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_evaluation.toml
+2-9Lines changed: 2 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ notes = """
3
3
Does not expand boolean arguments to `Literal[True]` and `Literal[False]`.
4
4
Does not expand enum arguments to literal variants.
5
5
Does not expand tuple arguments to possible combinations.
6
-
Does not evaluate `Any` in some cases where overload is ambiguous.
7
6
Evaluates `Any` in some cases where overload is not ambiguous.
8
7
"""
9
8
conformance_automated = "Fail"
@@ -14,10 +13,7 @@ Line 161: Unexpected errors ['overloads_evaluation.py:161: error: No overload va
14
13
Line 162: Unexpected errors ['overloads_evaluation.py:162: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]']
15
14
Line 205: Unexpected errors ['overloads_evaluation.py:205: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]']
16
15
Line 206: Unexpected errors ['overloads_evaluation.py:206: error: Expression is of type "int", not "int | str" [assert-type]']
17
-
Line 265: Unexpected errors ['overloads_evaluation.py:265: error: Expression is of type "list[Any]", not "Any" [assert-type]']
18
-
Line 281: Unexpected errors ['overloads_evaluation.py:281: error: Expression is of type "list[Any]", not "Any" [assert-type]']
19
-
Line 303: Unexpected errors ['overloads_evaluation.py:303: error: Expression is of type "Any", not "float" [assert-type]']
20
-
Line 347: Unexpected errors ['overloads_evaluation.py:347: error: Expression is of type "list[Any]", not "Any" [assert-type]']
16
+
Line 312: Unexpected errors ['overloads_evaluation.py:312: error: Expression is of type "Any", not "float" [assert-type]']
21
17
"""
22
18
output = """
23
19
overloads_evaluation.py:38: error: All overload variants of "example1_1" require at least one argument [call-overload]
Copy file name to clipboardExpand all lines: conformance/results/pyright/overloads_evaluation.toml
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
conformant = "Partial"
2
2
notes = """
3
-
Does not evaluate `Any` in some cases where overload is ambiguous.
3
+
Infers `list[int]` for ambiguous overloads with `list[Any]` arguments, rejecting use as `list[str]`.
4
4
"""
5
5
conformance_automated = "Fail"
6
6
errors_diff = """
7
-
Line 281: Unexpected errors ['overloads_evaluation.py:281:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)']
7
+
Line 290: Unexpected errors ['overloads_evaluation.py:290:27 - error: Type "list[int]" is not assignable to declared type "list[str]"']
8
8
"""
9
9
output = """
10
10
overloads_evaluation.py:38:1 - error: No overloads for "example1_1" match the provided arguments
@@ -20,5 +20,8 @@ overloads_evaluation.py:116:14 - error: Argument of type "int | str" cannot be a
20
20
overloads_evaluation.py:116:17 - error: Argument of type "int | str" cannot be assigned to parameter "y" of type "int" in function "example2"
21
21
Type "int | str" is not assignable to type "int"
22
22
"str" is not assignable to "int" (reportArgumentType)
23
-
overloads_evaluation.py:281:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)
23
+
overloads_evaluation.py:290:27 - error: Type "list[int]" is not assignable to declared type "list[str]"
24
+
"list[int]" is not assignable to "list[str]"
25
+
Type parameter "_T@list" is invariant, but "int" is not the same as "str"
26
+
Consider switching from "list" to "Sequence" which is covariant (reportAssignmentType)
0 commit comments