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
24 changes: 12 additions & 12 deletions conformance/results/pyrefly/aliases_explicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ ERROR aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[GoodType
ERROR aliases_explicit.py:69:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization]
ERROR aliases_explicit.py:70:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
ERROR aliases_explicit.py:71:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
ERROR aliases_explicit.py:79:21-61: function call cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:80:21-31: list literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:81:21-34: tuple literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:82:21-44: list comprehension cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:83:21-31: dict literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:79:21-61: Function call cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:80:21-31: List literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:81:21-34: Tuple literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:82:21-44: List comprehension cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:83:21-31: Dict literal cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:83:23-24: Could not find name `a` [unknown-name]
ERROR aliases_explicit.py:83:28-29: Could not find name `b` [unknown-name]
ERROR aliases_explicit.py:84:21-36: function call cannot be used in annotations [invalid-annotation]
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:84:21-36: Function call cannot be used in annotations [invalid-annotation]
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: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]
ERROR aliases_explicit.py:91:22-32: f-string 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]
ERROR aliases_explicit.py:91:22-32: F-string cannot be used in annotations [invalid-annotation]
ERROR aliases_explicit.py:100:5-19: `TypeAlias[ListAlias, type[list[Unknown]]]` is not subscriptable [unsupported-operation]
ERROR aliases_explicit.py:101:6-20: Expected a callable, got `TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]]` [not-callable]
ERROR aliases_explicit.py:102:5-24: `TypeAlias[ListOrSetAlias, type[list[Unknown] | set[Unknown]]]` is not subscriptable [unsupported-operation]
Expand Down
26 changes: 13 additions & 13 deletions conformance/results/pyrefly/aliases_recursive.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
conformant = "Unsupported"
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 19: Expected 1 errors
Line 20: Expected 1 errors
Line 38: Expected 1 errors
Line 39: Expected 1 errors
Line 50: Expected 1 errors
Line 51: Expected 1 errors
Line 52: Expected 1 errors
Line 63: Expected 1 errors
Line 69: Expected 1 errors
Line 72: Expected 1 errors
Line 75: Expected 1 errors
"""
output = """
ERROR aliases_recursive.py:19:12-29: `dict[str, complex | Json]` is not assignable to `dict[str, Json] | float | int | list[Json] | str | None` [bad-assignment]
ERROR aliases_recursive.py:20:12-19: `list[complex | Json]` is not assignable to `dict[str, Json] | float | int | list[Json] | str | None` [bad-assignment]
ERROR aliases_recursive.py:38:22-50: `tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]` is not assignable to `int | str | tuple[RecursiveTuple, ...]` [bad-assignment]
ERROR aliases_recursive.py:39:22-30: `tuple[Literal[1], list[int]]` is not assignable to `int | str | tuple[RecursiveTuple, ...]` [bad-assignment]
ERROR aliases_recursive.py:50:24-34: `dict[str, list[int]]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
ERROR aliases_recursive.py:51:24-55: `dict[str, list[int] | RecursiveMapping]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
ERROR aliases_recursive.py:52:24-83: `dict[str, dict[str, list[int] | RecursiveMapping] | RecursiveMapping]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
ERROR aliases_recursive.py:63:30-43: `list[list[float] | str | GenericTypeAlias1[str]]` is not assignable to `list[str | GenericTypeAlias1[str]]` [bad-assignment]
ERROR aliases_recursive.py:69:35-64: `list[int | list[int | list[int | list[float] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]]` is not assignable to `list[int | str | GenericTypeAlias2[str, int]]` [bad-assignment]
ERROR aliases_recursive.py:72:29-57: Found cyclic self-reference in `RecursiveUnion` [invalid-type-alias]
ERROR aliases_recursive.py:75:31-61: Found cyclic self-reference in `MutualReference1` [invalid-type-alias]
"""
40 changes: 18 additions & 22 deletions conformance/results/pyrefly/aliases_type_statement.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
conformant = "Partial"
notes = """
Does not reject redeclaration of type alias with the same name.
Does not detect circular definitions.
"""
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 82: Expected 1 errors
Line 84: Expected 1 errors
Lines 51, 52: Expected error (tag 'TA14')
Lines 88, 89: Expected error (tag 'RTA6')
"""
output = """
ERROR aliases_type_statement.py:17:1-21: Object of class `TypeAliasType` has no attribute `bit_count` [missing-attribute]
ERROR aliases_type_statement.py:19:1-11: Expected a callable, got `TypeAlias[GoodAlias1, type[int]]` [not-callable]
ERROR aliases_type_statement.py:23:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute]
ERROR aliases_type_statement.py:26:18-28: Cannot use scoped type alias `GoodAlias1` as a base class. Use a legacy type alias instead: `GoodAlias1: TypeAlias = type[int]` [invalid-inheritance]
ERROR aliases_type_statement.py:31:22-32: Expected class object, got `TypeAliasType` [invalid-argument]
ERROR aliases_type_statement.py:37:22-62: function call cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:38:22-32: list literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:39:22-35: tuple literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:40:22-45: list comprehension cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:41:22-32: dict literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:37:22-62: Function call cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:38:22-32: List literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:39:22-35: Tuple literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:40:22-45: List comprehension cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:41:22-32: Dict literal cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:41:24-25: Could not find name `a` [unknown-name]
ERROR aliases_type_statement.py:41:29-30: Could not find name `b` [unknown-name]
ERROR aliases_type_statement.py:42:22-37: function call cannot be used in annotations [invalid-annotation]
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:42:22-37: Function call cannot be used in annotations [invalid-annotation]
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: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]
ERROR aliases_type_statement.py:49:23-33: f-string 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]
ERROR aliases_type_statement.py:49:23-33: F-string cannot be used in annotations [invalid-annotation]
ERROR aliases_type_statement.py:52:6-20: Cannot redefine existing type alias `BadTypeAlias14` [redefinition]
ERROR aliases_type_statement.py:56:5-30: `type` statement is not allowed in this context [invalid-syntax]
ERROR aliases_type_statement.py:62:15-25: Type parameters used in `TA1` but not declared [invalid-type-var]
ERROR aliases_type_statement.py:67:12-20: Type parameters used in `TA2` but not declared [invalid-type-var]
ERROR aliases_type_statement.py:77:7-41: `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization]
ERROR aliases_type_statement.py:79:7-41: `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization]
ERROR aliases_type_statement.py:82:28-47: Found cyclic self-reference in `RecursiveTypeAlias3` [invalid-type-alias]
ERROR aliases_type_statement.py:84:31-59: Found cyclic self-reference in `RecursiveTypeAlias4` [invalid-type-alias]
ERROR aliases_type_statement.py:89:28-47: Found cyclic self-reference in `RecursiveTypeAlias7` [invalid-type-alias]
"""
33 changes: 17 additions & 16 deletions conformance/results/pyrefly/aliases_typealiastype.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,31 @@ Does not detect circular definitions.
"""
conformance_automated = "Fail"
errors_diff = """
Line 46: Expected 1 errors
Line 47: Expected 1 errors
Line 48: Expected 1 errors
Line 66: Expected 1 errors
"""
output = """
ERROR aliases_typealiastype.py:32:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute]
ERROR aliases_typealiastype.py:40:5-30: `int` is not assignable to upper bound `str` of type variable `TStr` [bad-specialization]
ERROR aliases_typealiastype.py:43:40-47: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
ERROR aliases_typealiastype.py:44:40-47: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
ERROR aliases_typealiastype.py:43:13-66: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
ERROR aliases_typealiastype.py:44:13-48: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
ERROR aliases_typealiastype.py:45:45-65: Value for argument `type_params` must be a tuple literal [invalid-type-alias]
ERROR aliases_typealiastype.py:52:40-80: function call cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:53:40-50: list literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:54:42-55: tuple literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:55:42-65: list comprehension cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:56:42-52: dict literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:46:41-50: Found cyclic self-reference in `BadAlias4` [invalid-type-alias]
ERROR aliases_typealiastype.py:47:40-60: Found cyclic self-reference in `BadAlias5` [invalid-type-alias]
ERROR aliases_typealiastype.py:49:40-49: Found cyclic self-reference in `BadAlias7` [invalid-type-alias]
ERROR aliases_typealiastype.py:52:40-80: Function call cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:53:40-50: List literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:54:42-55: Tuple literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:55:42-65: List comprehension cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:56:42-52: Dict literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:56:44-45: Could not find name `a` [unknown-name]
ERROR aliases_typealiastype.py:56:49-50: Could not find name `b` [unknown-name]
ERROR aliases_typealiastype.py:57:42-57: function call cannot be used in annotations [invalid-annotation]
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:57:42-57: Function call cannot be used in annotations [invalid-annotation]
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: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]
ERROR aliases_typealiastype.py:64:42-52: f-string 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]
ERROR aliases_typealiastype.py:64:42-52: F-string cannot be used in annotations [invalid-annotation]
"""
12 changes: 6 additions & 6 deletions conformance/results/pyrefly/aliases_variance.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
conformant = "Unsupported"
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 24: Expected 1 errors
Line 28: Expected 1 errors
Line 32: Expected 1 errors
Line 44: Expected 1 errors
"""
output = """
ERROR aliases_variance.py:24:16-28: Type variable `T_co` is Covariant but is used in invariant position [invalid-variance]
ERROR aliases_variance.py:28:16-31: Type variable `T_co` is Covariant but is used in invariant position [invalid-variance]
ERROR aliases_variance.py:32:16-31: Type variable `T_co` is Covariant but is used in invariant position [invalid-variance]
ERROR aliases_variance.py:44:16-41: Type variable `T_contra` is Contravariant but is used in invariant position [invalid-variance]
"""
30 changes: 15 additions & 15 deletions conformance/results/pyrefly/annotations_forward_refs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ Does not reject some type forms that require quotes.
"""
conformance_automated = "Fail"
errors_diff = """
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]']
Line 96: Unexpected errors ['assert_type(Any, int) failed [assert-type]']
"""
output = """
ERROR annotations_forward_refs.py:41:10-50: function call cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:42:10-20: list literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:43:10-20: tuple literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:44:10-33: list comprehension cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:45:10-12: dict literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:46:10-26: function call cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:47:10-18: invalid subscript expression cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:48:10-31: if expression cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation]
ERROR annotations_forward_refs.py:25:7-21: `|` union syntax does not work with string literals [invalid-annotation]
ERROR annotations_forward_refs.py:41:10-50: Function call cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:42:10-20: List literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:43:10-20: Tuple literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:44:10-33: List comprehension cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:45:10-12: Dict literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:46:10-26: Function call cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:47:10-18: Invalid subscript expression cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:48:10-31: If expression cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:49:10-14: Expected a type form, got instance of `Literal[1]` [not-a-type]
ERROR annotations_forward_refs.py:50:11-15: bool literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:51:11-12: number literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:52:11-13: unary operation cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:53:11-21: boolean operation cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:54:11-17: f-string cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:50:11-15: Bool literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:51:11-12: Number literal cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:52:11-13: Unary operation cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:53:11-21: Boolean operation cannot be used in annotations [invalid-annotation]
ERROR annotations_forward_refs.py:54:11-17: F-string cannot be used in annotations [invalid-annotation]
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:80:14-20: Could not find name `ClassF` [unknown-name]
ERROR annotations_forward_refs.py:87:9-12: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]
Expand Down
Loading