Skip to content

Commit 670d756

Browse files
committed
fix on old python
1 parent 8573706 commit 670d756

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test-data/unit/check-typeis.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def f4(a: Union[List[int], int]) -> None:
174174
[case testTypeIsTupleGeneric]
175175
# flags: --warn-unreachable
176176
from __future__ import annotations
177-
from typing_extensions import TypeIs
177+
from typing_extensions import TypeIs, Unpack
178178

179179
class A: ...
180180
class B: ...
@@ -211,7 +211,7 @@ def test5(t: tuple[A | B, ...]) -> None:
211211
else:
212212
reveal_type(t) # N: Revealed type is "builtins.tuple[Union[__main__.A, __main__.B], ...]"
213213

214-
def test6(t: tuple[B, *tuple[A | B, ...], B]) -> None:
214+
def test6(t: tuple[B, Unpack[tuple[A | B, ...]], B]) -> None:
215215
if is_tuple_of_B(t):
216216
# Should this be tuple[B, *tuple[B, ...], B]
217217
reveal_type(t) # N: Revealed type is "tuple[__main__.B, Never, __main__.B]"

0 commit comments

Comments
 (0)