This issue is supposed to track when we can start to use the improved generics syntax introduced in Python 3.12 (PEP 695 in typeshed. Support is needed in released versions of:
As this is a syntax change, it's unlikely that we can add support before mypy drops support for running under Python 3.11 and below.
Example from the PEP:
class ClassA[T: str]:
def method1(self) -> T:
...
def func[T](a: T, b: T) -> T:
...
This issue is supposed to track when we can start to use the improved generics syntax introduced in Python 3.12 (PEP 695 in typeshed. Support is needed in released versions of:
As this is a syntax change, it's unlikely that we can add support before mypy drops support for running under Python 3.11 and below.
Example from the PEP: