Skip to content

Commit 1121925

Browse files
authored
Refactor test case for generic type alias unpacking
Removed xfail marker from test case and updated comments for clarity.
1 parent 2676b24 commit 1121925

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

test-data/unit/check-type-aliases.test

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,18 +1237,17 @@ Ta2 = TypeAliasType("Ta2", None, type_params=(Unpack[Ts],)) # E: Free type vari
12371237

12381238
[builtins fixtures/tuple.pyi]
12391239

1240-
[case testGenericTypeAliasArgOfTypeAliasIsUnpackedTuple-xfail]
1240+
[case testGenericTypeAliasArgOfTypeAliasIsUnpackedTuple]
12411241
from typing_extensions import TypeAlias
12421242
from typing import TypeVarTuple, Unpack
12431243

12441244
Ts = TypeVarTuple('Ts')
12451245

12461246
TA: TypeAlias = tuple[Unpack[Ts]]
12471247

1248-
# For Python 3.10, error: Invalid syntax
1249-
# For other Python, error: "list[int]" cannot be unpacked (must be tuple or TypeVarTuple)
1250-
v1: TA[*list[int]]
1251-
v2: TA[Unpack[list[int]]]
1248+
v1: TA[*list[int]] # E: "list[int]" cannot be unpacked (must be tuple or TypeVarTuple)
1249+
v2: TA[Unpack[list[int]]] # E: "list[int]" cannot be unpacked (must be tuple or TypeVarTuple)
1250+
# python3.10: Invalid syntax
12521251
[builtins fixtures/tuple.pyi]
12531252

12541253
[case testAliasInstanceNameClash]

0 commit comments

Comments
 (0)