Skip to content

Commit 474b63e

Browse files
committed
Run conformance tests
1 parent e88b2eb commit 474b63e

Some content is hidden

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

47 files changed

+181
-325
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/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
"""
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/protocols_runtime_checkable.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ output = """
66
ERROR protocols_runtime_checkable.py:23:22-28: Protocol `Proto1` is not decorated with @runtime_checkable and cannot be used with isinstance() [invalid-argument]
77
ERROR protocols_runtime_checkable.py:55:22-34: Protocol `DataProtocol` has non-method members and cannot be used with issubclass() [invalid-argument]
88
ERROR protocols_runtime_checkable.py:61:22-53: Protocol `DataProtocol` has non-method members and cannot be used with issubclass() [invalid-argument]
9-
ERROR protocols_runtime_checkable.py:88:33-39: Runtime checkable protocol `Proto3` has an unsafe overlap with type `Concrete3A` [invalid-argument]
10-
ERROR protocols_runtime_checkable.py:92:23-48: Runtime checkable protocol `Proto3` has an unsafe overlap with type `Concrete3B` [invalid-argument]
11-
ERROR protocols_runtime_checkable.py:92:23-48: Runtime checkable protocol `NonDataProtocol` has an unsafe overlap with type `Concrete3B` [invalid-argument]
12-
ERROR protocols_runtime_checkable.py:96:31-56: Runtime checkable protocol `Proto3` has an unsafe overlap with type `Concrete3A` [invalid-argument]
13-
ERROR protocols_runtime_checkable.py:96:31-56: Runtime checkable protocol `NonDataProtocol` has an unsafe overlap with type `Concrete3A` [invalid-argument]
9+
ERROR protocols_runtime_checkable.py:88:33-39: Runtime checkable protocol `Proto3` has an unsafe overlap with type `Concrete3A` [unsafe-overlap]
10+
ERROR protocols_runtime_checkable.py:92:23-48: Runtime checkable protocol `Proto3` has an unsafe overlap with type `Concrete3B` [unsafe-overlap]
11+
ERROR protocols_runtime_checkable.py:92:23-48: Runtime checkable protocol `NonDataProtocol` has an unsafe overlap with type `Concrete3B` [unsafe-overlap]
12+
ERROR protocols_runtime_checkable.py:96:31-56: Runtime checkable protocol `Proto3` has an unsafe overlap with type `Concrete3A` [unsafe-overlap]
13+
ERROR protocols_runtime_checkable.py:96:31-56: Runtime checkable protocol `NonDataProtocol` has an unsafe overlap with type `Concrete3A` [unsafe-overlap]
1414
"""

conformance/results/pyrefly/qualifiers_final_annotation.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ conformance_automated = "Fail"
66
errors_diff = """
77
Line 34: Expected 1 errors
88
Line 38: Expected 1 errors
9-
Line 62: Expected 1 errors
10-
Line 63: Expected 1 errors
119
Line 107: Expected 1 errors
1210
Line 149: Expected 1 errors
1311
Line 152: Expected 1 errors
@@ -21,6 +19,8 @@ output = """
2119
ERROR qualifiers_final_annotation.py:16:7-12: Expected a type argument for `Final` [invalid-annotation]
2220
ERROR qualifiers_final_annotation.py:18:7-22: Expected 1 type argument for `Final`, got 2 [invalid-annotation]
2321
ERROR qualifiers_final_annotation.py:54:9-17: Cannot set field `ID5` [read-only]
22+
ERROR qualifiers_final_annotation.py:62:9-17: Cannot set field `id3` [read-only]
23+
ERROR qualifiers_final_annotation.py:63:9-17: Cannot set field `id4` [read-only]
2424
ERROR qualifiers_final_annotation.py:65:9-17: Cannot set field `ID7` [read-only]
2525
ERROR qualifiers_final_annotation.py:67:9-17: Cannot set field `ID7` [read-only]
2626
ERROR qualifiers_final_annotation.py:71:8-11: `RATE` is marked final [bad-assignment]

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.1"

conformance/results/pyright/specialtypes_never.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
conformant = "Pass"
22
output = """
33
specialtypes_never.py:19:22 - error: Function with declared return type "NoReturn" cannot return "None" (reportReturnType)
4-
specialtypes_never.py:86:21 - error: Type "list[Never]" is not assignable to declared type "list[int]"
4+
specialtypes_never.py:87:21 - error: Type "list[Never]" is not assignable to declared type "list[int]"
55
  "list[Never]" is not assignable to "list[int]"
66
    Type parameter "_T@list" is invariant, but "Never" is not the same as "int"
77
    Consider switching from "list" to "Sequence" which is covariant (reportAssignmentType)
8-
specialtypes_never.py:105:12 - error: Type "ClassC[Never]" is not assignable to return type "ClassC[U@func10]"
8+
specialtypes_never.py:106:12 - error: Type "ClassC[Never]" is not assignable to return type "ClassC[U@func10]"
99
  "ClassC[Never]" is not assignable to "ClassC[U@func10]"
1010
    Type parameter "T@ClassC" is invariant, but "Never" is not the same as "U@func10" (reportReturnType)
1111
"""

0 commit comments

Comments
 (0)