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

Skip to content

Commit 1198076

Browse files
gh-111151: Convert monospaced directives to :ref: (#111152)
1 parent 9bb202a commit 1198076

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-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: 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
@@ -1493,7 +1493,7 @@ These can be used as types in annotations. They all support subscription using
14931493
Typing operator to conceptually mark an object as having been unpacked.
14941494

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

14991499
Ts = TypeVarTuple('Ts')
@@ -1584,6 +1584,8 @@ without the dedicated syntax, as documented below.
15841584
...
15851585
# Etc.
15861586

1587+
.. _typevar:
1588+
15871589
.. class:: TypeVar(name, *constraints, bound=None, covariant=False, contravariant=False, infer_variance=False)
15881590

15891591
Type variable.
@@ -1728,9 +1730,11 @@ without the dedicated syntax, as documented below.
17281730
:ref:`type parameter <type-params>` syntax introduced by :pep:`695`.
17291731
The ``infer_variance`` parameter was added.
17301732

1733+
.. _typevartuple:
1734+
17311735
.. class:: TypeVarTuple(name)
17321736

1733-
Type variable tuple. A specialized form of :class:`type variable <TypeVar>`
1737< 6D47 /td>+
Type variable tuple. A specialized form of :ref:`type variable <typevar>`
17341738
that enables *variadic* generics.
17351739

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

18501854
Parameter specification variable. A specialized version of
1851-
:class:`type variables <TypeVar>`.
1855+
:ref:`type variables <typevar>`.
18521856

18531857
In :ref:`type parameter lists <type-params>`, parameter specifications
18541858
can be declared with two asterisks (``**``)::
@@ -2772,6 +2776,8 @@ Functions and decorators
27722776

27732777
.. versionadded:: 3.11
27742778

2779+
.. _overload:
2780+
27752781
.. decorator:: overload
27762782

27772783
Decorator for creating overloaded functions and methods.

0 commit comments

Comments
 (0)
0