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_definitions.toml
+4-27Lines changed: 4 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,11 @@ conformant = "Partial"
2
2
conformance_automated = "Fail"
3
3
notes = """
4
4
Does not allow an overload with no implementation in an abstract base class.
5
+
Allows @override to be on all overloads and implementation, instead of just implementation.
5
6
"""
6
7
errors_diff = """
8
+
Line 245: Expected 1 errors
7
9
Line 49: Unexpected errors ['overloads_definitions.py:49: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]']
8
-
Line 202: Unexpected errors ['overloads_definitions.py:202: error: Signature of "good_override" incompatible with supertype "Base" [override]']
9
10
"""
10
11
output = """
11
12
overloads_definitions.py:14: error: Single overload definition, multiple required [misc]
@@ -18,30 +19,6 @@ overloads_definitions.py:88: error: Overloaded function implementation does not
18
19
overloads_definitions.py:91: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc]
19
20
overloads_definitions.py:133: error: @final should be applied only to overload implementation [misc]
20
21
overloads_definitions.py:148: error: @final should be applied only to overload implementation [misc]
21
-
overloads_definitions.py:176: error: Cannot override final attribute "final_method" (previously declared in base class "Base") [misc]
22
-
overloads_definitions.py:176: error: Signature of "final_method" incompatible with supertype "Base" [override]
23
-
overloads_definitions.py:176: note: Superclass:
24
-
overloads_definitions.py:176: note: @overload
25
-
overloads_definitions.py:176: note: def final_method(self, x: int) -> int
Line 40: Unexpected errors ['overloads_definitions.py:40:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.']
11
11
Line 51: Unexpected errors ['overloads_definitions.py:51:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.']
12
12
Line 128: Unexpected errors ['overloads_definitions.py:128:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
13
-
Line 211: Unexpected errors ['overloads_definitions.py:211:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
13
+
Line 239: Unexpected errors ['overloads_definitions.py:239:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
14
14
"""
15
15
output = """
16
16
overloads_definitions.py:15:0 Incompatible overload [43]: At least two overload signatures must be present.
@@ -25,8 +25,8 @@ overloads_definitions.py:97:4 Incompatible overload [43]: The implementation of
25
25
overloads_definitions.py:97:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
26
26
overloads_definitions.py:128:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
27
27
overloads_definitions.py:139:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
28
-
overloads_definitions.py:176:4 Invalid override [40]: `overloads_definitions.Child.final_method` cannot override final method defined in `Base`.
29
-
overloads_definitions.py:192:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
30
-
overloads_definitions.py:192:4 Invalid override [40]: `overloads_definitions.Child.bad_override` is decorated with @override, but no method of the same name exists in superclasses of `Child`.
31
-
overloads_definitions.py:211:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
28
+
overloads_definitions.py:204:4 Invalid override [40]: `overloads_definitions.Child.final_method` cannot override final method defined in `Base`.
29
+
overloads_definitions.py:220:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
30
+
overloads_definitions.py:220:4 Invalid override [40]: `overloads_definitions.Child.bad_override` is decorated with @override, but no method of the same name exists in superclasses of `Child`.
31
+
overloads_definitions.py:239:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
Line 75: Unexpected errors ['overloads_definitions_stub.pyi:75:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
12
+
Line 91: Unexpected errors ['overloads_definitions_stub.pyi:91:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
13
+
Line 146: Unexpected errors ['overloads_definitions_stub.pyi:146:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
14
+
Line 162: Unexpected errors ['overloads_definitions_stub.pyi:162:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
15
+
Line 174: Unexpected errors ['overloads_definitions_stub.pyi:174:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
16
+
"""
17
+
output = """
18
+
overloads_definitions_stub.pyi:14:0 Incompatible overload [43]: At least two overload signatures must be present.
19
+
overloads_definitions_stub.pyi:43:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
20
+
overloads_definitions_stub.pyi:52:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
21
+
overloads_definitions_stub.pyi:75:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
22
+
overloads_definitions_stub.pyi:91:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
23
+
overloads_definitions_stub.pyi:142:4 Invalid override [40]: `overloads_definitions_stub.Child.bad_override` is decorated with @override, but no method of the same name exists in superclasses of `Child`.
24
+
overloads_definitions_stub.pyi:146:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
25
+
overloads_definitions_stub.pyi:162:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
26
+
overloads_definitions_stub.pyi:174:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
@@ -27,10 +27,6 @@ overloads_definitions.py:88:9 - error: Overloaded implementation is not consiste
27
27
overloads_definitions.py:93:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload)
28
28
overloads_definitions.py:97:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
29
29
overloads_definitions.py:135:9 - error: Overload for "invalid_final" is marked @final but implementation is not (reportInconsistentOverload)
30
-
overloads_definitions.py:176:9 - error: Method "final_method" cannot override final method defined in class "Base" (reportIncompatibleMethodOverride)
31
-
overloads_definitions.py:176:9 - error: Method "final_method" overrides class "Base" in an incompatible manner
32
-
Return type mismatch: base method returns type "int", override returns type "int | str"
33
-
Type "int | str" is not assignable to type "int"
34
-
"str" is not assignable to "int" (reportIncompatibleMethodOverride)
35
-
overloads_definitions.py:192:9 - error: Method "bad_override" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
30
+
overloads_definitions.py:204:9 - error: Method "final_method" cannot override final method defined in class "Base" (reportIncompatibleMethodOverride)
31
+
overloads_definitions.py:220:9 - error: Method "bad_override" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
overloads_definitions_stub.pyi:14:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload)
15
+
overloads_definitions_stub.pyi:38:9 - error: Overloads for "func5" use @staticmethod inconsistently (reportInconsistentOverload)
16
+
overloads_definitions_stub.pyi:38:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
17
+
overloads_definitions_stub.pyi:48:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload)
18
+
overloads_definitions_stub.pyi:52:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
19
+
overloads_definitions_stub.pyi:133:9 - error: Method "final_method" cannot override final method defined in class "Base" (reportIncompatibleMethodOverride)
0 commit comments