diff --git a/conformance/results/pyrefly/aliases_typealiastype.toml b/conformance/results/pyrefly/aliases_typealiastype.toml index c4e98a92..d6ec8ac8 100644 --- a/conformance/results/pyrefly/aliases_typealiastype.toml +++ b/conformance/results/pyrefly/aliases_typealiastype.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/annotations_forward_refs.toml b/conformance/results/pyrefly/annotations_forward_refs.toml index 77859140..5f45379a 100644 --- a/conformance/results/pyrefly/annotations_forward_refs.toml +++ b/conformance/results/pyrefly/annotations_forward_refs.toml @@ -6,7 +6,7 @@ Does not reject some type forms that require quotes. conformance_automated = "Fail" errors_diff = """ 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]'] +Line 96: Unexpected errors ['assert_type(Unknown, int) failed [assert-type]'] """ output = """ ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation] @@ -29,5 +29,5 @@ ERROR annotations_forward_refs.py:55:11-16: Expected a type form, got instance o 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] ERROR annotations_forward_refs.py:89:8-11: Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type] -ERROR annotations_forward_refs.py:96:12-27: assert_type(Any, int) failed [assert-type] +ERROR annotations_forward_refs.py:96:12-27: assert_type(Unknown, int) failed [assert-type] """ diff --git a/conformance/results/pyrefly/annotations_generators.toml b/conformance/results/pyrefly/annotations_generators.toml index 2f38c9d1..15f7ef6c 100644 --- a/conformance/results/pyrefly/annotations_generators.toml +++ b/conformance/results/pyrefly/annotations_generators.toml @@ -1,12 +1,6 @@ -conformant = "Partial" -notes = """ -Does not detect that invalid yield is unreachable -""" -conformance_automated = "Fail" +conformant = "Pass" +conformance_automated = "Pass" errors_diff = """ -Line 140: Unexpected errors ['This `yield` expression is unreachable [unreachable]'] -Line 145: Unexpected errors ['This `yield` expression is unreachable [unreachable]'] -Line 190: Unexpected errors ['This `yield` expression is unreachable [unreachable]'] """ output = """ ERROR annotations_generators.py:51:21-39: Function declared to return `C`, but one or more paths are missing an explicit `return` [bad-return] @@ -17,10 +11,7 @@ ERROR annotations_generators.py:71:12-16: Returned type `Literal[True]` is not a ERROR annotations_generators.py:75:11-14: Yielded type `B` is not assignable to declared yield type `A` [invalid-yield] ERROR annotations_generators.py:86:21-24: Generator function should return `Generator` [bad-return] ERROR annotations_generators.py:91:27-30: Async generator function should return `AsyncGenerator` [bad-return] -ERROR annotations_generators.py:118:5-29: Cannot yield from `Generator[A, None, None]`, which is not assignable to declared return type `Generator[B, None, Unknown]` [invalid-yield] -ERROR annotations_generators.py:119:5-19: Cannot yield from `Generator[int, None, None]`, which is not assignable to declared return type `Generator[B, None, Unknown]` [invalid-yield] -ERROR annotations_generators.py:135:5-29: Cannot yield from `Generator[None, int, None]`, which is not assignable to declared return type `Generator[None, str, Unknown]` [invalid-yield] -ERROR annotations_generators.py:140:5-13: This `yield` expression is unreachable [unreachable] -ERROR annotations_generators.py:145:5-13: This `yield` expression is unreachable [unreachable] -ERROR annotations_generators.py:190:5-12: This `yield` expression is unreachable [unreachable] +ERROR annotations_generators.py:118:5-29: Cannot yield from `Generator[A]`, which is not assignable to declared return type `Generator[B, None, Unknown]` [invalid-yield] +ERROR annotations_generators.py:119:5-19: Cannot yield from `Generator[int]`, which is not assignable to declared return type `Generator[B, None, Unknown]` [invalid-yield] +ERROR annotations_generators.py:135:5-29: Cannot yield from `Generator[None, int]`, which is not assignable to declared return type `Generator[None, str, Unknown]` [invalid-yield] """ diff --git a/conformance/results/pyrefly/callables_annotation.toml b/conformance/results/pyrefly/callables_annotation.toml index c31b3502..7ddb0965 100644 --- a/conformance/results/pyrefly/callables_annotation.toml +++ b/conformance/results/pyrefly/callables_annotation.toml @@ -4,8 +4,7 @@ Parameter names are lost when resolving ParamSpec """ conformance_automated = "Fail" errors_diff = """ -Line 156: Unexpected errors ['`Proto4[Ellipsis]` is not assignable to `Proto3` [bad-assignment]'] -Line 157: Unexpected errors ['`Proto7` is not assignable to `Proto6` [bad-assignment]'] +Line 159: Expected 1 errors """ output = """ ERROR callables_annotation.py:25:7-10: Expected 1 more positional argument [bad-argument-count] @@ -22,9 +21,6 @@ ERROR callables_annotation.py:58:5-28: `Callable` requires exactly two arguments ERROR callables_annotation.py:59:15-18: Invalid position for `...` [invalid-argument] ERROR callables_annotation.py:91:7-15: `() -> str` is not assignable to variable `cb3` with type `(int, ...) -> str` [bad-assignment] ERROR callables_annotation.py:93:7-15: `(*, a: int) -> str` is not assignable to variable `cb3` with type `(int, ...) -> str` [bad-assignment] -ERROR callables_annotation.py:156:20-22: `Proto4[Ellipsis]` is not assignable to `Proto3` [bad-assignment] -ERROR callables_annotation.py:157:20-22: `Proto7` is not assignable to `Proto6` [bad-assignment] -ERROR callables_annotation.py:159:25-27: `Proto8` is not assignable to `Proto5[Any]` [bad-assignment] ERROR callables_annotation.py:172:26-29: `() -> str` is not assignable to `(int, ...) -> str` [bad-assignment] ERROR callables_annotation.py:187:48-50: `(int, str) -> str` is not assignable to `(str, ...) -> str` [bad-assignment] ERROR callables_annotation.py:189:32-34: `(int, str) -> str` is not assignable to `(str, ...) -> str` [bad-assignment] diff --git a/conformance/results/pyrefly/callables_kwargs.toml b/conformance/results/pyrefly/callables_kwargs.toml index 92e2be0d..d37554ce 100644 --- a/conformance/results/pyrefly/callables_kwargs.toml +++ b/conformance/results/pyrefly/callables_kwargs.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/constructors_callable.toml b/conformance/results/pyrefly/constructors_callable.toml index 2bc52252..4756a4f3 100644 --- a/conformance/results/pyrefly/constructors_callable.toml +++ b/conformance/results/pyrefly/constructors_callable.toml @@ -9,7 +9,7 @@ errors_diff = """ Line 186: Expected 1 errors Line 197: Expected 1 errors Line 167: Unexpected errors ['assert_type(Class7[int], Class7[str]) failed [assert-type]', "Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type]"] -Line 185: Unexpected errors ['assert_type(Class8[Any], Class8[str]) failed [assert-type]'] +Line 185: Unexpected errors ['assert_type(Class8[Unknown], Class8[str]) failed [assert-type]'] """ output = """ ERROR constructors_callable.py:38:3-5: Missing argument `x` [missing-argument] @@ -27,5 +27,5 @@ ERROR constructors_callable.py:129:4-5: Expected 0 positional arguments, got 1 [ ERROR constructors_callable.py:146:8-9: Expected 0 positional arguments, got 1 [bad-argument-count] ERROR constructors_callable.py:167:12-33: assert_type(Class7[int], Class7[str]) failed [assert-type] ERROR constructors_callable.py:167:16-18: Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type] -ERROR constructors_callable.py:185:12-41: assert_type(Class8[Any], Class8[str]) failed [assert-type] +ERROR constructors_callable.py:185:12-41: assert_type(Class8[Unknown], Class8[str]) failed [assert-type] """ diff --git a/conformance/results/pyrefly/dataclasses_final.toml b/conformance/results/pyrefly/dataclasses_final.toml index a91f3835..144be4b1 100644 --- a/conformance/results/pyrefly/dataclasses_final.toml +++ b/conformance/results/pyrefly/dataclasses_final.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/directives_version_platform.toml b/conformance/results/pyrefly/directives_version_platform.toml index a7a45396..562bdae4 100644 --- a/conformance/results/pyrefly/directives_version_platform.toml +++ b/conformance/results/pyrefly/directives_version_platform.toml @@ -6,8 +6,6 @@ output = """ ERROR directives_version_platform.py:33:19-23: Could not find name `val3` [unknown-name] ERROR directives_version_platform.py:50:19-23: Could not find name `val6` [unknown-name] ERROR directives_version_platform.py:59:19-23: Could not find name `val9` [unknown-name] -ERROR directives_version_platform.py:66:19-24: `val10` may be uninitialized [unbound-name] -ERROR directives_version_platform.py:67:22-27: `val11` may be uninitialized [unbound-name] -ERROR directives_version_platform.py:74:22-27: `val12` may be uninitialized [unbound-name] -ERROR directives_version_platform.py:75:19-24: `val13` may be uninitialized [unbound-name] +ERROR directives_version_platform.py:66:19-24: Could not find name `val10` [unknown-name] +ERROR directives_version_platform.py:75:19-24: Could not find name `val13` [unknown-name] """ diff --git a/conformance/results/pyrefly/enums_behaviors.toml b/conformance/results/pyrefly/enums_behaviors.toml index 8d785714..150f59c2 100644 --- a/conformance/results/pyrefly/enums_behaviors.toml +++ b/conformance/results/pyrefly/enums_behaviors.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/enums_members.toml b/conformance/results/pyrefly/enums_members.toml index 491f60a2..503def2c 100644 --- a/conformance/results/pyrefly/enums_members.toml +++ b/conformance/results/pyrefly/enums_members.toml @@ -8,9 +8,9 @@ ERROR enums_members.py:82:20-34: `Pet4.converter` is not a valid enum member [in ERROR enums_members.py:83:20-34: `Pet4.transform` is not a valid enum member [invalid-literal] ERROR enums_members.py:84:18-30: `Pet4.species` is not a valid enum member [invalid-literal] ERROR enums_members.py:85:16-26: `Pet4.speak` is not a valid enum member [invalid-literal] -ERROR enums_members.py:116:12-43: assert_type(int, Any) failed [assert-type] +ERROR enums_members.py:116:12-43: assert_type(int, Unknown) failed [assert-type] ERROR enums_members.py:116:32-41: `Example.b` is not a valid enum member [invalid-literal] -ERROR enums_members.py:129:20-57: assert_type(int, Any) failed [assert-type] +ERROR enums_members.py:129:20-57: assert_type(int, Unknown) failed [assert-type] ERROR enums_members.py:129:43-55: `Example2.__B` is not a valid enum member [invalid-literal] ERROR enums_members.py:146:12-27: assert_type(Literal[Pet5.DOG], int) failed [assert-type] ERROR enums_members.py:147:12-28: assert_type(Literal[Pet5.FISH], int) failed [assert-type] diff --git a/conformance/results/pyrefly/generics_basic.toml b/conformance/results/pyrefly/generics_basic.toml index 73eae54f..b2847b96 100644 --- a/conformance/results/pyrefly/generics_basic.toml +++ b/conformance/results/pyrefly/generics_basic.toml @@ -1,25 +1,22 @@ conformant = "Partial" notes = """ -Incorrect rejects + between two AnyStr -Constrained type var resolves to subtype instead of explcitly listed constraint +Incorrectly rejects + between two AnyStr. +Spurious error for constrained type var call. """ conformance_automated = "Fail" errors_diff = """ Line 34: Unexpected errors ['`+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]', '`+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]'] -Line 67: Unexpected errors ['assert_type(MyStr, str) failed [assert-type]'] -Line 68: Unexpected errors ['assert_type(MyStr, str) failed [assert-type]', 'Argument `str` is not assignable to parameter `y` with type `MyStr` in function `concat` [bad-argument-type]'] +Line 44: Unexpected errors ['Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]'] """ output = """ ERROR generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation] ERROR generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation] ERROR generics_basic.py:40:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type] ERROR generics_basic.py:41:15-16: Argument `str` is not assignable to parameter `y` with type `bytes` in function `concat` [bad-argument-type] +ERROR generics_basic.py:44:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type] ERROR generics_basic.py:49:18-48: Expected at least 2 constraints in TypeVar `BadConstraint1`, got 1 [invalid-type-var] ERROR generics_basic.py:55:53-60: Type variable bounds and constraints must be concrete [invalid-annotation] -ERROR generics_basic.py:67:16-35: assert_type(MyStr, str) failed [assert-type] -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:69:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` 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]` [bad-index] ERROR generics_basic.py:158:8-9: Cannot index into `MyMap2[int, str]` [bad-index] diff --git a/conformance/results/pyrefly/generics_defaults.toml b/conformance/results/pyrefly/generics_defaults.toml index fb37190b..5570f83c 100644 --- a/conformance/results/pyrefly/generics_defaults.toml +++ b/conformance/results/pyrefly/generics_defaults.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/generics_self_attributes.toml b/conformance/results/pyrefly/generics_self_attributes.toml index 70866175..d1b89fa7 100644 --- a/conformance/results/pyrefly/generics_self_attributes.toml +++ b/conformance/results/pyrefly/generics_self_attributes.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/generics_self_protocols.toml b/conformance/results/pyrefly/generics_self_protocols.toml index befe1eef..75aead9f 100644 --- a/conformance/results/pyrefly/generics_self_protocols.toml +++ b/conformance/results/pyrefly/generics_self_protocols.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/generics_syntax_scoping.toml b/conformance/results/pyrefly/generics_syntax_scoping.toml index 3605418a..c49f5c23 100644 --- a/conformance/results/pyrefly/generics_syntax_scoping.toml +++ b/conformance/results/pyrefly/generics_syntax_scoping.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/generics_typevartuple_args.toml b/conformance/results/pyrefly/generics_typevartuple_args.toml index ae29ac7e..f3ee5342 100644 --- a/conformance/results/pyrefly/generics_typevartuple_args.toml +++ b/conformance/results/pyrefly/generics_typevartuple_args.toml @@ -9,7 +9,7 @@ ERROR generics_typevartuple_args.py:48:6-17: Unpacked argument `tuple[Literal[1] ERROR generics_typevartuple_args.py:57:6-16: Unpacked argument `tuple[Literal[1], Literal[1], Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] ERROR generics_typevartuple_args.py:58:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] ERROR generics_typevartuple_args.py:59:6-10: Unpacked argument `tuple[Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type] -ERROR generics_typevartuple_args.py:67:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, str]` in function `func3` [bad-argument-type] +ERROR generics_typevartuple_args.py:67:6-9: Expected 1 more positional argument in function `func3` [bad-argument-count] ERROR generics_typevartuple_args.py:75:13-19: Argument `tuple[Literal[1], Literal[2]]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type] ERROR generics_typevartuple_args.py:76:13-19: Argument `tuple[Literal['1']]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_specialization.toml b/conformance/results/pyrefly/generics_typevartuple_specialization.toml index 885ec1d8..e5dcdaff 100644 --- a/conformance/results/pyrefly/generics_typevartuple_specialization.toml +++ b/conformance/results/pyrefly/generics_typevartuple_specialization.toml @@ -1,23 +1,12 @@ -conformant = "Partial" -notes = """ -Sometimes specializes to tuple[Any, ...] instead of empty tuple -""" -conformance_automated = "Fail" +conformant = "Pass" +conformance_automated = "Pass" errors_diff = """ -Line 51: Unexpected errors ['assert_type(tuple[int, *tuple[Any, ...]], tuple[int]) failed [assert-type]'] -Line 94: Unexpected errors ['assert_type(tuple[float, *tuple[Any, ...]], tuple[float]) failed [assert-type]'] -Line 153: Unexpected errors ['Unpacked argument cannot be used for type parameter T1 [bad-unpacking]'] -Line 157: Unexpected errors ['assert_type(tuple[Any], tuple[*tuple[int, ...], int]) failed [assert-type]'] """ output = """ -ERROR generics_typevartuple_specialization.py:51:16-31: assert_type(tuple[int, *tuple[Any, ...]], tuple[int]) failed [assert-type] -ERROR generics_typevartuple_specialization.py:94:16-33: assert_type(tuple[float, *tuple[Any, ...]], tuple[float]) failed [assert-type] ERROR generics_typevartuple_specialization.py:109:1-21: Unpacked argument cannot be used for type parameter T [bad-unpacking] ERROR generics_typevartuple_specialization.py:110:1-36: Unpacked argument cannot be used for type parameter T [bad-unpacking] ERROR generics_typevartuple_specialization.py:121:26-29: Only one unbounded type is allowed to be unpacked [bad-unpacking] ERROR generics_typevartuple_specialization.py:122:26-42: Only one unbounded type is allowed to be unpacked [bad-unpacking] ERROR generics_typevartuple_specialization.py:127:5-13: Expected 3 type arguments for `TA7`, got 1 [bad-specialization] -ERROR generics_typevartuple_specialization.py:153:8-29: Unpacked argument cannot be used for type parameter T1 [bad-unpacking] -ERROR generics_typevartuple_specialization.py:157:16-49: assert_type(tuple[Any], tuple[*tuple[int, ...], int]) failed [assert-type] ERROR generics_typevartuple_specialization.py:163:8-18: Unpacked argument cannot be used for type parameter T [bad-unpacking] """ diff --git a/conformance/results/pyrefly/literals_literalstring.toml b/conformance/results/pyrefly/literals_literalstring.toml index 190cc520..fd23249c 100644 --- a/conformance/results/pyrefly/literals_literalstring.toml +++ b/conformance/results/pyrefly/literals_literalstring.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/overloads_definitions.toml b/conformance/results/pyrefly/overloads_definitions.toml index 4c793b5c..0bcca6cc 100644 --- a/conformance/results/pyrefly/overloads_definitions.toml +++ b/conformance/results/pyrefly/overloads_definitions.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/overloads_definitions_stub.toml b/conformance/results/pyrefly/overloads_definitions_stub.toml index d3bd427e..983ac42f 100644 --- a/conformance/results/pyrefly/overloads_definitions_stub.toml +++ b/conformance/results/pyrefly/overloads_definitions_stub.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/overloads_evaluation.toml b/conformance/results/pyrefly/overloads_evaluation.toml index 46549b26..3f9f9a8b 100644 --- a/conformance/results/pyrefly/overloads_evaluation.toml +++ b/conformance/results/pyrefly/overloads_evaluation.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/protocols_explicit.toml b/conformance/results/pyrefly/protocols_explicit.toml index e8bdff36..0ce752b0 100644 --- a/conformance/results/pyrefly/protocols_explicit.toml +++ b/conformance/results/pyrefly/protocols_explicit.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/protocols_generic.toml b/conformance/results/pyrefly/protocols_generic.toml index 86b53469..63416692 100644 --- a/conformance/results/pyrefly/protocols_generic.toml +++ b/conformance/results/pyrefly/protocols_generic.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/protocols_merging.toml b/conformance/results/pyrefly/protocols_merging.toml index ad33e85e..0819adc2 100644 --- a/conformance/results/pyrefly/protocols_merging.toml +++ b/conformance/results/pyrefly/protocols_merging.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/protocols_self.toml b/conformance/results/pyrefly/protocols_self.toml index cdd4d0cd..be211bd5 100644 --- a/conformance/results/pyrefly/protocols_self.toml +++ b/conformance/results/pyrefly/protocols_self.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/qualifiers_annotated.toml b/conformance/results/pyrefly/qualifiers_annotated.toml index 692aad31..cf976cd2 100644 --- a/conformance/results/pyrefly/qualifiers_annotated.toml +++ b/conformance/results/pyrefly/qualifiers_annotated.toml @@ -1,15 +1,6 @@ -conformant = "Partial" -notes = """ -Allows Annotated in some contexts where it should not be allowed -""" -conformance_automated = "Fail" +conformant = "Pass" +conformance_automated = "Pass" errors_diff = """ -Line 71: Expected 1 errors -Line 72: Expected 1 errors -Line 79: Expected 1 errors -Line 80: Expected 1 errors -Line 87: Expected 1 errors -Line 88: Expected 1 errors """ output = """ ERROR qualifiers_annotated.py:38:17-27: List literal cannot be used in annotations [invalid-annotation] @@ -27,5 +18,11 @@ ERROR qualifiers_annotated.py:47:18-19: Number literal cannot be used in annotat ERROR qualifiers_annotated.py:48:18-29: Boolean operation cannot be used in annotations [invalid-annotation] ERROR qualifiers_annotated.py:49:18-28: F-string cannot be used in annotations [invalid-annotation] ERROR qualifiers_annotated.py:59:8-22: `Annotated` needs at least one piece of metadata in addition to the type [invalid-annotation] +ERROR qualifiers_annotated.py:71:24-42: `Annotated[int]` is not assignable to `type[Any]` [bad-assignment] +ERROR qualifiers_annotated.py:72:24-32: `TypeAlias[SmallInt, Annotated[int]]` is not assignable to `type[Any]` [bad-assignment] +ERROR qualifiers_annotated.py:79:7-25: Argument `Annotated[str]` is not assignable to parameter `x` with type `type[@_]` in function `func4` [bad-argument-type] +ERROR qualifiers_annotated.py:80:7-15: Argument `TypeAlias[SmallInt, Annotated[int]]` is not assignable to parameter `x` with type `type[@_]` in function `func4` [bad-argument-type] ERROR qualifiers_annotated.py:86:1-10: Expected a callable, got `type[Annotated]` [not-callable] +ERROR qualifiers_annotated.py:87:1-19: Expected a callable, got `Annotated[int]` [not-callable] +ERROR qualifiers_annotated.py:88:1-9: Expected a callable, got `TypeAlias[SmallInt, Annotated[int]]` [not-callable] """ diff --git a/conformance/results/pyrefly/qualifiers_final_annotation.toml b/conformance/results/pyrefly/qualifiers_final_annotation.toml index b29ac8ce..10c83546 100644 --- a/conformance/results/pyrefly/qualifiers_final_annotation.toml +++ b/conformance/results/pyrefly/qualifiers_final_annotation.toml @@ -1,11 +1,10 @@ conformant = "Partial" notes = """ -Final attributes not initialized on the class can be assigned to +Does not reject Final inside ClassVar. +Issues with NamedTuple interaction. """ conformance_automated = "Fail" errors_diff = """ -Line 34: Expected 1 errors -Line 38: Expected 1 errors Line 107: Expected 1 errors Line 131: Unexpected errors ['Expected first item to be a string literal [invalid-argument]', 'Expected first item to be a string literal [invalid-argument]'] Line 133: Unexpected errors ['Unexpected keyword argument `x` in function `N.__new__` [unexpected-keyword]', 'Unexpected keyword argument `y` in function `N.__new__` [unexpected-keyword]'] @@ -13,6 +12,8 @@ Line 133: Unexpected errors ['Unexpected keyword argument `x` in function `N.__n output = """ ERROR qualifiers_final_annotation.py:16:7-12: Expected a type argument for `Final` [invalid-annotation] ERROR qualifiers_final_annotation.py:18:7-22: Expected 1 type argument for `Final`, got 2 [invalid-annotation] +ERROR qualifiers_final_annotation.py:34:5-8: Final attribute declared in class body must be initialized with a value or in `__init__` [invalid-annotation] +ERROR qualifiers_final_annotation.py:38:5-8: Final attribute declared in class body must be initialized with a value or in `__init__` [invalid-annotation] ERROR qualifiers_final_annotation.py:54:9-17: Cannot set field `ID5` [read-only] ERROR qualifiers_final_annotation.py:62:9-17: Cannot set field `id3` [read-only] ERROR qualifiers_final_annotation.py:63:9-17: Cannot set field `id4` [read-only] diff --git a/conformance/results/pyrefly/qualifiers_final_decorator.toml b/conformance/results/pyrefly/qualifiers_final_decorator.toml index c129fa54..aba68da0 100644 --- a/conformance/results/pyrefly/qualifiers_final_decorator.toml +++ b/conformance/results/pyrefly/qualifiers_final_decorator.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/typeddicts_inheritance.toml b/conformance/results/pyrefly/typeddicts_inheritance.toml index 0da00046..ee3230a7 100644 --- a/conformance/results/pyrefly/typeddicts_inheritance.toml +++ b/conformance/results/pyrefly/typeddicts_inheritance.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml b/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml index 509e7611..b1c3dc11 100644 --- a/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pyrefly/typeddicts_readonly_inheritance.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/typeddicts_required.toml b/conformance/results/pyrefly/typeddicts_required.toml index 07b5ab76..8a57a626 100644 --- a/conformance/results/pyrefly/typeddicts_required.toml +++ b/conformance/results/pyrefly/typeddicts_required.toml @@ -1,3 +1,4 @@ +conformant = "Pass" conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/version.toml b/conformance/results/pyrefly/version.toml index 64c5c3a3..8f6e7ab4 100644 --- a/conformance/results/pyrefly/version.toml +++ b/conformance/results/pyrefly/version.toml @@ -1 +1 @@ -version = "pyrefly 0.54.0" +version = "pyrefly 0.56.0" diff --git a/conformance/results/results.html b/conformance/results/results.html index 33748d47..dfa71a1e 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -178,7 +178,7 @@
Does not report incompatible Generator type in `yield from` statement.
Does not detect that invalid yield is unreachable
Incorrect rejects + between two AnyStr
Constrained type var resolves to subtype instead of explcitly listed constraint
Incorrectly rejects + between two AnyStr.
Spurious error for constrained type var call.
Incorrectly allows constrained type variables to be solved to a union of their constraints.
Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided.
Rejects specialization of generic type alias defined as a tuple containing a TypeVar.
Sometimes specializes to tuple[Any, ...] instead of empty tuple
Does not allow ClassVar to be nested within Annotated.
Does not allow Final to be nested within Annotated.
Does not allow Required and NotRequired to be nested within Annotated.
Does not reject type[T] compatibility for type alias defined with Annotated.
Does not reject call of type alias defined with Annotated.
Allows Annotated in some contexts where it should not be allowed
Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition.
Does not allow conditional assignment of Final instance variable in __init__ method.
Does not allow redefinition of private class variable that is marked Final in parent class.
Does not report modification of local Final variable via "for" statement.
Final attributes not initialized on the class can be assigned to
Does not reject Final inside ClassVar.
Issues with NamedTuple interaction.
Does not forbid `Final`-annotated assignments to attributes on `self` in non-`__init__` methods.
Does not flag modifications of `Final`-annotated attributes via augmented assignment.