@@ -118,6 +118,7 @@ def func_c1(x: Union[int, Callable[[Unpack[Ts1]], None]]) -> Tuple[Unpack[Ts1]]:
118118[builtins fixtures/tuple.pyi]
119119
120120[case testTypeVarDefaultsClass1]
121+ # flags: --disallow-any-generics
121122from typing import Generic, TypeVar, Union, overload
122123
123124T1 = TypeVar("T1")
@@ -149,7 +150,7 @@ def func_a1(
149150class ClassA2(Generic[T1, T2, T3]): ...
150151
151152def func_a2(
152- a: ClassA2,
153+ a: ClassA2, # E: Missing type parameters for generic type "ClassA2"
153154 b: ClassA2[float],
154155 c: ClassA2[float, float],
155156 d: ClassA2[float, float, float],
@@ -180,7 +181,7 @@ class ClassA3(Generic[T1, T2]):
180181 def __init__(self, var: Union[int, None] = None) -> None: ...
181182
182183def func_a3(
183- a: ClassA3,
184+ a: ClassA3, # E: Missing type parameters for generic type "ClassA3"
184185 b: ClassA3[float],
185186 c: ClassA3[float, float],
186187 d: ClassA3[float, float, float], # E: "ClassA3" expects between 1 and 2 type arguments, but 3 given
@@ -200,6 +201,7 @@ def func_a3(
200201 reveal_type(n) # N: Revealed type is "Any"
201202
202203[case testTypeVarDefaultsClass2]
204+ # flags: --disallow-any-generics
203205from typing import Generic, ParamSpec
204206
205207P1 = ParamSpec("P1")
@@ -231,7 +233,7 @@ def func_b1(
231233class ClassB2(Generic[P1, P2]): ...
232234
233235def func_b2(
234- a: ClassB2,
236+ a: ClassB2, # E: Missing type parameters for generic type "ClassB2"
235237 b: ClassB2[[float]],
236238 c: ClassB2[[float], [float]],
237239 d: ClassB2[[float], [float], [float]], # E: "ClassB2" expects between 1 and 2 type arguments, but 3 given
@@ -251,6 +253,7 @@ def func_b2(
251253 reveal_type(n) # N: Revealed type is "Any"
252254
253255[case testTypeVarDefaultsClass3]
256+ # flags: --disallow-any-generics
254257from typing import Generic, Tuple, TypeVar
255258from typing_extensions import TypeVarTuple, Unpack
256259
@@ -315,7 +318,7 @@ def func_c3(
315318class ClassC4(Generic[T1, Unpack[Ts1], T3]): ...
316319
317320def func_c4(
318- a: ClassC4,
321+ a: ClassC4, # E: Missing type parameters for generic type "ClassC4"
319322 b: ClassC4[int],
320323 c: ClassC4[int, float],
321324) -> None:
0 commit comments