|
1 | 1 | conformant = "Partial" |
2 | 2 | notes = """ |
3 | | -Does not reject a function with a single @overload signature. |
4 | | -Does not reject a function with @overload signature but no implementation. |
5 | | -Does not allow an overload with no implementation in a Protocol or an abstract base class. |
6 | | -Does not exempt overloads from checking of return type in body, when also decorated with `@staticmethod`. |
7 | | -Does not error on overloads inconsistently decorated with `@staticmethod` or `@classmethod`. |
8 | 3 | """ |
9 | 4 | output = """ |
10 | | -overloads_basic.py:35:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __getitem__: bad return type [bad-return-type] |
| 5 | +overloads_basic.py:33:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __getitem__: bad return type [bad-return-type] |
11 | 6 |
|
12 | 7 | return b"" |
13 | 8 | \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m |
14 | 9 |
|
15 | | -overloads_basic.py:41:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: unsupported operand type(s) for item retrieval: Bytes and str [unsupported-operands] |
| 10 | +overloads_basic.py:39:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: unsupported operand type(s) for item retrieval: Bytes and str [unsupported-operands] |
16 | 11 |
|
17 | 12 | b[""] # E: no matching overload |
18 | 13 | \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m |
19 | 14 |
|
20 | | -overloads_basic.py:62:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in map: bad return type [bad-return-type] |
| 15 | +overloads_basic.py:60:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in map: bad return type [bad-return-type] |
21 | 16 |
|
22 | 17 | pass |
23 | 18 | \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m |
24 | 19 |
|
25 | | -overloads_basic.py:98:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable] |
26 | | -
|
27 | | - ... |
28 | | - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m |
29 | | -
|
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 | | -
|
32 | | - ... |
33 | | - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m |
34 | | -
|
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 | | -
|
37 | | - ... |
38 | | - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m |
39 | | -
|
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] |
46 | | -
|
47 | | - ... |
48 | | - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m |
49 | | -
|
50 | 20 | """ |
51 | 21 | conformance_automated = "Fail" |
52 | 22 | errors_diff = """ |
53 | | -Lines 66, 67: Expected error (tag 'func1') |
54 | | -Lines 78, 79: Expected error (tag 'func2') |
55 | | -Lines 115, 116: Expected error (tag 'not_abstract') |
56 | | -Lines 130, 132, 137, 140: Expected error (tag 'func5') |
57 | | -Lines 143, 145, 150, 153: Expected error (tag 'func6') |
58 | | -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]'] |
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]'] |
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]"] |
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]'] |
| 23 | +Line 33: Unexpected errors ['overloads_basic.py:33:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __getitem__: bad return type [bad-return-type]'] |
| 24 | +Line 60: Unexpected errors ['overloads_basic.py:60:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in map: bad return type [bad-return-type]'] |
65 | 25 | """ |
0 commit comments