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/pyre/overloads_basic.toml
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,17 @@ overloads_basic.py:41:2 Incompatible parameter type [6]: In call `Bytes.__getite
7
7
overloads_basic.py:67:0 Incompatible overload [43]: At least two overload signatures must be present.
8
8
overloads_basic.py:79:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation.
9
9
overloads_basic.py:92:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.
10
-
overloads_basic.py:102:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.
11
-
overloads_basic.py:118:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `118`.
12
-
overloads_basic.py:123:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `123`.
13
-
overloads_basic.py:126:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
14
-
overloads_basic.py:131:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `131`.
15
-
overloads_basic.py:136:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `136`.
16
-
overloads_basic.py:139:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
10
+
overloads_basic.py:103:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.
11
+
overloads_basic.py:116:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.not_abstract` must have an implementation.
12
+
overloads_basic.py:132:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `132`.
13
+
overloads_basic.py:137:4 Incompatible overload [43]: The implementation of `C.func5` does not accept all possible arguments of overload defined on line `137`.
14
+
overloads_basic.py:140:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
15
+
overloads_basic.py:145:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `145`.
16
+
overloads_basic.py:150:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `150`.
17
+
overloads_basic.py:153:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
17
18
"""
18
19
conformance_automated = "Fail"
19
20
errors_diff = """
20
21
Line 92: Unexpected errors ['overloads_basic.py:92:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.']
21
-
Line 102: Unexpected errors ['overloads_basic.py:102:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.']
22
+
Line 103: Unexpected errors ['overloads_basic.py:103:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.']
Does not allow an overload with no implementation in an abstract base class.
4
3
"""
5
4
output = """
6
5
overloads_basic.py:41:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue)
7
6
overloads_basic.py:41:1 - error: Argument of type "Literal['']" cannot be assigned to parameter "__s" of type "slice[Any, Any, Any]" in function "__getitem__"
8
7
"Literal['']" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
9
8
overloads_basic.py:67:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload)
10
9
overloads_basic.py:79:5 - error: "func2" is marked as overload, but no implementation is provided (reportNoOverloadImplementation)
11
-
overloads_basic.py:102:9 - error: "func4" is marked as overload, but no implementation is provided (reportNoOverloadImplementation)
12
-
overloads_basic.py:118:9 - error: Overloads for "func5" use @staticmethod inconsistently (reportInconsistentOverload)
13
-
overloads_basic.py:126:9 - error: Overloaded implementation is not consistent with signature of overload 1
10
+
overloads_basic.py:116:9 - error: "not_abstract" is marked as overload, but no implementation is provided (reportNoOverloadImplementation)
11
+
overloads_basic.py:132:9 - error: Overloads for "func5" use @staticmethod inconsistently (reportInconsistentOverload)
12
+
overloads_basic.py:140:9 - error: Overloaded implementation is not consistent with signature of overload 1
14
13
Type "(self: Self@C, x: int | str) -> (int | str)" is not assignable to type "(x: int) -> int"
15
14
Parameter name mismatch: "x" versus "self"
16
15
Parameter 1: type "int" is incompatible with type "Self@C"
17
16
Type "int" is not assignable to type "Self@C"
18
17
Extra parameter "x" (reportInconsistentOverload)
19
-
overloads_basic.py:126:9 - error: Overloaded implementation is not consistent with signature of overload 2
18
+
overloads_basic.py:140:9 - error: Overloaded implementation is not consistent with signature of overload 2
20
19
Type "(self: Self@C, x: int | str) -> (int | str)" is not assignable to type "(x: str) -> str"
21
20
Parameter name mismatch: "x" versus "self"
22
21
Parameter 1: type "str" is incompatible with type "Self@C"
23
22
Type "str" is not assignable to type "Self@C"
24
23
Extra parameter "x" (reportInconsistentOverload)
25
-
overloads_basic.py:131:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload)
26
-
overloads_basic.py:139:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
24
+
overloads_basic.py:145:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload)
25
+
overloads_basic.py:153:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
27
26
"""
28
-
conformance_automated = "Fail"
27
+
conformance_automated = "Pass"
29
28
errors_diff = """
30
-
Line 102: Unexpected errors ['overloads_basic.py:102:9 - error: "func4" is marked as overload, but no implementation is provided (reportNoOverloadImplementation)']
Copy file name to clipboardExpand all lines: conformance/results/pytype/overloads_basic.toml
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -27,17 +27,22 @@ overloads_basic.py:98:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3:
27
27
...
28
28
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
29
29
30
-
overloads_basic.py:108:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]
30
+
overloads_basic.py:110:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]
31
31
32
32
...
33
33
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
34
34
35
-
overloads_basic.py:119:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
35
+
overloads_basic.py:122:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable]
36
36
37
37
...
38
38
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
39
39
40
-
overloads_basic.py:124:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
40
+
overloads_basic.py:133:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
41
+
42
+
...
43
+
\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m
44
+
45
+
overloads_basic.py:138:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type]
Line 35: Unexpected errors ['overloads_basic.py:35:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __getitem__: bad return type [bad-return-type]']
53
59
Line 62: Unexpected errors ['overloads_basic.py:62:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in map: bad return type [bad-return-type]']
54
60
Line 98: Unexpected errors ["overloads_basic.py:98:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable]"]
55
-
Line 108: Unexpected errors ["overloads_basic.py:108:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]"]
56
-
Line 119: Unexpected errors ['overloads_basic.py:119:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
57
-
Line 124: Unexpected errors ['overloads_basic.py:124:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
61
+
Line 110: Unexpected errors ["overloads_basic.py:110:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]"]
62
+
Line 122: Unexpected errors ["overloads_basic.py:122:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable]"]
63
+
Line 133: Unexpected errors ['overloads_basic.py:133:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
64
+
Line 138: Unexpected errors ['overloads_basic.py:138:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]']
@@ -670,7 +670,7 @@ <h3>Python Type System Conformance Test Results</h3>
670
670
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not allow an overload with no implementation in an abstract base class.</p></span></div></th>
671
671
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not allow an overload with no implementation in an abstract base class.</p></span></div></th>
672
672
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not allow an overload with no implementation in a Protocol or an abstract base class.</p></span></div></th>
673
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject a function with a single @overload signature.</p><p>Does not reject a function with @overload signature but no implementation.</p><p>Does not allow an overload with no implementation in a Protocol or an abstract base class.</p><p>Does not exempt overloads from checking of return type in body, when also decorated with `@staticmethod`.</p><p>Does not error on overloads inconsistently decorated with `@staticmethod`.</p></span></div></th>
673
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject a function with a single @overload signature.</p><p>Does not reject a function with @overload signature but no implementation.</p><p>Does not allow an overload with no implementation in a Protocol or an abstract base class.</p><p>Does not exempt overloads from checking of return type in body, when also decorated with `@staticmethod`.</p><p>Does not error on overloads inconsistently decorated with `@staticmethod` or `@classmethod`.</p></span></div></th>
0 commit comments