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
Copy file name to clipboardExpand all lines: test-data/unit/check-tuples.test
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1681,3 +1681,13 @@ def g(t: Tuple):
1681
1681
reveal_type(zip(*t)) # N: Revealed type is "typing.Iterator[builtins.tuple[Any, ...]]"
1682
1682
reveal_type(zip(t)) # N: Revealed type is "typing.Iterator[Tuple[Any]]"
1683
1683
[builtins fixtures/tuple.pyi]
1684
+
1685
+
[case testTupleSubclassSlice]
1686
+
from typing import Tuple
1687
+
1688
+
class A: ...
1689
+
1690
+
class tuple_aa_subclass(Tuple[A, A]): ...
1691
+
1692
+
inst_tuple_aa_subclass: tuple_aa_subclass = tuple_aa_subclass((A(), A()))[:] # E: Incompatible types in assignment (expression has type "Tuple[A, A]", variable has type "tuple_aa_subclass")
0 commit comments