Closed
Description
from typing import _T as T, Callable, Generic, TypeVar
class A(Generic[T]):
def f(self) -> None: ...
c: Callable[[A[int]], None]
c = A.f
c = A[int].f # error: Incompatible types in assignment (expression has type "(A[T]) -> None", variable has type "(A[int]) -> None")
expression has type "(A[T]) -> None"
Uhhhh, I don't think it does...
Mypy in Real Life
class B(A[int]): ...
# some higher order method
foo(list_of_b, B.f) # error