From 323524f2d8d8093ffb994090f5d5b6c58d947cb4 Mon Sep 17 00:00:00 2001 From: Zeina Migeed Date: Wed, 11 Mar 2026 14:43:46 -0700 Subject: [PATCH] Update pyrefly conformance results to v0.56.0 Bump pyrefly from 0.54.0 to 0.56.0 and update conformance results. Three tests improved from Partial to Pass (annotations_generators, generics_typevartuple_specialization, qualifiers_annotated). Score 20 previously unscored tests that pass automated conformance. Pass rate: 100/139 (72%) -> 123/139 (88.5%) --- .../pyrefly/aliases_typealiastype.toml | 1 + .../pyrefly/annotations_forward_refs.toml | 4 ++-- .../pyrefly/annotations_generators.toml | 19 +++++------------- .../results/pyrefly/callables_annotation.toml | 6 +----- .../results/pyrefly/callables_kwargs.toml | 1 + .../pyrefly/constructors_callable.toml | 4 ++-- .../results/pyrefly/dataclasses_final.toml | 1 + .../pyrefly/directives_version_platform.toml | 6 ++---- .../results/pyrefly/enums_behaviors.toml | 1 + .../results/pyrefly/enums_members.toml | 4 ++-- .../results/pyrefly/generics_basic.toml | 13 +++++------- .../results/pyrefly/generics_defaults.toml | 1 + .../pyrefly/generics_self_attributes.toml | 1 + .../pyrefly/generics_self_protocols.toml | 1 + .../pyrefly/generics_syntax_scoping.toml | 1 + .../pyrefly/generics_typevartuple_args.toml | 2 +- .../generics_typevartuple_specialization.toml | 15 ++------------ .../pyrefly/literals_literalstring.toml | 1 + .../pyrefly/overloads_definitions.toml | 1 + .../pyrefly/overloads_definitions_stub.toml | 1 + .../results/pyrefly/overloads_evaluation.toml | 1 + .../results/pyrefly/protocols_explicit.toml | 1 + .../results/pyrefly/protocols_generic.toml | 1 + .../results/pyrefly/protocols_merging.toml | 1 + .../results/pyrefly/protocols_self.toml | 1 + .../results/pyrefly/qualifiers_annotated.toml | 19 ++++++++---------- .../pyrefly/qualifiers_final_annotation.toml | 7 ++++--- .../pyrefly/qualifiers_final_decorator.toml | 1 + .../pyrefly/typeddicts_inheritance.toml | 1 + .../typeddicts_readonly_inheritance.toml | 1 + .../results/pyrefly/typeddicts_required.toml | 1 + conformance/results/pyrefly/version.toml | 2 +- conformance/results/results.html | 12 +++++------ conformance/uv.lock | 20 +++++++++---------- 34 files changed, 71 insertions(+), 82 deletions(-) diff --git a/conformance/results/pyrefly/aliases_typealiastype.toml b/conformance/results/pyrefly/aliases_typealiastype.toml index c4e98a923..d6ec8ac8e 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 77859140a..5f45379af 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 2f38c9d1c..15f7ef6c3 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 c31b35021..7ddb09654 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 92e2be0d9..d37554ce3 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 2bc522526..4756a4f3a 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 a91f38355..144be4b17 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 a7a453967..562bdae49 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 8d785714b..150f59c2c 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 491f60a2c..503def2cd 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 73eae54fe..b2847b966 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 fb37190b7..5570f83ca 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 70866175a..d1b89fa7c 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 befe1eef6..75aead9ff 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 3605418a9..c49f5c235 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 ae29ac7e9..f3ee5342d 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 885ec1d88..e5dcdaff5 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 190cc520c..fd23249c2 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 4c793b5c4..0bcca6cce 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 d3bd427e3..983ac42fb 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 46549b266..3f9f9a8b3 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 e8bdff360..0ce752b0b 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 86b534695..634166922 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 ad33e85e6..0819adc23 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 cdd4d0cd9..be211bd5b 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 692aad318..cf976cd2f 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 b29ac8cea..10c83546a 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 c129fa545..aba68da0a 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 0da000466..ee3230a71 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 509e76116..b1c3dc118 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 07b5ab762..8a57a6267 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 64c5c3a32..8f6e7ab48 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 33748d476..dfa71a1e8 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -178,7 +178,7 @@

Python Type System Conformance Test Results

zuban 0.6.1
-
pyrefly 0.54.0
+
pyrefly 0.56.0
ty 0.0.21
@@ -204,7 +204,7 @@

Python Type System Conformance Test Results

Partial

Does not report incompatible Generator type in `yield from` statement.

Pass Pass -
Partial

Does not detect that invalid yield is unreachable

+Pass Unsupported      annotations_methods @@ -283,7 +283,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -
Partial

Incorrect rejects + between two AnyStr

Constrained type var resolves to subtype instead of explcitly listed constraint

+
Partial

Incorrectly rejects + between two AnyStr.

Spurious error for constrained type var call.

Partial

Incorrectly allows constrained type variables to be solved to a union of their constraints.

     generics_defaults @@ -451,7 +451,7 @@

Python Type System Conformance Test Results

Partial

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.

Pass Pass -
Partial

Sometimes specializes to tuple[Any, ...] instead of empty tuple

+Pass Unsupported      generics_typevartuple_unpack @@ -489,14 +489,14 @@

Python Type System Conformance Test Results

Partial

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.

Pass Pass -
Partial

Allows Annotated in some contexts where it should not be allowed

+Pass Pass      qualifiers_final_annotation
Partial

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.

Pass Pass -
Partial

Final attributes not initialized on the class can be assigned to

+
Partial

Does not reject Final inside ClassVar.

Issues with NamedTuple interaction.

Partial

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.

     qualifiers_final_decorator diff --git a/conformance/uv.lock b/conformance/uv.lock index d81cd3963..0275c7071 100644 --- a/conformance/uv.lock +++ b/conformance/uv.lock @@ -73,18 +73,18 @@ wheels = [ [[package]] name = "pyrefly" -version = "0.54.0" +version = "0.56.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/81/44/c10b16a302fda90d0af1328f880b232761b510eab546616a7be2fdf35a57/pyrefly-0.54.0.tar.gz", hash = "sha256:c6663be64d492f0d2f2a411ada9f28a6792163d34133639378b7f3dd9a8dca94", size = 5098893, upload-time = "2026-02-23T15:44:35.111Z" } +sdist = { url = "https://files.pythonhosted.org/packages/54/c6/24259081a05ce112edfa313c753d556406d1ff31e885dd96b366cc736a93/pyrefly-0.56.0.tar.gz", hash = "sha256:f84d21d9b9b58481eea02204e2f73cabb93751b21ab2cd99178b4bde24be6a82", size = 5272585, upload-time = "2026-03-11T18:38:51.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5f/99/8fdcdb4e55f0227fdd9f6abce36b619bab1ecb0662b83b66adc8cba3c788/pyrefly-0.54.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:58a3f092b6dc25ef79b2dc6c69a40f36784ca157c312bfc0baea463926a9db6d", size = 12223973, upload-time = "2026-02-23T15:44:14.278Z" }, - { url = "https://files.pythonhosted.org/packages/90/35/c2aaf87a76003ad27b286594d2e5178f811eaa15bfe3d98dba2b47d56dd1/pyrefly-0.54.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:615081414106dd95873bc39c3a4bed68754c6cc24a8177ac51d22f88f88d3eb3", size = 11785585, upload-time = "2026-02-23T15:44:17.468Z" }, - { url = "https://files.pythonhosted.org/packages/c4/4a/ced02691ed67e5a897714979196f08ad279ec7ec7f63c45e00a75a7f3c0e/pyrefly-0.54.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbcaf20f5fe585079079a95205c1f3cd4542d17228cdf1df560288880623b70", size = 33381977, upload-time = "2026-02-23T15:44:19.736Z" }, - { url = "https://files.pythonhosted.org/packages/0b/ce/72a117ed437c8f6950862181014b41e36f3c3997580e29b772b71e78d587/pyrefly-0.54.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d5da116c0d34acfbd66663addd3ca8aa78a636f6692a66e078126d3620a883", size = 35962821, upload-time = "2026-02-23T15:44:22.357Z" }, - { url = "https://files.pythonhosted.org/packages/85/de/89013f5ae0a35d2b6b01274a92a35ee91431ea001050edf0a16748d39875/pyrefly-0.54.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef3ac27f1a4baaf67aead64287d3163350844794aca6315ad1a9650b16ec26a", size = 38496689, upload-time = "2026-02-23T15:44:25.236Z" }, - { url = "https://files.pythonhosted.org/packages/9f/9a/33b097c7bf498b924742dca32dd5d9c6a3fa6c2b52b63a58eb9e1980ca89/pyrefly-0.54.0-py3-none-win32.whl", hash = "sha256:7d607d72200a8afbd2db10bfefb40160a7a5d709d207161c21649cedd5cfc09a", size = 11295268, upload-time = "2026-02-23T15:44:27.551Z" }, - { url = "https://files.pythonhosted.org/packages/d4/21/9263fd1144d2a3d7342b474f183f7785b3358a1565c864089b780110b933/pyrefly-0.54.0-py3-none-win_amd64.whl", hash = "sha256:fd416f04f89309385696f685bd5c9141011f18c8072f84d31ca20c748546e791", size = 12081810, upload-time = "2026-02-23T15:44:29.461Z" }, - { url = "https://files.pythonhosted.org/packages/ea/5b/fad062a196c064cbc8564de5b2f4d3cb6315f852e3b31e8a1ce74c69a1ea/pyrefly-0.54.0-py3-none-win_arm64.whl", hash = "sha256:f06ab371356c7b1925e0bffe193b738797e71e5dbbff7fb5a13f90ee7521211d", size = 11564930, upload-time = "2026-02-23T15:44:33.053Z" }, + { url = "https://files.pythonhosted.org/packages/6c/36/d9553098c03062f04e8dc5adc802f585749d6c0b129553a78e20efab9c3d/pyrefly-0.56.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:21f018f47debc0842b2c3072201e53c138ae32bcda4f3119bfc8d23f59c16b3e", size = 12601703, upload-time = "2026-03-11T18:38:26.34Z" }, + { url = "https://files.pythonhosted.org/packages/60/95/bcc6ff4843eb56a687321677747637aad3bceec084b710c5e7f1e160fbe4/pyrefly-0.56.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:95366056ceb224571b9f1c20e801d949f2c1fa2cf4ed6ceaadf85ca2ebe6fb27", size = 12146344, upload-time = "2026-03-11T18:38:29.163Z" }, + { url = "https://files.pythonhosted.org/packages/8d/fd/44264f7e0c53490cccdeee506ab6bdcf6dd2188601cf15ba8953f990b697/pyrefly-0.56.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5478229b09f4bba5bfea000b5ba20ea405f62dc7619ea81197e7ea637d6cba8d", size = 34613710, upload-time = "2026-03-11T18:38:31.962Z" }, + { url = "https://files.pythonhosted.org/packages/d1/31/b156520a4031fc631267c56c81f99b64901827e217c19f95b61a7a94d7b0/pyrefly-0.56.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e5f53781875024086a5b9f31a89c57d2977487fc3f819d9255008ad34b86fe2", size = 37254696, upload-time = "2026-03-11T18:38:35.553Z" }, + { url = "https://files.pythonhosted.org/packages/cf/f2/ad6a354755447a2b84cc9d834cd0f92e47c0ca1556bff49ee8ee230d4bbd/pyrefly-0.56.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec6ab3f9e2c03bae8dfa520f52778f47b6762020929a664177d36aa3b941db22", size = 39843682, upload-time = "2026-03-11T18:38:39.242Z" }, + { url = "https://files.pythonhosted.org/packages/89/4e/631ca74575c20af35d07b894b53dcd8755793a126f63ad4301a303715e52/pyrefly-0.56.0-py3-none-win32.whl", hash = "sha256:f0440a4bbf119ab646468f360e0bd047df051352db1e5d5b9fd58f89e8458809", size = 11677289, upload-time = "2026-03-11T18:38:42.167Z" }, + { url = "https://files.pythonhosted.org/packages/98/08/7a56bde1b602efbfdd94c1044377e7d665d1303ccc96c7fd7a076e1883c8/pyrefly-0.56.0-py3-none-win_amd64.whl", hash = "sha256:f4948021639288b1ccda5f124c9562dc7f0a2679111eb314fa266c7bfd9f8603", size = 12488240, upload-time = "2026-03-11T18:38:45.285Z" }, + { url = "https://files.pythonhosted.org/packages/d2/20/7df64f185f5dff92d97ee319102ff2940e13a31647f0502d162f399cfd19/pyrefly-0.56.0-py3-none-win_arm64.whl", hash = "sha256:4683f5e8820d5fbfb84231b643b2c5f6cd40b982cac48ef756d4e3d9b09a39cc", size = 11953665, upload-time = "2026-03-11T18:38:48.759Z" }, ] [[package]]