Skip to content

Commit b2db1c2

Browse files
CAM-Gerlachhugovk
andauthored
[3.10] Docs: Fix backtick errors found by sphinx-lint (GH-97998) (#98373)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>. (cherry picked from commit fa2d43e) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
1 parent 3adf234 commit b2db1c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+81
-89
lines changed

Doc/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Available make targets are:
9191

9292
* "pydoc-topics", which builds a Python module containing a dictionary with
9393
plain text documentation for the labels defined in
94-
`tools/pyspecific.py` -- pydoc needs these to show topic and keyword help.
94+
``tools/pyspecific.py`` -- pydoc needs these to show topic and keyword help.
9595

9696
* "suspicious", which checks the parsed markup for text that looks like
9797
malformed and thus unconverted reST.

Doc/c-api/init.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1722,7 +1722,7 @@ is not possible due to its implementation being opaque at build time.
17221722
Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after
17231723
first calling :c:func:`PyThread_tss_delete` to ensure any associated
17241724
thread locals have been unassigned. This is a no-op if the *key*
1725-
argument is `NULL`.
1725+
argument is ``NULL``.
17261726
17271727
.. note::
17281728
A freed key becomes a dangling pointer. You should reset the key to

Doc/c-api/type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Type Objects
4040
.. c:function:: unsigned long PyType_GetFlags(PyTypeObject* type)
4141
4242
Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This function is primarily
43-
meant for use with `Py_LIMITED_API`; the individual flag bits are
43+
meant for use with ``Py_LIMITED_API``; the individual flag bits are
4444
guaranteed to be stable across Python releases, but access to
4545
:c:member:`~PyTypeObject.tp_flags` itself is not part of the limited API.
4646

Doc/faq/design.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Why can't I use an assignment in an expression?
155155

156156
Starting in Python 3.8, you can!
157157

158-
Assignment expressions using the walrus operator `:=` assign a variable in an
158+
Assignment expressions using the walrus operator ``:=`` assign a variable in an
159159
expression::
160160

161161
while chunk := fp.read(200):

Doc/howto/logging.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,14 +552,14 @@ raw message. If there is no date format string, the default date format is:
552552
553553
%Y-%m-%d %H:%M:%S
554554
555-
with the milliseconds tacked on at the end. The ``style`` is one of `%`, '{'
556-
or '$'. If one of these is not specified, then '%' will be used.
555+
with the milliseconds tacked on at the end. The ``style`` is one of ``'%'``,
556+
``'{'``, or ``'$'``. If one of these is not specified, then ``'%'`` will be used.
557557

558-
If the ``style`` is '%', the message format string uses
558+
If the ``style`` is ``'%'``, the message format string uses
559559
``%(<dictionary key>)s`` styled string substitution; the possible keys are
560-
documented in :ref:`logrecord-attributes`. If the style is '{', the message
560+
documented in :ref:`logrecord-attributes`. If the style is ``'{'``, the message
561561
format string is assumed to be compatible with :meth:`str.format` (using
562-
keyword arguments), while if the style is '$' then the message format string
562+
keyword arguments), while if the style is ``'$'`` then the message format string
563563
should conform to what is expected by :meth:`string.Template.substitute`.
564564

565565
.. versionchanged:: 3.2

Doc/install/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ And on Windows, the configuration files are:
761761
+--------------+-------------------------------------------------+-------+
762762

763763
On all platforms, the "personal" file can be temporarily disabled by
764-
passing the `--no-user-cfg` option.
764+
passing the ``--no-user-cfg`` option.
765765

766766
Notes:
767767

Doc/library/asyncio-protocol.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ accept factories that return streaming protocols.
553553
a connection is open.
554554

555555
However, :meth:`protocol.eof_received() <Protocol.eof_received>`
556-
is called at most once. Once `eof_received()` is called,
556+
is called at most once. Once ``eof_received()`` is called,
557557
``data_received()`` is not called anymore.
558558

559559
.. method:: Protocol.eof_received()

Doc/library/asyncio-task.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,17 +707,17 @@ Running in Threads
707707
# blocking_io complete at 19:50:54
708708
# finished main at 19:50:54
709709

710-
Directly calling `blocking_io()` in any coroutine would block the event loop
710+
Directly calling ``blocking_io()`` in any coroutine would block the event loop
711711
for its duration, resulting in an additional 1 second of run time. Instead,
712-
by using `asyncio.to_thread()`, we can run it in a separate thread without
712+
by using ``asyncio.to_thread()``, we can run it in a separate thread without
713713
blocking the event loop.
714714

715715
.. note::
716716

717-
Due to the :term:`GIL`, `asyncio.to_thread()` can typically only be used
717+
Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used
718718
to make IO-bound functions non-blocking. However, for extension modules
719719
that release the GIL or alternative Python implementations that don't
720-
have one, `asyncio.to_thread()` can also be used for CPU-bound functions.
720+
have one, ``asyncio.to_thread()`` can also be used for CPU-bound functions.
721721

722722
.. versionadded:: 3.9
723723

Doc/library/bdb.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ The :mod:`bdb` module also defines two classes:
143143

144144
For real file names, the canonical form is an operating-system-dependent,
145145
:func:`case-normalized <os.path.normcase>` :func:`absolute path
146-
<os.path.abspath>`. A *filename* with angle brackets, such as `"<stdin>"`
146+
<os.path.abspath>`. A *filename* with angle brackets, such as ``"<stdin>"``
147147
generated in interactive mode, is returned unchanged.
148148

149149
.. method:: reset()

Doc/library/bz2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Incremental (de)compression
206206
will be set to ``True``.
207207

208208
Attempting to decompress data after the end of stream is reached
209-
raises an `EOFError`. Any data found after the end of the
209+
raises an :exc:`EOFError`. Any data found after the end of the
210210
stream is ignored and saved in the :attr:`~.unused_data` attribute.
211211

212212
.. versionchanged:: 3.5
@@ -303,7 +303,7 @@ Using :class:`BZ2Compressor` for incremental compression:
303303
>>> out = out + comp.flush()
304304

305305
The example above uses a very "nonrandom" stream of data
306-
(a stream of `b"z"` chunks). Random data tends to compress poorly,
306+
(a stream of ``b"z"`` chunks). Random data tends to compress poorly,
307307
while ordered, repetitive data usually yields a high compression ratio.
308308

309309
Writing and reading a bzip2-compressed file in binary mode:

0 commit comments

Comments
 (0)