Skip to content

Commit 4f006ff

Browse files
miss-islingtonrffontenelleAA-Turner
authored
[3.13] Apply 'mod' role to typing module (GH-133201) (#133217)
Apply 'mod' role to typing module (GH-133201) (cherry picked from commit 2b67db7) Co-authored-by: Rafael Fontenelle <[email protected]> Co-authored-by: Adam Turner <[email protected]>
1 parent 110bec8 commit 4f006ff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/library/typing.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ through a simple assignment::
665665
User-defined generics for parameter expressions are also supported via parameter
666666
specification variables in the form ``[**P]``. The behavior is consistent
667667
with type variables' described above as parameter specification variables are
668-
treated by the typing module as a specialized type variable. The one exception
668+
treated by the :mod:`!typing` module as a specialized type variable. The one exception
669669
to this is that a list of types can be used to substitute a :class:`ParamSpec`::
670670

671671
>>> class Z[T, **P]: ... # T is a TypeVar; P is a ParamSpec
@@ -706,7 +706,7 @@ are intended primarily for static type checking.
706706

707707
A user-defined generic class can have ABCs as base classes without a metaclass
708708
conflict. Generic metaclasses are not supported. The outcome of parameterizing
709-
generics is cached, and most types in the typing module are :term:`hashable` and
709+
generics is cached, and most types in the :mod:`!typing` module are :term:`hashable` and
710710
comparable for equality.
711711

712712

@@ -2685,7 +2685,7 @@ types.
26852685
Protocols
26862686
---------
26872687

2688-
The following protocols are provided by the typing module. All are decorated
2688+
The following protocols are provided by the :mod:`!typing` module. All are decorated
26892689
with :func:`@runtime_checkable <runtime_checkable>`.
26902690

26912691
.. class:: SupportsAbs
@@ -3384,7 +3384,7 @@ Deprecated aliases
33843384
------------------
33853385

33863386
This module defines several deprecated aliases to pre-existing
3387-
standard library classes. These were originally included in the typing
3387+
standard library classes. These were originally included in the :mod:`!typing`
33883388
module in order to support parameterizing these generic classes using ``[]``.
33893389
However, the aliases became redundant in Python 3.9 when the
33903390
corresponding pre-existing classes were enhanced to support ``[]`` (see
@@ -3397,7 +3397,7 @@ interpreter for these aliases.
33973397

33983398
If at some point it is decided to remove these deprecated aliases, a
33993399
deprecation warning will be issued by the interpreter for at least two releases
3400-
prior to removal. The aliases are guaranteed to remain in the typing module
3400+
prior to removal. The aliases are guaranteed to remain in the :mod:`!typing` module
34013401
without deprecation warnings until at least Python 3.14.
34023402

34033403
Type checkers are encouraged to flag uses of the deprecated types if the

0 commit comments

Comments
 (0)