Skip to content

Commit 53b58ac

Browse files
committed
update tests
1 parent f1a9524 commit 53b58ac

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

test-data/unit/check-python310.test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,7 @@ match m1:
17531753
m2: tuple[int, str] | tuple[float, str]
17541754
match m2:
17551755
case (a2, b2):
1756-
reveal_type(a2) # N: Revealed type is "Union[builtins.int, builtins.float]"
1756+
reveal_type(a2) # N: Revealed type is "builtins.int | builtins.float"
17571757
reveal_type(b2) # N: Revealed type is "builtins.str"
17581758

17591759
m3: tuple[int] | tuple[float, str]
@@ -1780,30 +1780,30 @@ match m5:
17801780
m6: tuple[int, Unpack[tuple[float, ...]]] | list[str]
17811781
match m6:
17821782
case (a6, b6):
1783-
reveal_type(a6) # N: Revealed type is "Union[builtins.int, builtins.float, builtins.str]"
1784-
reveal_type(b6) # N: Revealed type is "Union[builtins.int, builtins.float, builtins.str]"
1783+
reveal_type(a6) # N: Revealed type is "builtins.int | builtins.float | builtins.str"
1784+
reveal_type(b6) # N: Revealed type is "builtins.int | builtins.float | builtins.str"
17851785

17861786
# but do still separate types from non unpacked types
17871787
m7: tuple[int, Unpack[tuple[float, ...]]] | tuple[str, str]
17881788
match m7:
17891789
case (a7, b7, *rest7):
1790-
reveal_type(a7) # N: Revealed type is "Union[builtins.int, builtins.float, builtins.str]"
1791-
reveal_type(b7) # N: Revealed type is "Union[builtins.int, builtins.float, builtins.str]"
1792-
reveal_type(rest7) # N: Revealed type is "builtins.list[Union[builtins.int, builtins.float]]"
1790+
reveal_type(a7) # N: Revealed type is "builtins.int | builtins.float | builtins.str"
1791+
reveal_type(b7) # N: Revealed type is "builtins.int | builtins.float | builtins.str"
1792+
reveal_type(rest7) # N: Revealed type is "builtins.list[builtins.int | builtins.float]"
17931793

17941794
# verify that if we are unpacking, it will get the type of the sequence if the tuple is too short
17951795
m8: tuple[int, str] | list[float]
17961796
match m8:
17971797
case (a8, b8, *rest8):
1798-
reveal_type(a8) # N: Revealed type is "Union[builtins.float, builtins.int]"
1799-
reveal_type(b8) # N: Revealed type is "Union[builtins.float, builtins.str]"
1798+
reveal_type(a8) # N: Revealed type is "builtins.float | builtins.int"
1799+
reveal_type(b8) # N: Revealed type is "builtins.float | builtins.str"
18001800
reveal_type(rest8) # N: Revealed type is "builtins.list[builtins.float]"
18011801

18021802
m9: tuple[str, str, int] | tuple[str, str]
18031803
match m9:
18041804
case (a9, *rest9):
18051805
reveal_type(a9) # N: Revealed type is "builtins.str"
1806-
reveal_type(rest9) # N: Revealed type is "builtins.list[Union[builtins.str, builtins.int]]"
1806+
reveal_type(rest9) # N: Revealed type is "builtins.list[builtins.str | builtins.int]"
18071807

18081808
[builtins fixtures/tuple.pyi]
18091809

0 commit comments

Comments
 (0)