Skip to content

Commit 9f6d8ce

Browse files
authored
Update Pyrefly results for v0.38.0 & fix error parsing (#2107)
1 parent aabc9d8 commit 9f6d8ce

25 files changed

+97
-98
lines changed

conformance/results/pyrefly/aliases_explicit.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ERROR aliases_explicit.py:83:28-29: Could not find name `b` [unknown-name]
1818
ERROR aliases_explicit.py:84:21-36: function call cannot be used in annotations [invalid-annotation]
1919
ERROR aliases_explicit.py:85:21-29: invalid subscript expression cannot be used in annotations [invalid-annotation]
2020
ERROR aliases_explicit.py:86:21-42: if expression cannot be used in annotations [invalid-annotation]
21-
ERROR aliases_explicit.py:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [type-alias-error]
21+
ERROR aliases_explicit.py:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [invalid-type-alias]
2222
ERROR aliases_explicit.py:88:22-26: bool literal cannot be used in annotations [invalid-annotation]
2323
ERROR aliases_explicit.py:89:22-23: number literal cannot be used in annotations [invalid-annotation]
2424
ERROR aliases_explicit.py:90:22-33: boolean operation cannot be used in annotations [invalid-annotation]

conformance/results/pyrefly/aliases_implicit.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ERROR aliases_implicit.py:77:9-28: `type[list[int | None]]` is not subscriptable
1616
ERROR aliases_implicit.py:78:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization]
1717
ERROR aliases_implicit.py:79:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
1818
ERROR aliases_implicit.py:80:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
19-
ERROR aliases_implicit.py:81:9-29: Type `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization]
19+
ERROR aliases_implicit.py:81:9-29: `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization]
2020
ERROR aliases_implicit.py:107:9-22: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type]
2121
ERROR aliases_implicit.py:108:9-22: Expected a type form, got instance of `tuple[tuple[type[int], type[str]]]` [not-a-type]
2222
ERROR aliases_implicit.py:109:9-22: Expected a type form, got instance of `list[type[int]]` [not-a-type]

conformance/results/pyrefly/aliases_type_statement.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
conformant = "Partial"
22
notes = """
3-
Does not reject type alias defined with type statement in base class list
43
Does not reject redeclaration of type alias with the same name.
54
Does not detect circular definitions.
65
"""
@@ -27,14 +26,14 @@ ERROR aliases_type_statement.py:41:29-30: Could not find name `b` [unknown-name]
2726
ERROR aliases_type_statement.py:42:22-37: function call cannot be used in annotations [invalid-annotation]
2827
ERROR aliases_type_statement.py:43:22-30: invalid subscript expression cannot be used in annotations [invalid-annotation]
2928
ERROR aliases_type_statement.py:44:22-43: if expression cannot be used in annotations [invalid-annotation]
30-
ERROR aliases_type_statement.py:45:22-26: Expected `BadTypeAlias9` to be a type alias, got `Literal[1]` [type-alias-error]
29+
ERROR aliases_type_statement.py:45:22-26: Expected `BadTypeAlias9` to be a type alias, got `Literal[1]` [invalid-type-alias]
3130
ERROR aliases_type_statement.py:46:23-27: bool literal cannot be used in annotations [invalid-annotation]
3231
ERROR aliases_type_statement.py:47:23-24: number literal cannot be used in annotations [invalid-annotation]
3332
ERROR aliases_type_statement.py:48:23-34: boolean operation cannot be used in annotations [invalid-annotation]
3433
ERROR aliases_type_statement.py:49:23-33: f-string cannot be used in annotations [invalid-annotation]
3534
ERROR aliases_type_statement.py:56:5-30: `type` statement is not allowed in this context [invalid-syntax]
3635
ERROR aliases_type_statement.py:62:15-25: Type parameters used in `TA1` but not declared [invalid-type-var]
3736
ERROR aliases_type_statement.py:67:12-20: Type parameters used in `TA2` but not declared [invalid-type-var]
38-
ERROR aliases_type_statement.py:77:7-41: Type `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization]
39-
ERROR aliases_type_statement.py:79:7-41: Type `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization]
37+
ERROR aliases_type_statement.py:77:7-41: `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization]
38+
ERROR aliases_type_statement.py:79:7-41: `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization]
4039
"""

conformance/results/pyrefly/aliases_typealiastype.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
conformant = "Unsupported"
1+
conformant = "Partial"
2+
notes = """
3+
Does not detect circular definitions.
4+
"""
25
conformance_automated = "Fail"
36
errors_diff = """
47
Line 46: Expected 1 errors
@@ -8,10 +11,10 @@ Line 66: Expected 1 errors
811
"""
912
output = """
1013
ERROR aliases_typealiastype.py:32:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute]
11-
ERROR aliases_typealiastype.py:40:5-30: Type `int` is not assignable to upper bound `str` of type variable `TStr` [bad-specialization]
12-
ERROR aliases_typealiastype.py:43:40-47: Type variable `S` is out of scope for this `TypeAliasType` [type-alias-error]
13-
ERROR aliases_typealiastype.py:44:40-47: Type variable `S` is out of scope for this `TypeAliasType` [type-alias-error]
14-
ERROR aliases_typealiastype.py:45:45-65: Value for argument `type_params` must be a tuple literal [type-alias-error]
14+
ERROR aliases_typealiastype.py:40:5-30: `int` is not assignable to upper bound `str` of type variable `TStr` [bad-specialization]
15+
ERROR aliases_typealiastype.py:43:40-47: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
16+
ERROR aliases_typealiastype.py:44:40-47: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
17+
ERROR aliases_typealiastype.py:45:45-65: Value for argument `type_params` must be a tuple literal [invalid-type-alias]
1518
ERROR aliases_typealiastype.py:52:40-80: function call cannot be used in annotations [invalid-annotation]
1619
ERROR aliases_typealiastype.py:53:40-50: list literal cannot be used in annotations [invalid-annotation]
1720
ERROR aliases_typealiastype.py:54:42-55: tuple literal cannot be used in annotations [invalid-annotation]
@@ -22,7 +25,7 @@ ERROR aliases_typealiastype.py:56:49-50: Could not find name `b` [unknown-name]
2225
ERROR aliases_typealiastype.py:57:42-57: function call cannot be used in annotations [invalid-annotation]
2326
ERROR aliases_typealiastype.py:58:42-50: invalid subscript expression cannot be used in annotations [invalid-annotation]
2427
ERROR aliases_typealiastype.py:59:42-63: if expression cannot be used in annotations [invalid-annotation]
25-
ERROR aliases_typealiastype.py:60:42-46: Expected `BadAlias16` to be a type alias, got `Literal[3]` [type-alias-error]
28+
ERROR aliases_typealiastype.py:60:42-46: Expected `BadAlias16` to be a type alias, got `Literal[3]` [invalid-type-alias]
2629
ERROR aliases_typealiastype.py:61:42-46: bool literal cannot be used in annotations [invalid-annotation]
2730
ERROR aliases_typealiastype.py:62:42-43: number literal cannot be used in annotations [invalid-annotation]
2831
ERROR aliases_typealiastype.py:63:42-53: boolean operation cannot be used in annotations [invalid-annotation]

conformance/results/pyrefly/constructors_callable.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
conformant = "Partial"
22
notes = """
3-
Some overloaded constructors are not resolved correctly.
43
Converting constructor to callable does not preserve class-scoped type params.
54
Converting constructor to callable does not substitute Self in __new__
65
Converting constructor to callable uses __new__ signature instead of __init__
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
conformant = "Unsupported"
2-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
33
errors_diff = """
4-
Line 18: Expected 1 errors
5-
Line 24: Expected 1 errors
6-
Line 25: Expected 1 errors
7-
Line 30: Expected 1 errors
8-
Line 44: Expected 1 errors
9-
Line 47: Expected 1 errors
10-
Line 48: Expected 1 errors
11-
Line 58: Expected 1 errors
12-
Line 69: Expected 1 errors
13-
Line 98: Expected 1 errors
144
"""
155
output = """
16-
ERROR directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [unsupported-operation]
17-
ERROR directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [unsupported-operation]
6+
WARN directives_deprecated.py:18:44-47: `Ham` is deprecated [deprecated]
7+
WARN directives_deprecated.py:24:1-23: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
8+
WARN directives_deprecated.py:25:5-27: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
9+
WARN directives_deprecated.py:30:12-15: Call to deprecated overload `_directives_deprecated_library.foo` [deprecated]
10+
WARN directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [deprecated]
11+
WARN directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [deprecated]
12+
WARN directives_deprecated.py:44:1-12: `_directives_deprecated_library.Spam.greasy` is deprecated [deprecated]
13+
WARN directives_deprecated.py:47:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
14+
WARN directives_deprecated.py:48:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
15+
WARN directives_deprecated.py:58:1-10: `Invocable.__call__` is deprecated [deprecated]
16+
WARN directives_deprecated.py:69:1-6: `lorem` is deprecated [deprecated]
17+
WARN directives_deprecated.py:98:5-10: `SupportsFoo1.foo` is deprecated [deprecated]
1818
"""

conformance/results/pyrefly/generics_basic.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
conformant = "Partial"
22
notes = """
3-
Does not reject Type Var definition with only 1 constraint
43
Incorrect rejects + between two AnyStr
54
Constrained type var resolves to subtype instead of explcitly listed constraint
65
"""
@@ -23,8 +22,8 @@ ERROR generics_basic.py:68:16-35: assert_type(MyStr, str) failed [assert-type]
2322
ERROR generics_basic.py:68:27-28: Argument `str` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type]
2423
ERROR generics_basic.py:69:15-16: Argument `bytes` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type]
2524
ERROR generics_basic.py:121:24-25: Duplicated type parameter declaration `T` [invalid-inheritance]
26-
ERROR generics_basic.py:157:8-9: Cannot index into `MyMap1[str, int]` [index-error]
27-
ERROR generics_basic.py:158:8-9: Cannot index into `MyMap2[int, str]` [index-error]
25+
ERROR generics_basic.py:157:8-9: Cannot index into `MyMap1[str, int]` [bad-index]
26+
ERROR generics_basic.py:158:8-9: Cannot index into `MyMap2[int, str]` [bad-index]
2827
ERROR generics_basic.py:162:7-11: Expected a type variable, got `int` [invalid-type-var]
2928
ERROR generics_basic.py:163:7-11: Expected a type variable, got `int` [invalid-type-var]
3029
ERROR generics_basic.py:171:7-11: Class `Bad3` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var]

conformance/results/pyrefly/generics_upper_bound.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ output = """
55
ERROR generics_upper_bound.py:24:38-45: Type variable bounds and constraints must be concrete [invalid-annotation]
66
ERROR generics_upper_bound.py:43:12-55: assert_type(list[int], list[int] | set[int]) failed [assert-type]
77
ERROR generics_upper_bound.py:43:25-31: Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]
8-
ERROR generics_upper_bound.py:51:7-13: Type `int` is not assignable to upper bound `Sized` of type variable `ST` [bad-specialization]
8+
ERROR generics_upper_bound.py:51:7-13: `int` is not assignable to upper bound `Sized` of type variable `ST` [bad-specialization]
99
ERROR generics_upper_bound.py:56:38-49: TypeVar cannot have both constraints and bound [invalid-type-var]
1010
"""

conformance/results/pyrefly/literals_interactions.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Line 71: Unexpected errors ['`@` is not supported between `Matrix[Literal[2], Li
88
Line 72: Unexpected errors ['assert_type(Matrix[Literal[2], int], Matrix[Literal[2], Literal[7]]) failed [assert-type]']
99
"""
1010
output = """
11-
ERROR literals_interactions.py:15:5-9: Index 5 out of range for tuple with 3 elements [index-error]
12-
ERROR literals_interactions.py:16:5-9: Index -5 out of range for tuple with 3 elements [index-error]
13-
ERROR literals_interactions.py:17:5-9: Index 4 out of range for tuple with 3 elements [index-error]
14-
ERROR literals_interactions.py:18:5-10: Index -4 out of range for tuple with 3 elements [index-error]
11+
ERROR literals_interactions.py:15:5-9: Index 5 out of range for tuple with 3 elements [bad-index]
12+
ERROR literals_interactions.py:16:5-9: Index -5 out of range for tuple with 3 elements [bad-index]
13+
ERROR literals_interactions.py:17:5-9: Index 4 out of range for tuple with 3 elements [bad-index]
14+
ERROR literals_interactions.py:18:5-10: Index -4 out of range for tuple with 3 elements [bad-index]
1515
ERROR literals_interactions.py:71:9-14: `@` is not supported between `Matrix[Literal[2], Literal[3]]` and `Matrix[Literal[3], Literal[7]]` [unsupported-operation]
1616
ERROR literals_interactions.py:72:16-51: assert_type(Matrix[Literal[2], int], Matrix[Literal[2], Literal[7]]) failed [assert-type]
1717
"""

conformance/results/pyrefly/literals_literalstring.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ERROR literals_literalstring.py:43:23-24: `Literal['two']` is not assignable to
88
ERROR literals_literalstring.py:66:25-47: `str` is not assignable to `LiteralString` [bad-assignment]
99
ERROR literals_literalstring.py:74:25-26: `Literal[3]` is not assignable to `LiteralString` [bad-assignment]
1010
ERROR literals_literalstring.py:75:25-32: `Literal[b'test']` is not assignable to `LiteralString` [bad-assignment]
11-
ERROR literals_literalstring.py:120:21-24: Type `str` is not assignable to upper bound `LiteralString` of type variable `TLiteral` [bad-specialization]
11+
ERROR literals_literalstring.py:120:21-24: `str` is not assignable to upper bound `LiteralString` of type variable `TLiteral` [bad-specialization]
1212
ERROR literals_literalstring.py:134:51-52: Argument `str` is not assignable to parameter `value` with type `LiteralString` in function `Container.__init__` [bad-argument-type]
1313
ERROR literals_literalstring.py:171:21-24: `list[LiteralString]` is not assignable to `list[str]` [bad-assignment]
1414
"""

0 commit comments

Comments
 (0)