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
+20-9Lines changed: 20 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,26 @@ notes = """
4
4
Does not allow an overload with no implementation in an abstract base class.
5
5
"""
6
6
errors_diff = """
7
-
Line 47: Unexpected errors ['overloads_invalid.py:47: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]']
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
8
"""
9
9
output = """
10
-
overloads_invalid.py:12: error: Single overload definition, multiple required [misc]
11
-
overloads_invalid.py:24: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
12
-
overloads_invalid.py:47: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
13
-
overloads_invalid.py:61: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
14
-
overloads_invalid.py:76: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc]
15
-
overloads_invalid.py:86: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc]
16
-
overloads_invalid.py:86: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc]
17
-
overloads_invalid.py:89: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc]
10
+
overloads_invalid.py:14: error: Single overload definition, multiple required [misc]
11
+
overloads_invalid.py:26: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
12
+
overloads_invalid.py:49: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
13
+
overloads_invalid.py:63: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
14
+
overloads_invalid.py:78: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc]
15
+
overloads_invalid.py:88: error: Overloaded function implementation does not accept all possible arguments of signature 1 [misc]
16
+
overloads_invalid.py:88: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc]
17
+
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
Copy file name to clipboardExpand all lines: conformance/results/pyre/overloads_invalid.toml
+18-13Lines changed: 18 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,26 @@ conformant = "Partial"
2
2
conformance_automated = "Fail"
3
3
notes = """
4
4
Does not allow an overload with no implementation in a Protocol or an abstract base class.
5
+
Expects @final on all overloads and implementation, instead of implementation only.
5
6
"""
6
7
errors_diff = """
7
-
Line 38: Unexpected errors ['overloads_invalid.py:38:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.']
8
-
Line 49: Unexpected errors ['overloads_invalid.py:49:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.']
Line 40: Unexpected errors ['overloads_invalid.py:40:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.']
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).']
9
12
"""
10
13
output = """
11
-
overloads_invalid.py:13:0 Incompatible overload [43]: At least two overload signatures must be present.
12
-
overloads_invalid.py:25:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation.
13
-
overloads_invalid.py:38:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.
14
-
overloads_invalid.py:49:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.
15
-
overloads_invalid.py:62:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.not_abstract` must have an implementation.
16
-
overloads_invalid.py:78:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `78`.
17
-
overloads_invalid.py:83:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `83`.
18
-
overloads_invalid.py:86:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
19
-
overloads_invalid.py:91:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `91`.
20
-
overloads_invalid.py:96:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `96`.
21
-
overloads_invalid.py:99:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
14
+
overloads_invalid.py:15:0 Incompatible overload [43]: At least two overload signatures must be present.
15
+
overloads_invalid.py:27:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation.
16
+
overloads_invalid.py:40:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.
17
+
overloads_invalid.py:51:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.
18
+
overloads_invalid.py:64:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.not_abstract` must have an implementation.
19
+
overloads_invalid.py:80:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `80`.
20
+
overloads_invalid.py:85:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `85`.
21
+
overloads_invalid.py:88:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
22
+
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
+
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`.
Line 44: Unexpected errors ["overloads_invalid.py:44:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable]"]
16
-
Line 56: Unexpected errors ["overloads_invalid.py:56:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]"]
17
-
Line 68: Unexpected errors ["overloads_invalid.py:68:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable]"]
18
-
Line 79: Unexpected errors ['overloads_invalid.py:79:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
19
-
Line 84: Unexpected errors ['overloads_invalid.py:84:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
Line 6: Unexpected errors ['overloads_invalid.py:6:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: typing.override not supported yet [not-supported-yet]']
19
+
Line 46: Unexpected errors ["overloads_invalid.py:46:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable]"]
20
+
Line 58: Unexpected errors ["overloads_invalid.py:58:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]"]
21
+
Line 70: Unexpected errors ["overloads_invalid.py:70:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable]"]
22
+
Line 81: Unexpected errors ['overloads_invalid.py:81:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
23
+
Line 86: Unexpected errors ['overloads_invalid.py:86:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
24
+
Line 125: Unexpected errors ['overloads_invalid.py:125:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in final_method: bad return type [bad-return-type]', 'overloads_invalid.py:125:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in final_method: bad return type [bad-return-type]']
25
+
Line 137: Unexpected errors ['overloads_invalid.py:137:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final: bad return type [bad-return-type]', 'overloads_invalid.py:137:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final: bad return type [bad-return-type]']
26
+
Line 151: Unexpected errors ['overloads_invalid.py:151:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final_2: bad return type [bad-return-type]', 'overloads_invalid.py:151:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final_2: bad return type [bad-return-type]']
27
+
Line 156: Unexpected errors ['overloads_invalid.py:156:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in final_method: bad return type [bad-return-type]']
20
28
"""
21
29
output = """
22
-
overloads_invalid.py:44:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable]
30
+
overloads_invalid.py:6:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: typing.override not supported yet [not-supported-yet]
overloads_invalid.py:46:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable]
23
46
24
47
...
25
48
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
26
49
27
-
overloads_invalid.py:56:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]
50
+
overloads_invalid.py:58:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]
28
51
29
52
...
30
53
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
31
54
32
-
overloads_invalid.py:68:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable]
55
+
overloads_invalid.py:70:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable]
33
56
34
57
...
35
58
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
36
59
37
-
overloads_invalid.py:79:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
60
+
overloads_invalid.py:81:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
38
61
39
62
...
40
63
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
41
64
42
-
overloads_invalid.py:84:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
65
+
overloads_invalid.py:86:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
66
+
67
+
...
68
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
69
+
70
+
overloads_invalid.py:125:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in final_method: bad return type [bad-return-type]
71
+
72
+
...
73
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
74
+
75
+
overloads_invalid.py:125:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in final_method: bad return type [bad-return-type]
76
+
77
+
...
78
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
79
+
80
+
overloads_invalid.py:137:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final: bad return type [bad-return-type]
81
+
82
+
...
83
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
84
+
85
+
overloads_invalid.py:137:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final: bad return type [bad-return-type]
86
+
87
+
...
88
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
89
+
90
+
overloads_invalid.py:151:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final_2: bad return type [bad-return-type]
91
+
92
+
...
93
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
94
+
95
+
overloads_invalid.py:151:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final_2: bad return type [bad-return-type]
96
+
97
+
...
98
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
99
+
100
+
overloads_invalid.py:154:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Class Child overrides final method final_method, defined in base class Base [final-error]
0 commit comments