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
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/aliases_explicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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:87:21-25: Expected `BadTypeAlias9` to be a type alias, got `Literal[3]` [type-alias-error]
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]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/aliases_implicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ERROR aliases_implicit.py:77:9-28: `type[list[int | None]]` is not subscriptable
ERROR aliases_implicit.py:78:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization]
ERROR aliases_implicit.py:79:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
ERROR aliases_implicit.py:80:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
ERROR aliases_implicit.py:81:9-29: Type `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization]
ERROR aliases_implicit.py:81:9-29: `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization]
ERROR aliases_implicit.py:107:9-22: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type]
ERROR aliases_implicit.py:108:9-22: Expected a type form, got instance of `tuple[tuple[type[int], type[str]]]` [not-a-type]
ERROR aliases_implicit.py:109:9-22: Expected a type form, got instance of `list[type[int]]` [not-a-type]
Expand Down
7 changes: 3 additions & 4 deletions conformance/results/pyrefly/aliases_type_statement.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
conformant = "Partial"
notes = """
Does not reject type alias defined with type statement in base class list
Does not reject redeclaration of type alias with the same name.
Does not detect circular definitions.
"""
Expand All @@ -27,14 +26,14 @@ 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:45:22-26: Expected `BadTypeAlias9` to be a type alias, got `Literal[1]` [type-alias-error]
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: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: Type `str` is not assignable to upper bound `int` of type variable `S` [bad-specialization]
ERROR aliases_type_statement.py:79:7-41: Type `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization]
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]
"""
15 changes: 9 additions & 6 deletions conformance/results/pyrefly/aliases_typealiastype.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
conformant = "Unsupported"
conformant = "Partial"
notes = """
Does not detect circular definitions.
"""
conformance_automated = "Fail"
errors_diff = """
Line 46: Expected 1 errors
Expand All @@ -8,10 +11,10 @@ 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: Type `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` [type-alias-error]
ERROR aliases_typealiastype.py:44:40-47: Type variable `S` is out of scope for this `TypeAliasType` [type-alias-error]
ERROR aliases_typealiastype.py:45:45-65: Value for argument `type_params` must be a tuple literal [type-alias-error]
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: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]
Expand All @@ -22,7 +25,7 @@ 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:60:42-46: Expected `BadAlias16` to be a type alias, got `Literal[3]` [type-alias-error]
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]
Expand Down
1 change: 0 additions & 1 deletion conformance/results/pyrefly/constructors_callable.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
conformant = "Partial"
notes = """
Some overloaded constructors are not resolved correctly.
Converting constructor to callable does not preserve class-scoped type params.
Converting constructor to callable does not substitute Self in __new__
Converting constructor to callable uses __new__ signature instead of __init__
Expand Down
28 changes: 14 additions & 14 deletions conformance/results/pyrefly/directives_deprecated.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
conformant = "Unsupported"
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 18: Expected 1 errors
Line 24: Expected 1 errors
Line 25: Expected 1 errors
Line 30: Expected 1 errors
Line 44: Expected 1 errors
Line 47: Expected 1 errors
Line 48: Expected 1 errors
Line 58: Expected 1 errors
Line 69: Expected 1 errors
Line 98: Expected 1 errors
"""
output = """
ERROR directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [unsupported-operation]
ERROR directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [unsupported-operation]
WARN directives_deprecated.py:18:44-47: `Ham` is deprecated [deprecated]
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: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]
WARN directives_deprecated.py:47:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
WARN directives_deprecated.py:48:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
WARN directives_deprecated.py:58:1-10: `Invocable.__call__` is deprecated [deprecated]
WARN directives_deprecated.py:69:1-6: `lorem` is deprecated [deprecated]
WARN directives_deprecated.py:98:5-10: `SupportsFoo1.foo` is deprecated [deprecated]
"""
5 changes: 2 additions & 3 deletions conformance/results/pyrefly/generics_basic.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
conformant = "Partial"
notes = """
Does not reject Type Var definition with only 1 constraint
Incorrect rejects + between two AnyStr
Constrained type var resolves to subtype instead of explcitly listed constraint
"""
Expand All @@ -23,8 +22,8 @@ ERROR generics_basic.py:68:16-35: assert_type(MyStr, str) failed [assert-type]
ERROR generics_basic.py:68:27-28: Argument `str` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type]
ERROR generics_basic.py:69:15-16: Argument `bytes` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type]
ERROR generics_basic.py:121:24-25: Duplicated type parameter declaration `T` [invalid-inheritance]
ERROR generics_basic.py:157:8-9: Cannot index into `MyMap1[str, int]` [index-error]
ERROR generics_basic.py:158:8-9: Cannot index into `MyMap2[int, str]` [index-error]
ERROR generics_basic.py:157:8-9: Cannot index into `MyMap1[str, int]` [bad-index]
ERROR generics_basic.py:158:8-9: Cannot index into `MyMap2[int, str]` [bad-index]
ERROR generics_basic.py:162:7-11: Expected a type variable, got `int` [invalid-type-var]
ERROR generics_basic.py:163:7-11: Expected a type variable, got `int` [invalid-type-var]
ERROR generics_basic.py:171:7-11: Class `Bad3` uses type variables not specified in `Generic` or `Protocol` base [invalid-type-var]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/generics_upper_bound.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ output = """
ERROR generics_upper_bound.py:24:38-45: Type variable bounds and constraints must be concrete [invalid-annotation]
ERROR generics_upper_bound.py:43:12-55: assert_type(list[int], list[int] | set[int]) failed [assert-type]
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]
ERROR generics_upper_bound.py:51:7-13: Type `int` is not assignable to upper bound `Sized` of type variable `ST` [bad-specialization]
ERROR generics_upper_bound.py:51:7-13: `int` is not assignable to upper bound `Sized` of type variable `ST` [bad-specialization]
ERROR generics_upper_bound.py:56:38-49: TypeVar cannot have both constraints and bound [invalid-type-var]
"""
8 changes: 4 additions & 4 deletions conformance/results/pyrefly/literals_interactions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Line 71: Unexpected errors ['`@` is not supported between `Matrix[Literal[2], Li
Line 72: Unexpected errors ['assert_type(Matrix[Literal[2], int], Matrix[Literal[2], Literal[7]]) failed [assert-type]']
"""
output = """
ERROR literals_interactions.py:15:5-9: Index 5 out of range for tuple with 3 elements [index-error]
ERROR literals_interactions.py:16:5-9: Index -5 out of range for tuple with 3 elements [index-error]
ERROR literals_interactions.py:17:5-9: Index 4 out of range for tuple with 3 elements [index-error]
ERROR literals_interactions.py:18:5-10: Index -4 out of range for tuple with 3 elements [index-error]
ERROR literals_interactions.py:15:5-9: Index 5 out of range for tuple with 3 elements [bad-index]
ERROR literals_interactions.py:16:5-9: Index -5 out of range for tuple with 3 elements [bad-index]
ERROR literals_interactions.py:17:5-9: Index 4 out of range for tuple with 3 elements [bad-index]
ERROR literals_interactions.py:18:5-10: Index -4 out of range for tuple with 3 elements [bad-index]
ERROR literals_interactions.py:71:9-14: `@` is not supported between `Matrix[Literal[2], Literal[3]]` and `Matrix[Literal[3], Literal[7]]` [unsupported-operation]
ERROR literals_interactions.py:72:16-51: assert_type(Matrix[Literal[2], int], Matrix[Literal[2], Literal[7]]) failed [assert-type]
"""
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/literals_literalstring.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ERROR literals_literalstring.py:43:23-24: `Literal['two']` is not assignable to
ERROR literals_literalstring.py:66:25-47: `str` is not assignable to `LiteralString` [bad-assignment]
ERROR literals_literalstring.py:74:25-26: `Literal[3]` is not assignable to `LiteralString` [bad-assignment]
ERROR literals_literalstring.py:75:25-32: `Literal[b'test']` is not assignable to `LiteralString` [bad-assignment]
ERROR literals_literalstring.py:120:21-24: Type `str` is not assignable to upper bound `LiteralString` of type variable `TLiteral` [bad-specialization]
ERROR literals_literalstring.py:120:21-24: `str` is not assignable to upper bound `LiteralString` of type variable `TLiteral` [bad-specialization]
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]
ERROR literals_literalstring.py:171:21-24: `list[LiteralString]` is not assignable to `list[str]` [bad-assignment]
"""
13 changes: 5 additions & 8 deletions conformance/results/pyrefly/namedtuples_define_class.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
conformant = "Partial"
notes = """
Doesn't catch illegal field name starting with underscore
"""
conformance_automated = "Fail"
conformant = "Pass"
conformance_automated = "Pass"
errors_diff = """
Line 76: Expected 1 errors
"""
output = """
ERROR namedtuples_define_class.py:32:7-12: Index 3 out of range for tuple with 3 elements [index-error]
ERROR namedtuples_define_class.py:33:7-13: Index -4 out of range for tuple with 3 elements [index-error]
ERROR namedtuples_define_class.py:32:7-12: Index 3 out of range for tuple with 3 elements [bad-index]
ERROR namedtuples_define_class.py:33:7-13: Index -4 out of range for tuple with 3 elements [bad-index]
ERROR namedtuples_define_class.py:44:11-14: Missing argument `y` in function `Point.__new__` [missing-argument]
ERROR namedtuples_define_class.py:45:11-16: Missing argument `y` in function `Point.__new__` [missing-argument]
ERROR namedtuples_define_class.py:46:15-17: Argument `Literal['']` is not assignable to parameter `y` with type `int` in function `Point.__new__` [bad-argument-type]
ERROR namedtuples_define_class.py:47:24-25: Argument `Literal[3]` is not assignable to parameter `units` with type `str` in function `Point.__new__` [bad-argument-type]
ERROR namedtuples_define_class.py:48:22-24: Expected 3 positional arguments, got 4 in function `Point.__new__` [bad-argument-count]
ERROR namedtuples_define_class.py:49:23-28: Unexpected keyword argument `other` in function `Point.__new__` [unexpected-keyword]
ERROR namedtuples_define_class.py:69:20-22: Expected 2 positional arguments, got 3 in function `Point2.__new__` [bad-argument-count]
ERROR namedtuples_define_class.py:76:5-7: NamedTuple field name may not start with an underscore: `_y` [bad-class-definition]
ERROR namedtuples_define_class.py:86:5-13: NamedTuple field 'latitude' without a default may not follow NamedTuple field with a default [bad-class-definition]
ERROR namedtuples_define_class.py:106:5-6: Cannot override named tuple element `x` [bad-override]
ERROR namedtuples_define_class.py:125:19-22: Argument `float` is not assignable to parameter `value` with type `str` in function `Property.__new__` [bad-argument-type]
Expand Down
4 changes: 2 additions & 2 deletions conformance/results/pyrefly/namedtuples_usage.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
ERROR namedtuples_usage.py:34:7-11: Index 3 out of range for tuple with 3 elements [index-error]
ERROR namedtuples_usage.py:35:7-12: Index -4 out of range for tuple with 3 elements [index-error]
ERROR namedtuples_usage.py:34:7-11: Index 3 out of range for tuple with 3 elements [bad-index]
ERROR namedtuples_usage.py:35:7-12: Index -4 out of range for tuple with 3 elements [bad-index]
ERROR namedtuples_usage.py:40:1-4: Cannot set field `x` [read-only]
ERROR namedtuples_usage.py:41:1-5: Cannot set item in `Point` [unsupported-operation]
ERROR namedtuples_usage.py:42:5-8: Cannot delete field `x` [read-only]
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/overloads_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
ERROR overloads_basic.py:39:1-6: Cannot index into `Bytes` [index-error]
ERROR overloads_basic.py:39:1-6: Cannot index into `Bytes` [bad-index]
"""
3 changes: 1 addition & 2 deletions conformance/results/pyrefly/protocols_definition.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
conformant = "Partial"
notes = """
Allows attributes defined by assignment via self in Protocols
Incorrectly handles some ClassVar examples in Protocol subtyping
"""
conformance_automated = "Fail"
errors_diff = """
Line 67: Expected 1 errors
Line 116: Expected 1 errors
Line 117: Expected 1 errors
Line 79: Unexpected errors ['`Concrete` is not assignable to `Template` [bad-assignment]']
"""
output = """
ERROR protocols_definition.py:30:11-14: Argument `list[int]` is not assignable to parameter `things` with type `Iterable[SupportsClose]` in function `close_all` [bad-argument-type]
ERROR protocols_definition.py:67:14-18: Instance or class variables within a Protocol class must be explicitly declared within the class body [protocol-implicitly-defined-attribute]
ERROR protocols_definition.py:79:17-38: `Concrete` is not assignable to `Template` [bad-assignment]
ERROR protocols_definition.py:114:22-38: `Concrete2_Bad1` is not assignable to `Template2` [bad-assignment]
ERROR protocols_definition.py:115:22-38: `Concrete2_Bad2` is not assignable to `Template2` [bad-assignment]
Expand Down
5 changes: 3 additions & 2 deletions conformance/results/pyrefly/protocols_explicit.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
conformant = "Unsupported"
conformant = "Partial"
notes = """
Does not check against abstract class instantiations
Does not reject call to super method with no default implementation.
Does not detect stub methods inherited from protocols as abstract.
"""
conformance_automated = "Fail"
errors_diff = """
Expand Down
8 changes: 4 additions & 4 deletions conformance/results/pyrefly/typeddicts_alt_syntax.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ERROR typeddicts_alt_syntax.py:35:72-83: Unrecognized argument `other` for typed
ERROR typeddicts_alt_syntax.py:41:1-7: Expected valid functional typed dictionary definition [invalid-argument]
ERROR typeddicts_alt_syntax.py:41:30-38: Unrecognized argument `name` for typed dictionary definition [invalid-argument]
ERROR typeddicts_alt_syntax.py:41:40-48: Unrecognized argument `year` for typed dictionary definition [invalid-argument]
ERROR typeddicts_alt_syntax.py:44:11-17: Key `name` is not defined in TypedDict `Movie2` [typed-dict-key-error]
ERROR typeddicts_alt_syntax.py:44:35-41: Key `year` is not defined in TypedDict `Movie2` [typed-dict-key-error]
ERROR typeddicts_alt_syntax.py:45:11-17: Key `name` is not defined in TypedDict `Movie2` [typed-dict-key-error]
ERROR typeddicts_alt_syntax.py:45:35-41: Key `year` is not defined in TypedDict `Movie2` [typed-dict-key-error]
ERROR typeddicts_alt_syntax.py:44:11-17: Key `name` is not defined in TypedDict `Movie2` [bad-typed-dict-key]
ERROR typeddicts_alt_syntax.py:44:35-41: Key `year` is not defined in TypedDict `Movie2` [bad-typed-dict-key]
ERROR typeddicts_alt_syntax.py:45:11-17: Key `name` is not defined in TypedDict `Movie2` [bad-typed-dict-key]
ERROR typeddicts_alt_syntax.py:45:35-41: Key `year` is not defined in TypedDict `Movie2` [bad-typed-dict-key]
"""
Loading