Skip to content

Commit 27c70f3

Browse files
authored
Fix uses of default role in the docs (#779)
1 parent c461223 commit 27c70f3

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ repos:
2020
rev: v1.0.2
2121
hooks:
2222
- id: sphinx-lint
23+
args: [--enable=default-role]
2324
- repo: https://github.com/python-jsonschema/check-jsonschema
2425
rev: 0.37.1
2526
hooks:

doc/index.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Python version in which each feature was added to :py:mod:`typing` and the
269269
- :pep:`673`
270270
* - :class:`sentinel`
271271
- 3.15
272-
- 4.14.0 (originally under the name `Sentinel`)
272+
- 4.14.0 (originally under the name ``Sentinel``)
273273
- :pep:`661`
274274
* - :class:`TypeAliasType`
275275
- 3.12
@@ -587,7 +587,7 @@ Special typing primitives
587587
``typing_extensions`` backports various bug fixes and improvements
588588
to ``TypedDict``.
589589

590-
Features backported by `typing_extensions` include:
590+
Features backported by ``typing_extensions`` include:
591591

592592
* :py:class:`typing.TypedDict` does not store runtime information about which
593593
(if any) keys are non-required in Python 3.8, and does not honor the
@@ -773,8 +773,8 @@ Special typing primitives
773773

774774
.. versionchanged:: 4.12.0
775775

776-
It is now disallowed to use a `TypeVar` with a default value after a
777-
`TypeVarTuple` in a type parameter list. This matches the CPython
776+
It is now disallowed to use a ``TypeVar`` with a default value after a
777+
``TypeVarTuple`` in a type parameter list. This matches the CPython
778778
implementation of PEP 696 on Python 3.13+.
779779

780780
.. versionchanged:: 4.16.0
@@ -1311,13 +1311,13 @@ Sentinel objects
13111311

13121312
- Sentinels can now be pickled. They are reduced as singletons, which
13131313
means that they also preserve their identity when copied or deep-copied.
1314-
- `Sentinel` has been renamed to `sentinel`. `Sentinel` is retained as a
1314+
- ``Sentinel`` has been renamed to ``sentinel``. ``Sentinel`` is retained as a
13151315
soft-deprecated alias, for backwards compatibility.
1316-
- The default repr of a sentinel `X = sentinel("X")` is now `X`, rather
1317-
than `<X>`.
1318-
- Passing `repr` as a positional argument to the constructor is deprecated.
1319-
- Passing `name` as a keyword argument to the constructor is deprecated.
1320-
- Subclassing `sentinel` is deprecated.
1316+
- The default repr of a sentinel ``X = sentinel("X")`` is now ``X``, rather
1317+
than ``<X>``.
1318+
- Passing ``repr`` as a positional argument to the constructor is deprecated.
1319+
- Passing ``name`` as a keyword argument to the constructor is deprecated.
1320+
- Subclassing ``sentinel`` is deprecated.
13211321
- Assigning arbitrary attributes to a sentinel is deprecated.
13221322

13231323

0 commit comments

Comments
 (0)