We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d355ff4 commit c51f1c7Copy full SHA for c51f1c7
test-data/unit/check-classes.test
@@ -1751,6 +1751,16 @@ class Fraction(Real):
1751
[out]
1752
main:5: error: Signatures of "__radd__" of "Fraction" and "__add__" of "Real" are unsafely overlapping
1753
1754
+[case testUnsafeOverlappingTuple]
1755
+from typing import Tuple
1756
+
1757
+class Real(Tuple[int, int]):
1758
+ def __add__(self, other): return 1
1759
+class Fraction(Real):
1760
+ def __radd__(self, other: Real) -> Real: return other # E: Signatures of "__radd__" of "Fraction" and "__add__" of "Real" are unsafely overlapping
1761
1762
+[builtins fixtures/tuple.pyi]
1763
1764
[case testOverlappingNormalAndInplaceOperatorMethod]
1765
import typing
1766
class A:
0 commit comments