Closed
Description
from typing import TypeVar
T = TypeVar('T')
V = TypeVar('V')
def identity(x: T) -> T: ...
def type_var_using_fn(x: V) -> None: ...
identity(type_var_using_fn)
has the confusing error:
test.py:10: error: Argument 1 to "identity" has incompatible type Callable[[V], None]; expected Callable[[V], None]
This is most commonly seen when decorating functions with TypeVars.