Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/generics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ Before parameter specifications, here's how one might have annotated the decorat

.. code-block:: python

from typing import Callable, TypeVar
from typing import Callable, TypeVar, cast
Comment thread
hauntsaninja marked this conversation as resolved.
Outdated

F = TypeVar('F', bound=Callable[..., Any])

Expand All @@ -650,7 +650,7 @@ and that would enable the following type checks:

.. code-block:: python

reveal_type(a) # str
reveal_type(a) # int
add_forty_two('x') # Type check error: incompatible type "str"; expected "int"
Comment thread
hauntsaninja marked this conversation as resolved.
Outdated


Expand Down