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

Skip to content

Commit 575bff3

Browse files
[3.11] gh-111151: Convert monospaced directives to :ref: (GH-111152) (#111270)
(cherry picked from commit 1198076) Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
1 parent c905fab commit 575bff3

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ Opening network connections
644644
Creating network servers
645645
^^^^^^^^^^^^^^^^^^^^^^^^
646646

647+
.. _loop_create_server:
648+
647649
.. coroutinemethod:: loop.create_server(protocol_factory, \
648650
host=None, port=None, *, \
649651
family=socket.AF_UNSPEC, \
@@ -1174,6 +1176,8 @@ Working with pipes
11741176
Unix signals
11751177
^^^^^^^^^^^^
11761178

1179+
.. _loop_add_signal_handler:
1180+
11771181
.. method:: loop.add_signal_handler(signum, callback, *args)
11781182

11791183
Set *callback* as the handler for the *signum* signal.
@@ -1393,6 +1397,8 @@ async/await code consider using the high-level
13931397
:ref:`Subprocess Support on Windows <asyncio-windows-subprocess>` for
13941398
details.
13951399

1400+
.. _loop_subprocess_exec:
1401+
13961402
.. coroutinemethod:: loop.subprocess_exec(protocol_factory, *args, \
13971403
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
13981404
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-loop>`, 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: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ a callable with any arbitrary parameter list would be acceptable:
290290
x = concat # Also OK
291291

292292
``Callable`` cannot express complex signatures such as functions that take a
293-
variadic number of arguments, :func:`overloaded functions <overload>`, or
293+
variadic number of arguments, :ref:`overloaded functions <overload>`, or
294294
functions that have keyword-only parameters. However, these signatures can be
295295
expressed by defining a :class:`Protocol` class with a< 10000 /div>
296296
:meth:`~object.__call__` method:
@@ -1424,7 +1424,7 @@ These can be used as types in annotations. They all support subscription using
14241424
Typing operator to conceptually mark an object as having been unpacked.
14251425

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

14301430
Ts = TypeVarTuple('Ts')
@@ -1479,6 +1479,8 @@ for creating generic types.
14791479
except KeyError:
14801480
return default
14811481

1482+
.. _typevar:
1483+
14821484
.. class:: TypeVar(name, *constraints, bound=None, covariant=False, contravariant=False)
14831485

14841486
Type variable.
@@ -1573,9 +1575,11 @@ for creating generic types.
15731575

15741576
A tuple containing the constraints of the type variable, if any.
15751577

1578+
.. _typevartuple:
1579+
15761580
.. class:: TypeVarTuple(name)
15771581

1578-
Type variable tuple. A specialized form of :class:`type variable <TypeVar>`
1582+
Type variable tuple. A specialized form of :ref:`type variable <typevar>`
15791583
that enables *variadic* generics.
15801584

15811585
Usage::
@@ -1686,7 +1690,7 @@ for creating generic types.
16861690
.. class:: ParamSpec(name, *, bound=None, covariant=False, contravariant=False)
16871691

16881692
Parameter specification variable. A specialized version of
1689-
:class:`type variables <TypeVar>`.
1693+
:ref:`type variables <typevar>`.
16901694

16911695
Usage::
16921696

@@ -2483,6 +2487,8 @@ Functions and decorators
24832487

24842488
.. versionadded:: 3.11
24852489

2490+
.. _overload:
2491+
24862492
.. decorator:: overload
24872493

24882494
Decorator for creating overloaded functions and methods.

0 commit comments

Comments
 (0)
0