Open
Description
Feature
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.