Skip to content

Commit 7c5e767

Browse files
authored
Fix broken headers (#1171)
1 parent 8817cb3 commit 7c5e767

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

docs/source/libraries.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ is obvious from the context:
294294
``__slots__``.
295295

296296
Examples of known and unknown types
297-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298298

299299
.. code:: python
300300
@@ -402,7 +402,7 @@ Best Practices for Inlined Types
402402
================================
403403

404404
Wide vs. Narrow Types
405-
~~~~~~~~~~~~~~~~~~~~~
405+
---------------------
406406

407407
In type theory, when comparing two types that are related to each other,
408408
the “wider” type is the one that is more general, and the “narrower”
@@ -433,7 +433,7 @@ parameter typed as ``List[Union[str, int]]`` is much more restrictive
433433
and accepts only a ``List[Union[str, int]]``.
434434

435435
Overloads
436-
~~~~~~~~~
436+
---------
437437

438438
If a function or method can return multiple different types and those
439439
types can be determined based on the presence or types of certain
@@ -443,7 +443,7 @@ are used within a “.py” file, they must appear prior to the function
443443
implementation, which should not have an ``@overload`` decorator.
444444

445445
Keyword-only Parameters
446-
~~~~~~~~~~~~~~~~~~~~~~~
446+
-----------------------
447447

448448
If a function or method is intended to take parameters that are
449449
specified only by name, use the keyword-only separator (``*``).
@@ -454,7 +454,7 @@ specified only by name, use the keyword-only separator (``*``).
454454
...
455455
456456
Annotating Decorators
457-
~~~~~~~~~~~~~~~~~~~~~
457+
---------------------
458458

459459
Decorators modify the behavior of a class or a function. Providing
460460
annotations for decorators is straightforward if the decorator retains
@@ -491,7 +491,7 @@ provide signature assistance. As such, library authors are discouraged
491491
from creating decorators that mutate function signatures in this manner.
492492

493493
Generic Classes and Functions
494-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
494+
-----------------------------
495495

496496
Classes and functions that can operate in a generic manner on various
497497
types should declare themselves as generic using the mechanisms
@@ -501,7 +501,7 @@ should be private to the file that declares it, and should therefore
501501
begin with an underscore.
502502

503503
Type Aliases
504-
~~~~~~~~~~~~
504+
------------
505505

506506
Type aliases are symbols that refer to other types. Generic type aliases
507507
(those that refer to unspecialized generic classes) are supported by
@@ -526,7 +526,7 @@ annotation.
526526
StrOrInt: TypeAlias = Union[str, int]
527527
528528
Abstract Classes and Methods
529-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
529+
----------------------------
530530

531531
Classes that must be subclassed should derive from ``ABC``, and methods
532532
or properties that must be overridden should be decorated with the
@@ -553,7 +553,7 @@ exception.
553553
raise NotImplementedError()
554554
555555
Final Classes and Methods
556-
~~~~~~~~~~~~~~~~~~~~~~~~~
556+
-------------------------
557557

558558
Classes that are not intended to be subclassed should be decorated as
559559
``@final`` as described in `PEP
@@ -562,15 +562,15 @@ can also be used to specify methods that cannot be overridden by
562562
subclasses.
563563

564564
Literals
565-
~~~~~~~~
565+
--------
566566

567567
Type annotations should make use of the Literal type where appropriate,
568568
as described in `PEP 586 <https://www.python.org/dev/peps/pep-0586/>`__.
569569
Literals allow for more type specificity than their non-literal
570570
counterparts.
571571

572572
Constants
573-
~~~~~~~~~
573+
---------
574574

575575
Constant values (those that are read-only) can be specified using the
576576
Final annotation as described in `PEP
@@ -601,7 +601,7 @@ type annotation would be redundant.
601601
LATEST_VERSION: Final[Tuple[int, int]] = (4, 5)
602602
603603
Typed Dictionaries, Data Classes, and Named Tuples
604-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
604+
--------------------------------------------------
605605

606606
If your library runs only on newer versions of Python, you are
607607
encouraged to use some of the new type-friendly classes.
@@ -628,7 +628,7 @@ section documents several techniques that can be used to add types while
628628
maintaining backward compatibility.
629629

630630
Quoted Annotations
631-
~~~~~~~~~~~~~~~~~~
631+
------------------
632632

633633
Type annotations for variables, parameters, and return types can be
634634
placed in quotes. The Python interpreter will then ignore them, whereas
@@ -643,7 +643,7 @@ a type checker will interpret them as type annotations.
643643
return self._config
644644
645645
Type Comment Annotations
646-
~~~~~~~~~~~~~~~~~~~~~~~~
646+
------------------------
647647

648648
Python 3.0 introduced syntax for parameter and return type annotations,
649649
as specified in `PEP 484 <https://www.python.org/dev/peps/pep-0484/>`__.
@@ -678,15 +678,15 @@ type: .
678678
...
679679
680680
typing_extensions
681-
~~~~~~~~~~~~~~~~~
681+
-----------------
682682

683683
New type features that require runtime support are typically included in
684684
the stdlib ``typing`` module. Where possible, these new features are
685685
back-ported to a runtime library called ``typing_extensions`` that works
686686
with older Python runtimes.
687687

688688
TYPE_CHECKING
689-
~~~~~~~~~~~~~
689+
-------------
690690

691691
The ``typing`` module exposes a variable called ``TYPE_CHECKING`` which
692692
has a value of False within the Python runtime but a value of True when

docs/source/unreachable.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ You can also use ``assert_never()`` with a sequence of ``if`` statements:
9999
assert_never(op)
100100
101101
Marking Code as Unreachable
102-
=======================
102+
===========================
103103

104104
Sometimes a piece of code is unreachable, but the type system is not
105105
powerful enough to recognize that. For example, consider a function that

0 commit comments

Comments
 (0)