Skip to content

Commit

Permalink
Docs: revert from typing to typing_extensions when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimaio committed Feb 29, 2024
1 parent 8453b10 commit d4366a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/error_code_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ This produces the following output from mypy:
.. code-block:: text
example.py:3: error: "bool" is invalid as return type for "__exit__" that always returns False
example.py:3: note: Use "typing.Literal[False]" as the return type or change it to
example.py:3: note: Use "typing_extensions.Literal[False]" as the return type or change it to
"None"
example.py:3: note: If return type of "__exit__" implies that it may return True, the context
manager may swallow exceptions
Expand Down
2 changes: 1 addition & 1 deletion docs/source/error_code_list2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ Correct usage:
.. code-block:: python
# Use "mypy --enable-error-code unimported-reveal"
from typing import reveal_type # "from typing_extensions" in Python 3.10 and earlier
from typing import reveal_type # or `typing_extensions`
x = 1
# This won't raise an error:
Expand Down

0 comments on commit d4366a9

Please sign in to comment.