from typing import TypeVar, Generic, TypeAlias
T = TypeVar("T")
class Foo(Generic[T]):
bar: Bar[T]
class Bar(Generic[T]):
Foo: TypeAlias = Foo[T]
Your Environment
- Mypy version used: 1.8.0
- Mypy command-line flags: no
- Mypy configuration options from
mypy.ini (and other config files): default
- Python version used: 3.12.0
Your Environment
mypy.ini(and other config files): default