Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conformance/results/pyrefly/aliases_explicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ERROR aliases_explicit.py:84:21-36: Function call cannot be used in annotations
ERROR aliases_explicit.py:85:21-29: Invalid subscript expression cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:86:21-42: If expression cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [invalid-type-alias]
ERROR aliases_explicit.py:87:21-25: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:88:22-26: Bool literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:89:22-23: Number literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:90:22-33: Boolean operation cannot be used in annotations [invalid-annotation]
Expand Down
1 change: 1 addition & 0 deletions conformance/results/pyrefly/aliases_type_statement.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ERROR aliases_type_statement.py:42:22-37: Function call cannot be used in annota
ERROR aliases_type_statement.py:43:22-30: Invalid subscript expression cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:44:22-43: If expression cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:45:22-26: Expected `BadTypeAlias9` to be a type alias, got `Literal[1]` [invalid-type-alias]
ERROR aliases_type_statement.py:45:22-26: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:46:23-27: Bool literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:47:23-24: Number literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:48:23-34: Boolean operation cannot be used in annotations [invalid-annotation]
Expand Down
1 change: 1 addition & 0 deletions conformance/results/pyrefly/aliases_typealiastype.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ERROR aliases_typealiastype.py:57:42-57: Function call cannot be used in annotat
ERROR aliases_typealiastype.py:58:42-50: Invalid subscript expression cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:59:42-63: If expression cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:60:42-46: Expected `BadAlias16` to be a type alias, got `Literal[3]` [invalid-type-alias]
ERROR aliases_typealiastype.py:60:42-46: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:61:42-46: Bool literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:62:42-43: Number literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:63:42-53: Boolean operation cannot be used in annotations [invalid-annotation]
Expand Down
12 changes: 4 additions & 8 deletions conformance/results/pyrefly/annotations_forward_refs.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
conformant = "Partial"
notes = """
Resolves forward references in type annotations in classes at the point of definition instead of end-of-scope
Fails to resolve a forward reference to a nested class
"""
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 94: Expected 1 errors
Line 96: Expected 1 errors
"""
output = """
ERROR annotations_forward_refs.py:23:12-18: `ClassA` is uninitialized [unbound-name]
Expand All @@ -30,6 +24,8 @@ ERROR annotations_forward_refs.py:54:11-17: F-string cannot be used in annotatio
ERROR annotations_forward_refs.py:55:11-16: Expected a type form, got instance of `Module[types]` [not-a-type]
ERROR annotations_forward_refs.py:83:13-23: Could not find name `ClassInner` [unknown-name]
ERROR annotations_forward_refs.py:92:14-20: Could not find name `ClassF` [unknown-name]
ERROR annotations_forward_refs.py:94:11-14: Circular reference to `str` in annotation [invalid-annotation]
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]
ERROR annotations_forward_refs.py:101:8-11: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]
ERROR annotations_forward_refs.py:103:9-12: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]
ERROR annotations_forward_refs.py:111:16-45: assert_type(Unknown, ClassD.ClassInner) failed [assert-type]
Expand Down
12 changes: 4 additions & 8 deletions conformance/results/pyrefly/annotations_future_import.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
conformant = "Partial"
notes = """
Forward references to nested classes are not resolved
Resolves forward references in type annotations in classes at the point of definition instead of end-of-scope
"""
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 37: Expected 1 errors
Line 39: Expected 1 errors
"""
output = """
ERROR annotations_future_import.py:37:10-13: Circular reference to `str` in annotation [invalid-annotation]
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]
ERROR annotations_future_import.py:44:8-11: Expected a type form, got instance of `(self: Self@ClassB) -> None` [not-a-type]
ERROR annotations_future_import.py:46:9-12: Expected a type form, got instance of `(self: Self@ClassB) -> None` [not-a-type]
"""
1 change: 1 addition & 0 deletions conformance/results/pyrefly/directives_deprecated.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ output = """
WARN directives_deprecated.py:24:1-23: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
WARN directives_deprecated.py:25:5-27: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
WARN directives_deprecated.py:30:12-15: Call to deprecated overload `_directives_deprecated_library.foo` [deprecated]
WARN directives_deprecated.py:34:7-10: `_directives_deprecated_library.Ham` is deprecated [deprecated]
WARN directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [deprecated]
WARN directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [deprecated]
WARN directives_deprecated.py:44:1-12: `_directives_deprecated_library.Spam.greasy` is deprecated [deprecated]
Expand Down
31 changes: 7 additions & 24 deletions conformance/results/pyrefly/generics_paramspec_variance.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
conformant = "Unsupported"
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 117: Expected 1 errors
Line 126: Expected 1 errors
Line 97: Unexpected errors ['Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]']
Line 98: Unexpected errors ['Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]']
Line 99: Unexpected errors ['Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]']
Line 122: Unexpected errors ['`ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]']
Line 133: Unexpected errors ['`CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]']
Line 143: Unexpected errors ['`InferredContravariantParamSpecOld[[object]]` is not assignable to `InferredContravariantParamSpecOld[[int]]` [bad-assignment]']
Line 152: Unexpected errors ['`InferredCovariantParamSpecOld[[int]]` is not assignable to `InferredCovariantParamSpecOld[[object]]` [bad-assignment]']
"""
output = """
ERROR generics_paramspec_variance.py:14:42-67: `InvariantParamSpec[[int]]` is not assignable to `InvariantParamSpec[[object]]` [bad-assignment]
Expand All @@ -23,23 +14,15 @@ ERROR generics_paramspec_variance.py:69:12-22: `InitP[[a: int, b: str]]` is not
ERROR generics_paramspec_variance.py:88:13-24: `OutitP[[b: int]]` is not assignable to attribute `t` with type `OutitP[[a: int]]` [bad-assignment]
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]
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]
ERROR generics_paramspec_variance.py:97:24-42: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:98:26-40: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:99:30-49: Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:100:28-42: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:100:44-62: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:101:28-42: Unexpected keyword argument `covariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:101:44-63: Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:102:28-46: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:102:48-67: Unexpected keyword argument `infer_variance` to ParamSpec [invalid-param-spec]
ERROR generics_paramspec_variance.py:100:44-62: Contradictory variance specifications [invalid-param-spec]
ERROR generics_paramspec_variance.py:101:44-63: Contradictory variance specifications [invalid-param-spec]
ERROR generics_paramspec_variance.py:102:48-67: Contradictory variance specifications [invalid-param-spec]
ERROR generics_paramspec_variance.py:110:14-43: `InvariantParamSpecOld[[bool]]` is not assignable to variable `in_out_old` with type `InvariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:111:14-45: `InvariantParamSpecOld[[object]]` is not assignable to variable `in_out_old` with type `InvariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:117:9-14: Type variable `InP` is contravariant but is used in covariant position [invalid-variance]
ERROR generics_paramspec_variance.py:121:49-81: `ContravariantParamSpecOld[[int]]` is not assignable to `ContravariantParamSpecOld[[object]]` [bad-assignment]
ERROR generics_paramspec_variance.py:122:46-81: `ContravariantParamSpecOld[[object]]` is not assignable to `ContravariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:126:9-13: Type variable `OutP` is covariant but is used in contravariant position [invalid-variance]
ERROR generics_paramspec_variance.py:132:43-74: `CovariantParamSpecOld[[object]]` is not assignable to `CovariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:133:46-74: `CovariantParamSpecOld[[int]]` is not assignable to `CovariantParamSpecOld[[object]]` [bad-assignment]
ERROR generics_paramspec_variance.py:142:63-103: `InferredContravariantParamSpecOld[[int]]` is not assignable to `InferredContravariantParamSpecOld[[object]]` [bad-assignment]
ERROR generics_paramspec_variance.py:143:60-103: `InferredContravariantParamSpecOld[[object]]` is not assignable to `InferredContravariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:151:57-96: `InferredCovariantParamSpecOld[[object]]` is not assignable to `InferredCovariantParamSpecOld[[int]]` [bad-assignment]
ERROR generics_paramspec_variance.py:152:60-96: `InferredCovariantParamSpecOld[[int]]` is not assignable to `InferredCovariantParamSpecOld[[object]]` [bad-assignment]
"""
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ERROR generics_syntax_declarations.py:48:17-27: Expected a type form, got instan
ERROR generics_syntax_declarations.py:60:17-19: Expected at least 2 constraints in TypeVar `T`, got 0 [invalid-type-var]
ERROR generics_syntax_declarations.py:64:17-23: Expected at least 2 constraints in TypeVar `T`, got 1 [invalid-type-var]
ERROR generics_syntax_declarations.py:71:17-19: Expected a type form, got instance of `tuple[type[bytes], type[str]]` [not-a-type]
ERROR generics_syntax_declarations.py:71:17-19: `t1` is not a valid type alias: Tuple literal cannot be used in annotations [invalid-annotation]
ERROR generics_syntax_declarations.py:75:18-19: Expected a type form, got instance of `Literal[3]` [not-a-type]
ERROR generics_syntax_declarations.py:79:23-24: Could not find name `S` [unknown-name]
"""
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ERROR generics_typevartuple_basic.py:54:37-42: `TypeVarTuple` must be unpacked [
ERROR generics_typevartuple_basic.py:57:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:60:24-29: `TypeVarTuple` must be unpacked [invalid-annotation]
ERROR generics_typevartuple_basic.py:66:27-30: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:66:32-37: Unexpected positional argument to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_basic.py:67:27-36: Unexpected keyword argument `bound` to TypeVarTuple [invalid-type-var-tuple]
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]
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]
Expand Down
31 changes: 7 additions & 24 deletions conformance/results/pyrefly/generics_typevartuple_variance.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
conformant = "Unsupported"
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 79: Expected 1 errors
Line 90: Expected 1 errors
Line 55: Unexpected errors ['Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]']
Line 73: Unexpected errors ['Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 84: Unexpected errors ['`ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]']
Line 87: Unexpected errors ['Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]']
Line 98: Unexpected errors ['`CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]']
Line 108: Unexpected errors ['`InferredContravariantTypeVarTupleOld[object]` is not assignable to `InferredContravariantTypeVarTupleOld[int]` [bad-assignment]']
Line 117: Unexpected errors ['`InferredCovariantTypeVarTupleOld[int]` is not assignable to `InferredCovariantTypeVarTupleOld[object]` [bad-assignment]']
"""
output = """
ERROR generics_typevartuple_variance.py:14:45-73: `InvariantTypeVarTuple[int]` is not assignable to `InvariantTypeVarTuple[object]` [bad-assignment]
Expand All @@ -27,23 +18,15 @@ ERROR generics_typevartuple_variance.py:46:50-88: `CovariantTypeVarTuple[object,
ERROR generics_typevartuple_variance.py:47:50-90: `CovariantTypeVarTuple[object, object]` is not assignable to `CovariantTypeVarTuple[int, int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:48:61-105: `CovariantTypeVarTuple[*tuple[object, ...]]` is not assignable to `CovariantTypeVarTuple[*tuple[int, ...]]` [bad-assignment]
ERROR generics_typevartuple_variance.py:51:55-96: `CovariantTypeVarTuple[*tuple[int, ...]]` is not assignable to `CovariantTypeVarTuple[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:55:35-54: Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:56:33-47: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:56:49-67: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:57:33-47: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:57:49-68: Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:58:33-51: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:58:53-72: Unexpected keyword argument `infer_variance` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:56:49-67: Contradictory variance specifications [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:57:49-68: Contradictory variance specifications [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:58:53-72: Contradictory variance specifications [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:68:45-76: `InvariantTypeVarTupleOld[int]` is not assignable to `InvariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:69:42-76: `InvariantTypeVarTupleOld[object]` is not assignable to `InvariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:73:29-47: Unexpected keyword argument `contravariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:79:9-14: Type variable `InTs` is contravariant but is used in covariant position [invalid-variance]
ERROR generics_typevartuple_variance.py:83:52-87: `ContravariantTypeVarTupleOld[int]` is not assignable to `ContravariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:84:49-87: `ContravariantTypeVarTupleOld[object]` is not assignable to `ContravariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:87:31-45: Unexpected keyword argument `covariant` to TypeVarTuple [invalid-type-var-tuple]
ERROR generics_typevartuple_variance.py:90:9-13: Type variable `OutTs` is covariant but is used in contravariant position [invalid-variance]
ERROR generics_typevartuple_variance.py:97:46-80: `CovariantTypeVarTupleOld[object]` is not assignable to `CovariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:98:49-80: `CovariantTypeVarTupleOld[int]` is not assignable to `CovariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:107:66-109: `InferredContravariantTypeVarTupleOld[int]` is not assignable to `InferredContravariantTypeVarTupleOld[object]` [bad-assignment]
ERROR generics_typevartuple_variance.py:108:63-109: `InferredContravariantTypeVarTupleOld[object]` is not assignable to `InferredContravariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:116:60-102: `InferredCovariantTypeVarTupleOld[object]` is not assignable to `InferredCovariantTypeVarTupleOld[int]` [bad-assignment]
ERROR generics_typevartuple_variance.py:117:63-102: `InferredCovariantTypeVarTupleOld[int]` is not assignable to `InferredCovariantTypeVarTupleOld[object]` [bad-assignment]
"""
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/protocols_explicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
ERROR protocols_explicit.py:27:16-28: Method `draw` inherited from class `PColor` has no implementation and cannot be accessed via `super()` [missing-attribute]
ERROR protocols_explicit.py:27:16-28: Method `draw` inherited from class `PColor` has no implementation and cannot be accessed via `super()` [abstract-method-call]
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]
ERROR protocols_explicit.py:60:10-20: Cannot instantiate `Point` because the following members are abstract: `intensity`, `transparency` [bad-instantiation]
ERROR protocols_explicit.py:89:15-17: Cannot instantiate `Concrete1` because the following members are abstract: `cm1` [bad-instantiation]
Expand Down
9 changes: 2 additions & 7 deletions conformance/results/pyrefly/protocols_variance.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
conformant = "Partial"
conformance_automated = "Fail"
notes = """
Doesn't support variance keywords to ParamSpec
"""
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 15: Unexpected errors ['Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]']
"""
output = """
ERROR protocols_variance.py:15:20-38: Unexpected keyword argument `contravariant` to ParamSpec [invalid-param-spec]
WARN protocols_variance.py:22:7-17: Type variable `T1` in class `AnotherBox` is declared as invariant, but could be covariant based on its usage [variance-mismatch]
WARN protocols_variance.py:41:7-16: Type variable `T3` in class `Protocol2` is declared as invariant, but could be contravariant based on its usage [variance-mismatch]
WARN protocols_variance.py:57:7-16: Type variable `T1` in class `Protocol4` is declared as invariant, but could be contravariant based on its usage [variance-mismatch]
Expand Down
Loading