From 2fbd013434e4dafc5fae99c85d94990d40397447 Mon Sep 17 00:00:00 2001 From: jiwaszki Date: Thu, 5 Sep 2024 23:59:11 +0200 Subject: [PATCH] Fix code formatting --- docs/advanced/exceptions.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/advanced/exceptions.rst b/docs/advanced/exceptions.rst index 970cf136f..a4a282162 100644 --- a/docs/advanced/exceptions.rst +++ b/docs/advanced/exceptions.rst @@ -333,9 +333,9 @@ Handling warnings from the Python C API Where possible, use :ref:`pybind11 warnings ` instead of calling the Python C API directly. The motivation is similar to previously mentioned errors. -All warnings categories are required to be a subclass of `PyExc_Warning` from Python C API. +All warnings categories are required to be a subclass of ``PyExc_Warning`` from Python C API. -Warnings can be raised with `warn` function: +Warnings can be raised with ``warn`` function: .. code-block:: cpp @@ -344,7 +344,7 @@ Warnings can be raised with `warn` function: // When calling `stack_level` can be specified as well. py::warnings::warn("Another one!", PyExc_DeprecationWarning, 3); -New warning types can be registered on the module level with `new_warning_type`: +New warning types can be registered on the module level with ``new_warning_type``: .. code-block:: cpp