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: conformance/results/mypy/overloads_invalid.toml
+21-11
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ Does not allow an overload with no implementation in an abstract base class.
5
5
"""
6
6
errors_diff = """
7
7
Line 49: Unexpected errors ['overloads_invalid.py:49: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]']
8
+
Line 199: Unexpected errors ['overloads_invalid.py:199: error: Signature of "good_override" incompatible with supertype "Base" [override]']
8
9
"""
9
10
output = """
10
11
overloads_invalid.py:14: error: Single overload definition, multiple required [misc]
@@ -15,15 +16,24 @@ overloads_invalid.py:78: error: Overload does not consistently use the "@staticm
15
16
overloads_invalid.py:88: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc]
16
17
overloads_invalid.py:88: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc]
17
18
overloads_invalid.py:91: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc]
18
-
overloads_invalid.py:127: error: @final should be applied only to overload implementation [misc]
19
-
overloads_invalid.py:139: error: @final should be applied only to overload implementation [misc]
20
-
overloads_invalid.py:155: error: Cannot override final attribute "final_method" (previously declared in base class "Base") [misc]
21
-
overloads_invalid.py:155: error: Signature of "final_method" incompatible with supertype "Base" [override]
22
-
overloads_invalid.py:155: note: Superclass:
23
-
overloads_invalid.py:155: note: @overload
24
-
overloads_invalid.py:155: note: def final_method(self, x: int) -> int
Line 40: Unexpected errors ['overloads_invalid.py:40:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.']
10
10
Line 51: Unexpected errors ['overloads_invalid.py:51:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.']
11
-
Line 124: Unexpected errors ['overloads_invalid.py:124:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
11
+
Line 128: Unexpected errors ['overloads_invalid.py:128:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
12
+
Line 208: Unexpected errors ['overloads_invalid.py:208:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
12
13
"""
13
14
output = """
14
15
overloads_invalid.py:15:0 Incompatible overload [43]: At least two overload signatures must be present.
@@ -21,7 +22,10 @@ overloads_invalid.py:85:4 Incompatible overload [43]: The implementation of `C.f
21
22
overloads_invalid.py:88:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
22
23
overloads_invalid.py:97:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `97`.
23
24
overloads_invalid.py:97:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
24
-
overloads_invalid.py:124:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
25
-
overloads_invalid.py:133:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
26
-
overloads_invalid.py:155:4 Invalid override [40]: `overloads_invalid.Child.final_method` cannot override final method defined in `Base`.
25
+
overloads_invalid.py:128:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
26
+
overloads_invalid.py:139:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
27
+
overloads_invalid.py:173:4 Invalid override [40]: `overloads_invalid.Child.final_method` cannot override final method defined in `Base`.
28
+
overloads_invalid.py:189:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
29
+
overloads_invalid.py:189:4 Invalid override [40]: `overloads_invalid.Child.bad_override` is decorated with @override, but no method of the same name exists in superclasses of `Child`.
30
+
overloads_invalid.py:208:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
0 commit comments