|
| 1 | +conformant = "Partial" |
| 2 | +notes = """ |
| 3 | +Does not expand boolean arguments to Literal[True] and Literal[False]. |
| 4 | +Does not expand enum arguments to literal variants. |
| 5 | +Does not expand tuple arguments to possible combinations. |
| 6 | +""" |
| 7 | +conformance_automated = "Fail" |
| 8 | +errors_diff = """ |
| 9 | +Line 106: Unexpected errors ['overloads_evaluation.py:106: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]'] |
| 10 | +Line 107: Unexpected errors ['overloads_evaluation.py:107: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] |
| 11 | +Line 129: Unexpected errors ['overloads_evaluation.py:129: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]'] |
| 12 | +Line 130: Unexpected errors ['overloads_evaluation.py:130: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] |
| 13 | +Line 169: Unexpected errors ['overloads_evaluation.py:169: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]'] |
| 14 | +Line 170: Unexpected errors ['overloads_evaluation.py:170: error: Expression is of type "int", not "int | str" [assert-type]'] |
| 15 | +""" |
| 16 | +output = """ |
| 17 | +overloads_evaluation.py:32: error: All overload variants of "example1" require at least one argument [call-overload] |
| 18 | +overloads_evaluation.py:32: note: Possible overload variants: |
| 19 | +overloads_evaluation.py:32: note: def example1(x: int, y: str) -> int |
| 20 | +overloads_evaluation.py:32: note: def example1(x: str) -> str |
| 21 | +overloads_evaluation.py:40: error: No overload variant of "example1" matches argument types "int", "int" [call-overload] |
| 22 | +overloads_evaluation.py:40: note: Possible overload variants: |
| 23 | +overloads_evaluation.py:40: note: def example1(x: int, y: str) -> int |
| 24 | +overloads_evaluation.py:40: note: def example1(x: str) -> str |
| 25 | +overloads_evaluation.py:45: error: No overload variant of "example1" matches argument type "int" [call-overload] |
| 26 | +overloads_evaluation.py:45: note: Possible overload variants: |
| 27 | +overloads_evaluation.py:45: note: def example1(x: int, y: str) -> int |
| 28 | +overloads_evaluation.py:45: note: def example1(x: str) -> str |
| 29 | +overloads_evaluation.py:89: error: Argument 1 to "example2" has incompatible type "int | str"; expected "int" [arg-type] |
| 30 | +overloads_evaluation.py:89: error: Argument 2 to "example2" has incompatible type "int | str"; expected "str" [arg-type] |
| 31 | +overloads_evaluation.py:106: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload] |
| 32 | +overloads_evaluation.py:106: note: Possible overload variants: |
| 33 | +overloads_evaluation.py:106: note: def expand_bool(x: Literal[False]) -> Literal[0] |
| 34 | +overloads_evaluation.py:106: note: def expand_bool(x: Literal[True]) -> Literal[1] |
| 35 | +overloads_evaluation.py:107: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] |
| 36 | +overloads_evaluation.py:129: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload] |
| 37 | +overloads_evaluation.py:129: note: Possible overload variants: |
| 38 | +overloads_evaluation.py:129: note: def expand_enum(x: Literal[Color.RED]) -> Literal[0] |
| 39 | +overloads_evaluation.py:129: note: def expand_enum(x: Literal[Color.BLUE]) -> Literal[1] |
| 40 | +overloads_evaluation.py:130: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] |
| 41 | +overloads_evaluation.py:169: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type] |
| 42 | +overloads_evaluation.py:170: error: Expression is of type "int", not "int | str" [assert-type] |
| 43 | +""" |
0 commit comments