You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes a user less familiar with more advanced typing concepts will use a TypeVar in a way that doesn't add any typing information.
As an example: def foo() -> T:
I think, basically, anytime a TypeVar appears only 1 time in a function (or class) definition, this should be treated as an error.
Pitch
Code like this seems like an obvious sign the user has misunderstood TypeVar, and a warning should probably be emitted. They either want a normal type, or they missed an annotation somewhere.