We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68df89a commit 8f4a237Copy full SHA for 8f4a237
test-data/unit/semanal-errors.test
@@ -1072,6 +1072,9 @@ class C(Generic[T]):
1072
Bad = TypeVar("Bad", int, List[T]) # E: TypeVar constraint type cannot be parametrized by type variables
1073
class D:
1074
Bad = TypeVar("Bad", int, List[Self]) # E: TypeVar constraint type cannot be parametrized by type variables
1075
+S = TypeVar("S", int, List[T]) # E: Type variable "__main__.T" is unbound \
1076
+ # N: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) \
1077
+ # N: (Hint: Use "T" in function signature to bind "T" inside a function)
1078
1079
[case testInvalidTypevarValues]
1080
from typing import TypeVar
0 commit comments