diff --git a/conformance/results/pyrefly/aliases_explicit.toml b/conformance/results/pyrefly/aliases_explicit.toml index 3eaadf11..6e489a28 100644 --- a/conformance/results/pyrefly/aliases_explicit.toml +++ b/conformance/results/pyrefly/aliases_explicit.toml @@ -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] diff --git a/conformance/results/pyrefly/aliases_implicit.toml b/conformance/results/pyrefly/aliases_implicit.toml index 7b1bfb60..033e0c71 100644 --- a/conformance/results/pyrefly/aliases_implicit.toml +++ b/conformance/results/pyrefly/aliases_implicit.toml @@ -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] diff --git a/conformance/results/pyrefly/aliases_type_statement.toml b/conformance/results/pyrefly/aliases_type_statement.toml index f887262d..7d23523e 100644 --- a/conformance/results/pyrefly/aliases_type_statement.toml +++ b/conformance/results/pyrefly/aliases_type_statement.toml @@ -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. """ @@ -27,7 +26,7 @@ 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] @@ -35,6 +34,6 @@ ERROR aliases_type_statement.py:49:23-33: f-string cannot be used in annotations 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] """ diff --git a/conformance/results/pyrefly/aliases_typealiastype.toml b/conformance/results/pyrefly/aliases_typealiastype.toml index ddb3a209..3a09d2cd 100644 --- a/conformance/results/pyrefly/aliases_typealiastype.toml +++ b/conformance/results/pyrefly/aliases_typealiastype.toml @@ -1,4 +1,7 @@ -conformant = "Unsupported" +conformant = "Partial" +notes = """ +Does not detect circular definitions. +""" conformance_automated = "Fail" errors_diff = """ Line 46: Expected 1 errors @@ -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] @@ -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] diff --git a/conformance/results/pyrefly/constructors_callable.toml b/conformance/results/pyrefly/constructors_callable.toml index edbb81b1..bbfb662d 100644 --- a/conformance/results/pyrefly/constructors_callable.toml +++ b/conformance/results/pyrefly/constructors_callable.toml @@ -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__ diff --git a/conformance/results/pyrefly/directives_deprecated.toml b/conformance/results/pyrefly/directives_deprecated.toml index 913e327b..9373c54f 100644 --- a/conformance/results/pyrefly/directives_deprecated.toml +++ b/conformance/results/pyrefly/directives_deprecated.toml @@ -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] """ diff --git a/conformance/results/pyrefly/generics_basic.toml b/conformance/results/pyrefly/generics_basic.toml index c0b28fb8..49e3c9da 100644 --- a/conformance/results/pyrefly/generics_basic.toml +++ b/conformance/results/pyrefly/generics_basic.toml @@ -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 """ @@ -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] diff --git a/conformance/results/pyrefly/generics_upper_bound.toml b/conformance/results/pyrefly/generics_upper_bound.toml index cfbb661e..b438675c 100644 --- a/conformance/results/pyrefly/generics_upper_bound.toml +++ b/conformance/results/pyrefly/generics_upper_bound.toml @@ -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] """ diff --git a/conformance/results/pyrefly/literals_interactions.toml b/conformance/results/pyrefly/literals_interactions.toml index cc0646c6..4e5d984e 100644 --- a/conformance/results/pyrefly/literals_interactions.toml +++ b/conformance/results/pyrefly/literals_interactions.toml @@ -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] """ diff --git a/conformance/results/pyrefly/literals_literalstring.toml b/conformance/results/pyrefly/literals_literalstring.toml index d9f744fd..4f01e113 100644 --- a/conformance/results/pyrefly/literals_literalstring.toml +++ b/conformance/results/pyrefly/literals_literalstring.toml @@ -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] """ diff --git a/conformance/results/pyrefly/namedtuples_define_class.toml b/conformance/results/pyrefly/namedtuples_define_class.toml index 0d85f64e..0c845656 100644 --- a/conformance/results/pyrefly/namedtuples_define_class.toml +++ b/conformance/results/pyrefly/namedtuples_define_class.toml @@ -1,14 +1,10 @@ -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] @@ -16,6 +12,7 @@ ERROR namedtuples_define_class.py:47:24-25: Argument `Literal[3]` is not assigna 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] diff --git a/conformance/results/pyrefly/namedtuples_usage.toml b/conformance/results/pyrefly/namedtuples_usage.toml index fe89094a..14f8163d 100644 --- a/conformance/results/pyrefly/namedtuples_usage.toml +++ b/conformance/results/pyrefly/namedtuples_usage.toml @@ -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] diff --git a/conformance/results/pyrefly/overloads_basic.toml b/conformance/results/pyrefly/overloads_basic.toml index 315a20e4..9dd079a2 100644 --- a/conformance/results/pyrefly/overloads_basic.toml +++ b/conformance/results/pyrefly/overloads_basic.toml @@ -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] """ diff --git a/conformance/results/pyrefly/protocols_definition.toml b/conformance/results/pyrefly/protocols_definition.toml index 294fd1c6..d2dd01e6 100644 --- a/conformance/results/pyrefly/protocols_definition.toml +++ b/conformance/results/pyrefly/protocols_definition.toml @@ -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] diff --git a/conformance/results/pyrefly/protocols_explicit.toml b/conformance/results/pyrefly/protocols_explicit.toml index bdb414d4..01f91a26 100644 --- a/conformance/results/pyrefly/protocols_explicit.toml +++ b/conformance/results/pyrefly/protocols_explicit.toml @@ -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 = """ diff --git a/conformance/results/pyrefly/typeddicts_alt_syntax.toml b/conformance/results/pyrefly/typeddicts_alt_syntax.toml index 82ee6fb6..6f018049 100644 --- a/conformance/results/pyrefly/typeddicts_alt_syntax.toml +++ b/conformance/results/pyrefly/typeddicts_alt_syntax.toml @@ -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] """ diff --git a/conformance/results/pyrefly/typeddicts_extra_items.toml b/conformance/results/pyrefly/typeddicts_extra_items.toml index 1ae17335..6dd41085 100644 --- a/conformance/results/pyrefly/typeddicts_extra_items.toml +++ b/conformance/results/pyrefly/typeddicts_extra_items.toml @@ -1,24 +1,25 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR typeddicts_extra_items.py:15:45-49: `Literal[1982]` is not assignable to TypedDict key with type `bool` [typed-dict-key-error] -ERROR typeddicts_extra_items.py:22:55-59: `Literal[1982]` is not assignable to TypedDict key with type `bool` [typed-dict-key-error] -ERROR typeddicts_extra_items.py:39:54-58: `None` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:15:45-49: `Literal[1982]` is not assignable to TypedDict key with type `bool` [bad-typed-dict-key] +ERROR typeddicts_extra_items.py:22:55-59: `Literal[1982]` is not assignable to TypedDict key with type `bool` [bad-typed-dict-key] +ERROR typeddicts_extra_items.py:39:54-58: `None` is not assignable to TypedDict key `year` with type `int` [bad-typed-dict-key] ERROR typeddicts_extra_items.py:49:7-16: Expected literal True or False for keyword `closed`, got instance of `bool` [bad-typed-dict] ERROR typeddicts_extra_items.py:67:7-20: Non-closed TypedDict cannot inherit from closed TypedDict `ClosedBase` [bad-typed-dict] ERROR typeddicts_extra_items.py:73:7-20: Non-closed TypedDict cannot inherit from TypedDict `ExtraItemsBase` with extra items [bad-typed-dict] -ERROR typeddicts_extra_items.py:92:5-8: Cannot extend closed TypedDict `MovieA` with extra item `age` [typed-dict-key-error] -ERROR typeddicts_extra_items.py:95:5-8: Cannot extend closed TypedDict `MovieB` with extra item `age` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:92:5-8: Cannot extend closed TypedDict `MovieA` with extra item `age` [bad-typed-dict-key] +ERROR typeddicts_extra_items.py:95:5-8: Cannot extend closed TypedDict `MovieB` with extra item `age` [bad-typed-dict-key] ERROR typeddicts_extra_items.py:109:7-30: Closed TypedDict cannot inherit from TypedDict `ExtraItemsBase` with non-read-only extra items [bad-typed-dict] ERROR typeddicts_extra_items.py:114:50-63: `Required` is not allowed in this context [invalid-annotation] ERROR typeddicts_extra_items.py:117:57-73: `NotRequired` is not allowed in this context [invalid-annotation] -ERROR typeddicts_extra_items.py:128:15-21: Key `name` in TypedDict `MovieEI` may not be deleted [delete-error] +ERROR typeddicts_extra_items.py:128:15-21: Key `name` in TypedDict `MovieEI` may not be deleted [unsupported-delete] ERROR typeddicts_extra_items.py:143:48-52: Unexpected keyword argument `year` in function `unpack_no_extra` [unexpected-keyword] ERROR typeddicts_extra_items.py:174:7-12: Cannot change the non-read-only extra items type of TypedDict `Parent` [bad-typed-dict] -ERROR typeddicts_extra_items.py:185:5-9: TypedDict `MovieBase2` with non-read-only `extra_items` cannot be extended with required extra item `year` [typed-dict-key-error] -ERROR typeddicts_extra_items.py:188:5-9: `int` is not consistent with `extra_items` type `int | None` of TypedDict `MovieBase2` [typed-dict-key-error] -ERROR typeddicts_extra_items.py:197:5-14: `str` is not assignable to `extra_items` type `int | None` of TypedDict `BookBase` [typed-dict-key-error] +ERROR typeddicts_extra_items.py:185:5-9: TypedDict `MovieBase2` with non-read-only `extra_items` cannot be extended with required extra item `year` [bad-typed-dict-key] +ERROR typeddicts_extra_items.py:188:5-9: `int` is not consistent with `extra_items` type `int | None` of TypedDict `MovieBase2` [bad-typed-dict-key] +ERROR typeddicts_extra_items.py:197:5-14: `str` is not assignable to `extra_items` type `int | None` of TypedDict `BookBase` [bad-typed-dict-key] ERROR typeddicts_extra_items.py:215:22-30: `TypedDict[MovieDetails]` is not assignable to `TypedDict[MovieBase2]` [bad-assignment] ERROR typeddicts_extra_items.py:222:22-30: `TypedDict[MovieWithYear2]` is not assignable to `TypedDict[MovieBase2]` [bad-assignment] ERROR typeddicts_extra_items.py:242:19-27: `TypedDict[MovieDetails5]` is not assignable to `TypedDict[MovieSI]` [bad-assignment] diff --git a/conformance/results/pyrefly/typeddicts_operations.toml b/conformance/results/pyrefly/typeddicts_operations.toml index a145cff0..3c3dafe4 100644 --- a/conformance/results/pyrefly/typeddicts_operations.toml +++ b/conformance/results/pyrefly/typeddicts_operations.toml @@ -3,16 +3,16 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR typeddicts_operations.py:22:17-21: `Literal[1982]` is not assignable to TypedDict key `name` with type `str` [typed-dict-key-error] -ERROR typeddicts_operations.py:23:17-19: `Literal['']` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] -ERROR typeddicts_operations.py:24:7-14: TypedDict `Movie` does not have key `other` [typed-dict-key-error] -ERROR typeddicts_operations.py:26:13-20: TypedDict `Movie` does not have key `other` [typed-dict-key-error] -ERROR typeddicts_operations.py:28:9-33: Missing required key `year` for TypedDict `Movie` [typed-dict-key-error] -ERROR typeddicts_operations.py:29:42-48: `float` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] -ERROR typeddicts_operations.py:32:36-43: Key `other` is not defined in TypedDict `Movie` [typed-dict-key-error] -ERROR typeddicts_operations.py:37:20-52: Missing required key `name` for TypedDict `Movie` [typed-dict-key-error] -ERROR typeddicts_operations.py:37:21-33: Expected string literal key, got `str` [typed-dict-key-error] +ERROR typeddicts_operations.py:22:17-21: `Literal[1982]` is not assignable to TypedDict key `name` with type `str` [bad-typed-dict-key] +ERROR typeddicts_operations.py:23:17-19: `Literal['']` is not assignable to TypedDict key `year` with type `int` [bad-typed-dict-key] +ERROR typeddicts_operations.py:24:7-14: TypedDict `Movie` does not have key `other` [bad-typed-dict-key] +ERROR typeddicts_operations.py:26:13-20: TypedDict `Movie` does not have key `other` [bad-typed-dict-key] +ERROR typeddicts_operations.py:28:9-33: Missing required key `year` for TypedDict `Movie` [bad-typed-dict-key] +ERROR typeddicts_operations.py:29:42-48: `float` is not assignable to TypedDict key `year` with type `int` [bad-typed-dict-key] +ERROR typeddicts_operations.py:32:36-43: Key `other` is not defined in TypedDict `Movie` [bad-typed-dict-key] +ERROR typeddicts_operations.py:37:20-52: Missing required key `name` for TypedDict `Movie` [bad-typed-dict-key] +ERROR typeddicts_operations.py:37:21-33: Expected string literal key, got `str` [bad-typed-dict-key] ERROR typeddicts_operations.py:47:1-12: Object of class `Movie` has no attribute `clear` [missing-attribute] -ERROR typeddicts_operations.py:49:11-17: Key `name` in TypedDict `Movie` may not be deleted [delete-error] +ERROR typeddicts_operations.py:49:11-17: Key `name` in TypedDict `Movie` may not be deleted [unsupported-delete] ERROR typeddicts_operations.py:62:1-21: Object of class `MovieOptional` has no attribute `clear` [missing-attribute] """ diff --git a/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml b/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml index ad8d736e..7f87fb46 100644 --- a/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml @@ -12,9 +12,9 @@ Line 132: Expected 1 errors output = """ ERROR typeddicts_readonly_inheritance.py:36:4-10: Key `name` in TypedDict `Album2` is read-only [read-only] ERROR typeddicts_readonly_inheritance.py:50:5-8: Class member `RecordShop.alt` overrides parent class `AlbumCollection` in an inconsistent manner [bad-override] -ERROR typeddicts_readonly_inheritance.py:65:19-21: Missing required key `name` for TypedDict `RequiredName` [typed-dict-key-error] -ERROR typeddicts_readonly_inheritance.py:82:14-15: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [typed-dict-key-error] -ERROR typeddicts_readonly_inheritance.py:83:15-16: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [typed-dict-key-error] -ERROR typeddicts_readonly_inheritance.py:84:5-7: Missing required key `ident` for TypedDict `User` [typed-dict-key-error] +ERROR typeddicts_readonly_inheritance.py:65:19-21: Missing required key `name` for TypedDict `RequiredName` [bad-typed-dict-key] +ERROR typeddicts_readonly_inheritance.py:82:14-15: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [bad-typed-dict-key] +ERROR typeddicts_readonly_inheritance.py:83:15-16: `Literal[3]` is not assignable to TypedDict key `ident` with type `str` [bad-typed-dict-key] +ERROR typeddicts_readonly_inheritance.py:84:5-7: Missing required key `ident` for TypedDict `User` [bad-typed-dict-key] ERROR typeddicts_readonly_inheritance.py:94:5-6: Class member `F3.a` overrides parent class `F1` in an inconsistent manner [bad-override] """ diff --git a/conformance/results/pyrefly/typeddicts_type_consistency.toml b/conformance/results/pyrefly/typeddicts_type_consistency.toml index c7812752..bc1273de 100644 --- a/conformance/results/pyrefly/typeddicts_type_consistency.toml +++ b/conformance/results/pyrefly/typeddicts_type_consistency.toml @@ -6,10 +6,10 @@ output = """ ERROR typeddicts_type_consistency.py:21:10-12: `TypedDict[B1]` is not assignable to `TypedDict[A1]` [bad-assignment] ERROR typeddicts_type_consistency.py:38:10-12: `TypedDict[B2]` is not assignable to `TypedDict[A2]` [bad-assignment] ERROR typeddicts_type_consistency.py:65:6-8: `TypedDict[A3]` is not assignable to variable `b3` with type `TypedDict[B3]` [bad-assignment] -ERROR typeddicts_type_consistency.py:69:21-24: Key `y` is not defined in TypedDict `A3` [typed-dict-key-error] +ERROR typeddicts_type_consistency.py:69:21-24: Key `y` is not defined in TypedDict `A3` [bad-typed-dict-key] ERROR typeddicts_type_consistency.py:76:22-24: `TypedDict[B3]` is not assignable to `dict[str, int]` [bad-assignment] ERROR typeddicts_type_consistency.py:77:25-27: `TypedDict[B3]` is not assignable to `dict[str, object]` [bad-assignment] ERROR typeddicts_type_consistency.py:78:22-24: `TypedDict[B3]` is not assignable to `dict[Any, Any]` [bad-assignment] ERROR typeddicts_type_consistency.py:82:25-27: `TypedDict[B3]` is not assignable to `Mapping[str, int]` [bad-assignment] -ERROR typeddicts_type_consistency.py:126:56-57: `Literal[1]` is not assignable to TypedDict key `inner_key` with type `str` [typed-dict-key-error] +ERROR typeddicts_type_consistency.py:126:56-57: `Literal[1]` is not assignable to TypedDict key `inner_key` with type `str` [bad-typed-dict-key] """ diff --git a/conformance/results/pyrefly/typeddicts_usage.toml b/conformance/results/pyrefly/typeddicts_usage.toml index 45500ced..6c43741d 100644 --- a/conformance/results/pyrefly/typeddicts_usage.toml +++ b/conformance/results/pyrefly/typeddicts_usage.toml @@ -3,10 +3,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR typeddicts_usage.py:23:7-17: TypedDict `Movie` does not have key `director` [typed-dict-key-error] -ERROR typeddicts_usage.py:24:17-23: `Literal['1982']` is not assignable to TypedDict key `year` with type `int` [typed-dict-key-error] -ERROR typeddicts_usage.py:28:17-56: Missing required key `name` for TypedDict `Movie` [typed-dict-key-error] -ERROR typeddicts_usage.py:28:18-25: Key `title` is not defined in TypedDict `Movie` [typed-dict-key-error] +ERROR typeddicts_usage.py:23:7-17: TypedDict `Movie` does not have key `director` [bad-typed-dict-key] +ERROR typeddicts_usage.py:24:17-23: `Literal['1982']` is not assignable to TypedDict key `year` with type `int` [bad-typed-dict-key] +ERROR typeddicts_usage.py:28:17-56: Missing required key `name` for TypedDict `Movie` [bad-typed-dict-key] +ERROR typeddicts_usage.py:28:18-25: Key `title` is not defined in TypedDict `Movie` [bad-typed-dict-key] ERROR typeddicts_usage.py:35:22-27: TypedDict `Movie` not allowed as second argument to isinstance() [invalid-argument] ERROR typeddicts_usage.py:40:24-33: `TypedDict` is not allowed in this context [invalid-annotation] """ diff --git a/conformance/results/pyrefly/version.toml b/conformance/results/pyrefly/version.toml index b7e81919..8327c9e1 100644 --- a/conformance/results/pyrefly/version.toml +++ b/conformance/results/pyrefly/version.toml @@ -1 +1 @@ -version = "pyrefly 0.37.0" +version = "pyrefly 0.38.1" diff --git a/conformance/results/results.html b/conformance/results/results.html index 79ecbdd8..ee949fd4 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -162,9 +162,9 @@
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
Incorrect rejects + between two AnyStr
Constrained type var resolves to subtype instead of explcitly listed constraint
Does not reject type alias defined in function scope.
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.
Does not reject redeclaration of type alias with the same name.
Does not detect circular definitions.
Incorrectly rejects some recursive type aliases using TypeAliasType.
Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.
Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.
Incorrectly allows type_params= to be an arbitrary tuple.
Does not detect circular definitions.
Does not detect protocol mismatch if concrete method is missing annotations.
Does not detect protocol mismatch if concrete method's parameters are position-only.
Does not detect protocol mismatch if concrete method is missing annotations.
Does not detect protocol mismatch if concrete method's parameters are position-only.
Allows attributes defined by assignment via self in Protocols
Incorrectly handles some ClassVar examples in Protocol subtyping
Incorrectly handles some ClassVar examples in Protocol subtyping
Does not report unimplemented attributes for class that explicitly derives from protocol until it is instantiated.
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.
Does not generate a union type for __new__ and __init__ when converting class to callable.
Does not ignore __init__ based on __new__ return type when converting class to callable.
Does not support __new__ return type that is different from class being constructed.
Does not generate a union type for __new__ and __init__ when converting class to callable.
Does not ignore __init__ based on __new__ return type when converting class to callable.
Does not support __new__ return type that is different from class being constructed.
Struggles with some cases of self types
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__
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__
Does not report inconsistency between __new__ and __init__ (optional).
Does not reject override of named tuple attribute in child class.
Does not reject override of named tuple attribute in child class.
Doesn't catch illegal field name starting with underscore
Does not honor `@no_type_check` class decorator (allowed).
Does not reject invalid call of `@no_type_check` function.