Skip to content

Commit 73a5b3c

Browse files
authored
Small doc improvements for conditional overloads (#12283)
1 parent 0777c10 commit 73a5b3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/source/more_types.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ For example, there must be at least two overloads.
593593

594594
Mypy can only infer a limited number of conditions.
595595
Supported ones currently include :py:data:`~typing.TYPE_CHECKING`, ``MYPY``,
596-
:ref:`version_and_platform_checks`, and :option:`--always-true <mypy --always-true>`
596+
:ref:`version_and_platform_checks`, :option:`--always-true <mypy --always-true>`,
597597
and :option:`--always-false <mypy --always-false>` values.
598598

599599
.. code-block:: python
@@ -666,7 +666,8 @@ For example, there must be at least two overloads.
666666
The overloads for ``A`` and ``C`` are ignored!
667667
The overload for ``D`` is not defined conditionally and thus is also added.
668668

669-
When mypy cannot infer a condition to be always True or always False, an error is emitted.
669+
When mypy cannot infer a condition to be always ``True`` or always ``False``,
670+
an error is emitted.
670671

671672
.. code-block:: python
672673

0 commit comments

Comments
 (0)