basedmypy
basedmypy copied to clipboard
generic bounds don't work with a generic tuple
from typing import Generic, TypeVar
from basedtyping import T
class Foo(Generic[T]): ...
U = TypeVar("U", bound=Foo[T])
class G(Generic[T]): ...
class C(G[tuple[U, T]]): ...
# error: Value of type variable "U" of "C" cannot be "int"
reveal_type(C[Foo[int], int])