Open IvanKirpichnikov opened 1 month ago
Here are a couple of workarounds:
from typing import TypeVar
T = TypeVar("T")
WithProtocols: TypeAlias = T
or
type WithProtocols[T] = T
Here are a couple of workarounds:
from typing import TypeVar T = TypeVar("T") WithProtocols: TypeAlias = T
or
type WithProtocols[T] = T
Unfortunately, pyright swears with such code :(
Here are a couple of workarounds:
from typing import TypeVar T = TypeVar("T") WithProtocols: TypeAlias = T
or
type WithProtocols[T] = T
Unfortunately, pyright swears with such code :(
oops, I confused it with Union[T]. Excuse me
But the above decision is not valid
To Reproduce
Expected Behavior I expected mypy not to swear
Actual behavior
error: Type application is only supported for generic classes [misc]
My environment mypy == 3.11.1 python == 3.11.8