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
Does not expand boolean arguments to Literal[True] and Literal[False].
4
+
"""
5
+
conformance_automated = "Fail"
3
6
errors_diff = """
7
+
Line 85: Expected 1 errors
8
+
Line 102: Unexpected errors ['overloads_evaluation.py:102:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`.']
9
+
Line 103: Unexpected errors ['overloads_evaluation.py:103:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.']
overloads_evaluation.py:34:19 Incompatible parameter type [6]: In call `example1`, for 2nd positional argument, expected `str` but got `int`.
8
14
overloads_evaluation.py:40:16 Incompatible parameter type [6]: In call `example1`, for 1st positional argument, expected `str` but got `int`.
9
-
overloads_evaluation.py:85:13 Incompatible parameter type [6]: In call `example2`, for 1st positional argument, expected `int` but got `Union[int, str]`.
10
-
overloads_evaluation.py:85:16 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.
15
+
overloads_evaluation.py:102:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`.
16
+
overloads_evaluation.py:103:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.
Copy file name to clipboardExpand all lines: conformance/results/pyright/overloads_evaluation.toml
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
-
conformant = "Pass"
2
-
conformance_automated = "Pass"
1
+
conformant = "Partial"
2
+
notes = """
3
+
Does not expand boolean arguments to Literal[True] and Literal[False].
4
+
"""
5
+
conformance_automated = "Fail"
3
6
errors_diff = """
7
+
Line 102: Unexpected errors ['overloads_evaluation.py:102:12 - error: No overloads for "expand_bool" match the provided arguments (reportCallIssue)', 'overloads_evaluation.py:102:24 - error: Argument of type "bool" cannot be assigned to parameter "x" of type "Literal[True]" in function "expand_bool"']
8
+
Line 103: Unexpected errors ['overloads_evaluation.py:103:17 - error: "assert_type" mismatch: expected "Literal[0, 1]" but received "Unknown" (reportAssertTypeFailure)']
4
9
"""
5
10
output = """
6
11
overloads_evaluation.py:26:1 - error: No overloads for "example1" match the provided arguments
@@ -16,4 +21,8 @@ overloads_evaluation.py:85:14 - error: Argument of type "int | str" cannot be as
16
21
overloads_evaluation.py:85:17 - error: Argument of type "int | str" cannot be assigned to parameter "y" of type "int" in function "example2"
17
22
Type "int | str" is not assignable to type "int"
18
23
"str" is not assignable to "int" (reportArgumentType)
24
+
overloads_evaluation.py:102:12 - error: No overloads for "expand_bool" match the provided arguments (reportCallIssue)
25
+
overloads_evaluation.py:102:24 - error: Argument of type "bool" cannot be assigned to parameter "x" of type "Literal[True]" in function "expand_bool"
26
+
"bool" is not assignable to type "Literal[True]" (reportArgumentType)
27
+
overloads_evaluation.py:103:17 - error: "assert_type" mismatch: expected "Literal[0, 1]" but received "Unknown" (reportAssertTypeFailure)
Copy file name to clipboardExpand all lines: conformance/results/pytype/overloads_evaluation.toml
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
conformant = "Partial"
2
2
notes = """
3
3
Does not pick a winning overload based on arity, prior to considering argument types.
4
-
Does not perform argument expansion on unions and union return types of all matching overloads.
4
+
Does not perform argument expansion and union return types of all matching overloads.
5
5
"""
6
6
conformance_automated = "Fail"
7
7
errors_diff = """
@@ -11,6 +11,9 @@ Line 35: Unexpected errors ['overloads_evaluation.py:35:1: \\x1b[1m\\x1b[31merro
11
11
Line 41: Unexpected errors ['overloads_evaluation.py:41:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Any [assert-type]']
12
12
Line 59: Unexpected errors ['overloads_evaluation.py:59:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example2: bad return type [bad-return-type]']
13
13
Line 78: Unexpected errors ['overloads_evaluation.py:78:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in _: str [assert-type]']
14
+
Line 99: Unexpected errors ['overloads_evaluation.py:99:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_bool: bad return type [bad-return-type]', 'overloads_evaluation.py:99:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_bool: bad return type [bad-return-type]']
15
+
Line 102: Unexpected errors ['overloads_evaluation.py:102:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in _: Function expand_bool was called with the wrong arguments [wrong-arg-types]']
16
+
Line 103: Unexpected errors ['overloads_evaluation.py:103:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in _: Any [assert-type]']
14
17
"""
15
18
output = """
16
19
overloads_evaluation.py:22:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example1: bad return type [bad-return-type]
@@ -55,4 +58,24 @@ overloads_evaluation.py:78:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in _:
overloads_evaluation.py:102:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in _: Function expand_bool was called with the wrong arguments [wrong-arg-types]
@@ -691,10 +691,10 @@ <h3>Python Type System Conformance Test Results</h3>
691
691
<thclass="column col2 not-conformant"><divclass="hover-text">Fail<spanclass="tooltip-text" id="bottom"><p>Does not enforce any of the specified rules regarding overload definitions.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not pick a winning overload based on arity, prior to considering argument types.</p></span></div></th>
695
-
<thclass="column col2 conformant">Pass</th>
696
-
<thclass="column col2 conformant">Pass</th>
697
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not pick a winning overload based on arity, prior to considering argument types.</p><p>Does not perform argument expansion on unions and union return types of all matching overloads.</p></span></div></th>
694
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not pick a winning overload based on arity, prior to considering argument types.</p><p>Does not expand boolean arguments to Literal[True] and Literal[False].</p></span></div></th>
695
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not expand boolean arguments to Literal[True] and Literal[False].</p></span></div></th>
696
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not expand boolean arguments to Literal[True] and Literal[False].</p></span></div></th>
697
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not pick a winning overload based on arity, prior to considering argument types.</p><p>Does not perform argument expansion and union return types of all matching overloads.</p></span></div></th>
0 commit comments