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/pyre/overloads_consistency.toml
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,15 @@ Does not apply decorator transforms before checking overload consistency.
4
4
"""
5
5
conformance_automated = "Fail"
6
6
errors_diff = """
7
-
Line 107: Unexpected errors ['overloads_consistency.py:107:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`None`) is incompatible with the return type of the implementation (`bytes`).', 'overloads_consistency.py:107:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `107`.']
8
-
Line 111: Unexpected errors ['overloads_consistency.py:111:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`str`) is incompatible with the return type of the implementation (`bytes`).', 'overloads_consistency.py:111:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `111`.', 'overloads_consistency.py:111:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
7
+
Line 108: Unexpected errors ['overloads_consistency.py:108:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`None`) is incompatible with the return type of the implementation (`bytes`).', 'overloads_consistency.py:108:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `108`.']
8
+
Line 112: Unexpected errors ['overloads_consistency.py:112:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`str`) is incompatible with the return type of the implementation (`bytes`).', 'overloads_consistency.py:112:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `112`.', 'overloads_consistency.py:112:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
9
9
"""
10
10
output = """
11
-
overloads_consistency.py:24:0 Incompatible overload [43]: The return type of overloaded function `return_type` (`str`) is incompatible with the return type of the implementation (`int`).
12
-
overloads_consistency.py:40:0 Incompatible overload [43]: The implementation of `parameter_type` does not accept all possible arguments of overload defined on line `40`.
13
-
overloads_consistency.py:107:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`None`) is incompatible with the return type of the implementation (`bytes`).
14
-
overloads_consistency.py:107:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `107`.
15
-
overloads_consistency.py:111:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`str`) is incompatible with the return type of the implementation (`bytes`).
16
-
overloads_consistency.py:111:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `111`.
17
-
overloads_consistency.py:111:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
11
+
overloads_consistency.py:25:0 Incompatible overload [43]: The return type of overloaded function `return_type` (`str`) is incompatible with the return type of the implementation (`int`).
12
+
overloads_consistency.py:41:0 Incompatible overload [43]: The implementation of `parameter_type` does not accept all possible arguments of overload defined on line `41`.
13
+
overloads_consistency.py:108:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`None`) is incompatible with the return type of the implementation (`bytes`).
14
+
overloads_consistency.py:108:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `108`.
15
+
overloads_consistency.py:112:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`str`) is incompatible with the return type of the implementation (`bytes`).
16
+
overloads_consistency.py:112:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `112`.
17
+
overloads_consistency.py:112:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
Line 155: Unexpected errors ['overloads_definitions.py:155:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload)']
9
+
Line 247: Unexpected errors ['overloads_definitions.py:247:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload)']
10
+
Line 252: Unexpected errors ['overloads_definitions.py:252:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload)']
9
11
"""
10
12
output = """
11
13
overloads_definitions.py:15:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload)
@@ -26,7 +28,11 @@ overloads_definitions.py:88:9 - error: Overloaded implementation is not consiste
26
28
Extra parameter "x" (reportInconsistentOverload)
27
29
overloads_definitions.py:93:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload)
28
30
overloads_definitions.py:97:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
29
-
overloads_definitions.py:135:9 - error: Overload for "invalid_final" is marked @final but implementation is not (reportInconsistentOverload)
31
+
overloads_definitions.py:135:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload)
32
+
overloads_definitions.py:150:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload)
33
+
overloads_definitions.py:155:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload)
30
34
overloads_definitions.py:204:9 - error: Method "final_method" cannot override final method defined in class "Base" (reportIncompatibleMethodOverride)
31
35
overloads_definitions.py:220:9 - error: Method "bad_override" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
36
+
overloads_definitions.py:247:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload)
37
+
overloads_definitions.py:252:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload)
Line 103: Unexpected errors ['overloads_definitions_stub.pyi:103:9 - error: Only the first overload should be marked @final (reportInconsistentOverload)']
11
+
Line 174: Unexpected errors ['overloads_definitions_stub.pyi:174:9 - error: Only the first overload should be marked @override (reportInconsistentOverload)']
12
12
"""
13
13
output = """
14
14
overloads_definitions_stub.pyi:14:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload)
15
15
overloads_definitions_stub.pyi:38:9 - error: Overloads for "func5" use @staticmethod inconsistently (reportInconsistentOverload)
16
16
overloads_definitions_stub.pyi:38:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
17
17
overloads_definitions_stub.pyi:48:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload)
18
18
overloads_definitions_stub.pyi:52:15 - warning: Instance methods should take a "self" parameter (reportSelfClsParameterName)
19
+
overloads_definitions_stub.pyi:87:9 - error: Only the first overload should be marked @final (reportInconsistentOverload)
20
+
overloads_definitions_stub.pyi:103:9 - error: Only the first overload should be marked @final (reportInconsistentOverload)
19
21
overloads_definitions_stub.pyi:133:9 - error: Method "final_method" cannot override final method defined in class "Base" (reportIncompatibleMethodOverride)
22
+
overloads_definitions_stub.pyi:142:9 - error: Method "bad_override" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
23
+
overloads_definitions_stub.pyi:174:9 - error: Only the first overload should be marked @override (reportInconsistentOverload)
Copy file name to clipboardExpand all lines: conformance/results/pyright/overloads_evaluation.toml
+1-22Lines changed: 1 addition & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,8 @@ Does not expand enum arguments to literal variants.
5
5
Does not expand tuple arguments to possible combinations.
6
6
Does not prefer variadic match to indeterminate-length unpacked argument.
7
7
"""
8
-
conformance_automated = "Fail"
8
+
conformance_automated = "Pass"
9
9
errors_diff = """
10
-
Line 106: Unexpected errors ['overloads_evaluation.py:106:12 - error: No overloads for "expand_bool" match the provided arguments (reportCallIssue)', 'overloads_evaluation.py:106:24 - error: Argument of type "bool" cannot be assigned to parameter "x" of type "Literal[True]" in function "expand_bool"']
11
-
Line 107: Unexpected errors ['overloads_evaluation.py:107:17 - error: "assert_type" mismatch: expected "Literal[0, 1]" but received "Unknown" (reportAssertTypeFailure)']
12
-
Line 129: Unexpected errors ['overloads_evaluation.py:129:12 - error: No overloads for "expand_enum" match the provided arguments (reportCallIssue)', 'overloads_evaluation.py:129:24 - error: Argument of type "Color" cannot be assigned to parameter "x" of type "Literal[Color.BLUE]" in function "expand_enum"']
13
-
Line 130: Unexpected errors ['overloads_evaluation.py:130:17 - error: "assert_type" mismatch: expected "Literal[0, 1]" but received "Unknown" (reportAssertTypeFailure)']
14
-
Line 169: Unexpected errors ['overloads_evaluation.py:169:12 - error: No overloads for "expand_tuple" match the provided arguments (reportCallIssue)', 'overloads_evaluation.py:169:29 - error: Argument of type "tuple[Literal[1], int | str]" cannot be assigned to parameter "x" of type "tuple[int, str]" in function "expand_tuple"']
15
-
Line 170: Unexpected errors ['overloads_evaluation.py:170:17 - error: "assert_type" mismatch: expected "int | str" but received "Unknown" (reportAssertTypeFailure)']
16
-
Line 196: Unexpected errors ['overloads_evaluation.py:196:17 - error: "assert_type" mismatch: expected "int" but received "str" (reportAssertTypeFailure)']
17
10
"""
18
11
output = """
19
12
overloads_evaluation.py:32:1 - error: No overloads for "example1" match the provided arguments
@@ -29,18 +22,4 @@ overloads_evaluation.py:89:14 - error: Argument of type "int | str" cannot be as
29
22
overloads_evaluation.py:89:17 - error: Argument of type "int | str" cannot be assigned to parameter "y" of type "int" in function "example2"
30
23
Type "int | str" is not assignable to type "int"
31
24
"str" is not assignable to "int" (reportArgumentType)
32
-
overloads_evaluation.py:106:12 - error: No overloads for "expand_bool" match the provided arguments (reportCallIssue)
33
-
overloads_evaluation.py:106:24 - error: Argument of type "bool" cannot be assigned to parameter "x" of type "Literal[True]" in function "expand_bool"
34
-
"bool" is not assignable to type "Literal[True]" (reportArgumentType)
35
-
overloads_evaluation.py:107:17 - error: "assert_type" mismatch: expected "Literal[0, 1]" but received "Unknown" (reportAssertTypeFailure)
36
-
overloads_evaluation.py:129:12 - error: No overloads for "expand_enum" match the provided arguments (reportCallIssue)
37
-
overloads_evaluation.py:129:24 - error: Argument of type "Color" cannot be assigned to parameter "x" of type "Literal[Color.BLUE]" in function "expand_enum"
38
-
"Color" is not assignable to type "Literal[Color.BLUE]" (reportArgumentType)
39
-
overloads_evaluation.py:130:17 - error: "assert_type" mismatch: expected "Literal[0, 1]" but received "Unknown" (reportAssertTypeFailure)
40
-
overloads_evaluation.py:169:12 - error: No overloads for "expand_tuple" match the provided arguments (reportCallIssue)
41
-
overloads_evaluation.py:169:29 - error: Argument of type "tuple[Literal[1], int | str]" cannot be assigned to parameter "x" of type "tuple[int, str]" in function "expand_tuple"
42
-
Type "int | str" is not assignable to type "str"
43
-
"int" is not assignable to "str" (reportArgumentType)
44
-
overloads_evaluation.py:170:17 - error: "assert_type" mismatch: expected "int | str" but received "Unknown" (reportAssertTypeFailure)
45
-
overloads_evaluation.py:196:17 - error: "assert_type" mismatch: expected "int" but received "str" (reportAssertTypeFailure)
0 commit comments