Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored Nov 18, 2022
1 parent 949ff11 commit 15c37df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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, cast
from typing import Any, Callable, TypeVar, cast
F = TypeVar('F', bound=Callable[..., Any])
Expand All @@ -650,8 +650,8 @@ and that would enable the following type checks:

.. code-block:: python
reveal_type(a) # int
add_forty_two('x') # Type check error: incompatible type "str"; expected "int"
reveal_type(a) # Revealed type is "builtins.int"
add_forty_two('x') # Argument 1 to "add_forty_two" has incompatible type "str"; expected "int"
Note that the ``wrapper()`` function is not type-checked. Wrapper
Expand Down

0 comments on commit 15c37df

Please sign in to comment.