You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# E: Incompatible types in assignment (expression has type Tuple[int, int, ... <15 more items>], variable has type Tuple[int, int, ... <10 more items>])
1422
1422
1423
1423
[builtins fixtures/tuple.pyi]
1424
+
1425
+
[case testTupleWithStarExpr]
1426
+
from typing import Tuple, List
1427
+
points = (1, "test") # type: Tuple[int, str]
1428
+
x, y, z = *points, 0
1429
+
reveal_type(x) # N: Revealed type is 'builtins.int'
1430
+
reveal_type(y) # N: Revealed type is 'builtins.str'
1431
+
reveal_type(z) # N: Revealed type is 'builtins.int'
1432
+
1433
+
points2 = [1,2]
1434
+
x2, y2, z2= *points2, "test"
1435
+
1436
+
reveal_type(x2) # N: Revealed type is 'builtins.int*'
1437
+
reveal_type(y2) # N: Revealed type is 'builtins.int*'
1438
+
reveal_type(z2) # N: Revealed type is 'builtins.str'
1439
+
1440
+
x3, x4, y3, y4, z3 = *points, *points2, "test"
1441
+
1442
+
reveal_type(x3) # N: Revealed type is 'builtins.int'
1443
+
reveal_type(x4) # N: Revealed type is 'builtins.str'
1444
+
reveal_type(y3) # N: Revealed type is 'builtins.int*'
1445
+
reveal_type(y4) # N: Revealed type is 'builtins.int*'
1446
+
reveal_type(z3) # N: Revealed type is 'builtins.str'
1447
+
1448
+
x5, x6, y5, y6, z4 = *points2, *points2, "test"
1449
+
1450
+
reveal_type(x5) # N: Revealed type is 'builtins.int*'
1451
+
reveal_type(x6) # N: Revealed type is 'builtins.int*'
1452
+
reveal_type(y5) # N: Revealed type is 'builtins.int*'
1453
+
reveal_type(y6) # N: Revealed type is 'builtins.int*'
1454
+
reveal_type(z4) # N: Revealed type is 'builtins.str'
1455
+
1456
+
points3 = ["test1", "test2"]
1457
+
x7, x8, y7, y8 = *points2, *points3 # E: Contiguous iterable with same type expected
1458
+
1459
+
x9, y9, x10, y10, z5 = *points2, 1, *points2 # E: Contiguous iterable with same type expected
0 commit comments