Skip to content

Commit ab19cfd

Browse files
committed
Run conformance tests
1 parent 8cfbc5a commit ab19cfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+188
-324
lines changed

conformance/results/mypy/generics_defaults.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ generics_defaults.py:156: error: Expression is of type "type[Foo6[*tuple[Any, ..
1919
generics_defaults.py:156: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]
2020
generics_defaults.py:157: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type]
2121
generics_defaults.py:157: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]
22-
generics_defaults.py:171: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type]
2322
"""
2423
conformance_automated = "Fail"
2524
errors_diff = """
@@ -36,5 +35,4 @@ Line 79: Unexpected errors ['generics_defaults.py:79: error: Expression is of ty
3635
Line 94: Unexpected errors ['generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*DefaultTs]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type]']
3736
Line 156: Unexpected errors ['generics_defaults.py:156: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type]', 'generics_defaults.py:156: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]']
3837
Line 157: Unexpected errors ['generics_defaults.py:157: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type]', 'generics_defaults.py:157: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]']
39-
Line 171: Unexpected errors ['generics_defaults.py:171: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type]']
4038
"""

conformance/results/mypy/overloads_evaluation.toml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ Line 161: Unexpected errors ['overloads_evaluation.py:161: error: No overload va
1414
Line 162: Unexpected errors ['overloads_evaluation.py:162: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]']
1515
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]']
1616
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]']
17+
Line 305: Unexpected errors ['overloads_evaluation.py:305: error: Expression is of type "Any", not "float" [assert-type]']
2118
"""
2219
output = """
2320
overloads_evaluation.py:38: error: All overload variants of "example1_1" require at least one argument [call-overload]
@@ -47,7 +44,7 @@ overloads_evaluation.py:162: error: Expression is of type "Any", not "Literal[0,
4744
overloads_evaluation.py:205: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]
4845
overloads_evaluation.py:206: error: Expression is of type "int", not "int | str" [assert-type]
4946
overloads_evaluation.py:265: error: Expression is of type "list[Any]", not "Any" [assert-type]
50-
overloads_evaluation.py:281: error: Expression is of type "list[Any]", not "Any" [assert-type]
51-
overloads_evaluation.py:303: error: Expression is of type "Any", not "float" [assert-type]
52-
overloads_evaluation.py:347: error: Expression is of type "list[Any]", not "Any" [assert-type]
47+
overloads_evaluation.py:282: error: Expression is of type "list[Any]", not "Any" [assert-type]
48+
overloads_evaluation.py:305: error: Expression is of type "Any", not "float" [assert-type]
49+
overloads_evaluation.py:349: error: Expression is of type "list[Any]", not "Any" [assert-type]
5350
"""

conformance/results/mypy/specialtypes_never.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
conformant = "Pass"
22
output = """
33
specialtypes_never.py:19: error: Implicit return in function which does not return [misc]
4-
specialtypes_never.py:86: error: Incompatible types in assignment (expression has type "list[Never]", variable has type "list[int]") [assignment]
5-
specialtypes_never.py:86: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
6-
specialtypes_never.py:86: note: Consider using "Sequence" instead, which is covariant
7-
specialtypes_never.py:105: error: Incompatible return value type (got "ClassC[Never]", expected "ClassC[U]") [return-value]
4+
specialtypes_never.py:87: error: Incompatible types in assignment (expression has type "list[Never]", variable has type "list[int]") [assignment]
5+
specialtypes_never.py:87: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
6+
specialtypes_never.py:87: note: Consider using "Sequence" instead, which is covariant
7+
specialtypes_never.py:106: error: Incompatible return value type (got "ClassC[Never]", expected "ClassC[U]") [return-value]
88
"""
99
conformance_automated = "Pass"
1010
errors_diff = """
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "mypy 1.19.0"
1+
version = "mypy 1.19.1"
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Defaults are not bound by attribute access
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 171: Unexpected errors ['assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type]']
83
"""
94
output = """
105
ERROR generics_defaults.py:24:7-31: Type parameter `T` without a default cannot follow type parameter `DefaultStrT` with a default [invalid-type-var]
@@ -13,5 +8,4 @@ ERROR generics_defaults.py:107:51-54: Expected default `int` of `Invalid1` to be
138
ERROR generics_defaults.py:114:52-55: Expected default `int` of `Invalid2` to be one of the following constraints: `float`, `str` [invalid-type-var]
149
ERROR generics_defaults.py:132:12-27: assert_type(int, Any) failed [assert-type]
1510
ERROR generics_defaults.py:143:7-11: TypeVar `T5` with a default cannot follow TypeVarTuple `Ts` [invalid-type-var]
16-
ERROR generics_defaults.py:171:12-57: assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type]
1711
"""

conformance/results/pyrefly/overloads_evaluation.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ ERROR overloads_evaluation.py:38:11-13: No matching overload found for function
66
ERROR overloads_evaluation.py:46:11-17: No matching overload found for function `example1_1` called with arguments: (Literal[1], Literal[1]) [no-matching-overload]
77
ERROR overloads_evaluation.py:51:11-14: No matching overload found for function `example1_1` called with arguments: (Literal[1]) [no-matching-overload]
88
ERROR overloads_evaluation.py:116:13-22: No matching overload found for function `example2` called with arguments: (int | str, int | str, Literal[1]) [no-matching-overload]
9+
ERROR overloads_evaluation.py:266:16-33: assert_type(Any, list[Any]) failed [assert-type]
10+
ERROR overloads_evaluation.py:283:16-40: assert_type(Any, list[Any]) failed [assert-type]
11+
ERROR overloads_evaluation.py:350:16-33: assert_type(Any, list[Any]) failed [assert-type]
912
"""
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not reject call to super method with no default implementation.
4-
Does not detect stub methods inherited from protocols as abstract.
5-
"""
6-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
72
errors_diff = """
8-
Line 89: Expected 1 errors
93
"""
104
output = """
115
ERROR protocols_explicit.py:27:16-28: Method `draw` inherited from class `PColor` has no implementation and cannot be accessed via `super()` [missing-attribute]
126
ERROR protocols_explicit.py:56:20-36: `tuple[int, int, str]` is not assignable to attribute `rgb` with type `tuple[int, int, int]` [bad-assignment]
137
ERROR protocols_explicit.py:60:10-20: Cannot instantiate `Point` because the following members are abstract: `intensity`, `transparency` [bad-instantiation]
8+
ERROR protocols_explicit.py:89:15-17: Cannot instantiate `Concrete1` because the following members are abstract: `cm1` [bad-instantiation]
149
ERROR protocols_explicit.py:134:15-17: Cannot instantiate `Concrete5` because the following members are abstract: `method1` [bad-instantiation]
1510
ERROR protocols_explicit.py:164:17-19: Cannot instantiate `Concrete7A` because the following members are abstract: `method1` [bad-instantiation]
1611
"""

conformance/results/pyrefly/specialtypes_never.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Does not detect invalid return is unreachable
44
"""
55
conformance_automated = "Fail"
66
errors_diff = """
7-
Line 32: Unexpected errors ["Returned type `Literal['whatever works']` is not assignable to declared return type `int` [bad-return]"]
7+
Line 33: Unexpected errors ["Returned type `Literal['whatever works']` is not assignable to declared return type `int` [bad-return]"]
88
"""
99
output = """
1010
ERROR specialtypes_never.py:19:22-30: Function declared to return `NoReturn` but is missing an explicit `return` [bad-return]
11-
ERROR specialtypes_never.py:32:12-28: Returned type `Literal['whatever works']` is not assignable to declared return type `int` [bad-return]
12-
ERROR specialtypes_never.py:86:21-22: `list[Never]` is not assignable to `list[int]` [bad-assignment]
13-
ERROR specialtypes_never.py:105:12-27: Returned type `ClassC[Never]` is not assignable to declared return type `ClassC[U]` [bad-return]
11+
ERROR specialtypes_never.py:33:12-28: Returned type `Literal['whatever works']` is not assignable to declared return type `int` [bad-return]
12+
ERROR specialtypes_never.py:87:21-22: `list[Never]` is not assignable to `list[int]` [bad-assignment]
13+
ERROR specialtypes_never.py:106:12-27: Returned type `ClassC[Never]` is not assignable to declared return type `ClassC[U]` [bad-return]
1414
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "pyrefly 0.45.2"
1+
version = "pyrefly 0.46.0"

conformance/results/pyright/overloads_evaluation.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Does not evaluate Any in some cases where overload is ambiguous.
44
"""
55
conformance_automated = "Fail"
66
errors_diff = """
7-
Line 281: Unexpected errors ['overloads_evaluation.py:281:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)']
7+
Lines 282, 283: Expected exactly one error (tag 'example5')
8+
Line 282: Unexpected errors ['overloads_evaluation.py:282:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)']
9+
Line 283: Unexpected errors ['overloads_evaluation.py:283:17 - error: "assert_type" mismatch: expected "list[Any]" but received "list[int]" (reportAssertTypeFailure)']
810
"""
911
output = """
1012
overloads_evaluation.py:38:1 - error: No overloads for "example1_1" match the provided arguments
@@ -20,5 +22,8 @@ overloads_evaluation.py:116:14 - error: Argument of type "int | str" cannot be a
2022
overloads_evaluation.py:116:17 - error: Argument of type "int | str" cannot be assigned to parameter "y" of type "int" in function "example2"
2123
  Type "int | str" is not assignable to type "int"
2224
    "str" is not assignable to "int" (reportArgumentType)
23-
overloads_evaluation.py:281:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)
25+
overloads_evaluation.py:266:17 - error: "assert_type" mismatch: expected "list[Any]" but received "Unknown" (reportAssertTypeFailure)
26+
overloads_evaluation.py:282:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)
27+
overloads_evaluation.py:283:17 - error: "assert_type" mismatch: expected "list[Any]" but received "list[int]" (reportAssertTypeFailure)
28+
overloads_evaluation.py:350:17 - error: "assert_type" mismatch: expected "list[Any]" but received "Unknown" (reportAssertTypeFailure)
2429
"""

0 commit comments

Comments
 (0)