@@ -1218,56 +1218,6 @@ td4 = C({"fn": bad, "val": False}) # E: Incompatible types (expression has type
12181218[builtins fixtures/dict.pyi]
12191219[typing fixtures/typing-typeddict.pyi]
12201220
1221- [case testVariadicTypedDictDeriveStar]
1222- from typing import Tuple, Callable, Generic, TypedDict, TypeVar
1223- from typing_extensions import TypeVarTuple
1224-
1225- T = TypeVar("T")
1226- Ts = TypeVarTuple("Ts")
1227- class A(TypedDict, Generic[*Ts]):
1228- fn: Callable[[*Ts], None]
1229-
1230- class B(A[*Ts]):
1231- val: bool
1232-
1233- class C(A[*Ts], Generic[*Ts, T]):
1234- val: T
1235-
1236-
1237- y: B[int, str]
1238- reveal_type(y) # N: Revealed type is "TypedDict('__main__.B', {'fn': def (builtins.int, builtins.str), 'val': builtins.bool})"
1239- reveal_type(y["fn"]) # N: Revealed type is "def (builtins.int, builtins.str)"
1240- reveal_type(y["val"]) # N: Revealed type is "builtins.bool"
1241-
1242- y2: C[int, str, bool]
1243- reveal_type(y2) # N: Revealed type is "TypedDict('__main__.C', {'fn': def (builtins.int, builtins.str), 'val': builtins.bool})"
1244- reveal_type(y2["fn"]) # N: Revealed type is "def (builtins.int, builtins.str)"
1245- reveal_type(y2["val"]) # N: Revealed type is "builtins.bool"
1246-
1247- z: B[*Tuple[int, ...]]
1248- reveal_type(z) # N: Revealed type is "TypedDict('__main__.B', {'fn': def (*builtins.int), 'val': builtins.bool})"
1249- reveal_type(z["fn"]) # N: Revealed type is "def (*builtins.int)"
1250- reveal_type(y["val"]) # N: Revealed type is "builtins.bool"
1251-
1252- z2: C[*Tuple[int, ...]]
1253- reveal_type(z2) # N: Revealed type is "TypedDict('__main__.C', {'fn': def (*builtins.int), 'val': builtins.int})"
1254- reveal_type(z2["fn"]) # N: Revealed type is "def (*builtins.int)"
1255- reveal_type(z2["val"]) # N: Revealed type is "builtins.int"
1256-
1257- z3: C[*Tuple[int, ...], bool]
1258- reveal_type(z3) # N: Revealed type is "TypedDict('__main__.C', {'fn': def (*builtins.int), 'val': builtins.bool})"
1259- reveal_type(z3["fn"]) # N: Revealed type is "def (*builtins.int)"
1260- reveal_type(z3["val"]) # N: Revealed type is "builtins.bool"
1261-
1262- t: B[int, *Tuple[int, str]]
1263- reveal_type(t) # N: Revealed type is "TypedDict('__main__.B', {'fn': def (builtins.int, builtins.int, builtins.str), 'val': builtins.bool})"
1264-
1265- t2: C[int, *Tuple[int, str]]
1266- reveal_type(t2) # N: Revealed type is "TypedDict('__main__.C', {'fn': def (builtins.int, builtins.int), 'val': builtins.str})"
1267-
1268- [builtins fixtures/dict.pyi]
1269- [typing fixtures/typing-typeddict.pyi]
1270-
12711221[case testFixedUnpackWithRegularInstance]
12721222from typing import Tuple, Generic, TypeVar
12731223from typing_extensions import Unpack
0 commit comments