-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published version
Description
Describe the bug
TypeVar(bound=...)
are not detected by reportInvalidTypeVarUse when nested in Tuple/Type.
To Reproduce
I would expect that testE and testD create an error.
from typing import Tuple, Type, TypeVar
Bound = TypeVar("Bound", bound=int)
Unbound = TypeVar("Unbound")
def testA() -> Tuple[Unbound, ...]: # error
...
def testB() -> Tuple[Type[Unbound], ...]: # error
...
def testC() -> Unbound: # error
...
def testD() -> Tuple[Bound, ...]: # no error!
...
def testE() -> Tuple[Type[Bound], ...]: # no error!
...
def testF() -> Bound: # error
...
Additional context
https://github.com/pandas-dev/pandas/pull/43752/files#r716224377
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published version