Skip to content

Commit 9026db3

Browse files
authored
Update conformance results for pyrefly 1.5.0 (#2391)
1 parent 6d2f52c commit 9026db3

17 files changed

Lines changed: 60 additions & 117 deletions

‎conformance/results/pyrefly/aliases_explicit.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ERROR aliases_explicit.py:84:21-36: Function call cannot be used in annotations
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]
2121
ERROR aliases_explicit.py:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [invalid-type-alias]
22+
ERROR aliases_explicit.py:87:21-25: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
2223
ERROR aliases_explicit.py:88:22-26: Bool literal cannot be used in annotations [invalid-annotation]
2324
ERROR aliases_explicit.py:89:22-23: Number literal cannot be used in annotations [invalid-annotation]
2425
ERROR aliases_explicit.py:90:22-33: Boolean operation cannot be used in annotations [invalid-annotation]

‎conformance/results/pyrefly/aliases_type_statement.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ERROR aliases_type_statement.py:42:22-37: Function call cannot be used in annota
1919
ERROR aliases_type_statement.py:43:22-30: Invalid subscript expression cannot be used in annotations [invalid-annotation]
2020
ERROR aliases_type_statement.py:44:22-43: If expression cannot be used in annotations [invalid-annotation]
2121
ERROR aliases_type_statement.py:45:22-26: Expected `BadTypeAlias9` to be a type alias, got `Literal[1]` [invalid-type-alias]
22+
ERROR aliases_type_statement.py:45:22-26: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
2223
ERROR aliases_type_statement.py:46:23-27: Bool literal cannot be used in annotations [invalid-annotation]
2324
ERROR aliases_type_statement.py:47:23-24: Number literal cannot be used in annotations [invalid-annotation]
2425
ERROR aliases_type_statement.py:48:23-34: Boolean operation cannot be used in annotations [invalid-annotation]

‎conformance/results/pyrefly/aliases_typealiastype.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ERROR aliases_typealiastype.py:57:42-57: Function call cannot be used in annotat
2323
ERROR aliases_typealiastype.py:58:42-50: Invalid subscript expression cannot be used in annotations [invalid-annotation]
2424
ERROR aliases_typealiastype.py:59:42-63: If expression cannot be used in annotations [invalid-annotation]
2525
ERROR aliases_typealiastype.py:60:42-46: Expected `BadAlias16` to be a type alias, got `Literal[3]` [invalid-type-alias]
26+
ERROR aliases_typealiastype.py:60:42-46: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
2627
ERROR aliases_typealiastype.py:61:42-46: Bool literal cannot be used in annotations [invalid-annotation]
2728
ERROR aliases_typealiastype.py:62:42-43: Number literal cannot be used in annotations [invalid-annotation]
2829
ERROR aliases_typealiastype.py:63:42-53: Boolean operation cannot be used in annotations [invalid-annotation]

‎conformance/results/pyrefly/annotations_forward_refs.toml‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
conformant = "Partial"
2-
notes = """
3-
Resolves forward references in type annotations in classes at the point of definition instead of end-of-scope
4-
Fails to resolve a forward reference to a nested class
5-
"""
6-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
73
errors_diff = """
8-
Line 94: Expected 1 errors
9-
Line 96: Expected 1 errors
104
"""
115
output = """
126
ERROR annotations_forward_refs.py:23:12-18: `ClassA` is uninitialized [unbound-name]
@@ -30,6 +24,8 @@ ERROR annotations_forward_refs.py:54:11-17: F-string cannot be used in annotatio
3024
ERROR annotations_forward_refs.py:55:11-16: Expected a type form, got instance of `Module[types]` [not-a-type]
3125
ERROR annotations_forward_refs.py:83:13-23: Could not find name `ClassInner` [unknown-name]
3226
ERROR annotations_forward_refs.py:92:14-20: Could not find name `ClassF` [unknown-name]
27+
ERROR annotations_forward_refs.py:94:11-14: Circular reference to `str` in annotation [invalid-annotation]
28+
ERROR annotations_forward_refs.py:96:9-12: Expected a type form, got class attribute `int` of type `(self: Self@ClassD) -> None` [not-a-type]
3329
ERROR annotations_forward_refs.py:101:8-11: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]
3430
ERROR annotations_forward_refs.py:103:9-12: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]
3531
ERROR annotations_forward_refs.py:111:16-45: assert_type(Unknown, ClassD.ClassInner) failed [assert-type]
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
conformant = "Partial"
2-
notes = """
3-
Forward references to nested classes are not resolved
4-
Resolves forward references in type annotations in classes at the point of definition instead of end-of-scope
5-
"""
6-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
73
errors_diff = """
8-
Line 37: Expected 1 errors
9-
Line 39: Expected 1 errors
104
"""
115
output = """
6+
ERROR annotations_future_import.py:37:10-13: Circular reference to `str` in annotation [invalid-annotation]
7+
ERROR annotations_future_import.py:39:8-11: Expected a type form, got class attribute `int` of type `(self: Self@ClassB) -> None` [not-a-type]
128
ERROR annotations_future_import.py:44:8-11: Expected a type form, got instance of `(self: Self@ClassB) -> None` [not-a-type]
139
ERROR annotations_future_import.py:46:9-12: Expected a type form, got instance of `(self: Self@ClassB) -> None` [not-a-type]
1410
"""

‎conformance/results/pyrefly/directives_deprecated.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ output = """
77
WARN directives_deprecated.py:24:1-23: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
88
WARN directives_deprecated.py:25:5-27: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
99
WARN directives_deprecated.py:30:12-15: Call to deprecated overload `_directives_deprecated_library.foo` [deprecated]
10+
WARN directives_deprecated.py:34:7-10: `_directives_deprecated_library.Ham` is deprecated [deprecated]
1011
WARN directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [deprecated]
1112
WARN directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [deprecated]
1213
WARN directives_deprecated.py:44:1-12: `_directives_deprecated_library.Spam.greasy` is deprecated [deprecated]
Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
conformant = "Unsupported"
2-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
33
errors_diff = """
4-
Line 117: Expected 1 errors
5-
Line 126: Expected 1 errors
6-
Line 97: Unexpected errors ['Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]']
7-
Line 98: Unexpected errors ['Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]']
8-
Line 99: Unexpected errors ['Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]']
9-
Line 122: Unexpected errors ['`ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]']
10-
Line 133: Unexpected errors ['`CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]']
11-
Line 143: Unexpected errors ['`InferredContravariantParamSpecOld[[object]]` is not assignable to `InferredContravariantParamSpecOld[[int]]` [bad-assignment]']
12-
Line 152: Unexpected errors ['`InferredCovariantParamSpecOld[[int]]` is not assignable to `InferredCovariantParamSpecOld[[object]]` [bad-assignment]']
134
"""
145
output = """
156
ERROR generics_paramspec_variance.py:14:42-67: `InvariantParamSpec[[int]]` is not assignable to `InvariantParamSpec[[object]]` [bad-assignment]
@@ -23,23 +14,15 @@ ERROR generics_paramspec_variance.py:69:12-22: `InitP[[a: int, b: str]]` is not
2314
ERROR generics_paramspec_variance.py:88:13-24: `OutitP[[b: int]]` is not assignable to attribute `t` with type `OutitP[[a: int]]` [bad-assignment]
2415
ERROR generics_paramspec_variance.py:90:13-26: `OutitP[[a: int = 1]]` is not assignable to attribute `t` with type `OutitP[[a: int]]` [bad-assignment]
2516
ERROR generics_paramspec_variance.py:92:13-24: `OutitP[[a: int, b: str]]` is not assignable to attribute `t` with type `OutitP[[a: int]]` [bad-assignment]
26-
ERROR generics_paramspec_variance.py:97:24-42: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
27-
ERROR generics_paramspec_variance.py:98:26-40: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
28-
ERROR generics_paramspec_variance.py:99:30-49: Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]
29-
ERROR generics_paramspec_variance.py:100:28-42: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
30-
ERROR generics_paramspec_variance.py:100:44-62: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
31-
ERROR generics_paramspec_variance.py:101:28-42: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
32-
ERROR generics_paramspec_variance.py:101:44-63: Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]
33-
ERROR generics_paramspec_variance.py:102:28-46: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
34-
ERROR generics_paramspec_variance.py:102:48-67: Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]
17+
ERROR generics_paramspec_variance.py:100:44-62: Contradictory variance specifications [invalid-param-spec]
18+
ERROR generics_paramspec_variance.py:101:44-63: Contradictory variance specifications [invalid-param-spec]
19+
ERROR generics_paramspec_variance.py:102:48-67: Contradictory variance specifications [invalid-param-spec]
3520
ERROR generics_paramspec_variance.py:110:14-43: `InvariantParamSpecOld[[bool]]` is not assignable to variable `in_out_old` with type `InvariantParamSpecOld[[int]]` [bad-assignment]
3621
ERROR generics_paramspec_variance.py:111:14-45: `InvariantParamSpecOld[[object]]` is not assignable to variable `in_out_old` with type `InvariantParamSpecOld[[int]]` [bad-assignment]
22+
ERROR generics_paramspec_variance.py:117:9-14: Type variable `InP` is contravariant but is used in covariant position [invalid-variance]
3723
ERROR generics_paramspec_variance.py:121:49-81: `ContravariantParamSpecOld[[int]]` is not assignable to `ContravariantParamSpecOld[[object]]` [bad-assignment]
38-
ERROR generics_paramspec_variance.py:122:46-81: `ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]
24+
ERROR generics_paramspec_variance.py:126:9-13: Type variable `OutP` is covariant but is used in contravariant position [invalid-variance]
3925
ERROR generics_paramspec_variance.py:132:43-74: `CovariantParamSpecOld[[object]]` is not assignable to `CovariantParamSpecOld[[int]]` [bad-assignment]
40-
ERROR generics_paramspec_variance.py:133:46-74: `CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]
4126
ERROR generics_paramspec_variance.py:142:63-103: `InferredContravariantParamSpecOld[[int]]` is not assignable to `InferredContravariantParamSpecOld[[object]]` [bad-assignment]
42-
ERROR generics_paramspec_variance.py:143:60-103: `InferredContravariantParamSpecOld[[object]]` is not assignable to `InferredContravariantParamSpecOld[[int]]` [bad-assignment]
4327
ERROR generics_paramspec_variance.py:151:57-96: `InferredCovariantParamSpecOld[[object]]` is not assignable to `InferredCovariantParamSpecOld[[int]]` [bad-assignment]
44-
ERROR generics_paramspec_variance.py:152:60-96: `InferredCovariantParamSpecOld[[int]]` is not assignable to `InferredCovariantParamSpecOld[[object]]` [bad-assignment]
4528
"""

‎conformance/results/pyrefly/generics_syntax_declarations.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ERROR generics_syntax_declarations.py:48:17-27: Expected a type form, got instan
1111
ERROR generics_syntax_declarations.py:60:17-19: Expected at least 2 constraints in TypeVar `T`, got 0 [invalid-type-var]
1212
ERROR generics_syntax_declarations.py:64:17-23: Expected at least 2 constraints in TypeVar `T`, got 1 [invalid-type-var]
1313
ERROR generics_syntax_declarations.py:71:17-19: Expected a type form, got instance of `tuple[type[bytes], type[str]]` [not-a-type]
14+
ERROR generics_syntax_declarations.py:71:17-19: `t1` is not a valid type alias: Tuple literal cannot be used in annotations [invalid-annotation]
1415
ERROR generics_syntax_declarations.py:75:18-19: Expected a type form, got instance of `Literal[3]` [not-a-type]
1516
ERROR generics_syntax_declarations.py:79:23-24: Could not find name `S` [unknown-name]
1617
"""

‎conformance/results/pyrefly/generics_typevartuple_basic.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ERROR generics_typevartuple_basic.py:54:37-42: `TypeVarTuple` must be unpacked [
1111
ERROR generics_typevartuple_basic.py:57:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
1212
ERROR generics_typevartuple_basic.py:60:24-29: `TypeVarTuple` must be unpacked [invalid-annotation]
1313
ERROR generics_typevartuple_basic.py:66:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
14+
ERROR generics_typevartuple_basic.py:66:32-37: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
1415
ERROR generics_typevartuple_basic.py:67:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple]
1516
ERROR generics_typevartuple_basic.py:91:15-19: Argument `tuple[Literal[0]]` is not assignable to parameter `arg2` with type `tuple[int, int]` in function `func2` [bad-argument-type]
1617
ERROR generics_typevartuple_basic.py:100:17-18: Argument `Array[Width]` is not assignable to parameter `y` with type `Array[Height]` in function `multiply` [bad-argument-type]
Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
conformant = "Unsupported"
2-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
33
errors_diff = """
4-
Line 79: Expected 1 errors
5-
Line 90: Expected 1 errors
6-
Line 55: Unexpected errors ['Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]']
7-
Line 73: Unexpected errors ['Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]']
8-
Line 84: Unexpected errors ['`ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]']
9-
Line 87: Unexpected errors ['Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]']
10-
Line 98: Unexpected errors ['`CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]']
11-
Line 108: Unexpected errors ['`InferredContravariantTypeVarTupleOld[object]` is not assignable to `InferredContravariantTypeVarTupleOld[int]` [bad-assignment]']
12-
Line 117: Unexpected errors ['`InferredCovariantTypeVarTupleOld[int]` is not assignable to `InferredCovariantTypeVarTupleOld[object]` [bad-assignment]']
134
"""
145
output = """
156
ERROR generics_typevartuple_variance.py:14:45-73: `InvariantTypeVarTuple[int]` is not assignable to `InvariantTypeVarTuple[object]` [bad-assignment]
@@ -27,23 +18,15 @@ ERROR generics_typevartuple_variance.py:46:50-88: `CovariantTypeVarTuple[object,
2718
ERROR generics_typevartuple_variance.py:47:50-90: `CovariantTypeVarTuple[object, object]` is not assignable to `CovariantTypeVarTuple[int, int]` [bad-assignment]
2819
ERROR generics_typevartuple_variance.py:48:61-105: `CovariantTypeVarTuple[*tuple[object, ...]]` is not assignable to `CovariantTypeVarTuple[*tuple[int, ...]]` [bad-assignment]
2920
ERROR generics_typevartuple_variance.py:51:55-96: `CovariantTypeVarTuple[*tuple[int, ...]]` is not assignable to `CovariantTypeVarTuple[int]` [bad-assignment]
30-
ERROR generics_typevartuple_variance.py:55:35-54: Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]
31-
ERROR generics_typevartuple_variance.py:56:33-47: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
32-
ERROR generics_typevartuple_variance.py:56:49-67: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
33-
ERROR generics_typevartuple_variance.py:57:33-47: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
34-
ERROR generics_typevartuple_variance.py:57:49-68: Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]
35-
ERROR generics_typevartuple_variance.py:58:33-51: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
36-
ERROR generics_typevartuple_variance.py:58:53-72: Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]
21+
ERROR generics_typevartuple_variance.py:56:49-67: Contradictory variance specifications [invalid-type-var-tuple]
22+
ERROR generics_typevartuple_variance.py:57:49-68: Contradictory variance specifications [invalid-type-var-tuple]
23+
ERROR generics_typevartuple_variance.py:58:53-72: Contradictory variance specifications [invalid-type-var-tuple]
3724
ERROR generics_typevartuple_variance.py:68:45-76: `InvariantTypeVarTupleOld[int]` is not assignable to `InvariantTypeVarTupleOld[object]` [bad-assignment]
3825
ERROR generics_typevartuple_variance.py:69:42-76: `InvariantTypeVarTupleOld[object]` is not assignable to `InvariantTypeVarTupleOld[int]` [bad-assignment]
39-
ERROR generics_typevartuple_variance.py:73:29-47: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
26+
ERROR generics_typevartuple_variance.py:79:9-14: Type variable `InTs` is contravariant but is used in covariant position [invalid-variance]
4027
ERROR generics_typevartuple_variance.py:83:52-87: `ContravariantTypeVarTupleOld[int]` is not assignable to `ContravariantTypeVarTupleOld[object]` [bad-assignment]
41-
ERROR generics_typevartuple_variance.py:84:49-87: `ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]
42-
ERROR generics_typevartuple_variance.py:87:31-45: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
28+
ERROR generics_typevartuple_variance.py:90:9-13: Type variable `OutTs` is covariant but is used in contravariant position [invalid-variance]
4329
ERROR generics_typevartuple_variance.py:97:46-80: `CovariantTypeVarTupleOld[object]` is not assignable to `CovariantTypeVarTupleOld[int]` [bad-assignment]
44-
ERROR generics_typevartuple_variance.py:98:49-80: `CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]
4530
ERROR generics_typevartuple_variance.py:107:66-109: `InferredContravariantTypeVarTupleOld[int]` is not assignable to `InferredContravariantTypeVarTupleOld[object]` [bad-assignment]
46-
ERROR generics_typevartuple_variance.py:108:63-109: `InferredContravariantTypeVarTupleOld[object]` is not assignable to `InferredContravariantTypeVarTupleOld[int]` [bad-assignment]
4731
ERROR generics_typevartuple_variance.py:116:60-102: `InferredCovariantTypeVarTupleOld[object]` is not assignable to `InferredCovariantTypeVarTupleOld[int]` [bad-assignment]
48-
ERROR generics_typevartuple_variance.py:117:63-102: `InferredCovariantTypeVarTupleOld[int]` is not assignable to `InferredCovariantTypeVarTupleOld[object]` [bad-assignment]
4932
"""

0 commit comments

Comments
 (0)