8000 [3.12] gh-111151: Convert monospaced directives to :ref: (GH-111152) … · python/cpython@edff7c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit edff7c1

Browse files
gh-111151: Convert monospaced directives to :ref: (GH-111152) (cherry picked from commit 1198076) Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
1 parent df53191 commit edff7c1

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,8 @@ Opening network connections
661661
Creating network servers
662662
^^^^^^^^^^^^^^^^^^^^^^^^
663663

664+
.. _loop_create_server:
665+
664666
.. coroutinemethod:: loop.create_server(protocol_factory, \
665667
host=None, port=None, *, \
666668
family=socket.AF_UNSPEC, \
@@ -1191,6 +1193,8 @@ Working with pipes
11911193
Unix signals
11921194
^^^^^^^^^^^^
11931195

1196+
.. _loop_add_signal_handler:
1197+
11941198
.. method:: loop.add_signal_handler(signum, callback, *args)
11951199

11961200
Set *callback* as the handler for the *signum* signal.
@@ -1419,6 +1423,8 @@ async/await code consider using the high-level
14191423
:ref:`Subprocess Support on Windows <asyncio-windows-subprocess>` for
14201424
details.
14211425

1426+
.. _loop_subprocess_exec:
1427+
14221428
.. coroutinemethod:: loop.subprocess_exec(protocol_factory, *args, \
14231429
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
14241430
stderr=subprocess.PIPE, **kwargs)

Doc/library/asyncio.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ Additionally, there are **low-level** APIs for
4646
*library and framework developers* to:
4747

4848
* create and manage :ref:`event loops <asyncio-event-lo 8000 op>`, which
49-
provide asynchronous APIs for :meth:`networking <loop.create_server>`,
50-
running :meth:`subprocesses <loop.subprocess_exec>`,
51-
handling :meth:`OS signals <loop.add_signal_handler>`, etc;
49+
provide asynchronous APIs for :ref:`networking <loop_create_server>`,
50+
running :ref:`subprocesses <loop_subprocess_exec>`,
51+
handling :ref:`OS signals <loop_add_signal_handler>`, etc;
5252

5353
* implement efficient protocols using
5454
:ref:`transports <asyncio-transports-protocols>`;

Doc/library/typing.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ a callable with any arbitrary parameter list would be acceptable:
304304
x = concat # Also OK
305305

306306
``Callable`` cannot express complex signatures such as functions that take a
307-
variadic number of arguments, :func:`overloaded functions <overload>`, or
307+
variadic number of arguments, :ref:`overloaded functions <overload>`, or
308308
functions that have keyword-only parameters. However, these signatures can be
309309
expressed by defining a :class:`Protocol` class with a
310310
:meth:`~object.__call__` method:
@@ -526,7 +526,7 @@ A user-defined class can be defined as a generic class.
526526
self.logger.info('%s: %s', self.name, message)
527527

528528
This syntax indicates that the class ``LoggedVar`` is parameterised around a
529-
single :class:`type variable <TypeVar>` ``T`` . This also makes ``T`` valid as
529+
single :ref:`type variable <typevar>` ``T`` . This also makes ``T`` valid as
530530
a type within the class body.
531531

532532
Generic classes implicitly inherit from :class:`Generic`. For compatibility
@@ -1483,7 +1483,7 @@ These can be used as types in annotations. They all support subscription using
14831483
Typing operator to conceptually mark an object as having been unpacked.
14841484

14851485
For example, using the unpack operator ``*`` on a
1486-
:class:`type variable tuple <TypeVarTuple>` is equivalent to using ``Unpack``
1486+
:ref:`type variable tuple <typevartuple>` is equivalent to using ``Unpack``
14871487
to mark the type variable tuple as having been unpacked::
14881488

14891489
Ts = TypeVarTuple('Ts')
@@ -1574,6 +1574,8 @@ without the dedicated syntax, as documented below.
15741574
...
15751575
# Etc.
15761576

1577+
.. _typevar:
1578+
15771579
.. class:: TypeVar(name, *constraints, bound=None, covariant=False, contravariant=False, infer_variance=False)
15781580

15791581
Type variable.
@@ -1718,9 +1720,11 @@ without the dedicated syntax, as documented below.
17181720
:ref:`type parameter <type-params>` syntax introduced by :pep:`695`.
17191721
The ``infer_variance`` parameter was added.
17201722

1723+
.. _typevartuple:
1724+
17211725
.. class:: TypeVarTuple(name)
17221726

1723-
Type variable tuple. A specialized form of :class:`type variable <TypeVar>`
1727+
Type variable tuple. A specialized form of :ref:`type variable <typevar>`
17241728
that enables *variadic* generics.
17251729

17261730
Type variable tuples can be declared in :ref:`type parameter lists <type-params>`
@@ -1838,7 +1842,7 @@ without the dedicated syntax, as documented below.
18381842
.. class:: ParamSpec(name, *, bound=None, covariant=False, contravariant=False)
18391843

18401844
Parameter specification variable. A specialized version of
1841-
:class:`type variables <TypeVar>`.
1845+
:ref:`type variables <typevar>`.
18421846

18431847
In :ref:`type parameter lists <type-params>`, parameter specifications
18441848
can be declared with two asterisks (``**``)::
@@ -2749,6 +2753,8 @@ Functions and decorators
27492753

27502754
.. versionadded:: 3.11
27512755

2756+
.. _overload:
2757+
27522758
.. decorator:: overload
27532759

27542760
Decorator for creating overloaded functions and methods.

0 commit comments

Comments
 (0)
0