-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no expectation of return type if there are call errors
- Loading branch information
Showing
9 changed files
with
138 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,43 @@ | ||
conformant = "Partial" | ||
notes = """ | ||
Does not pick a winning overload based on arity, prior to considering argument types. | ||
Does not expand boolean arguments to Literal[True] and Literal[False]. | ||
Does not expand enum arguments to literal variants. | ||
Does not expand tuple arguments to possible combinations. | ||
""" | ||
conformance_automated = "Fail" | ||
errors_diff = """ | ||
Line 36: Unexpected errors ['overloads_evaluation.py:36: error: Expression is of type "Any", not "int" [assert-type]'] | ||
Line 42: Unexpected errors ['overloads_evaluation.py:42: error: Expression is of type "Any", not "str" [assert-type]'] | ||
Line 103: Unexpected errors ['overloads_evaluation.py:103: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]'] | ||
Line 104: Unexpected errors ['overloads_evaluation.py:104: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] | ||
Line 126: Unexpected errors ['overloads_evaluation.py:126: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]'] | ||
Line 127: Unexpected errors ['overloads_evaluation.py:127: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] | ||
Line 166: Unexpected errors ['overloads_evaluation.py:166: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]'] | ||
Line 167: Unexpected errors ['overloads_evaluation.py:167: error: Expression is of type "int", not "int | str" [assert-type]'] | ||
Line 106: Unexpected errors ['overloads_evaluation.py:106: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]'] | ||
Line 107: Unexpected errors ['overloads_evaluation.py:107: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] | ||
Line 129: Unexpected errors ['overloads_evaluation.py:129: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]'] | ||
Line 130: Unexpected errors ['overloads_evaluation.py:130: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] | ||
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]'] | ||
Line 170: Unexpected errors ['overloads_evaluation.py:170: error: Expression is of type "int", not "int | str" [assert-type]'] | ||
""" | ||
output = """ | ||
overloads_evaluation.py:27: error: All overload variants of "example1" require at least one argument [call-overload] | ||
overloads_evaluation.py:27: note: Possible overload variants: | ||
overloads_evaluation.py:27: note: def example1(x: int, y: str) -> int | ||
overloads_evaluation.py:27: note: def example1(x: str) -> str | ||
overloads_evaluation.py:35: error: No overload variant of "example1" matches argument types "int", "int" [call-overload] | ||
overloads_evaluation.py:35: note: Possible overload variants: | ||
overloads_evaluation.py:35: note: def example1(x: int, y: str) -> int | ||
overloads_evaluation.py:35: note: def example1(x: str) -> str | ||
overloads_evaluation.py:36: error: Expression is of type "Any", not "int" [assert-type] | ||
overloads_evaluation.py:41: error: No overload variant of "example1" matches argument type "int" [call-overload] | ||
overloads_evaluation.py:41: note: Possible overload variants: | ||
overloads_evaluation.py:41: note: def example1(x: int, y: str) -> int | ||
overloads_evaluation.py:41: note: def example1(x: str) -> str | ||
overloads_evaluation.py:42: error: Expression is of type "Any", not "str" [assert-type] | ||
overloads_evaluation.py:86: error: Argument 1 to "example2" has incompatible type "int | str"; expected "int" [arg-type] | ||
overloads_evaluation.py:86: error: Argument 2 to "example2" has incompatible type "int | str"; expected "str" [arg-type] | ||
overloads_evaluation.py:103: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload] | ||
overloads_evaluation.py:103: note: Possible overload variants: | ||
overloads_evaluation.py:103: note: def expand_bool(x: Literal[False]) -> Literal[0] | ||
overloads_evaluation.py:103: note: def expand_bool(x: Literal[True]) -> Literal[1] | ||
overloads_evaluation.py:104: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] | ||
overloads_evaluation.py:126: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload] | ||
overloads_evaluation.py:126: note: Possible overload variants: | ||
overloads_evaluation.py:126: note: def expand_enum(x: Literal[Color.RED]) -> Literal[0] | ||
overloads_evaluation.py:126: note: def expand_enum(x: Literal[Color.BLUE]) -> Literal[1] | ||
overloads_evaluation.py:127: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] | ||
overloads_evaluation.py:166: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type] | ||
overloads_evaluation.py:167: error: Expression is of type "int", not "int | str" [assert-type] | ||
overloads_evaluation.py:32: error: All overload variants of "example1" require at least one argument [call-overload] | ||
overloads_evaluation.py:32: note: Possible overload variants: | ||
overloads_evaluation.py:32: note: def example1(x: int, y: str) -> int | ||
overloads_evaluation.py:32: note: def example1(x: str) -> str | ||
overloads_evaluation.py:40: error: No overload variant of "example1" matches argument types "int", "int" [call-overload] | ||
overloads_evaluation.py:40: note: Possible overload variants: | ||
overloads_evaluation.py:40: note: def example1(x: int, y: str) -> int | ||
overloads_evaluation.py:40: note: def example1(x: str) -> str | ||
overloads_evaluation.py:45: error: No overload variant of "example1" matches argument type "int" [call-overload] | ||
overloads_evaluation.py:45: note: Possible overload variants: | ||
overloads_evaluation.py:45: note: def example1(x: int, y: str) -> int | ||
overloads_evaluation.py:45: note: def example1(x: str) -> str | ||
overloads_evaluation.py:89: error: Argument 1 to "example2" has incompatible type "int | str"; expected "int" [arg-type] | ||
overloads_evaluation.py:89: error: Argument 2 to "example2" has incompatible type "int | str"; expected "str" [arg-type] | ||
overloads_evaluation.py:106: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload] | ||
overloads_evaluation.py:106: note: Possible overload variants: | ||
overloads_evaluation.py:106: note: def expand_bool(x: Literal[False]) -> Literal[0] | ||
overloads_evaluation.py:106: note: def expand_bool(x: Literal[True]) -> Literal[1] | ||
overloads_evaluation.py:107: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] | ||
overloads_evaluation.py:129: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload] | ||
overloads_evaluation.py:129: note: Possible overload variants: | ||
overloads_evaluation.py:129: note: def expand_enum(x: Literal[Color.RED]) -> Literal[0] | ||
overloads_evaluation.py:129: note: def expand_enum(x: Literal[Color.BLUE]) -> Literal[1] | ||
overloads_evaluation.py:130: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] | ||
overloads_evaluation.py:169: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type] | ||
overloads_evaluation.py:170: error: Expression is of type "int", not "int | str" [assert-type] | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "mypy 1.14.1" | ||
test_duration = 1.7 | ||
test_duration = 1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version = "pyre 0.9.23" | ||
test_duration = 6.1 | ||
test_duration = 6.7 |
Oops, something went wrong.