From 0e0f552a8141ff772d54217fca4511972057c636 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Tue, 20 May 2025 08:51:35 -0700 Subject: [PATCH] Removed support for the pytype type checker. It is becoming increasingly difficult to maintain support for pytype in the conformance tests. The maintainers of pytype have indicated that they do not have plans to make their type checker compliant with the typing spec, and they've agreed that it makes sense to eliminate it from the conformance test results. --- conformance/README.md | 2 +- conformance/requirements.txt | 1 - conformance/results/mypy/version.toml | 2 +- conformance/results/pyre/version.toml | 2 +- .../results/pytype/aliases_explicit.toml | 113 ----- .../results/pytype/aliases_implicit.toml | 342 ------------- .../results/pytype/aliases_newtype.toml | 44 -- .../results/pytype/aliases_recursive.toml | 115 ----- .../pytype/aliases_type_statement.toml | 37 -- .../results/pytype/aliases_typealiastype.toml | 78 --- .../results/pytype/aliases_variance.toml | 25 - .../pytype/annotations_coroutines.toml | 7 - .../pytype/annotations_forward_refs.toml | 446 ----------------- .../pytype/annotations_generators.toml | 82 ---- .../results/pytype/annotations_methods.toml | 14 - .../results/pytype/annotations_typeexpr.toml | 381 --------------- .../results/pytype/callables_annotation.toml | 27 -- .../results/pytype/callables_kwargs.toml | 93 ---- .../results/pytype/callables_protocol.toml | 66 --- .../results/pytype/callables_subtyping.toml | 74 --- .../results/pytype/classes_classvar.toml | 135 ------ .../results/pytype/classes_override.toml | 60 --- .../pytype/constructors_call_init.toml | 90 ---- .../pytype/constructors_call_metaclass.toml | 41 -- .../results/pytype/constructors_call_new.toml | 49 -- .../pytype/constructors_call_type.toml | 54 --- .../results/pytype/constructors_callable.toml | 230 --------- .../pytype/constructors_consistency.toml | 10 - .../pytype/dataclasses_descriptors.toml | 78 --- .../results/pytype/dataclasses_final.toml | 33 -- .../results/pytype/dataclasses_frozen.toml | 16 - .../results/pytype/dataclasses_hash.toml | 12 - .../pytype/dataclasses_inheritance.toml | 13 - .../results/pytype/dataclasses_kwonly.toml | 49 -- .../results/pytype/dataclasses_order.toml | 11 - .../results/pytype/dataclasses_postinit.toml | 30 -- .../results/pytype/dataclasses_slots.toml | 36 -- .../pytype/dataclasses_transform_class.toml | 57 --- .../dataclasses_transform_converter.toml | 123 ----- .../pytype/dataclasses_transform_field.toml | 23 - .../pytype/dataclasses_transform_func.toml | 76 --- .../pytype/dataclasses_transform_meta.toml | 39 -- .../results/pytype/dataclasses_usage.toml | 61 --- .../pytype/directives_assert_type.toml | 35 -- .../results/pytype/directives_cast.toml | 20 - .../results/pytype/directives_deprecated.toml | 43 -- .../pytype/directives_no_type_check.toml | 34 -- .../pytype/directives_reveal_type.toml | 40 -- .../pytype/directives_type_checking.toml | 7 - .../pytype/directives_type_ignore.toml | 21 - .../pytype/directives_type_ignore_file1.toml | 7 - .../pytype/directives_type_ignore_file2.toml | 11 - .../pytype/directives_version_platform.toml | 25 - .../results/pytype/enums_behaviors.toml | 11 - .../results/pytype/enums_definition.toml | 14 - .../results/pytype/enums_expansion.toml | 11 - .../results/pytype/enums_member_names.toml | 7 - .../results/pytype/enums_member_values.toml | 74 --- conformance/results/pytype/enums_members.toml | 134 ------ .../pytype/exceptions_context_managers.toml | 21 - .../results/pytype/generics_base_class.toml | 52 -- .../results/pytype/generics_basic.toml | 108 ----- .../results/pytype/generics_defaults.toml | 335 ------------- .../pytype/generics_defaults_referential.toml | 217 --------- .../generics_defaults_specialization.toml | 104 ---- .../pytype/generics_paramspec_basic.toml | 17 - .../pytype/generics_paramspec_components.toml | 26 - .../pytype/generics_paramspec_semantics.toml | 19 - .../generics_paramspec_specialization.toml | 79 --- .../results/pytype/generics_scoping.toml | 96 ---- .../pytype/generics_self_advanced.toml | 91 ---- .../pytype/generics_self_attributes.toml | 15 - .../results/pytype/generics_self_basic.toml | 70 --- .../pytype/generics_self_protocols.toml | 12 - .../results/pytype/generics_self_usage.toml | 78 --- .../pytype/generics_syntax_compatibility.toml | 12 - .../pytype/generics_syntax_declarations.toml | 20 - .../generics_syntax_infer_variance.toml | 28 -- .../pytype/generics_syntax_scoping.toml | 17 - .../results/pytype/generics_type_erasure.toml | 14 - .../pytype/generics_typevartuple_args.toml | 134 ------ .../pytype/generics_typevartuple_basic.toml | 306 ------------ .../generics_typevartuple_callable.toml | 128 ----- .../pytype/generics_typevartuple_concat.toml | 155 ------ .../generics_typevartuple_overloads.toml | 72 --- .../generics_typevartuple_specialization.toml | 454 ------------------ .../pytype/generics_typevartuple_unpack.toml | 74 --- .../results/pytype/generics_upper_bound.toml | 41 -- .../results/pytype/generics_variance.toml | 55 --- .../pytype/generics_variance_inference.toml | 33 -- .../results/pytype/historical_positional.toml | 18 - .../results/pytype/literals_interactions.toml | 87 ---- .../pytype/literals_literalstring.toml | 89 ---- .../pytype/literals_parameterizations.toml | 106 ---- .../results/pytype/literals_semantics.toml | 62 --- .../pytype/namedtuples_define_class.toml | 81 ---- .../pytype/namedtuples_define_functional.toml | 72 --- .../pytype/namedtuples_type_compat.toml | 16 - .../results/pytype/namedtuples_usage.toml | 48 -- .../results/pytype/narrowing_typeguard.toml | 21 - .../results/pytype/narrowing_typeis.toml | 48 -- .../results/pytype/overloads_basic.toml | 25 - .../results/pytype/overloads_consistency.toml | 56 --- .../results/pytype/overloads_definitions.toml | 302 ------------ .../pytype/overloads_definitions_stub.toml | 17 - .../results/pytype/overloads_evaluation.toml | 173 ------- .../pytype/protocols_class_objects.toml | 33 -- .../results/pytype/protocols_definition.toml | 77 --- .../results/pytype/protocols_explicit.toml | 36 -- .../results/pytype/protocols_generic.toml | 60 --- .../results/pytype/protocols_merging.toml | 36 -- .../results/pytype/protocols_modules.toml | 24 - .../results/pytype/protocols_recursive.toml | 27 -- .../pytype/protocols_runtime_checkable.toml | 18 - .../results/pytype/protocols_self.toml | 33 -- .../results/pytype/protocols_subtyping.toml | 37 -- .../results/pytype/protocols_variance.toml | 34 -- .../results/pytype/qualifiers_annotated.toml | 78 --- .../pytype/qualifiers_final_annotation.toml | 142 ------ .../pytype/qualifiers_final_decorator.toml | 265 ---------- .../results/pytype/specialtypes_any.toml | 7 - .../results/pytype/specialtypes_never.toml | 47 -- .../results/pytype/specialtypes_none.toml | 21 - .../pytype/specialtypes_promotions.toml | 11 - .../results/pytype/specialtypes_type.toml | 83 ---- .../results/pytype/tuples_type_compat.toml | 318 ------------ .../results/pytype/tuples_type_form.toml | 71 --- .../results/pytype/tuples_unpacked.toml | 167 ------- .../results/pytype/typeddicts_alt_syntax.toml | 25 - .../pytype/typeddicts_class_syntax.toml | 26 - .../results/pytype/typeddicts_final.toml | 7 - .../pytype/typeddicts_inheritance.toml | 27 -- .../results/pytype/typeddicts_operations.toml | 45 -- .../results/pytype/typeddicts_readonly.toml | 18 - .../typeddicts_readonly_consistency.toml | 35 -- .../typeddicts_readonly_inheritance.toml | 134 ------ .../pytype/typeddicts_readonly_kwargs.toml | 23 - .../pytype/typeddicts_readonly_update.toml | 13 - .../results/pytype/typeddicts_required.toml | 16 - .../pytype/typeddicts_type_consistency.toml | 38 -- .../results/pytype/typeddicts_usage.toml | 27 -- conformance/results/pytype/version.toml | 2 - conformance/results/results.html | 188 +------- conformance/src/type_checker.py | 111 ----- 144 files changed, 27 insertions(+), 10208 deletions(-) delete mode 100644 conformance/results/pytype/aliases_explicit.toml delete mode 100644 conformance/results/pytype/aliases_implicit.toml delete mode 100644 conformance/results/pytype/aliases_newtype.toml delete mode 100644 conformance/results/pytype/aliases_recursive.toml delete mode 100644 conformance/results/pytype/aliases_type_statement.toml delete mode 100644 conformance/results/pytype/aliases_typealiastype.toml delete mode 100644 conformance/results/pytype/aliases_variance.toml delete mode 100644 conformance/results/pytype/annotations_coroutines.toml delete mode 100644 conformance/results/pytype/annotations_forward_refs.toml delete mode 100644 conformance/results/pytype/annotations_generators.toml delete mode 100644 conformance/results/pytype/annotations_methods.toml delete mode 100644 conformance/results/pytype/annotations_typeexpr.toml delete mode 100644 conformance/results/pytype/callables_annotation.toml delete mode 100644 conformance/results/pytype/callables_kwargs.toml delete mode 100644 conformance/results/pytype/callables_protocol.toml delete mode 100644 conformance/results/pytype/callables_subtyping.toml delete mode 100644 conformance/results/pytype/classes_classvar.toml delete mode 100644 conformance/results/pytype/classes_override.toml delete mode 100644 conformance/results/pytype/constructors_call_init.toml delete mode 100644 conformance/results/pytype/constructors_call_metaclass.toml delete mode 100644 conformance/results/pytype/constructors_call_new.toml delete mode 100644 conformance/results/pytype/constructors_call_type.toml delete mode 100644 conformance/results/pytype/constructors_callable.toml delete mode 100644 conformance/results/pytype/constructors_consistency.toml delete mode 100644 conformance/results/pytype/dataclasses_descriptors.toml delete mode 100644 conformance/results/pytype/dataclasses_final.toml delete mode 100644 conformance/results/pytype/dataclasses_frozen.toml delete mode 100644 conformance/results/pytype/dataclasses_hash.toml delete mode 100644 conformance/results/pytype/dataclasses_inheritance.toml delete mode 100644 conformance/results/pytype/dataclasses_kwonly.toml delete mode 100644 conformance/results/pytype/dataclasses_order.toml delete mode 100644 conformance/results/pytype/dataclasses_postinit.toml delete mode 100644 conformance/results/pytype/dataclasses_slots.toml delete mode 100644 conformance/results/pytype/dataclasses_transform_class.toml delete mode 100644 conformance/results/pytype/dataclasses_transform_converter.toml delete mode 100644 conformance/results/pytype/dataclasses_transform_field.toml delete mode 100644 conformance/results/pytype/dataclasses_transform_func.toml delete mode 100644 conformance/results/pytype/dataclasses_transform_meta.toml delete mode 100644 conformance/results/pytype/dataclasses_usage.toml delete mode 100644 conformance/results/pytype/directives_assert_type.toml delete mode 100644 conformance/results/pytype/directives_cast.toml delete mode 100644 conformance/results/pytype/directives_deprecated.toml delete mode 100644 conformance/results/pytype/directives_no_type_check.toml delete mode 100644 conformance/results/pytype/directives_reveal_type.toml delete mode 100644 conformance/results/pytype/directives_type_checking.toml delete mode 100644 conformance/results/pytype/directives_type_ignore.toml delete mode 100644 conformance/results/pytype/directives_type_ignore_file1.toml delete mode 100644 conformance/results/pytype/directives_type_ignore_file2.toml delete mode 100644 conformance/results/pytype/directives_version_platform.toml delete mode 100644 conformance/results/pytype/enums_behaviors.toml delete mode 100644 conformance/results/pytype/enums_definition.toml delete mode 100644 conformance/results/pytype/enums_expansion.toml delete mode 100644 conformance/results/pytype/enums_member_names.toml delete mode 100644 conformance/results/pytype/enums_member_values.toml delete mode 100644 conformance/results/pytype/enums_members.toml delete mode 100644 conformance/results/pytype/exceptions_context_managers.toml delete mode 100644 conformance/results/pytype/generics_base_class.toml delete mode 100644 conformance/results/pytype/generics_basic.toml delete mode 100644 conformance/results/pytype/generics_defaults.toml delete mode 100644 conformance/results/pytype/generics_defaults_referential.toml delete mode 100644 conformance/results/pytype/generics_defaults_specialization.toml delete mode 100644 conformance/results/pytype/generics_paramspec_basic.toml delete mode 100644 conformance/results/pytype/generics_paramspec_components.toml delete mode 100644 conformance/results/pytype/generics_paramspec_semantics.toml delete mode 100644 conformance/results/pytype/generics_paramspec_specialization.toml delete mode 100644 conformance/results/pytype/generics_scoping.toml delete mode 100644 conformance/results/pytype/generics_self_advanced.toml delete mode 100644 conformance/results/pytype/generics_self_attributes.toml delete mode 100644 conformance/results/pytype/generics_self_basic.toml delete mode 100644 conformance/results/pytype/generics_self_protocols.toml delete mode 100644 conformance/results/pytype/generics_self_usage.toml delete mode 100644 conformance/results/pytype/generics_syntax_compatibility.toml delete mode 100644 conformance/results/pytype/generics_syntax_declarations.toml delete mode 100644 conformance/results/pytype/generics_syntax_infer_variance.toml delete mode 100644 conformance/results/pytype/generics_syntax_scoping.toml delete mode 100644 conformance/results/pytype/generics_type_erasure.toml delete mode 100644 conformance/results/pytype/generics_typevartuple_args.toml delete mode 100644 conformance/results/pytype/generics_typevartuple_basic.toml delete mode 100644 conformance/results/pytype/generics_typevartuple_callable.toml delete mode 100644 conformance/results/pytype/generics_typevartuple_concat.toml delete mode 100644 conformance/results/pytype/generics_typevartuple_overloads.toml delete mode 100644 conformance/results/pytype/generics_typevartuple_specialization.toml delete mode 100644 conformance/results/pytype/generics_typevartuple_unpack.toml delete mode 100644 conformance/results/pytype/generics_upper_bound.toml delete mode 100644 conformance/results/pytype/generics_variance.toml delete mode 100644 conformance/results/pytype/generics_variance_inference.toml delete mode 100644 conformance/results/pytype/historical_positional.toml delete mode 100644 conformance/results/pytype/literals_interactions.toml delete mode 100644 conformance/results/pytype/literals_literalstring.toml delete mode 100644 conformance/results/pytype/literals_parameterizations.toml delete mode 100644 conformance/results/pytype/literals_semantics.toml delete mode 100644 conformance/results/pytype/namedtuples_define_class.toml delete mode 100644 conformance/results/pytype/namedtuples_define_functional.toml delete mode 100644 conformance/results/pytype/namedtuples_type_compat.toml delete mode 100644 conformance/results/pytype/namedtuples_usage.toml delete mode 100644 conformance/results/pytype/narrowing_typeguard.toml delete mode 100644 conformance/results/pytype/narrowing_typeis.toml delete mode 100644 conformance/results/pytype/overloads_basic.toml delete mode 100644 conformance/results/pytype/overloads_consistency.toml delete mode 100644 conformance/results/pytype/overloads_definitions.toml delete mode 100644 conformance/results/pytype/overloads_definitions_stub.toml delete mode 100644 conformance/results/pytype/overloads_evaluation.toml delete mode 100644 conformance/results/pytype/protocols_class_objects.toml delete mode 100644 conformance/results/pytype/protocols_definition.toml delete mode 100644 conformance/results/pytype/protocols_explicit.toml delete mode 100644 conformance/results/pytype/protocols_generic.toml delete mode 100644 conformance/results/pytype/protocols_merging.toml delete mode 100644 conformance/results/pytype/protocols_modules.toml delete mode 100644 conformance/results/pytype/protocols_recursive.toml delete mode 100644 conformance/results/pytype/protocols_runtime_checkable.toml delete mode 100644 conformance/results/pytype/protocols_self.toml delete mode 100644 conformance/results/pytype/protocols_subtyping.toml delete mode 100644 conformance/results/pytype/protocols_variance.toml delete mode 100644 conformance/results/pytype/qualifiers_annotated.toml delete mode 100644 conformance/results/pytype/qualifiers_final_annotation.toml delete mode 100644 conformance/results/pytype/qualifiers_final_decorator.toml delete mode 100644 conformance/results/pytype/specialtypes_any.toml delete mode 100644 conformance/results/pytype/specialtypes_never.toml delete mode 100644 conformance/results/pytype/specialtypes_none.toml delete mode 100644 conformance/results/pytype/specialtypes_promotions.toml delete mode 100644 conformance/results/pytype/specialtypes_type.toml delete mode 100644 conformance/results/pytype/tuples_type_compat.toml delete mode 100644 conformance/results/pytype/tuples_type_form.toml delete mode 100644 conformance/results/pytype/tuples_unpacked.toml delete mode 100644 conformance/results/pytype/typeddicts_alt_syntax.toml delete mode 100644 conformance/results/pytype/typeddicts_class_syntax.toml delete mode 100644 conformance/results/pytype/typeddicts_final.toml delete mode 100644 conformance/results/pytype/typeddicts_inheritance.toml delete mode 100644 conformance/results/pytype/typeddicts_operations.toml delete mode 100644 conformance/results/pytype/typeddicts_readonly.toml delete mode 100644 conformance/results/pytype/typeddicts_readonly_consistency.toml delete mode 100644 conformance/results/pytype/typeddicts_readonly_inheritance.toml delete mode 100644 conformance/results/pytype/typeddicts_readonly_kwargs.toml delete mode 100644 conformance/results/pytype/typeddicts_readonly_update.toml delete mode 100644 conformance/results/pytype/typeddicts_required.toml delete mode 100644 conformance/results/pytype/typeddicts_type_consistency.toml delete mode 100644 conformance/results/pytype/typeddicts_usage.toml delete mode 100644 conformance/results/pytype/version.toml diff --git a/conformance/README.md b/conformance/README.md index aa65c815d..a5a45b7e6 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -81,7 +81,7 @@ Currently, the only unsupported type checker is Pyre on Windows. Different type checkers report errors in different ways (with different wording in error messages and different line numbers or character ranges for errors). This variation makes it difficult to fully automate test validation given that tests will want to check for both false positive and false negative type errors. Some level of manual inspection will therefore be needed to determine whether a type checker is fully conformant with all tests in any given test file. This "scoring" process is required only when the output of a test changes — e.g. when a new version of that type checker is released and the tests are rerun. We assume that the output of a type checker will be the same from one run to the next unless/until a new version is released that fixes or introduces a bug. In this case, the output will need to be manually inspected and the conformance results re-scored for those tests whose output has changed. -Conformance results are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyre, pyright, and pytype. It is the goal and desire to add additional type checkers over time. +Conformance results are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyre, and pyright. It is the goal and desire to add additional type checkers over time. ## Adding a New Test Case diff --git a/conformance/requirements.txt b/conformance/requirements.txt index f4dafc207..973d0bf51 100644 --- a/conformance/requirements.txt +++ b/conformance/requirements.txt @@ -5,4 +5,3 @@ pyright mypy pip pyre-check; platform_system != "Windows" -pytype diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index b3982776b..41659210a 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ version = "mypy 1.15.0" -test_duration = 1.8 +test_duration = 1.5 diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index cd0a5eb7e..c759e78d0 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.23" -test_duration = 9.8 +test_duration = 10.7 diff --git a/conformance/results/pytype/aliases_explicit.toml b/conformance/results/pytype/aliases_explicit.toml deleted file mode 100644 index c46571aff..000000000 --- a/conformance/results/pytype/aliases_explicit.toml +++ /dev/null @@ -1,113 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. -Does not report invalid specialization of generic type alias with bound TypeVar. -Incorrectly evaluates generic type alias with ParamSpec with missing type argument. -Does not report some illegal annotation forms as invalid type aliases. -Does not report invalid specialization of already-specialized generic type alias. -""" -output = """ -aliases_explicit.py:41:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[str, str]' [invalid-annotation] - - p9: GoodTypeAlias9[[str, str], None], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:41:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Callable[Concatenate[int, P], R][[str, str], None]' [invalid-annotation] - - p9: GoodTypeAlias9[[str, str], None], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:57:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_type_aliases: Callable[Concatenate, Any] [assert-type] - - assert_type(p9, Callable[[int, str, str], None]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:60:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_type_aliases: Callable[[Any], None] [assert-type] - - assert_type(p12, Callable[..., None]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:67:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Optional[int][int]' [invalid-annotation] - - p1: GoodTypeAlias2[int], # E: type alias is not generic - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:68:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[Optional[int]][int]' [invalid-annotation] - - p2: GoodTypeAlias3[int], # E: type alias is already specialized - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:69:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[T][int, int]' [invalid-annotation] - - p3: GoodTypeAlias4[int, int], # E: too many type arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:70:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Callable[[int, T], T][int, int]' [invalid-annotation] - - p4: GoodTypeAlias8[int, int], # E: too many type arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:71:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Callable[Concatenate[int, P], R][int, int]' [invalid-annotation] - - p5: GoodTypeAlias9[int, int], # E: bad type argument for ParamSpec - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:80:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[int, str]' for BadTypeAlias2 [invalid-annotation] - -BadTypeAlias2: TA = [int, str] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:81:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '((int, str),)' for BadTypeAlias3 [invalid-annotation] - -BadTypeAlias3: TA = ((int, str),) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:82:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for BadTypeAlias4 [invalid-annotation] - -BadTypeAlias4: TA = [int for i in range(1)] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:83:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation "{'a': 'b'}" for BadTypeAlias5 [invalid-annotation] - -BadTypeAlias5: TA = {"a": "b"} # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '3' for BadTypeAlias9 [invalid-annotation] - -BadTypeAlias9: TA = var1 # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:88:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'True' for BadTypeAlias10 [invalid-annotation] - -BadTypeAlias10: TA = True # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:89:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '1' for BadTypeAlias11 [invalid-annotation] - -BadTypeAlias11: TA = 1 # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:91:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for BadTypeAlias13 [invalid-annotation] - -BadTypeAlias13: TA = f"{'int'}" # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_explicit.py:102:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Union[list, set][int]' [invalid-annotation] - -x4: ListOrSetAlias[int] # E: already specialized - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 79: Expected 1 errors -Line 84: Expected 1 errors -Line 85: Expected 1 errors -Line 86: Expected 1 errors -Line 90: Expected 1 errors -Line 100: Expected 1 errors -Line 101: Expected 1 errors -Line 41: Unexpected errors ["aliases_explicit.py:41:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[str, str]' [invalid-annotation]", "aliases_explicit.py:41:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Callable[Concatenate[int, P], R][[str, str], None]' [invalid-annotation]"] -Line 57: Unexpected errors ['aliases_explicit.py:57:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_type_aliases: Callable[Concatenate, Any] [assert-type]'] -Line 60: Unexpected errors ['aliases_explicit.py:60:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_type_aliases: Callable[[Any], None] [assert-type]'] -""" diff --git a/conformance/results/pytype/aliases_implicit.toml b/conformance/results/pytype/aliases_implicit.toml deleted file mode 100644 index 2be1cfd68..000000000 --- a/conformance/results/pytype/aliases_implicit.toml +++ /dev/null @@ -1,342 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. -Does not report invalid specialization of generic type alias with bound TypeVar. -Incorrectly evaluates generic type alias with ParamSpec with missing type argument. -Allows some illegal annotation forms to be interpreted as valid type aliases. -Does not report invalid specialization of already-specialized generic type alias. -""" -output = """ -aliases_implicit.py:54:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[str, str]' [invalid-annotation] - - p9: GoodTypeAlias9[[str, str], None], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:54:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Callable[Concatenate[int, P], R][[str, str], None]' [invalid-annotation] - - p9: GoodTypeAlias9[[str, str], None], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:68:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_type_aliases: Callable[Concatenate, Any] [assert-type] - - assert_type(p9, Callable[[int, str, str], None]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:72:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_type_aliases: Callable[[Any], None] [assert-type] - - assert_type(p13, Callable[..., None]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:76:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Optional[int][int]' [invalid-annotation] - - p1: GoodTypeAlias2[int], # E: type alias is not generic - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:77:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[Optional[int]][int]' [invalid-annotation] - - p2: GoodTypeAlias3[int], # E: type alias is already specialized - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:78:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[T][int, int]' [invalid-annotation] - - p3: GoodTypeAlias4[int, int], # E: too many type arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:79:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Callable[[int, T], T][int, int]' [invalid-annotation] - - p4: GoodTypeAlias8[int, int], # E: too many type arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:80:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Callable[Concatenate[int, P], R][int, int]' [invalid-annotation] - - p5: GoodTypeAlias9[int, int], # E: bad type argument for ParamSpec - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[int, str]' for p2 [invalid-annotation] - -def bad_type_aliases( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: BadTypeAlias1, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: BadTypeAlias2, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: BadTypeAlias3, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: BadTypeAlias4, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: BadTypeAlias5, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: BadTypeAlias6, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: BadTypeAlias7, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: BadTypeAlias8, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: BadTypeAlias9, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: BadTypeAlias10, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: BadTypeAlias11, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: BadTypeAlias12, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: BadTypeAlias13, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: BadTypeAlias14, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'True' for p10 [invalid-annotation] - -def bad_type_aliases( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: BadTypeAlias1, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: BadTypeAlias2, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: BadTypeAlias3, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: BadTypeAlias4, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: BadTypeAlias5, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: BadTypeAlias6, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: BadTypeAlias7, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: BadTypeAlias8, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: BadTypeAlias9, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: BadTypeAlias10, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: BadTypeAlias11, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: BadTypeAlias12, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: BadTypeAlias13, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: BadTypeAlias14, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for p4 [invalid-annotation] - -def bad_type_aliases( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: BadTypeAlias1, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: BadTypeAlias2, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: BadTypeAlias3, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: BadTypeAlias4, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: BadTypeAlias5, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: BadTypeAlias6, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: BadTypeAlias7, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: BadTypeAlias8, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: BadTypeAlias9, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: BadTypeAlias10, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: BadTypeAlias11, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: BadTypeAlias12, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: BadTypeAlias13, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: BadTypeAlias14, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '3' for p9 [invalid-annotation] - -def bad_type_aliases( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: BadTypeAlias1, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: BadTypeAlias2, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: BadTypeAlias3, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: BadTypeAlias4, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: BadTypeAlias5, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: BadTypeAlias6, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: BadTypeAlias7, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: BadTypeAlias8, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: BadTypeAlias9, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: BadTypeAlias10, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: BadTypeAlias11, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: BadTypeAlias12, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: BadTypeAlias13, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: BadTypeAlias14, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '1' for p11 [invalid-annotation] - -def bad_type_aliases( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: BadTypeAlias1, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: BadTypeAlias2, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: BadTypeAlias3, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: BadTypeAlias4, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: BadTypeAlias5, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: BadTypeAlias6, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: BadTypeAlias7, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: BadTypeAlias8, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: BadTypeAlias9, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: BadTypeAlias10, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: BadTypeAlias11, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: BadTypeAlias12, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: BadTypeAlias13, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: BadTypeAlias14, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '((int, str),)' for p3 [invalid-annotation] - -def bad_type_aliases( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: BadTypeAlias1, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: BadTypeAlias2, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: BadTypeAlias3, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: BadTypeAlias4, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: BadTypeAlias5, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: BadTypeAlias6, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: BadTypeAlias7, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: BadTypeAlias8, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: BadTypeAlias9, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: BadTypeAlias10, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: BadTypeAlias11, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: BadTypeAlias12, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: BadTypeAlias13, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: BadTypeAlias14, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation "{'a': 'b'}" for p5 [invalid-annotation] - -def bad_type_aliases( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: BadTypeAlias1, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: BadTypeAlias2, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: BadTypeAlias3, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: BadTypeAlias4, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: BadTypeAlias5, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: BadTypeAlias6, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: BadTypeAlias7, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: BadTypeAlias8, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: BadTypeAlias9, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: BadTypeAlias10, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: BadTypeAlias11, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: BadTypeAlias12, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: BadTypeAlias13, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: BadTypeAlias14, # E: Invalid type annotation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -aliases_implicit.py:135:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Union[list, set][int]' [invalid-annotation] - -x4: ListOrSetAlias[int] # E: already specialized - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 81: Expected 1 errors -Line 106: Expected 1 errors -Line 107: Expected 1 errors -Line 108: Expected 1 errors -Line 109: Expected 1 errors -Line 110: Expected 1 errors -Line 111: Expected 1 errors -Line 112: Expected 1 errors -Line 113: Expected 1 errors -Line 114: Expected 1 errors -Line 115: Expected 1 errors -Line 116: Expected 1 errors -Line 117: Expected 1 errors -Line 118: Expected 1 errors -Line 119: Expected 1 errors -Line 133: Expected 1 errors -Line 54: Unexpected errors ["aliases_implicit.py:54:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[str, str]' [invalid-annotation]", "aliases_implicit.py:54:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Callable[Concatenate[int, P], R][[str, str], None]' [invalid-annotation]"] -Line 68: Unexpected errors ['aliases_implicit.py:68:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_type_aliases: Callable[Concatenate, Any] [assert-type]'] -Line 72: Unexpected errors ['aliases_implicit.py:72:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_type_aliases: Callable[[Any], None] [assert-type]'] -Line 105: Unexpected errors ["aliases_implicit.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[int, str]' for p2 [invalid-annotation]", "aliases_implicit.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'True' for p10 [invalid-annotation]", "aliases_implicit.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' for p4 [invalid-annotation]", "aliases_implicit.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '3' for p9 [invalid-annotation]", "aliases_implicit.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '1' for p11 [invalid-annotation]", "aliases_implicit.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '((int, str),)' for p3 [invalid-annotation]", 'aliases_implicit.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation "{\\'a\\': \\'b\\'}" for p5 [invalid-annotation]'] -""" diff --git a/conformance/results/pytype/aliases_newtype.toml b/conformance/results/pytype/aliases_newtype.toml deleted file mode 100644 index 996e17771..000000000 --- a/conformance/results/pytype/aliases_newtype.toml +++ /dev/null @@ -1,44 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of NewType in `isinstance` call. -Does not reject use of NewType in class definition statement. -Does not report inconsistency between name of NewType and assigned identifier name. -Does not reject use of NewType with generic class with TypeVar. -Does not reject use of NewType with protocol class. -Does not reject use of NewType with TypedDict class. -Does not reject use of NewType with Any. -""" -output = """ -aliases_newtype.py:11:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function UserId.__init__ was called with the wrong arguments [wrong-arg-types] - -UserId("user") # E: incorrect type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_newtype.py:12:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for u1 does not match type of assignment [annotation-type-mismatch] - -u1: UserId = 42 # E: incorrect type -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_newtype.py:38:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class GoodNewType1 is not indexable [not-indexable] - -nt1: GoodNewType1[int] # E: NewType cannot be generic - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_newtype.py:60:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function typing.NewType expects 2 arg(s), got 3 [wrong-arg-count] - -BadNewType6 = NewType("BadNewType6", int, int) # E: too many arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 20: Expected 1 errors -Line 23: Expected 1 errors -Line 32: Expected 1 errors -Line 44: Expected 1 errors -Line 47: Expected 1 errors -Line 49: Expected 1 errors -Line 51: Expected 1 errors -Line 58: Expected 1 errors -Line 62: Expected 1 errors -""" diff --git a/conformance/results/pytype/aliases_recursive.toml b/conformance/results/pytype/aliases_recursive.toml deleted file mode 100644 index 10e318a6b..000000000 --- a/conformance/results/pytype/aliases_recursive.toml +++ /dev/null @@ -1,115 +0,0 @@ -conformant = "Partial" -notes = """ -Does not detect type violation for some deeply-nested types. -Does not properly handle `|` for unions in some recursive type alias definitions. -Does not detect cyclical references in recursive type alias definition. -""" -output = """ -aliases_recursive.py:19:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for j4 does not match type of assignment [annotation-type-mismatch] - -j4: Json = {"a": 1, "b": 3j} # E: incompatible type -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:20:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for j5 does not match type of assignment [annotation-type-mismatch] - -j5: Json = [2, 3j] # E: incompatible type -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:38:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t6 does not match type of assignment [annotation-type-mismatch] - -t6: RecursiveTuple = (1, ("1", 1), (1, (1, [2]))) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:39:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t6 does not match type of assignment [annotation-type-mismatch] - -t6: RecursiveTuple = (1, [1]) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:50:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for m7 does not match type of assignment [annotation-type-mismatch] - -m7: RecursiveMapping = {"1": [1]} # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:51:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for m8 does not match type of assignment [annotation-type-mismatch] - -m8: RecursiveMapping = {"1": "1", "2": 1, "3": [1, 2]} # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:58:26: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for |: ''GenericTypeAlias1[T1]': str' and 'T1: TypeVar' [unsupported-operands] - -GenericTypeAlias1 = list["GenericTypeAlias1[T1]" | T1] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:59:25: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[str]' [invalid-annotation] - -SpecializedTypeAlias1 = GenericTypeAlias1[str] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:62:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[str]' [invalid-annotation] - -g2: GenericTypeAlias1[str] = ["hi", "bye", [""], [["hi"]]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:62:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'GenericTypeAlias1[str]' [invalid-annotation] - -g2: GenericTypeAlias1[str] = ["hi", "bye", [""], [["hi"]]] # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:63:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[str]' [invalid-annotation] - -g3: GenericTypeAlias1[str] = ["hi", [2.4]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:63:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'GenericTypeAlias1[str]' [invalid-annotation] - -g3: GenericTypeAlias1[str] = ["hi", [2.4]] # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:65:26: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for |: ''GenericTypeAlias2[T1, T2]': str' and 'T1: TypeVar' [unsupported-operands] - -GenericTypeAlias2 = list["GenericTypeAlias2[T1, T2]" | T1 | T2] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:67:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[str, int]' [invalid-annotation] - -g4: GenericTypeAlias2[str, int] = [[3, ["hi"]], "hi"] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:67:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'GenericTypeAlias2[str, int]' [invalid-annotation] - -g4: GenericTypeAlias2[str, int] = [[3, ["hi"]], "hi"] # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:68:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[str, float]' [invalid-annotation] - -g5: GenericTypeAlias2[str, float] = [[3, ["hi", 3.4, [3.4]]], "hi"] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:68:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'GenericTypeAlias2[str, float]' [invalid-annotation] - -g5: GenericTypeAlias2[str, float] = [[3, ["hi", 3.4, [3.4]]], "hi"] # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -aliases_recursive.py:69:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[str, int]' [invalid-annotation] - -g6: GenericTypeAlias2[str, int] = [[3, ["hi", 3, [3.4]]], "hi"] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_recursive.py:69:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'GenericTypeAlias2[str, int]' [invalid-annotation] - -g6: GenericTypeAlias2[str, int] = [[3, ["hi", 3, [3.4]]], "hi"] # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 52: Expected 1 errors -Line 72: Expected 1 errors -Line 75: Expected 1 errors -Line 58: Unexpected errors ["aliases_recursive.py:58:26: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : unsupported operand type(s) for |: ''GenericTypeAlias1[T1]': str' and 'T1: TypeVar' [unsupported-operands]"] -Line 59: Unexpected errors ["aliases_recursive.py:59:25: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'list[str]' [invalid-annotation]"] -Line 62: Unexpected errors ["aliases_recursive.py:62:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'list[str]' [invalid-annotation]", "aliases_recursive.py:62:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'GenericTypeAlias1[str]' [invalid-annotation]"] -Line 65: Unexpected errors ["aliases_recursive.py:65:26: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : unsupported operand type(s) for |: ''GenericTypeAlias2[T1, T2]': str' and 'T1: TypeVar' [unsupported-operands]"] -Line 67: Unexpected errors ["aliases_recursive.py:67:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'list[str, int]' [invalid-annotation]", "aliases_recursive.py:67:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'GenericTypeAlias2[str, int]' [invalid-annotation]"] -Line 68: Unexpected errors ["aliases_recursive.py:68:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'list[str, float]' [invalid-annotation]", "aliases_recursive.py:68:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'GenericTypeAlias2[str, float]' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/aliases_type_statement.toml b/conformance/results/pytype/aliases_type_statement.toml deleted file mode 100644 index 84f4bc313..000000000 --- a/conformance/results/pytype/aliases_type_statement.toml +++ /dev/null @@ -1,37 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support `type` statement. -""" -output = """ -SyntaxError: Type statement is only supported in Python 3.12 and greater (, line 8) -""" -conformance_automated = "Fail" -errors_diff = """ -Line 17: Expected 1 errors -Line 19: Expected 1 errors -Line 23: Expected 1 errors -Line 26: Expected 1 errors -Line 31: Expected 1 errors -Line 37: Expected 1 errors -Line 38: Expected 1 errors -Line 39: Expected 1 errors -Line 40: Expected 1 errors -Line 41: Expected 1 errors -Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 49: Expected 1 errors -Line 56: Expected 1 errors -Line 62: Expected 1 errors -Line 67: Expected 1 errors -Line 77: Expected 1 errors -Line 79: Expected 1 errors -Line 82: Expected 1 errors -Line 84: Expected 1 errors -Lines 51, 52: Expected error (tag 'TA14') -Lines 88, 89: Expected error (tag 'RTA6') -""" diff --git a/conformance/results/pytype/aliases_typealiastype.toml b/conformance/results/pytype/aliases_typealiastype.toml deleted file mode 100644 index da0105cf4..000000000 --- a/conformance/results/pytype/aliases_typealiastype.toml +++ /dev/null @@ -1,78 +0,0 @@ -conformant = "Unsupported" -notes = """ -Support for TypeAliasType is not implemented. -""" -output = """ -aliases_typealiastype.py:5:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import Callable, Generic, ParamSpec, TypeAliasType, TypeVar, TypeVarTuple -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:11:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:16:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -GoodAlias1 = TypeAliasType("GoodAlias1", int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:19:42: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for |: 'T: TypeVar' and ''list[GoodAlias4[T]]': str' [unsupported-operands] - -GoodAlias4 = TypeAliasType("GoodAlias4", T | "list[GoodAlias4[T]]", type_params=(T,)) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:22:68: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - - Callable[P, TStr] | list[S] | list["GoodAlias5[S, TStr, P]"] | tuple[*Ts], - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:22:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - - Callable[P, TStr] | list[S] | list["GoodAlias5[S, TStr, P]"] | tuple[*Ts], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:32:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'other_attrib' on TypeAliasType [attribute-error] - -print(GoodAlias1.other_attrib) # E: unknown attribute - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:47:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for |: 'T: TypeVar' and ''BadAlias5[str]': str' [unsupported-operands] - -BadAlias5 = TypeAliasType("BadAlias5", T | "BadAlias5[str]", type_params=(T,)) # E: circular dependency - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_typealiastype.py:66:47: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Name 'BadAlias21' is not defined [name-error] - -BadAlias21 = TypeAliasType("BadAlias21", list[BadAlias21]) # E - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 40: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 48: Expected 1 errors -Line 52: Expected 1 errors -Line 53: Expected 1 errors -Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 56: Expected 1 errors -Line 57: Expected 1 errors -Line 58: Expected 1 errors -Line 59: Expected 1 errors -Line 60: Expected 1 errors -Line 61: Expected 1 errors -Line 62: Expected 1 errors -Line 63: Expected 1 errors -Line 64: Expected 1 errors -Line 5: Unexpected errors ['aliases_typealiastype.py:5:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 11: Unexpected errors ['aliases_typealiastype.py:11:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 16: Unexpected errors ["aliases_typealiastype.py:16:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 19: Unexpected errors ["aliases_typealiastype.py:19:42: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : unsupported operand type(s) for |: 'T: TypeVar' and ''list[GoodAlias4[T]]': str' [unsupported-operands]"] -Line 22: Unexpected errors ["aliases_typealiastype.py:22:68: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "aliases_typealiastype.py:22:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/aliases_variance.toml b/conformance/results/pytype/aliases_variance.toml deleted file mode 100644 index 89093dfe8..000000000 --- a/conformance/results/pytype/aliases_variance.toml +++ /dev/null @@ -1,25 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not detect variance incompatibility. -""" -output = """ -aliases_variance.py:9:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T_co = TypeVar("T_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -aliases_variance.py:10:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -T_contra = TypeVar("T_contra", contravariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Expected 1 errors -Line 28: Expected 1 errors -Line 32: Expected 1 errors -Line 44: Expected 1 errors -Line 9: Unexpected errors ['aliases_variance.py:9:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 10: Unexpected errors ['aliases_variance.py:10:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/annotations_coroutines.toml b/conformance/results/pytype/annotations_coroutines.toml deleted file mode 100644 index a339ad0a1..000000000 --- a/conformance/results/pytype/annotations_coroutines.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/annotations_forward_refs.toml b/conformance/results/pytype/annotations_forward_refs.toml deleted file mode 100644 index c8757a0c1..000000000 --- a/conformance/results/pytype/annotations_forward_refs.toml +++ /dev/null @@ -1,446 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject some illegal type expression forms when quoted. -Incorrectly generates error for quoted type defined in class scope. -Evaluates incorrect type for class variable annotated with quoted type expression. -Does not treat triple-quoted forward reference annotation as implicitly parenthesized. -""" -output = """ -annotations_forward_refs.py:22:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Name 'ClassA' is not defined [name-error] - -bad1: ClassA # E: Runtime error: requires quotes - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:23:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Name 'ClassA' is not defined [name-error] - -bad2: list[ClassA] # E: Runtime error: requires quotes - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:24:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for |: ''ClassA': str' and 'int: type[int]' [unsupported-operands] - -bad3: "ClassA" | int # E: Runtime error - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:25:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'y' in call to function int.__or__ [missing-parameter] - -bad4: int | "ClassA" # E: Runtime error - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '{}' for p5 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[int, str]' for p2 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'True' for p10 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for p15 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for p4 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '1' for p9 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '1' for p11 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '-1' for p12 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '(int, str)' for p3 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: "eval(''.join(map(chr, [105, 110, 116])))", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: "[int, str]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: "(int, str)", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: "[int for i in range(1)]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: "{}", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: "(lambda : int)()", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: "[int][0]", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: "int if 1 < 3 else str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: "var1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: "True", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: "1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: "-1", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: "int or str", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: 'f"int"', # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: "types", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:66:26: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassB: Name 'ClassB' is not defined [name-error] - - def method1(self) -> ClassB: # E: Runtime error - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:80:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Name 'ClassF' is not defined [name-error] - - ClassF: "ClassF" # E: circular reference - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:82:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Invalid type annotation '' for str [invalid-annotation] - - str: "str" = "" # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:87:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Invalid type annotation '' for x [invalid-annotation] - - x: "int" = 0 # OK - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -annotations_forward_refs.py:89:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Invalid type annotation '' for y [invalid-annotation] - - y: int = 0 # E: Refers to local int, which isn't a legal type expression - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -annotations_forward_refs.py:96:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(ClassD.x, int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_forward_refs.py:103:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unexpected indent [python-compiler-error] - -value: ""\" -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - int | -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - str | -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - list[int] -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m -""\" -\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 41: Expected 1 errors -Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 49: Expected 1 errors -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 52: Expected 1 errors -Line 53: Expected 1 errors -Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 40: Unexpected errors ["annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '{}' for p5 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[int, str]' for p2 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'True' for p10 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' for p15 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' for p4 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '1' for p9 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '1' for p11 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '-1' for p12 [invalid-annotation]", "annotations_forward_refs.py:40:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '(int, str)' for p3 [invalid-annotation]"] -Line 82: Unexpected errors ["annotations_forward_refs.py:82:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in ClassD: Invalid type annotation '' for str [invalid-annotation]"] -Line 87: Unexpected errors ["annotations_forward_refs.py:87:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in ClassD: Invalid type annotation '' for x [invalid-annotation]"] -Line 96: Unexpected errors ['annotations_forward_refs.py:96:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 103: Unexpected errors ['annotations_forward_refs.py:103:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : unexpected indent [python-compiler-error]'] -""" diff --git a/conformance/results/pytype/annotations_generators.toml b/conformance/results/pytype/annotations_generators.toml deleted file mode 100644 index 50bb6423c..000000000 --- a/conformance/results/pytype/annotations_generators.toml +++ /dev/null @@ -1,82 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report invalid return type for generator when function implicitly returns None. -Reports invalid error when return type of generator is annotated as a compatible protocol. -Does not report type violation in `yield from` statement. -""" -output = """ -annotations_generators.py:54:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in generator2: bad return type [bad-return-type] - - return False # E: incompatible return type - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:57:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in generator2: bad return type [bad-return-type] - - yield 3 # E: incompatible yield type - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:57:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in generator2: bad return type [bad-return-type] - - yield 3 # E: incompatible yield type - \u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:66:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in generator3: bad return type [bad-return-type] - - yield 3 # E: Incompatible yield type - \u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:75:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in generator5: bad return type [bad-return-type] - - yield B() # E: incompatible yield type - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:86:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Bad return type 'int' for generator function generator8 [bad-yield-annotation] - -def generator8() -> int: # E: incompatible return type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - yield None # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return 0 -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:91:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Bad return type 'int' for async generator function generator9 [bad-yield-annotation] - -async def generator9() -> int: # E: incompatible return type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - yield None # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:100:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Bad return type 'IntIterator' for generator function generator15 [bad-yield-annotation] - -def generator15() -> IntIterator: # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - yield 0 -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:109:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Bad return type 'AsyncIntIterator' for async generator function generator16 [bad-yield-annotation] - -async def generator16() -> AsyncIntIterator: # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - yield 0 -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:118:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in generator18: bad return type [bad-return-type] - - yield from generator17() # E: incompatible generator type - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -annotations_generators.py:119:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in generator18: bad return type [bad-return-type] - - yield from [1] # E: incompatible generator type - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 51: Expected 1 errors -Line 87: Expected 1 errors -Line 92: Expected 1 errors -Line 135: Expected 1 errors -Line 100: Unexpected errors ["annotations_generators.py:100:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Bad return type 'IntIterator' for generator function generator15 [bad-yield-annotation]"] -Line 109: Unexpected errors ["annotations_generators.py:109:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Bad return type 'AsyncIntIterator' for async generator function generator16 [bad-yield-annotation]"] -""" diff --git a/conformance/results/pytype/annotations_methods.toml b/conformance/results/pytype/annotations_methods.toml deleted file mode 100644 index 4a773d055..000000000 --- a/conformance/results/pytype/annotations_methods.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Pass" -notes = """ -Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. -""" -output = """ -annotations_methods.py:42:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : B [assert-type] - -assert_type(A.copy(B()), A) # E? -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/annotations_typeexpr.toml b/conformance/results/pytype/annotations_typeexpr.toml deleted file mode 100644 index 322d352c5..000000000 --- a/conformance/results/pytype/annotations_typeexpr.toml +++ /dev/null @@ -1,381 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject call expressions in type annotation. -Does not reject call lambda expression in type annotation. -Does not reject list expression in type annotation. -Does not reject ternary expression in type annotation. -Does not reject f-string in type annotation. -Does not reject module in type annotation. -""" -output = """ -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '{}' for p5 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[int, str]' for p2 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'True' for p10 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for p15 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for p4 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '3' for p9 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '1' for p11 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '-1' for p12 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -annotations_typeexpr.py:87:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '(int, str)' for p3 [invalid-annotation] - -def invalid_annotations( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p1: eval("".join(map(chr, [105, 110, 116]))), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p2: [int, str], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p3: (int, str), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p4: [int for i in range(1)], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p5: {}, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p6: (lambda: int)(), # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p7: [int][0], # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p8: int if 1 < 3 else str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p9: var1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p10: True, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p11: 1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p12: -1, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p13: int or str, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p14: f"int", # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - p15: types, # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -): -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 88: Expected 1 errors -Line 89: Expected 1 errors -Line 90: Expected 1 errors -Line 91: Expected 1 errors -Line 92: Expected 1 errors -Line 93: Expected 1 errors -Line 94: Expected 1 errors -Line 95: Expected 1 errors -Line 96: Expected 1 errors -Line 97: Expected 1 errors -Line 98: Expected 1 errors -Line 99: Expected 1 errors -Line 100: Expected 1 errors -Line 101: Expected 1 errors -Line 102: Expected 1 errors -Line 87: Unexpected errors ["annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '{}' for p5 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[int, str]' for p2 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'True' for p10 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' for p15 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' for p4 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '3' for p9 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '1' for p11 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '-1' for p12 [invalid-annotation]", "annotations_typeexpr.py:87:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '(int, str)' for p3 [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/callables_annotation.toml b/conformance/results/pytype/callables_annotation.toml deleted file mode 100644 index 2373cd1cc..000000000 --- a/conformance/results/pytype/callables_annotation.toml +++ /dev/null @@ -1,27 +0,0 @@ -conformant = "Partial" -notes = """ -Does not support Concatenate. -Does not treat "*args: Any, **kwargs: Any" as "...". -""" -output = """ -AttributeError: 'Concatenate' object has no attribute 'formal_type_parameters' -""" -conformance_automated = "Fail" -errors_diff = """ -Line 25: Expected 1 errors -Line 26: Expected 1 errors -Line 27: Expected 1 errors -Line 29: Expected 1 errors -Line 35: Expected 1 errors -Line 55: Expected 1 errors -Line 56: Expected 1 errors -Line 57: Expected 1 errors -Line 58: Expected 1 errors -Line 59: Expected 1 errors -Line 91: Expected 1 errors -Line 93: Expected 1 errors -Line 159: Expected 1 errors -Line 172: Expected 1 errors -Line 187: Expected 1 errors -Line 189: Expected 1 errors -""" diff --git a/conformance/results/pytype/callables_kwargs.toml b/conformance/results/pytype/callables_kwargs.toml deleted file mode 100644 index 9e727daec..000000000 --- a/conformance/results/pytype/callables_kwargs.toml +++ /dev/null @@ -1,93 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand Unpack in the context of **kwargs annotation. -""" -output = """ -callables_kwargs.py:10:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.Unpack not supported yet [not-supported-yet] - -from typing import Protocol, TypeVar, TypedDict, NotRequired, Required, Unpack, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:24:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Unpack[TD2] [assert-type] - - assert_type(v1, int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:32:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Unpack[TD2] [assert-type] - - assert_type(v2, str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:35:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Unpack[TD2] [assert-type] - - assert_type(v3, str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:41:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: dict[str, Unpack[TD1]] [assert-type] - - assert_type(kwargs, TD1) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:47:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func1 was called with the wrong arguments [wrong-arg-types] - - func1(v1=1, v2="", v3="5") # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:49:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Missing parameter 'v2' in call to function TD2.__init__ [missing-parameter] - - td2 = TD2(v1=2, v3="4") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:51:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func1 was called with the wrong arguments [wrong-arg-types] - - func1(v1=1, v2="", v3="5", v4=5) # E: v4 is not in TD2 - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:52:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func1 expects 0 arg(s), got 3 [wrong-arg-count] - - func1(1, "", "5") # E: args not passed by position - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:58:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func1 was called with the wrong arguments [wrong-arg-types] - - func1(**my_dict) # E: untyped dict - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:61:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func1 was called with the wrong arguments [wrong-arg-types] - - func1(**d1) # E?: OK or Type error (spec allows either) - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:63:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func1 was called with the wrong arguments [wrong-arg-types] - - func1(v1=2, **td2) # E: v1 is already specified - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:64:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func2 was called with the wrong arguments [wrong-arg-types] - - func2(1, **td2) # E: v1 is already specified - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_kwargs.py:65:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Function func2 was called with the wrong arguments [wrong-arg-types] - - func2(v1=1, **td2) # E: v1 is already specified - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 46: Expected 1 errors -Line 101: Expected 1 errors -Line 102: Expected 1 errors -Line 103: Expected 1 errors -Line 111: Expected 1 errors -Line 122: Expected 1 errors -Line 134: Expected 1 errors -Line 10: Unexpected errors ['callables_kwargs.py:10:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.Unpack not supported yet [not-supported-yet]'] -Line 24: Unexpected errors ['callables_kwargs.py:24:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Unpack[TD2] [assert-type]'] -Line 32: Unexpected errors ['callables_kwargs.py:32:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Unpack[TD2] [assert-type]'] -Line 35: Unexpected errors ['callables_kwargs.py:35:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Unpack[TD2] [assert-type]'] -Line 41: Unexpected errors ['callables_kwargs.py:41:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: dict[str, Unpack[TD1]] [assert-type]'] -Line 47: Unexpected errors ['callables_kwargs.py:47:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: Function func1 was called with the wrong arguments [wrong-arg-types]'] -Line 49: Unexpected errors ["callables_kwargs.py:49:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: Missing parameter 'v2' in call to function TD2.__init__ [missing-parameter]"] -""" diff --git a/conformance/results/pytype/callables_protocol.toml b/conformance/results/pytype/callables_protocol.toml deleted file mode 100644 index 1f20354ff..000000000 --- a/conformance/results/pytype/callables_protocol.toml +++ /dev/null @@ -1,66 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not properly handle type compatibility checks with callback protocols. -""" -output = """ -callables_protocol.py:9:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -InputT = TypeVar("InputT", contravariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_protocol.py:10:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -OutputT = TypeVar("OutputT", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_protocol.py:121:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for cb6 does not match type of assignment [annotation-type-mismatch] - -cb6: NotProto6 = cb6_bad1 # E: NotProto6 isn't a protocol class -\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -callables_protocol.py:173:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -R = TypeVar("R", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_protocol.py:188:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in decorator1: bad return type [bad-return-type] - - return converted - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 191, in current file -callables_protocol.py:197:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'other_attribute2' on Proto9[Any, str] [attribute-error] - -print(cb9_good.other_attribute2) # E: unknown attribute - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_protocol.py:199:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Proto9.__call__ was called with the wrong arguments [wrong-arg-types] - -cb9_good(x=3) -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 35: Expected 1 errors -Line 36: Expected 1 errors -Line 37: Expected 1 errors -Line 67: Expected 1 errors -Line 68: Expected 1 errors -Line 69: Expected 1 errors -Line 70: Expected 1 errors -Line 97: Expected 1 errors -Line 169: Expected 1 errors -Line 186: Expected 1 errors -Line 187: Expected 1 errors -Line 238: Expected 1 errors -Line 260: Expected 1 errors -Line 284: Expected 1 errors -Line 311: Expected 1 errors -Line 9: Unexpected errors ['callables_protocol.py:9:10: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] -Line 10: Unexpected errors ['callables_protocol.py:10:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 173: Unexpected errors ['callables_protocol.py:173:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 188: Unexpected errors ['callables_protocol.py:188:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in decorator1: bad return type [bad-return-type]'] -Line 199: Unexpected errors ['callables_protocol.py:199:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function Proto9.__call__ was called with the wrong arguments [wrong-arg-types]'] -""" diff --git a/conformance/results/pytype/callables_subtyping.toml b/conformance/results/pytype/callables_subtyping.toml deleted file mode 100644 index 9d940c4ab..000000000 --- a/conformance/results/pytype/callables_subtyping.toml +++ /dev/null @@ -1,74 +0,0 @@ -conformant = "Partial" -notes = """ -Does not detect many subtyping rule violations for callables. -Does not correctly handle type alias parameterized by ParamSpec. -""" -errors_diff = """ -Line 51: Expected 1 errors -Line 52: Expected 1 errors -Line 55: Expected 1 errors -Line 58: Expected 1 errors -Line 82: Expected 1 errors -Line 85: Expected 1 errors -Line 86: Expected 1 errors -Line 116: Expected 1 errors -Line 119: Expected 1 errors -Line 120: Expected 1 errors -Line 122: Expected 1 errors -Line 124: Expected 1 errors -Line 125: Expected 1 errors -Line 126: Expected 1 errors -Line 151: Expected 1 errors -Line 154: Expected 1 errors -Line 155: Expected 1 errors -Line 187: Expected 1 errors -Line 190: Expected 1 errors -Line 191: Expected 1 errors -Line 193: Expected 1 errors -Line 195: Expected 1 errors -Line 196: Expected 1 errors -Line 197: Expected 1 errors -Line 236: Expected 1 errors -Line 237: Expected 1 errors -Line 240: Expected 1 errors -Line 243: Expected 1 errors -Line 273: Expected 1 errors -Line 297: Expected 1 errors -Line 211: Unexpected errors ["callables_subtyping.py:211:40: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Callable[[P], None][P]' [invalid-annotation]"] -Line 213: Unexpected errors ["callables_subtyping.py:213:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func7: Invalid type annotation 'TypeAliasWithP[P]' [invalid-annotation]"] -Line 255: Unexpected errors ["callables_subtyping.py:255:40: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __call__: @typing.overload-decorated 'Overloaded9.__call__' object is not callable [not-callable]"] -Line 284: Unexpected errors ["callables_subtyping.py:284:44: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __call__: @typing.overload-decorated 'Overloaded10.__call__' object is not callable [not-callable]"] -""" -output = """ -callables_subtyping.py:26:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for f6 does not match type of assignment [annotation-type-mismatch] - - f6: Callable[[float], float] = cb3 # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -callables_subtyping.py:29:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for f8 does not match type of assignment [annotation-type-mismatch] - - f8: Callable[[int], int] = cb2 # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -callables_subtyping.py:211:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Callable[[P], None][P]' [invalid-annotation] - -def func7(proto: ProtocolWithP[P], ta: TypeAliasWithP[P]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -callables_subtyping.py:213:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: Invalid type annotation 'TypeAliasWithP[P]' [invalid-annotation] - - f1: TypeAliasWithP[P] = proto # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -callables_subtyping.py:255:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __call__: @typing.overload-decorated 'Overloaded9.__call__' object is not callable [not-callable] - - def __call__(self, x: str) -> str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -callables_subtyping.py:284:44: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __call__: @typing.overload-decorated 'Overloaded10.__call__' object is not callable [not-callable] - - def __call__(self, x: str) -> complex: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" diff --git a/conformance/results/pytype/classes_classvar.toml b/conformance/results/pytype/classes_classvar.toml deleted file mode 100644 index 3c88e5ef8..000000000 --- a/conformance/results/pytype/classes_classvar.toml +++ /dev/null @@ -1,135 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of TypeVar in ClassVar. -Does not reject use of ParamSpec in ClassVar. -Does not reject use of ClassVar as a generic type argument. -Rejects initialization of ClassVar if no type argument is provided. -Does not infer ClassVar with no type argument and no assigned value as Any. -Does not reject use of ClassVar in parameter type annotation. -Does not reject use of ClassVar in local variable annotation. -Does not reject use of ClassVar in instance variable annotation. -Does not reject use of ClassVar in return type annotation. -Does not reject use of ClassVar in type alias definition. -Does not reject assignment of ClassVar through instance of class. -""" -output = """ -classes_classvar.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import ( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - Annotated, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - Any, -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - Callable, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - ClassVar, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - Final, -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - Generic, -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - ParamSpec, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - Protocol, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - TypeAlias, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - TypeVar, -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - TypeVarTuple, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - assert_type, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - cast, -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m -) -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -classes_classvar.py:29:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -classes_classvar.py:38:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Invalid type annotation 'ClassVar[int, str]' [invalid-annotation] - - bad1: ClassVar[int, str] = cast(Any, 0) # E: too many arguments - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -classes_classvar.py:38:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Invalid type annotation 'ClassVar[int, str]' [invalid-annotation] - - bad1: ClassVar[int, str] = cast(Any, 0) # E: too many arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -classes_classvar.py:39:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: class ClassVar is not indexable [not-indexable] - - bad2: CV[3] = cast(Any, 0) # E: invalid type - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -classes_classvar.py:39:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Invalid type annotation 'CV[3]' [invalid-annotation] - - bad2: CV[3] = cast(Any, 0) # E: invalid type - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -classes_classvar.py:40:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Name 'var' is not defined [name-error] - - bad3: CV[var] = cast(Any, 0) # E: invalid type - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -classes_classvar.py:40:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Name 'var' is not defined [name-error] - - bad3: CV[var] = cast(Any, 0) # E: invalid type - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -classes_classvar.py:52:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Type annotation for bad8 does not match type of assignment [annotation-type-mismatch] - - bad8: ClassVar[list[str]] = {} # E: type violation in initialization - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -classes_classvar.py:63:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Type annotation for good4 does not match type of assignment [annotation-type-mismatch] - - good4: ClassVar = 3.1 - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -classes_classvar.py:74:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method2: bad return type [bad-return-type] - - return 3 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -classes_classvar.py:84:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : ClassVar [assert-type] - -assert_type(ClassA.good5, Any) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -classes_classvar.py:130:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ProtoA: Type annotation for z does not match type of assignment [annotation-type-mismatch] - - z: CV = [""] - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -classes_classvar.py:140:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for a does not match type of assignment [annotation-type-mismatch] - -a: ProtoA = ProtoAImpl() # E: y is not a ClassVar -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 69: Expected 1 errors -Line 70: Expected 1 errors -Line 71: Expected 1 errors -Line 73: Expected 1 errors -Line 77: Expected 1 errors -Line 78: Expected 1 errors -Line 111: Expected 1 errors -Line 7: Unexpected errors ['classes_classvar.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 29: Unexpected errors ['classes_classvar.py:29:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 63: Unexpected errors ['classes_classvar.py:63:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in ClassA: Type annotation for good4 does not match type of assignment [annotation-type-mismatch]'] -Line 74: Unexpected errors ['classes_classvar.py:74:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method2: bad return type [bad-return-type]'] -Line 84: Unexpected errors ['classes_classvar.py:84:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : ClassVar [assert-type]'] -Line 130: Unexpected errors ['classes_classvar.py:130:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in ProtoA: Type annotation for z does not match type of assignment [annotation-type-mismatch]'] -""" diff --git a/conformance/results/pytype/classes_override.toml b/conformance/results/pytype/classes_override.toml deleted file mode 100644 index 1944b5612..000000000 --- a/conformance/results/pytype/classes_override.toml +++ /dev/null @@ -1,60 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not yet support the @override decorator. -""" -output = """ -classes_override.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.override not supported yet [not-supported-yet] - -from typing import Any, Callable, overload, override -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -classes_override.py:30:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method2: bad return type [bad-return-type] - - return 0 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -classes_override.py:50:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method2: bad return type [bad-return-type] - - return 0 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -classes_override.py:53:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ChildA: Attribute 'method3' not found on any parent class [override-error] - - def method3(self) -> int: # E[method3]: no matching signature in ancestor - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return 1 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -classes_override.py:57:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ChildA: Attribute 'method4' not found on any parent class [override-error] - - def method4(self, x: int) -> int: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -classes_override.py:66:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method4: bad return type [bad-return-type] - - return 0 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -classes_override.py:101:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ChildB: Attribute 'method1' not found on any parent class [override-error] - - def method1(self) -> None: # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 56, 64, 65: Expected error (tag 'method4') -Lines 78, 79: Expected error (tag 'static_method1') -Lines 83, 84: Expected error (tag 'class_method1') -Lines 88, 89: Expected error (tag 'property1') -Line 7: Unexpected errors ['classes_override.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.override not supported yet [not-supported-yet]'] -Line 30: Unexpected errors ['classes_override.py:30:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method2: bad return type [bad-return-type]'] -Line 50: Unexpected errors ['classes_override.py:50:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method2: bad return type [bad-return-type]'] -Line 57: Unexpected errors ["classes_override.py:57:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in ChildA: Attribute 'method4' not found on any parent class [override-error]"] -Line 66: Unexpected errors ['classes_override.py:66:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method4: bad return type [bad-return-type]'] -Line 101: Unexpected errors ["classes_override.py:101:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in ChildB: Attribute 'method1' not found on any parent class [override-error]"] -""" diff --git a/conformance/results/pytype/constructors_call_init.toml b/conformance/results/pytype/constructors_call_init.toml deleted file mode 100644 index b52f3b5b2..000000000 --- a/conformance/results/pytype/constructors_call_init.toml +++ /dev/null @@ -1,90 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report errors during binding to self parameter of __init__ method. -Does not infer type of Self for self parameter of __init__ method. -Rejects valid type annotation for self parameter in __init__ method. -Does not support function-scoped TypeVars in self annotation in __init__ method. -Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 21: Expected 1 errors -Line 42: Expected 1 errors -Line 56: Expected 1 errors -Line 107: Expected 1 errors -Line 51: Unexpected errors ["constructors_call_init.py:51:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __init__: Invalid type annotation 'Class4[int]' for self [invalid-annotation]"] -Line 72: Unexpected errors ['constructors_call_init.py:72:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class5 [assert-type]'] -Line 74: Unexpected errors ['constructors_call_init.py:74:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class5 [assert-type]'] -Line 88: Unexpected errors ["constructors_call_init.py:88:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Class6: Invalid type annotation 'V2' [invalid-annotation]", "constructors_call_init.py:88:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Class6: Invalid type annotation 'V1' [invalid-annotation]", "constructors_call_init.py:88:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __init__: Invalid type annotation 'Class6[V1, V2]' for self [invalid-annotation]"] -Line 91: Unexpected errors ['constructors_call_init.py:91:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class6 [assert-type]'] -Line 96: Unexpected errors ["constructors_call_init.py:96:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Class7: Invalid type annotation 'V2' [invalid-annotation]", "constructors_call_init.py:96:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Class7: Invalid type annotation 'V1' [invalid-annotation]", "constructors_call_init.py:96:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __init__: Invalid type annotation 'Class7[V2, V1]' for self [invalid-annotation]"] -Line 99: Unexpected errors ['constructors_call_init.py:99:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class7 [assert-type]'] -Line 108: Unexpected errors ["constructors_call_init.py:108:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __init__: Invalid type annotation 'Class8[T2, T1]' for self [invalid-annotation]"] -""" -output = """ -constructors_call_init.py:51:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Invalid type annotation 'Class4[int]' for self [invalid-annotation] - - def __init__(self: "Class4[int]") -> None: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -constructors_call_init.py:72:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class5 [assert-type] - -assert_type(Class5(0), Class5[list[int]]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:74:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class5 [assert-type] - -assert_type(Class5(""), Class5[set[str]]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:88:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Class6: Invalid type annotation 'V2' [invalid-annotation] - - def __init__(self: "Class6[V1, V2]", value1: V1, value2: V2) -> None: ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:88:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Class6: Invalid type annotation 'V1' [invalid-annotation] - - def __init__(self: "Class6[V1, V2]", value1: V1, value2: V2) -> None: ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:88:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Invalid type annotation 'Class6[V1, V2]' for self [invalid-annotation] - - def __init__(self: "Class6[V1, V2]", value1: V1, value2: V2) -> None: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -constructors_call_init.py:91:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class6 [assert-type] - -assert_type(Class6(0, ""), Class6[int, str]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:96:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Class7: Invalid type annotation 'V2' [invalid-annotation] - - def __init__(self: "Class7[V2, V1]", value1: V1, value2: V2) -> None: ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:96:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Class7: Invalid type annotation 'V1' [invalid-annotation] - - def __init__(self: "Class7[V2, V1]", value1: V1, value2: V2) -> None: ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:96:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Invalid type annotation 'Class7[V2, V1]' for self [invalid-annotation] - - def __init__(self: "Class7[V2, V1]", value1: V1, value2: V2) -> None: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -constructors_call_init.py:99:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class7 [assert-type] - -assert_type(Class7(0, ""), Class7[str, int]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:108:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Invalid type annotation 'Class8[T2, T1]' for self [invalid-annotation] - - pass - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -constructors_call_init.py:130:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Class11.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Class11(1) # E -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/constructors_call_metaclass.toml b/conformance/results/pytype/constructors_call_metaclass.toml deleted file mode 100644 index 3fe225c40..000000000 --- a/conformance/results/pytype/constructors_call_metaclass.toml +++ /dev/null @@ -1,41 +0,0 @@ -conformant = "Unupported" -notes = """ -Does not honor metaclass __call__ method when evaluating constructor call. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 23: Unexpected errors ["constructors_call_metaclass.py:23:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'x' in call to function Class1.__new__ [missing-parameter]", 'constructors_call_metaclass.py:23:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 36: Unexpected errors ["constructors_call_metaclass.py:36:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'x' in call to function Class2.__new__ [missing-parameter]", 'constructors_call_metaclass.py:36:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -""" -output = """ -constructors_call_metaclass.py:23:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'x' in call to function Class1.__new__ [missing-parameter] - -assert_type(Class1(), NoReturn) - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_metaclass.py:23:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(Class1(), NoReturn) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_metaclass.py:36:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'x' in call to function Class2.__new__ [missing-parameter] - -assert_type(Class2(), int | Meta2) - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_metaclass.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(Class2(), int | Meta2) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_metaclass.py:51:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'x' in call to function Class3.__new__ [missing-parameter] - -Class3() # E: Missing argument for 'x' parameter in __new__ -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_metaclass.py:65:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'x' in call to function Class4.__new__ [missing-parameter] - -Class4() # E: Missing argument for 'x' parameter in __new__ -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/constructors_call_new.toml b/conformance/results/pytype/constructors_call_new.toml deleted file mode 100644 index 970a8bbe3..000000000 --- a/conformance/results/pytype/constructors_call_new.toml +++ /dev/null @@ -1,49 +0,0 @@ -conformant = "Partial" -notes = """ -Does not honor explicit specialization of generic class when used in constructor call. -Does not support __new__ return type that is not a subclass of the class being constructed. -Does not skip evaluation of __init__ based on __new__ return type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 21: Expected 1 errors -Line 76: Unexpected errors ['constructors_call_new.py:76:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 89: Unexpected errors ["constructors_call_new.py:89:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'x' in call to function Class6.__init__ [missing-parameter]"] -Line 113: Unexpected errors ['constructors_call_new.py:113:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: bad return type [bad-return-type]'] -Line 125: Unexpected errors ['constructors_call_new.py:125:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: bad return type [bad-return-type]'] -Line 140: Unexpected errors ['constructors_call_new.py:140:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: bad return type [bad-return-type]'] -""" -output = """ -constructors_call_new.py:76:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - - assert_type(Class5(), NoReturn) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_new.py:89:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'x' in call to function Class6.__init__ [missing-parameter] - -assert_type(Class6(), int | Class6) - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -constructors_call_new.py:113:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: bad return type [bad-return-type] - - def __new__(cls, *args, **kwargs) -> "Class8[list[T]]": ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -constructors_call_new.py:125:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: bad return type [bad-return-type] - - def __new__(cls, *args, **kwargs) -> Self: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -constructors_call_new.py:140:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: bad return type [bad-return-type] - - def __new__(cls: "type[Class11[int]]") -> "Class11[int]": ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -Called from (traceback): - line 143, in current file -constructors_call_new.py:145:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Class11.__new__ was called with the wrong arguments [wrong-arg-types] - -Class11[str]() # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/constructors_call_type.toml b/conformance/results/pytype/constructors_call_type.toml deleted file mode 100644 index 9af05589a..000000000 --- a/conformance/results/pytype/constructors_call_type.toml +++ /dev/null @@ -1,54 +0,0 @@ -conformant = "Partial" -notes = """ -Does not validate call to custom metaclass __call__ method through type[T]. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 30: Expected 1 errors -Line 64: Expected 1 errors -Line 72: Expected 1 errors -Line 81: Expected 1 errors -Line 82: Expected 1 errors -Line 25: Unexpected errors ["constructors_call_type.py:25:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: Missing parameter 'cls' in call to function object.__new__ [missing-parameter]", 'constructors_call_type.py:25:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: Invalid keyword arguments (x, y) to function object.__new__ [wrong-keyword-args]'] -Line 62: Unexpected errors ["constructors_call_type.py:62:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T' [invalid-annotation]"] -""" -output = """ -constructors_call_type.py:25:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: Missing parameter 'cls' in call to function object.__new__ [missing-parameter] - - return super().__new__(*args, **kwargs) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 30, in func1 -constructors_call_type.py:25:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: Invalid keyword arguments (x, y) to function object.__new__ [wrong-keyword-args] - - return super().__new__(*args, **kwargs) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 29, in func1 -constructors_call_type.py:40:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Missing parameter 'x' in call to function Class2.__new__ [missing-parameter] - - cls() # E - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -constructors_call_type.py:50:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Missing parameter 'x' in call to function Class3.__init__ [missing-parameter] - - cls() # E - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -constructors_call_type.py:59:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func4: Function Class4.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - - cls(1) # E - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -constructors_call_type.py:62:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T' [invalid-annotation] - -def func5(cls: type[T]): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - cls() # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - cls(1) # E -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/constructors_callable.toml b/conformance/results/pytype/constructors_callable.toml deleted file mode 100644 index 0074fa180..000000000 --- a/conformance/results/pytype/constructors_callable.toml +++ /dev/null @@ -1,230 +0,0 @@ -conformant = "Partial" -notes = """ -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 use annotated type of self in __init__ method to generate return type of callable. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 51: Expected 1 errors -Line 127: Expected 1 errors -Line 144: Expected 1 errors -Line 36: Unexpected errors ['constructors_callable.py:36:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class1] [reveal-type]'] -Line 49: Unexpected errors ['constructors_callable.py:49:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class2] [reveal-type]'] -Line 50: Unexpected errors ['constructors_callable.py:50:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count]', 'constructors_callable.py:50:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 57: Unexpected errors ['constructors_callable.py:57:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: bad return type [bad-return-type]'] -Line 63: Unexpected errors ['constructors_callable.py:63:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class3] [reveal-type]'] -Line 73: Unexpected errors ['constructors_callable.py:73:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: bad return type [bad-return-type]'] -Line 77: Unexpected errors ['constructors_callable.py:77:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class4] [reveal-type]'] -Line 78: Unexpected errors ['constructors_callable.py:78:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : nothing [assert-type]'] -Line 97: Unexpected errors ['constructors_callable.py:97:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class5] [reveal-type]'] -Line 100: Unexpected errors ['constructors_callable.py:100:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count]', 'constructors_callable.py:100:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 105: Unexpected errors ['constructors_callable.py:105:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid keyword argument x to function [wrong-keyword-args]', 'constructors_callable.py:105:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 125: Unexpected errors ['constructors_callable.py:125:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class6] [reveal-type]'] -Line 126: Unexpected errors ['constructors_callable.py:126:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count]', 'constructors_callable.py:126:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 142: Unexpected errors ['constructors_callable.py:142:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class6Any] [reveal-type]'] -Line 143: Unexpected errors ['constructors_callable.py:143:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count]'] -Line 161: Unexpected errors ['constructors_callable.py:161:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class7] [reveal-type]'] -Line 164: Unexpected errors ['constructors_callable.py:164:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class7 [assert-type]'] -Line 165: Unexpected errors ['constructors_callable.py:165:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class7 [assert-type]'] -Line 182: Unexpected errors ['constructors_callable.py:182:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class8[nothing]] [reveal-type]'] -Line 183: Unexpected errors ['constructors_callable.py:183:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function expects 1 arg(s), got 2 [wrong-arg-count]', 'constructors_callable.py:183:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 193: Unexpected errors ['constructors_callable.py:193:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Class9] [reveal-type]'] -Line 194: Unexpected errors ['constructors_callable.py:194:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function expects 1 arg(s), got 2 [wrong-arg-count]', 'constructors_callable.py:194:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -""" -output = """ -constructors_callable.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class1] [reveal-type] - -reveal_type(r1) # `def (x: int) -> Class1` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:38:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count] - -r1() # E -\u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -constructors_callable.py:39:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument y to function [wrong-keyword-args] - -r1(y=1) # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:49:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class2] [reveal-type] - -reveal_type(r2) # `def () -> Class2` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:50:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count] - -assert_type(r2(), Class2) - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -constructors_callable.py:50:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(r2(), Class2) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:57:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: bad return type [bad-return-type] - - def __new__(cls, *args, **kwargs) -> Self: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -Called from (traceback): - line 64, in current file -constructors_callable.py:63:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class3] [reveal-type] - -reveal_type(r3) # `def (x: int) -> Class3` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:65:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count] - -r3() # E -\u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -constructors_callable.py:66:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument y to function [wrong-keyword-args] - -r3(y=1) # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:67:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 2 [wrong-arg-count] - -r3(1, 2) # E -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:73:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: bad return type [bad-return-type] - - def __new__(cls, x: int) -> int: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -Called from (traceback): - line 78, in current file -constructors_callable.py:77:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class4] [reveal-type] - -reveal_type(r4) # `def (x: int) -> int` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:78:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : nothing [assert-type] - -assert_type(r4(1), int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:79:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count] - -r4() # E -\u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -constructors_callable.py:80:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument y to function [wrong-keyword-args] - -r4(y=1) # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:97:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class5] [reveal-type] - -reveal_type(r5) # `def (*args: Any, **kwargs: Any) -> NoReturn` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:100:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count] - - assert_type(r5(), NoReturn) - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -constructors_callable.py:100:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - - assert_type(r5(), NoReturn) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:105:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument x to function [wrong-keyword-args] - - assert_type(r5(1, x=1), NoReturn) - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:105:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - - assert_type(r5(1, x=1), NoReturn) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:125:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class6] [reveal-type] - -reveal_type(r6) # `def () -> Class6Proxy` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:126:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count] - -assert_type(r6(), Class6Proxy) - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -constructors_callable.py:126:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(r6(), Class6Proxy) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:142:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class6Any] [reveal-type] - -reveal_type(r6_any) # `def () -> Any` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:143:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 0 [wrong-arg-count] - -assert_type(r6_any(), Any) - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:161:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class7] [reveal-type] - -reveal_type( -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - r7 -\u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m -) # overload of `def (x: int) -> Class7[int]` and `def (x: str) -> Class7[str]` -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -constructors_callable.py:164:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class7 [assert-type] - -assert_type(r7(0), Class7[int]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:165:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class7 [assert-type] - -assert_type(r7(""), Class7[str]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:182:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class8[nothing]] [reveal-type] - -reveal_type(r8) # `def [T] (x: T, y: list[T]) -> Class8[T]` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:183:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 2 [wrong-arg-count] - -assert_type(r8([""], [""]), Class8[str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:183:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(r8([""], [""]), Class8[str]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:184:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 2 [wrong-arg-count] - -r8([1], [""]) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:193:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Class9] [reveal-type] - -reveal_type(r9) # `def [T] (x: list[T], y: list[T]) -> Class9` -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:194:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 2 [wrong-arg-count] - -assert_type(r9([""], [""]), Class9) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:194:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(r9([""], [""]), Class9) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -constructors_callable.py:195:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function expects 1 arg(s), got 2 [wrong-arg-count] - -r9([1], [""]) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/constructors_consistency.toml b/conformance/results/pytype/constructors_consistency.toml deleted file mode 100644 index a5d4de873..000000000 --- a/conformance/results/pytype/constructors_consistency.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Pass" -notes = """ -Does not report inconsistency between __new__ and __init__ (optional). -""" -errors_diff = """ -""" -output = """ - -""" -conformance_automated = "Pass" diff --git a/conformance/results/pytype/dataclasses_descriptors.toml b/conformance/results/pytype/dataclasses_descriptors.toml deleted file mode 100644 index 04f115500..000000000 --- a/conformance/results/pytype/dataclasses_descriptors.toml +++ /dev/null @@ -1,78 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand descriptor objects in dataclass. -""" -output = """ -dataclasses_descriptors.py:24:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 38, in current file -dataclasses_descriptors.py:24:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 37, in current file -dataclasses_descriptors.py:35:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC1.__init__ was called with the wrong arguments [wrong-arg-types] - -dc1 = DC1(3) - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -dataclasses_descriptors.py:51:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 68, in current file -dataclasses_descriptors.py:51:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 67, in current file -dataclasses_descriptors.py:51:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 66, in current file -dataclasses_descriptors.py:51:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 63, in current file -dataclasses_descriptors.py:51:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 62, in current file -dataclasses_descriptors.py:51:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 61, in current file -dataclasses_descriptors.py:51:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __get__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Unexpected errors ['dataclasses_descriptors.py:24:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]', 'dataclasses_descriptors.py:24:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]'] -Line 35: Unexpected errors ['dataclasses_descriptors.py:35:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function DC1.__init__ was called with the wrong arguments [wrong-arg-types]'] -Line 51: Unexpected errors ['dataclasses_descriptors.py:51:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]', 'dataclasses_descriptors.py:51:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]', 'dataclasses_descriptors.py:51:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]', 'dataclasses_descriptors.py:51:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]', 'dataclasses_descriptors.py:51:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]', 'dataclasses_descriptors.py:51:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]', 'dataclasses_descriptors.py:51:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __get__: bad return type [bad-return-type]'] -""" diff --git a/conformance/results/pytype/dataclasses_final.toml b/conformance/results/pytype/dataclasses_final.toml deleted file mode 100644 index 7d9d915f0..000000000 --- a/conformance/results/pytype/dataclasses_final.toml +++ /dev/null @@ -1,33 +0,0 @@ -conformant = "Partial" -notes = """ -Doesn't handle Final nested inside ClassVar. -""" -errors_diff = """ -Line 27: Expected 1 errors -Line 35: Expected 1 errors -Line 37: Expected 1 errors -Line 18: Unexpected errors ['dataclasses_final.py:18:21: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in D: Invalid use of typing.Final [final-error]', "dataclasses_final.py:18:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in D: Invalid type annotation 'ClassVar[Final[int]]' [invalid-annotation]"] -""" -output = """ -dataclasses_final.py:18:21: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in D: Invalid use of typing.Final [final-error] - - final_classvar: ClassVar[Final[int]] = 4 - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_final.py:18:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in D: Invalid type annotation 'ClassVar[Final[int]]' [invalid-annotation] - - final_classvar: ClassVar[Final[int]] = 4 - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_final.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Assigning to attribute final_with_default, which was annotated with Final [final-error] - -d.final_with_default = "baz" # E: can't assign to final attribute -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_final.py:38:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Assigning to attribute final_with_default, which was annotated with Final [final-error] - -D.final_with_default = "baz" # E: can't assign to final attribute -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" diff --git a/conformance/results/pytype/dataclasses_frozen.toml b/conformance/results/pytype/dataclasses_frozen.toml deleted file mode 100644 index ede4373af..000000000 --- a/conformance/results/pytype/dataclasses_frozen.toml +++ /dev/null @@ -1,16 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not report assignment to field within frozen dataclass instance. -Does not reject frozen dataclass inherited from non-frozen dataclass. -Does not reject non-frozen dataclass inherited from frozen dataclass. -""" -output = """ - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 16: Expected 1 errors -Line 17: Expected 1 errors -Lines 22, 23: Expected error (tag 'DC2') -Lines 32, 33: Expected error (tag 'DC4') -""" diff --git a/conformance/results/pytype/dataclasses_hash.toml b/conformance/results/pytype/dataclasses_hash.toml deleted file mode 100644 index 379b0e691..000000000 --- a/conformance/results/pytype/dataclasses_hash.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report when dataclass is not compatible with Hashable protocol. -""" -output = """ - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 15: Expected 1 errors -Line 32: Expected 1 errors -""" diff --git a/conformance/results/pytype/dataclasses_inheritance.toml b/conformance/results/pytype/dataclasses_inheritance.toml deleted file mode 100644 index 88ec64ce2..000000000 --- a/conformance/results/pytype/dataclasses_inheritance.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject ClassVar that is overridden by instance variable. -Does not reject instance variable that is overridden by ClassVar. -""" -output = """ - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 60: Expected 1 errors -Line 64: Expected 1 errors -""" diff --git a/conformance/results/pytype/dataclasses_kwonly.toml b/conformance/results/pytype/dataclasses_kwonly.toml deleted file mode 100644 index 4166e7030..000000000 --- a/conformance/results/pytype/dataclasses_kwonly.toml +++ /dev/null @@ -1,49 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly reports error when kw_only field has default value. -Incorrectly rejects kw_only field with default before positional field. -""" -output = """ -dataclasses_kwonly.py:23:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC1.__init__ expects 2 arg(s), got 3 [wrong-arg-count] - -DC1("hi", 1) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_kwonly.py:38:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC2.__init__ expects 2 arg(s), got 3 [wrong-arg-count] - -DC2("hi", 1) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_kwonly.py:47:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'a' in call to function DC3.__init__ [missing-parameter] - -DC3("hi") -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_kwonly.py:50:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'a' in call to function DC3.__init__ [missing-parameter] - -DC3("hi", b=1) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_kwonly.py:53:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'a' in call to function DC3.__init__ [missing-parameter] - -DC3("hi", 1) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_kwonly.py:56:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : In method __init__, non-default argument c follows default argument [invalid-function-definition] - -@dataclass - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_kwonly.py:61:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : function DC4.__init__ got multiple values for keyword argument 'b' [duplicate-keyword-argument] - -DC4("", 0.2, b=3) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 47: Unexpected errors ["dataclasses_kwonly.py:47:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'a' in call to function DC3.__init__ [missing-parameter]"] -Line 50: Unexpected errors ["dataclasses_kwonly.py:50:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'a' in call to function DC3.__init__ [missing-parameter]"] -Line 56: Unexpected errors ['dataclasses_kwonly.py:56:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : In method __init__, non-default argument c follows default argument [invalid-function-definition]'] -Line 61: Unexpected errors ["dataclasses_kwonly.py:61:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : function DC4.__init__ got multiple values for keyword argument 'b' [duplicate-keyword-argument]"] -""" diff --git a/conformance/results/pytype/dataclasses_order.toml b/conformance/results/pytype/dataclasses_order.toml deleted file mode 100644 index 154b02be2..000000000 --- a/conformance/results/pytype/dataclasses_order.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report type incompatibility with comparison operator. -""" -output = """ - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 50: Expected 1 errors -""" diff --git a/conformance/results/pytype/dataclasses_postinit.toml b/conformance/results/pytype/dataclasses_postinit.toml deleted file mode 100644 index 286e7a3d9..000000000 --- a/conformance/results/pytype/dataclasses_postinit.toml +++ /dev/null @@ -1,30 +0,0 @@ -conformant = "Partial" -notes = """ -Does not validate `__post_init__` method. -Reports incorrect error for incompatible `__post_init__` method override. -""" -output = """ -dataclasses_postinit.py:28:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'x' on DC1 [attribute-error] - -print(dc1.x) # E: cannot access InitVar - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -dataclasses_postinit.py:29:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'y' on DC1 [attribute-error] - -print(dc1.y) # E: cannot access InitVar - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -dataclasses_postinit.py:54:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in DC4: Overriding method signature mismatch [signature-mismatch] - - def __post_init__(self, _name: str, _age: int): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 19: Expected 1 errors -Line 36: Expected 1 errors -Line 54: Unexpected errors ['dataclasses_postinit.py:54:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in DC4: Overriding method signature mismatch [signature-mismatch]'] -""" diff --git a/conformance/results/pytype/dataclasses_slots.toml b/conformance/results/pytype/dataclasses_slots.toml deleted file mode 100644 index c3318af84..000000000 --- a/conformance/results/pytype/dataclasses_slots.toml +++ /dev/null @@ -1,36 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report error when `slots=True` is used with `__slots__` definition. -Does not reject write to instance variable that is not defined in __slots__. -Incorrectly reports error when accessing `__slots__` when `slots=True`. -""" -output = """ -dataclasses_slots.py:56:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute '__slots__' on type[DC5] [attribute-error] - -DC5.__slots__ -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_slots.py:57:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute '__slots__' on DC5 [attribute-error] - -DC5(1).__slots__ -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_slots.py:66:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute '__slots__' on type[DC6] [attribute-error] - -DC6.__slots__ # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_slots.py:69:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute '__slots__' on DC6 [attribute-error] - -DC6(1).__slots__ # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 25: Expected 1 errors -Line 38: Expected 1 errors -Lines 10, 11: Expected error (tag 'DC1') -Line 56: Unexpected errors ["dataclasses_slots.py:56:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : No attribute '__slots__' on type[DC5] [attribute-error]"] -Line 57: Unexpected errors ["dataclasses_slots.py:57:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : No attribute '__slots__' on DC5 [attribute-error]"] -""" diff --git a/conformance/results/pytype/dataclasses_transform_class.toml b/conformance/results/pytype/dataclasses_transform_class.toml deleted file mode 100644 index 5bbaceedc..000000000 --- a/conformance/results/pytype/dataclasses_transform_class.toml +++ /dev/null @@ -1,57 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. -""" -output = """ -dataclasses_transform_class.py:23:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform( - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - kw_only_default=True, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - field_specifiers=(ModelField, model_field), -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -) -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -dataclasses_transform_class.py:60:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument other_name to function Customer1.__init__ [wrong-keyword-args] - -c1_1 = Customer1(id=3, name="Sue", other_name="Susan") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_class.py:85:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform( - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - kw_only_default=True, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - field_specifiers=(ModelField, model_field), -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -) -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -dataclasses_transform_class.py:106:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument id to function GenericCustomer.__init__ [wrong-keyword-args] - -gc_1 = GenericCustomer(id=3) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_class.py:109:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform(frozen_default=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 51: Expected 1 errors -Line 63: Expected 1 errors -Line 66: Expected 1 errors -Line 72: Expected 1 errors -Line 82: Expected 1 errors -Line 122: Expected 1 errors -Line 23: Unexpected errors ['dataclasses_transform_class.py:23:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -Line 60: Unexpected errors ['dataclasses_transform_class.py:60:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid keyword argument other_name to function Customer1.__init__ [wrong-keyword-args]'] -Line 85: Unexpected errors ['dataclasses_transform_class.py:85:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -Line 106: Unexpected errors ['dataclasses_transform_class.py:106:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid keyword argument id to function GenericCustomer.__init__ [wrong-keyword-args]'] -Line 109: Unexpected errors ['dataclasses_transform_class.py:109:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/dataclasses_transform_converter.toml b/conformance/results/pytype/dataclasses_transform_converter.toml deleted file mode 100644 index 14fa83e82..000000000 --- a/conformance/results/pytype/dataclasses_transform_converter.toml +++ /dev/null @@ -1,123 +0,0 @@ -conformant = "Unsupported" -notes = """ -Converter parameter not yet supported. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 49: Expected 1 errors -Line 118: Expected 1 errors -Line 26: Unexpected errors ['dataclasses_transform_converter.py:26:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in model_field: bad return type [bad-return-type]', 'dataclasses_transform_converter.py:26:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in model_field: bad return type [bad-return-type]', 'dataclasses_transform_converter.py:26:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in model_field: bad return type [bad-return-type]', 'dataclasses_transform_converter.py:26:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in model_field: bad return type [bad-return-type]', 'dataclasses_transform_converter.py:26:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in model_field: bad return type [bad-return-type]'] -Line 29: Unexpected errors ['dataclasses_transform_converter.py:29:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -Line 112: Unexpected errors ['dataclasses_transform_converter.py:112:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function DC2.__init__ was called with the wrong arguments [wrong-arg-types]'] -Line 114: Unexpected errors ['dataclasses_transform_converter.py:114:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for field0 does not match type of assignment [annotation-type-mismatch]'] -Line 115: Unexpected errors ['dataclasses_transform_converter.py:115:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for field3 does not match type of assignment [annotation-type-mismatch]'] -Line 116: Unexpected errors ['dataclasses_transform_converter.py:116:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for field3 does not match type of assignment [annotation-type-mismatch]'] -Line 121: Unexpected errors ['dataclasses_transform_converter.py:121:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function DC2.__init__ was called with the wrong arguments [wrong-arg-types]'] -""" -output = """ -dataclasses_transform_converter.py:26:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in model_field: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 98, in current file - line 99, in DC2 -dataclasses_transform_converter.py:26:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in model_field: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 98, in current file - line 104, in DC2 -dataclasses_transform_converter.py:26:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in model_field: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 98, in current file - line 102, in DC2 -dataclasses_transform_converter.py:26:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in model_field: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 98, in current file - line 100, in DC2 -dataclasses_transform_converter.py:26:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in model_field: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 47, in current file - line 49, in DC1 -dataclasses_transform_converter.py:29:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform(field_specifiers=(model_field,)) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:48:19: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in DC1: Function model_field was called with the wrong arguments [wrong-arg-types] - - field1: int = model_field(converter=bad_converter1) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:107:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC2.__init__ was called with the wrong arguments [wrong-arg-types] - -DC2(1, "f1", "f2", b"f3", []) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:108:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC2.__init__ was called with the wrong arguments [wrong-arg-types] - -DC2("f0", "f1", "f2", 1, []) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:109:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC2.__init__ was called with the wrong arguments [wrong-arg-types] - -DC2("f0", "f1", "f2", "f3", 3j) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:112:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC2.__init__ was called with the wrong arguments [wrong-arg-types] - -dc1 = DC2("f0", "f1", "f2", b"f6", []) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:114:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for field0 does not match type of assignment [annotation-type-mismatch] - -dc1.field0 = "f1" -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:115:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for field3 does not match type of assignment [annotation-type-mismatch] - -dc1.field3 = "f6" -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:116:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for field3 does not match type of assignment [annotation-type-mismatch] - -dc1.field3 = b"f6" -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:119:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for field3 does not match type of assignment [annotation-type-mismatch] - -dc1.field3 = 1 # E -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:121:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC2.__init__ was called with the wrong arguments [wrong-arg-types] - -dc2 = DC2("f0", "f1", "f2", "f6", "1", (("a", "1"), ("b", "2"))) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:130:19: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in DC3: Function model_field was called with the wrong arguments [wrong-arg-types] - - field1: int = model_field(converter=converter_simple, default=1) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_converter.py:133:19: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in DC3: Function model_field was called with the wrong arguments [wrong-arg-types] - - field3: int = model_field(converter=converter_simple, default_factory=int) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/dataclasses_transform_field.toml b/conformance/results/pytype/dataclasses_transform_field.toml deleted file mode 100644 index 62c34fded..000000000 --- a/conformance/results/pytype/dataclasses_transform_field.toml +++ /dev/null @@ -1,23 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. -""" -output = """ -dataclasses_transform_field.py:48:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform(kw_only_default=True, field_specifiers=(field1, field2)) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_field.py:50:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in create_model: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 64: Expected 1 errors -Line 75: Expected 1 errors -Line 48: Unexpected errors ['dataclasses_transform_field.py:48:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -Line 50: Unexpected errors ['dataclasses_transform_field.py:50:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in create_model: bad return type [bad-return-type]'] -""" diff --git a/conformance/results/pytype/dataclasses_transform_func.toml b/conformance/results/pytype/dataclasses_transform_func.toml deleted file mode 100644 index 1479e2bcb..000000000 --- a/conformance/results/pytype/dataclasses_transform_func.toml +++ /dev/null @@ -1,76 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. -""" -output = """ -dataclasses_transform_func.py:13:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform(kw_only_default=True, order_default=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:19:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform(kw_only_default=True, order_default=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:30:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in create_model: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 89, in current file -dataclasses_transform_func.py:30:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in create_model: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:50:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword arguments (id, name) to function Customer1.__init__ [wrong-keyword-args] - -c1_1 = Customer1(id=3, name="Sue") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:53:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Customer1.__init__ expects 1 arg(s), got 3 [wrong-arg-count] - -c1_2 = Customer1(3, "Sue") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:57:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for name does not match type of assignment [annotation-type-mismatch] - -c1_2.name = 3 # E -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:65:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword arguments (id, name, salary) to function Customer1.__init__ [wrong-keyword-args] - -c1_3 = Customer1(id=3, name="Sue", salary=40000) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:67:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword arguments (id, name) to function Customer2.__init__ [wrong-keyword-args] - -c2_1 = Customer2(id=0, name="John") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:71:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Customer2.__init__ expects 1 arg(s), got 3 [wrong-arg-count] - -c2_2 = Customer2(0, "John") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_func.py:76:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform(kw_only_default=True, order_default=True, frozen_default=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 61: Expected 1 errors -Line 97: Expected 1 errors -Lines 89, 90: Expected error (tag 'Customer3Subclass') -Line 13: Unexpected errors ['dataclasses_transform_func.py:13:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -Line 19: Unexpected errors ['dataclasses_transform_func.py:19:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -Line 30: Unexpected errors ['dataclasses_transform_func.py:30:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in create_model: bad return type [bad-return-type]', 'dataclasses_transform_func.py:30:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in create_model: bad return type [bad-return-type]'] -Line 50: Unexpected errors ['dataclasses_transform_func.py:50:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid keyword arguments (id, name) to function Customer1.__init__ [wrong-keyword-args]'] -Line 53: Unexpected errors ['dataclasses_transform_func.py:53:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function Customer1.__init__ expects 1 arg(s), got 3 [wrong-arg-count]'] -Line 67: Unexpected errors ['dataclasses_transform_func.py:67:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid keyword arguments (id, name) to function Customer2.__init__ [wrong-keyword-args]'] -Line 76: Unexpected errors ['dataclasses_transform_func.py:76:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/dataclasses_transform_meta.toml b/conformance/results/pytype/dataclasses_transform_meta.toml deleted file mode 100644 index 93cf0058c..000000000 --- a/conformance/results/pytype/dataclasses_transform_meta.toml +++ /dev/null @@ -1,39 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. -""" -output = """ -dataclasses_transform_meta.py:21:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform( - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - kw_only_default=True, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - field_specifiers=(ModelField, model_field), -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -) -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -dataclasses_transform_meta.py:60:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument other_name to function Customer1.__init__ [wrong-keyword-args] - -c1_1 = Customer1(id=3, name="Sue", other_name="Susan") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_transform_meta.py:86:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet] - -@dataclass_transform(frozen_default=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 51: Expected 1 errors -Line 63: Expected 1 errors -Line 66: Expected 1 errors -Line 73: Expected 1 errors -Line 83: Expected 1 errors -Line 103: Expected 1 errors -Line 21: Unexpected errors ['dataclasses_transform_meta.py:21:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -Line 60: Unexpected errors ['dataclasses_transform_meta.py:60:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid keyword argument other_name to function Customer1.__init__ [wrong-keyword-args]'] -Line 86: Unexpected errors ['dataclasses_transform_meta.py:86:2: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/dataclasses_usage.toml b/conformance/results/pytype/dataclasses_usage.toml deleted file mode 100644 index cc9e6e713..000000000 --- a/conformance/results/pytype/dataclasses_usage.toml +++ /dev/null @@ -1,61 +0,0 @@ -conformant = "Pass" -output = """ -dataclasses_usage.py:50:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'unit_price' in call to function InventoryItem.__init__ [missing-parameter] - -v2 = InventoryItem("name") # E: missing unit_price - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:51:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function InventoryItem.__init__ was called with the wrong arguments [wrong-arg-types] - -v3 = InventoryItem("name", "price") # E: incorrect type for unit_price - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:52:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function InventoryItem.__init__ expects 3 arg(s), got 5 [wrong-arg-count] - -v4 = InventoryItem("name", 3.1, 3, 4) # E: too many arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:58:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : In method __init__, non-default argument b follows default argument [invalid-function-definition] - -@dataclass # E[DC1] - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:64:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : In method __init__, non-default argument b follows default argument [invalid-function-definition] - -@dataclass # E[DC2] - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:70:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : In method __init__, non-default argument b follows default argument [invalid-function-definition] - -@dataclass # E[DC3] - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:83:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC4.__init__ expects 2 arg(s), got 3 [wrong-arg-count] - -v6 = DC4(0, 1) # E: too many parameters - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:88:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in DC5: Type annotation for a does not match type of assignment [annotation-type-mismatch] - - a: int = field(default_factory=str) # E: type mismatch - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -dataclasses_usage.py:127:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC7.__init__ expects 2 arg(s), got 3 [wrong-arg-count] - -DC7(3, 4) # E -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:130:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'y' in call to function DC8.__init__ [missing-parameter] - -DC8(a) # E -\u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -dataclasses_usage.py:179:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function DC13.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -DC13(3) # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/directives_assert_type.toml b/conformance/results/pytype/directives_assert_type.toml deleted file mode 100644 index 288cc6558..000000000 --- a/conformance/results/pytype/directives_assert_type.toml +++ /dev/null @@ -1,35 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly allows assert(x, int) where x is a Literal. -""" -output = """ -directives_assert_type.py:27:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Union[int, str] [assert-type] - - assert_type(a, int) # E: Type mismatch - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_assert_type.py:28:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Any [assert-type] - - assert_type(c, int) # E: Type mismatch - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_assert_type.py:31:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Function assert_type expects 2 arg(s), got 0 [wrong-arg-count] - - assert_type() # E: not enough arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_assert_type.py:32:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: str [assert-type] - - assert_type("", int) # E: wrong argument type - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_assert_type.py:33:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Function assert_type expects 2 arg(s), got 3 [wrong-arg-count] - - assert_type(a, int | str, a) # E: too many arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -""" diff --git a/conformance/results/pytype/directives_cast.toml b/conformance/results/pytype/directives_cast.toml deleted file mode 100644 index edb229b98..000000000 --- a/conformance/results/pytype/directives_cast.toml +++ /dev/null @@ -1,20 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject a call to "cast" with additional arguments. -""" -output = """ -directives_cast.py:15:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'typ' in call to function typing.cast [missing-parameter] - -bad1 = cast() # E: Too few arguments - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -directives_cast.py:16:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '1' for typing.cast [invalid-annotation] - -bad2 = cast(1, "") # E: Bad first argument type - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 17: Expected 1 errors -""" diff --git a/conformance/results/pytype/directives_deprecated.toml b/conformance/results/pytype/directives_deprecated.toml deleted file mode 100644 index 26c189937..000000000 --- a/conformance/results/pytype/directives_deprecated.toml +++ /dev/null @@ -1,43 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support @deprecated. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Expected 1 errors -Line 25: Expected 1 errors -Line 30: Expected 1 errors -Line 41: Expected 1 errors -Line 42: 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 -Line 10: Unexpected errors ['directives_deprecated.py:10:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.override not supported yet [not-supported-yet]'] -Line 11: Unexpected errors ['directives_deprecated.py:11:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing_extensions.deprecated not supported yet [not-supported-yet]'] -Line 19: Unexpected errors ["directives_deprecated.py:19:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Can't find module '_directives_deprecated_library'. [import-error]"] -""" -output = """ -directives_deprecated.py:10:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.override not supported yet [not-supported-yet] - -from typing import Protocol, override -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_deprecated.py:11:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing_extensions.deprecated not supported yet [not-supported-yet] - -from typing_extensions import deprecated -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_deprecated.py:18:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't find module '_directives_deprecated_library'. [import-error] - -from _directives_deprecated_library import Ham # E: Use of deprecated class Ham -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_deprecated.py:19:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't find module '_directives_deprecated_library'. [import-error] - -import _directives_deprecated_library as library -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/directives_no_type_check.toml b/conformance/results/pytype/directives_no_type_check.toml deleted file mode 100644 index 22229130f..000000000 --- a/conformance/results/pytype/directives_no_type_check.toml +++ /dev/null @@ -1,34 +0,0 @@ -conformant = "Pass" -notes = """ -Does not honor @no_type_check decorator. -""" -output = """ -directives_no_type_check.py:15:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Type annotation for x does not match type of assignment [annotation-type-mismatch] - - x: int = "" # E?: No error should be reported - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -directives_no_type_check.py:25:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: unsupported operand type(s) for +: int and str [unsupported-operands] - - c = a + b # E?: No error should be reported - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -directives_no_type_check.py:26:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: bad return type [bad-return-type] - - return 1 # E?: No error should be reported - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -directives_no_type_check.py:29:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function func1 was called with the wrong arguments [wrong-arg-types] - -func1(b"invalid", b"arguments") # E?: No error should be reported -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_no_type_check.py:32:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'a' in call to function func1 [missing-parameter] - -func1() # E: incorrect arguments for parameters -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/directives_reveal_type.toml b/conformance/results/pytype/directives_reveal_type.toml deleted file mode 100644 index 05358bc89..000000000 --- a/conformance/results/pytype/directives_reveal_type.toml +++ /dev/null @@ -1,40 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject call to reveal_type with zero arguments. -Does not reject call to reveal_type with too many arguments. -""" -output = """ -directives_reveal_type.py:14:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Union[int, str] [reveal-type] - - reveal_type(a) # Revealed type is "int | str" - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_reveal_type.py:15:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: list[int] [reveal-type] - - reveal_type(b) # Revealed type is "list[int]" - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_reveal_type.py:16:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Any [reveal-type] - - reveal_type(c) # Revealed type is "Any" - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_reveal_type.py:17:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: ForwardReference [reveal-type] - - reveal_type(d) # Revealed type is "ForwardReference" - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -directives_reveal_type.py:20:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Union[int, str] [reveal-type] - - reveal_type(a, a) # E: Too many arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 19: Expected 1 errors -Line 14: Unexpected errors ['directives_reveal_type.py:14:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Union[int, str] [reveal-type]'] -Line 15: Unexpected errors ['directives_reveal_type.py:15:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: list[int] [reveal-type]'] -Line 16: Unexpected errors ['directives_reveal_type.py:16:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Any [reveal-type]'] -Line 17: Unexpected errors ['directives_reveal_type.py:17:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: ForwardReference [reveal-type]'] -""" diff --git a/conformance/results/pytype/directives_type_checking.toml b/conformance/results/pytype/directives_type_checking.toml deleted file mode 100644 index a339ad0a1..000000000 --- a/conformance/results/pytype/directives_type_checking.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/directives_type_ignore.toml b/conformance/results/pytype/directives_type_ignore.toml deleted file mode 100644 index 0fd583385..000000000 --- a/conformance/results/pytype/directives_type_ignore.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Partial" -notes = """ -Does not honor "# type: ignore" comment if comment includes additional text. -""" -output = """ -directives_type_ignore.py:11:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for y does not match type of assignment [annotation-type-mismatch] - -y: int = "" # type: ignore - additional stuff -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -directives_type_ignore.py:11:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: : Stray type comment: ignore - additional stuff [ignored-type-comment] - -y: int = "" # type: ignore - additional stuff\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -y: int = "" # type: ignore - additional stuff -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 11: Unexpected errors ['directives_type_ignore.py:11:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for y does not match type of assignment [annotation-type-mismatch]', 'directives_type_ignore.py:11:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: : Stray type comment: ignore - additional stuff [ignored-type-comment]'] -""" diff --git a/conformance/results/pytype/directives_type_ignore_file1.toml b/conformance/results/pytype/directives_type_ignore_file1.toml deleted file mode 100644 index a339ad0a1..000000000 --- a/conformance/results/pytype/directives_type_ignore_file1.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/directives_type_ignore_file2.toml b/conformance/results/pytype/directives_type_ignore_file2.toml deleted file mode 100644 index 0b11099d3..000000000 --- a/conformance/results/pytype/directives_type_ignore_file2.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Partial" -notes = """ -Does not ignore `# type: ignore` if it occurs after docstrings in the file. -""" -output = """ - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 14: Expected 1 errors -""" diff --git a/conformance/results/pytype/directives_version_platform.toml b/conformance/results/pytype/directives_version_platform.toml deleted file mode 100644 index dd6558f4b..000000000 --- a/conformance/results/pytype/directives_version_platform.toml +++ /dev/null @@ -1,25 +0,0 @@ -conformant = "Pass" -notes = """ -Does not understand three-element form of sys.version checks. -Does not understand os.name checks. -""" -output = """ -directives_version_platform.py:27:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for val3 does not match type of assignment [annotation-type-mismatch] - - val3: int = "" # E?: May not generate an error (support for three-element sys.version is optional) - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -directives_version_platform.py:40:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for val7 does not match type of assignment [annotation-type-mismatch] - - val7: int = "" # E?: May not generate an error (support for os.name is optional) - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -directives_version_platform.py:45:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for val8 does not match type of assignment [annotation-type-mismatch] - - val8: int = "" # E?: May not generate an error (support for os.name is optional) - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/enums_behaviors.toml b/conformance/results/pytype/enums_behaviors.toml deleted file mode 100644 index ab9118cfb..000000000 --- a/conformance/results/pytype/enums_behaviors.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Partial" -notes = """ -Does not enforce that Enum classes are implicitly final. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 39: Expected 1 errors -""" -output = """ - -""" diff --git a/conformance/results/pytype/enums_definition.toml b/conformance/results/pytype/enums_definition.toml deleted file mode 100644 index bc2a8230e..000000000 --- a/conformance/results/pytype/enums_definition.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Pass" -notes = """ -Does not support some functional forms for Enum class definitions (optional). -""" -errors_diff = """ -""" -output = """ -enums_definition.py:24:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function unsolveable.__new__ was called with the wrong arguments [wrong-arg-types] - -Color2 = Enum("Color2", "RED", "GREEN", "BLUE") # E? - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" diff --git a/conformance/results/pytype/enums_expansion.toml b/conformance/results/pytype/enums_expansion.toml deleted file mode 100644 index 9f168ca05..000000000 --- a/conformance/results/pytype/enums_expansion.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Partial" -notes = """ -Improperly applies narrowing to Flag subclass. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 53: Expected 1 errors -""" -output = """ - -""" diff --git a/conformance/results/pytype/enums_member_names.toml b/conformance/results/pytype/enums_member_names.toml deleted file mode 100644 index fb0bc9609..000000000 --- a/conformance/results/pytype/enums_member_names.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ - -""" diff --git a/conformance/results/pytype/enums_member_values.toml b/conformance/results/pytype/enums_member_values.toml deleted file mode 100644 index bf9325764..000000000 --- a/conformance/results/pytype/enums_member_values.toml +++ /dev/null @@ -1,74 +0,0 @@ -conformant = "Partial" -notes = """ -Does not enforce declared type of `_value_`. -Does not correctly enforce assigned tuple types for enum members (optional). -Does not evaluate literal types for enum member values (optional). -Does not evaluate literal types for auto values (optional). -""" -conformance_automated = "Fail" -errors_diff = """ -Line 78: Expected 1 errors -Line 41: Unexpected errors ["enums_member_values.py:41:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'mass' in call to function Planet.__init__ [missing-parameter]", 'enums_member_values.py:41:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function Planet.__init__ was called with the wrong arguments [wrong-arg-types]'] -""" -output = """ -enums_member_values.py:41:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'mass' in call to function Planet.__init__ [missing-parameter] - -class Planet(Enum): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def __init__(self, value: int, mass: float, radius: float): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self._value_ = value -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.mass = mass -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.radius = radius -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - MERCURY = (1, 3.303e23, 2.4397e6) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - VENUS = (2, 4.869e24, 6.0518e6) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - EARTH = (3, 5.976e24, 6.37814e6) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - MARS = (6.421e23, 3.3972e6) # E?: Type checker error (optional) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - JUPITER = 5 # E?: Type checker error (optional) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_member_values.py:41:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Planet.__init__ was called with the wrong arguments [wrong-arg-types] - -class Planet(Enum): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def __init__(self, value: int, mass: float, radius: float): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self._value_ = value -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.mass = mass -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.radius = radius -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - MERCURY = (1, 3.303e23, 2.4397e6) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - VENUS = (2, 4.869e24, 6.0518e6) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - EARTH = (3, 5.976e24, 6.37814e6) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - MARS = (6.421e23, 3.3972e6) # E?: Type checker error (optional) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - JUPITER = 5 # E?: Type checker error (optional) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_member_values.py:85:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Type annotation for _value_ does not match type of assignment [annotation-type-mismatch] - - self._value_ = value # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_member_values.py:96:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(ColumnType.DORIC.value, int) # E? -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/enums_members.toml b/conformance/results/pytype/enums_members.toml deleted file mode 100644 index 2f5eb964d..000000000 --- a/conformance/results/pytype/enums_members.toml +++ /dev/null @@ -1,134 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of annotation with enum member. -Does not support `enum.member` and `enum.nonmember`. -Does not support `_ignore_` mechanism (optional). -""" -conformance_automated = "Fail" -errors_diff = """ -Line 50: Expected 1 errors -Line 116: Expected 1 errors -Line 129: Expected 1 errors -Line 7: Unexpected errors ['enums_members.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : enum.nonmember not supported yet [not-supported-yet]', 'enums_members.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : enum.member not supported yet [not-supported-yet]'] -Line 35: Unexpected errors ['enums_members.py:35:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : _enums_members.Pet2 [assert-type]'] -Line 36: Unexpected errors ['enums_members.py:36:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : _enums_members.Pet2 [assert-type]'] -Line 107: Unexpected errors ['enums_members.py:107:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Example: Function enum.member expects 0 arg(s), got 1 [wrong-arg-count]'] -Line 108: Unexpected errors ['enums_members.py:108:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Example: Function enum.nonmember expects 0 arg(s), got 1 [wrong-arg-count]'] -Line 110: Unexpected errors ['enums_members.py:110:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Example: Function enum.member expects 0 arg(s), got 1 [wrong-arg-count]'] -Line 128: Unexpected errors ['enums_members.py:128:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method: Example2 [reveal-type]'] -""" -output = """ -enums_members.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : enum.nonmember not supported yet [not-supported-yet] - -from enum import Enum, member, nonmember -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : enum.member not supported yet [not-supported-yet] - -from enum import Enum, member, nonmember -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:15:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Pet.__init__ was called with the wrong arguments [wrong-arg-types] - -class Pet(Enum): # E?: Uninitialized attributes (pyre) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - genus: str # Non-member attribute -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - species: str # Non-member attribute -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - CAT = 1 # Member attribute -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - DOG = 2 # Member attribute -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def __init__(self, genus: str, species: str) -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.genus = genus -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.species = species -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:35:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : _enums_members.Pet2 [assert-type] - -assert_type(Pet2.genus, str) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : _enums_members.Pet2 [assert-type] - -assert_type(Pet2.species, str) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:82:29: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -assert_type(Pet4.converter, Literal[Pet4.converter]) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:82:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Any] [assert-type] - -assert_type(Pet4.converter, Literal[Pet4.converter]) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:83:29: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -assert_type(Pet4.transform, Literal[Pet4.transform]) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:83:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[int], int] [assert-type] - -assert_type(Pet4.transform, Literal[Pet4.transform]) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:84:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : property [assert-type] - -assert_type(Pet4.species, Literal[Pet4.species]) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:84:27: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -assert_type(Pet4.species, Literal[Pet4.species]) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:85:25: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -assert_type(Pet4.speak, Literal[Pet4.speak]) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:85:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], None] [assert-type] - -assert_type(Pet4.speak, Literal[Pet4.speak]) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:107:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Example: Function enum.member expects 0 arg(s), got 1 [wrong-arg-count] - - a = member(1) # Member attribute - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:108:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Example: Function enum.nonmember expects 0 arg(s), got 1 [wrong-arg-count] - - b = nonmember(2) # Non-member attribute - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:110:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Example: Function enum.member expects 0 arg(s), got 1 [wrong-arg-count] - - @member - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -enums_members.py:128:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method: Example2 [reveal-type] - - reveal_type(Example2.__B) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:146:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Pet5 [assert-type] - -assert_type(Pet5.DOG, int) # E?: Literal[2] is also acceptable -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -enums_members.py:147:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Pet5 [assert-type] - -assert_type(Pet5.FISH, int) # E?: Literal[3] is also acceptable -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/exceptions_context_managers.toml b/conformance/results/pytype/exceptions_context_managers.toml deleted file mode 100644 index 4d195209d..000000000 --- a/conformance/results/pytype/exceptions_context_managers.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support code flow analysis. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 50: Unexpected errors ['exceptions_context_managers.py:50:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in suppress1: str [assert-type]'] -Line 57: Unexpected errors ['exceptions_context_managers.py:57:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in suppress2: str [assert-type]'] -""" -output = """ -exceptions_context_managers.py:50:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in suppress1: str [assert-type] - - assert_type(x, int | str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -exceptions_context_managers.py:57:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in suppress2: str [assert-type] - - assert_type(x, int | str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/generics_base_class.toml b/conformance/results/pytype/generics_base_class.toml deleted file mode 100644 index a3aa1cea9..000000000 --- a/conformance/results/pytype/generics_base_class.toml +++ /dev/null @@ -1,52 +0,0 @@ -conformant = "Partial" -notes = """ -False negative on passing SymbolTable to dict[str, list[object]]. -Does not reject illegal use of Generic. -Wrong type variable order when inheriting from multiple generic base classes. -""" -output = """ -generics_base_class.py:29:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T' [invalid-annotation] - -def func1(y: Generic[T]): # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - x: Generic # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_base_class.py:49:22: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'LinkedList[int, int]' [invalid-annotation] - -linked_list_invalid: LinkedList[int, int] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_base_class.py:61:18: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'MyDict[int, int]' [invalid-annotation] - -my_dict_invalid: MyDict[int, int] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_base_class.py:68:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class BadClass1(Generic[T, T]): # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_base_class.py:90:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_parent1 was called with the wrong arguments [wrong-arg-types] - -takes_parent1(child) # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_base_class.py:91:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_parent2 was called with the wrong arguments [wrong-arg-types] - -takes_parent2(child) # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_base_class.py:98:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'BadChild' [invalid-annotation] - -class BadChild(Parent[T1, T2], Grandparent[T2, T1]): ... # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 26: Expected 1 errors -Line 30: Expected 1 errors -Line 90: Unexpected errors ['generics_base_class.py:90:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function takes_parent1 was called with the wrong arguments [wrong-arg-types]'] -Line 91: Unexpected errors ['generics_base_class.py:91:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function takes_parent2 was called with the wrong arguments [wrong-arg-types]'] -""" diff --git a/conformance/results/pytype/generics_basic.toml b/conformance/results/pytype/generics_basic.toml deleted file mode 100644 index db7695d22..000000000 --- a/conformance/results/pytype/generics_basic.toml +++ /dev/null @@ -1,108 +0,0 @@ -conformant = "Partial" -notes = """ -False positives in examples using constrained type variables. -Argument 'covariant' to TypeVar not supported. -False negative for type variables missing from Generic/Protocol base class. -False negative for generic metaclass. -""" -output = """ -generics_basic.py:34:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in concat: bad return type [bad-return-type] - - return x + y - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 67, in test_concat_subtype -generics_basic.py:40:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_concat: Function concat was called with the wrong arguments [wrong-arg-types] - - concat(s, b) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:41:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_concat: Function concat was called with the wrong arguments [wrong-arg-types] - - concat(b, s) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:49:18: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid TypeVar: the number of constraints must be 0 or more than 1 [invalid-typevar] - -BadConstraint1 = TypeVar("BadConstraint1", str) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:55:22: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Test: Invalid TypeVar: constraint cannot contain TypeVars [invalid-typevar] - - BadConstraint2 = TypeVar("BadConstraint2", str, list[T]) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:67:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_concat_subtype: MyStr [assert-type] - - assert_type(concat(m, m), str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:68:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_concat_subtype: Function concat was called with the wrong arguments [wrong-arg-types] - - assert_type(concat(m, s), str) - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:68:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_concat_subtype: Any [assert-type] - - assert_type(concat(m, s), str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:69:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_concat_subtype: Function concat was called with the wrong arguments [wrong-arg-types] - - concat(m, b) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:121:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Pair2(Generic[T, T]): # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:157:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_my_map: unsupported operand type(s) for item retrieval: MyMap1[str, int] and int [unsupported-operands] - - m1[0] # E - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -generics_basic.py:158:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_my_map: unsupported operand type(s) for item retrieval: MyMap2[int, str] and int [unsupported-operands] - - m2[0] # E - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -generics_basic.py:162:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Bad1(Generic[int]): ... # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:163:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Protocol' [invalid-annotation] - -class Bad2(Protocol[int]): ... # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:168:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T_co = TypeVar("T_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:169:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -S_co = TypeVar("S_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_basic.py:199:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_my_iterable_any: Iterator[nothing] [assert-type] - - assert_type(iter(m), Iterator[Any]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 171: Expected 1 errors -Line 172: Expected 1 errors -Line 208: Expected 1 errors -Line 34: Unexpected errors ['generics_basic.py:34:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in concat: bad return type [bad-return-type]'] -Line 67: Unexpected errors ['generics_basic.py:67:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_concat_subtype: MyStr [assert-type]'] -Line 68: Unexpected errors ['generics_basic.py:68:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_concat_subtype: Function concat was called with the wrong arguments [wrong-arg-types]', 'generics_basic.py:68:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_concat_subtype: Any [assert-type]'] -Line 168: Unexpected errors ['generics_basic.py:168:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 169: Unexpected errors ['generics_basic.py:169:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 199: Unexpected errors ['generics_basic.py:199:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_my_iterable_any: Iterator[nothing] [assert-type]'] -""" diff --git a/conformance/results/pytype/generics_defaults.toml b/conformance/results/pytype/generics_defaults.toml deleted file mode 100644 index 68c0f8448..000000000 --- a/conformance/results/pytype/generics_defaults.toml +++ /dev/null @@ -1,335 +0,0 @@ -conformant = "Unsupported" -output = """ -generics_defaults.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.Unpack not supported yet [not-supported-yet] - -from typing import Any, Callable, Generic, Self, Unpack, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:8:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing_extensions.TypeVarTuple not supported yet [not-supported-yet] - -from typing_extensions import TypeVar, ParamSpec, TypeVarTuple -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:11:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -DefaultStrT = TypeVar("DefaultStrT", default=str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:12:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -DefaultIntT = TypeVar("DefaultIntT", default=int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:13:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -DefaultBoolT = TypeVar("DefaultBoolT", default=bool) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:24:32: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class NonDefaultFollowsDefault(Generic[DefaultStrT, T]): ... # E: non-default TypeVars cannot follow ones with defaults - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:27:21: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class NoNonDefaults(Generic[DefaultStrT, DefaultIntT]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:30:33: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class NoNonDefaults is not indexable [not-indexable] - -assert_type(NoNonDefaults, type[NoNonDefaults[str, int]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:31:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class NoNonDefaults is not indexable [not-indexable] - -assert_type(NoNonDefaults[str], type[NoNonDefaults[str, int]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:31:38: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class NoNonDefaults is not indexable [not-indexable] - -assert_type(NoNonDefaults[str], type[NoNonDefaults[str, int]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:32:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class NoNonDefaults is not indexable [not-indexable] - -assert_type(NoNonDefaults[str, int], type[NoNonDefaults[str, int]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:32:43: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class NoNonDefaults is not indexable [not-indexable] - -assert_type(NoNonDefaults[str, int], type[NoNonDefaults[str, int]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:35:18: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class OneDefault(Generic[T, DefaultBoolT]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:38:37: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'OneDefault[float, bool]' [invalid-annotation] - -assert_type(OneDefault[float], type[OneDefault[float, bool]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:39:34: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'OneDefault[float, bool]' [invalid-annotation] - -assert_type(OneDefault[float](), OneDefault[float, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:42:22: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class AllTheDefaults(Generic[T1, T2, DefaultStrT, DefaultIntT, DefaultBoolT]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:45:34: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[Any, Any, str, int, bool]' [invalid-annotation] - -assert_type(AllTheDefaults, type[AllTheDefaults[Any, Any, str, int, bool]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:47:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation] - - AllTheDefaults[int, complex], type[AllTheDefaults[int, complex, str, int, bool]] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:50:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int]' [invalid-annotation] - -AllTheDefaults[int] # E: expected 2 arguments to AllTheDefaults -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:53:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation] - - AllTheDefaults[int, complex], type[AllTheDefaults[int, complex, str, int, bool]] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:56:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str]' [invalid-annotation] - - AllTheDefaults[int, complex, str], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:57:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation] - - type[AllTheDefaults[int, complex, str, int, bool]], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:60:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int]' [invalid-annotation] - - AllTheDefaults[int, complex, str, int], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:61:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation] - - type[AllTheDefaults[int, complex, str, int, bool]], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:64:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation] - - AllTheDefaults[int, complex, str, int, bool], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:65:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation] - - type[AllTheDefaults[int, complex, str, int, bool]], - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:73:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -DefaultP = ParamSpec("DefaultP", default=[str, int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:76:23: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Class_ParamSpec(Generic[DefaultP]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:79:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_ParamSpec is not indexable [not-indexable] - -assert_type(Class_ParamSpec, type[Class_ParamSpec[str, int]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:80:32: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_ParamSpec is not indexable [not-indexable] - -assert_type(Class_ParamSpec(), Class_ParamSpec[str, int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:81:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_ParamSpec is not indexable [not-indexable] - -assert_type(Class_ParamSpec[[bool, bool]](), Class_ParamSpec[bool, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:81:46: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_ParamSpec is not indexable [not-indexable] - -assert_type(Class_ParamSpec[[bool, bool]](), Class_ParamSpec[bool, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:91:26: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Class_TypeVarTuple(Generic[*DefaultTs]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:94:38: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable] - -assert_type(Class_TypeVarTuple, type[Class_TypeVarTuple[*tuple[str, int]]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:95:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable] - -assert_type(Class_TypeVarTuple(), Class_TypeVarTuple[str, int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:96:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable] - -assert_type(Class_TypeVarTuple[int, bool](), Class_TypeVarTuple[int, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:96:46: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable] - -assert_type(Class_TypeVarTuple[int, bool](), Class_TypeVarTuple[int, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:99:61: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -AnotherDefaultTs = TypeVarTuple("AnotherDefaultTs", default=Unpack[DefaultTs]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:106:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Ok1 = TypeVar("Ok1", bound=float, default=int) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:107:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Invalid1 = TypeVar("Invalid1", bound=str, default=int) # E: the bound and default are incompatible - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:113:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Ok2 = TypeVar("Ok2", float, str, default=float) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:114:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Invalid2 = TypeVar("Invalid2", float, str, default=int) # E: expected one of float or str got int - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:124:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -T4 = TypeVar("T4", default=int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:130:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(func1(0), int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:138:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -T5 = TypeVar("T5", default=bool) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:141:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Foo5(Generic[*Ts, T5]): ... # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:148:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -P = ParamSpec("P", default=[float, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:151:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Foo6(Generic[*Ts, P]): ... # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:154:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo6 is not indexable [not-indexable] - -assert_type(Foo6[int, str], type[Foo6[int, str, [float, bool]]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:154:34: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo6 is not indexable [not-indexable] - -assert_type(Foo6[int, str], type[Foo6[int, str, [float, bool]]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:155:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo6 is not indexable [not-indexable] - -assert_type(Foo6[int, str, [bytes]], type[Foo6[int, str, [bytes]]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:155:43: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo6 is not indexable [not-indexable] - -assert_type(Foo6[int, str, [bytes]], type[Foo6[int, str, [bytes]]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:162:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Foo7(Generic[DefaultIntT]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:169:34: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo7 is not indexable [not-indexable] - -assert_type(Foo7.meth, Callable[[Foo7[int]], Foo7[int]]) - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:169:46: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo7 is not indexable [not-indexable] - -assert_type(Foo7.meth, Callable[[Foo7[int]], Foo7[int]]) - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:169:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Callable[[Any], Self] [assert-type] - -assert_type(Foo7.meth, Callable[[Foo7[int]], Foo7[int]]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults.py:170:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(Foo7.attr, int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 7: Unexpected errors ['generics_defaults.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.Unpack not supported yet [not-supported-yet]'] -Line 8: Unexpected errors ['generics_defaults.py:8:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing_extensions.TypeVarTuple not supported yet [not-supported-yet]'] -Line 11: Unexpected errors ['generics_defaults.py:11:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 12: Unexpected errors ['generics_defaults.py:12:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 13: Unexpected errors ['generics_defaults.py:13:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 27: Unexpected errors ["generics_defaults.py:27:21: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 30: Unexpected errors ['generics_defaults.py:30:33: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class NoNonDefaults is not indexable [not-indexable]'] -Line 31: Unexpected errors ['generics_defaults.py:31:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class NoNonDefaults is not indexable [not-indexable]', 'generics_defaults.py:31:38: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class NoNonDefaults is not indexable [not-indexable]'] -Line 32: Unexpected errors ['generics_defaults.py:32:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class NoNonDefaults is not indexable [not-indexable]', 'generics_defaults.py:32:43: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class NoNonDefaults is not indexable [not-indexable]'] -Line 35: Unexpected errors ["generics_defaults.py:35:18: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 38: Unexpected errors ["generics_defaults.py:38:37: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'OneDefault[float, bool]' [invalid-annotation]"] -Line 39: Unexpected errors ["generics_defaults.py:39:34: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'OneDefault[float, bool]' [invalid-annotation]"] -Line 42: Unexpected errors ["generics_defaults.py:42:22: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 45: Unexpected errors ["generics_defaults.py:45:34: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[Any, Any, str, int, bool]' [invalid-annotation]"] -Line 47: Unexpected errors ["generics_defaults.py:47:40: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation]"] -Line 53: Unexpected errors ["generics_defaults.py:53:40: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation]"] -Line 56: Unexpected errors ["generics_defaults.py:56:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str]' [invalid-annotation]"] -Line 57: Unexpected errors ["generics_defaults.py:57:10: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation]"] -Line 60: Unexpected errors ["generics_defaults.py:60:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int]' [invalid-annotation]"] -Line 61: Unexpected errors ["generics_defaults.py:61:10: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation]"] -Line 64: Unexpected errors ["generics_defaults.py:64:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation]"] -Line 65: Unexpected errors ["generics_defaults.py:65:10: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'AllTheDefaults[int, complex, str, int, bool]' [invalid-annotation]"] -Line 73: Unexpected errors ['generics_defaults.py:73:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 76: Unexpected errors ["generics_defaults.py:76:23: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 79: Unexpected errors ['generics_defaults.py:79:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_ParamSpec is not indexable [not-indexable]'] -Line 80: Unexpected errors ['generics_defaults.py:80:32: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_ParamSpec is not indexable [not-indexable]'] -Line 81: Unexpected errors ['generics_defaults.py:81:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_ParamSpec is not indexable [not-indexable]', 'generics_defaults.py:81:46: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_ParamSpec is not indexable [not-indexable]'] -Line 91: Unexpected errors ["generics_defaults.py:91:26: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 94: Unexpected errors ['generics_defaults.py:94:38: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable]'] -Line 95: Unexpected errors ['generics_defaults.py:95:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable]'] -Line 96: Unexpected errors ['generics_defaults.py:96:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable]', 'generics_defaults.py:96:46: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Class_TypeVarTuple is not indexable [not-indexable]'] -Line 99: Unexpected errors ["generics_defaults.py:99:61: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 106: Unexpected errors ['generics_defaults.py:106:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 113: Unexpected errors ['generics_defaults.py:113:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 124: Unexpected errors ['generics_defaults.py:124:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 130: Unexpected errors ['generics_defaults.py:130:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 138: Unexpected errors ['generics_defaults.py:138:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 148: Unexpected errors ['generics_defaults.py:148:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 151: Unexpected errors ["generics_defaults.py:151:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 154: Unexpected errors ['generics_defaults.py:154:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Foo6 is not indexable [not-indexable]', 'generics_defaults.py:154:34: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Foo6 is not indexable [not-indexable]'] -Line 155: Unexpected errors ['generics_defaults.py:155:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Foo6 is not indexable [not-indexable]', 'generics_defaults.py:155:43: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Foo6 is not indexable [not-indexable]'] -Line 162: Unexpected errors ["generics_defaults.py:162:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 169: Unexpected errors ['generics_defaults.py:169:34: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Foo7 is not indexable [not-indexable]', 'generics_defaults.py:169:46: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Foo7 is not indexable [not-indexable]', 'generics_defaults.py:169:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Callable[[Any], Self] [assert-type]'] -Line 170: Unexpected errors ['generics_defaults.py:170:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -""" diff --git a/conformance/results/pytype/generics_defaults_referential.toml b/conformance/results/pytype/generics_defaults_referential.toml deleted file mode 100644 index 08636f341..000000000 --- a/conformance/results/pytype/generics_defaults_referential.toml +++ /dev/null @@ -1,217 +0,0 @@ -conformant = "Unsupported" -output = """ -generics_defaults_referential.py:14:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -DefaultStrT = TypeVar("DefaultStrT", default=str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:15:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -StartT = TypeVar("StartT", default=int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:16:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -StopT = TypeVar("StopT", default=StartT) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:17:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -StepT = TypeVar("StepT", default=int | None) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:20:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class slice(Generic[StartT, StopT, StepT]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:23:25: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class slice is not indexable [not-indexable] - -assert_type(slice, type[slice[int, int, int | None]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:24:22: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class slice is not indexable [not-indexable] - -assert_type(slice(), slice[int, int, int | None]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:25:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class slice is not indexable [not-indexable] - -assert_type(slice[str](), slice[str, str, int | None]) - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:25:27: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class slice is not indexable [not-indexable] - -assert_type(slice[str](), slice[str, str, int | None]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:26:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class slice is not indexable [not-indexable] - -assert_type(slice[str, bool, complex](), slice[str, bool, complex]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:26:42: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class slice is not indexable [not-indexable] - -assert_type(slice[str, bool, complex](), slice[str, bool, complex]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:28:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -T2 = TypeVar("T2", default=DefaultStrT) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:31:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Foo(Generic[DefaultStrT, T2]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:35:25: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo is not indexable [not-indexable] - -assert_type(Foo(1, ""), Foo[int, str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo is not indexable [not-indexable] - -Foo[int](1, "") # E: Foo[int, str] cannot be assigned to self: Foo[int, int] in Foo.__init__ -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:37:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo is not indexable [not-indexable] - -Foo[int]("", 1) # E: Foo[str, int] cannot be assigned to self: Foo[int, int] in Foo.__init__ -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:43:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -S2 = TypeVar("S2", default=S1) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:46:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Foo2(Generic[S1, S2]): ... # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:49:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Start2T = TypeVar("Start2T", default="StopT") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:50:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Stop2T = TypeVar("Stop2T", default=int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:53:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class slice2(Generic[Start2T, Stop2T, StepT]): ... # E: bad ordering - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:60:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Foo3: Invalid type annotation 'Generic' [invalid-annotation] - - class Bar2(Generic[S2]): ... # E - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:66:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Ok1 = TypeVar("Ok1", default=X1, bound=float) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:67:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -AlsoOk1 = TypeVar("AlsoOk1", default=X1, bound=int) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:68:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Invalid1 = TypeVar("Invalid1", default=X1, bound=str) # E: int is not a subtype of str - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:74:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -Invalid2 = TypeVar("Invalid2", float, str, default=Y1) # E: upper bound int is incompatible with constraints float or str - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:77:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -AlsoOk2 = TypeVar("AlsoOk2", int, str, bool, default=Y2) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:78:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -AlsoInvalid2 = TypeVar("AlsoInvalid2", bool, complex, default=Y2) # E: {bool, complex} is not a superset of {int, str} - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:87:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -ListDefaultT = TypeVar("ListDefaultT", default=list[Z1]) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:90:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Bar(Generic[Z1, ListDefaultT]): # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:94:23: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Bar[Any, list]' [invalid-annotation] - -assert_type(Bar, type[Bar[Any, list[Any]]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:95:28: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Bar[int, list[int]]' [invalid-annotation] - -assert_type(Bar[int], type[Bar[int, list[int]]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:96:30: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Bar[int, list[int]]' [invalid-annotation] - -assert_type(Bar[int](0, []), Bar[int, list[int]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:97:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Bar[int, list[str]]' [invalid-annotation] - -assert_type(Bar[int, list[str]](0, []), Bar[int, list[str]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:97:41: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Bar[int, list[str]]' [invalid-annotation] - -assert_type(Bar[int, list[str]](0, []), Bar[int, list[str]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:98:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Bar[int, str]' [invalid-annotation] - -assert_type(Bar[int, str](0, ""), Bar[int, str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_referential.py:98:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Bar[int, str]' [invalid-annotation] - -assert_type(Bar[int, str](0, ""), Bar[int, str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 14: Unexpected errors ['generics_defaults_referential.py:14:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 15: Unexpected errors ['generics_defaults_referential.py:15:10: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 16: Unexpected errors ['generics_defaults_referential.py:16:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 17: Unexpected errors ['generics_defaults_referential.py:17:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 20: Unexpected errors ["generics_defaults_referential.py:20:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 23: Unexpected errors ['generics_defaults_referential.py:23:25: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class slice is not indexable [not-indexable]'] -Line 24: Unexpected errors ['generics_defaults_referential.py:24:22: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class slice is not indexable [not-indexable]'] -Line 25: Unexpected errors ['generics_defaults_referential.py:25:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class slice is not indexable [not-indexable]', 'generics_defaults_referential.py:25:27: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class slice is not indexable [not-indexable]'] -Line 26: Unexpected errors ['generics_defaults_referential.py:26:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class slice is not indexable [not-indexable]', 'generics_defaults_referential.py:26:42: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class slice is not indexable [not-indexable]'] -Line 28: Unexpected errors ['generics_defaults_referential.py:28:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 31: Unexpected errors ["generics_defaults_referential.py:31:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 35: Unexpected errors ['generics_defaults_referential.py:35:25: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Foo is not indexable [not-indexable]'] -Line 43: Unexpected errors ['generics_defaults_referential.py:43:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 46: Unexpected errors ["generics_defaults_referential.py:46:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 49: Unexpected errors ['generics_defaults_referential.py:49:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 50: Unexpected errors ['generics_defaults_referential.py:50:10: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 66: Unexpected errors ['generics_defaults_referential.py:66:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 67: Unexpected errors ['generics_defaults_referential.py:67:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 77: Unexpected errors ['generics_defaults_referential.py:77:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 87: Unexpected errors ['generics_defaults_referential.py:87:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 90: Unexpected errors ["generics_defaults_referential.py:90:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 94: Unexpected errors ["generics_defaults_referential.py:94:23: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Bar[Any, list]' [invalid-annotation]"] -Line 95: Unexpected errors ["generics_defaults_referential.py:95:28: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Bar[int, list[int]]' [invalid-annotation]"] -Line 96: Unexpected errors ["generics_defaults_referential.py:96:30: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Bar[int, list[int]]' [invalid-annotation]"] -Line 97: Unexpected errors ["generics_defaults_referential.py:97:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Bar[int, list[str]]' [invalid-annotation]", "generics_defaults_referential.py:97:41: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Bar[int, list[str]]' [invalid-annotation]"] -Line 98: Unexpected errors ["generics_defaults_referential.py:98:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Bar[int, str]' [invalid-annotation]", "generics_defaults_referential.py:98:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Bar[int, str]' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/generics_defaults_specialization.toml b/conformance/results/pytype/generics_defaults_specialization.toml deleted file mode 100644 index 2b77a0a3e..000000000 --- a/conformance/results/pytype/generics_defaults_specialization.toml +++ /dev/null @@ -1,104 +0,0 @@ -conformant = "Unsupported" -output = """ -generics_defaults_specialization.py:15:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -DefaultIntT = TypeVar("DefaultIntT", default=int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:16:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : wrong arguments [invalid-typevar] - -DefaultStrT = TypeVar("DefaultStrT", default=str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:25:28: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'SomethingWithNoDefaults[int, Any][bool]' [invalid-annotation] - -def func1(p1: MyAlias, p2: MyAlias[bool]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:26:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: SomethingWithNoDefaults[int, Any] [assert-type] - - assert_type(p1, SomethingWithNoDefaults[int, str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:27:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: SomethingWithNoDefaults[int, Any] [assert-type] - - assert_type(p2, SomethingWithNoDefaults[int, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:30:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'SomethingWithNoDefaults[int, Any][bool, int]' [invalid-annotation] - -MyAlias[bool, int] # E: too many arguments passed to MyAlias -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:38:18: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class SubclassMe(Generic[T1, DefaultStrT]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:42:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'SubclassMe[int, Any]' [invalid-annotation] - -class Bar(SubclassMe[int, DefaultStrT]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:45:23: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Bar is not indexable [not-indexable] - -assert_type(Bar, type[Bar[str]]) - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:46:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Bar is not indexable [not-indexable] - -assert_type(Bar(), Bar[str]) - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:47:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Bar is not indexable [not-indexable] - -assert_type(Bar[bool](), Bar[bool]) - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:47:26: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Bar is not indexable [not-indexable] - -assert_type(Bar[bool](), Bar[bool]) - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:53:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(Foo().x, str) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:55:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Foo is not indexable [not-indexable] - -Foo[str] # E: Foo cannot be further subscripted -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:58:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Baz(Generic[DefaultIntT, DefaultStrT]): ... - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:65:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Baz is not indexable [not-indexable] - -v1: Baz[int, str] = Spam() - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_defaults_specialization.py:65:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Baz[int, str]' [invalid-annotation] - -v1: Baz[int, str] = Spam() -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 15: Unexpected errors ['generics_defaults_specialization.py:15:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 16: Unexpected errors ['generics_defaults_specialization.py:16:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : wrong arguments [invalid-typevar]'] -Line 25: Unexpected errors ["generics_defaults_specialization.py:25:28: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'SomethingWithNoDefaults[int, Any][bool]' [invalid-annotation]"] -Line 26: Unexpected errors ['generics_defaults_specialization.py:26:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: SomethingWithNoDefaults[int, Any] [assert-type]'] -Line 27: Unexpected errors ['generics_defaults_specialization.py:27:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: SomethingWithNoDefaults[int, Any] [assert-type]'] -Line 38: Unexpected errors ["generics_defaults_specialization.py:38:18: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 42: Unexpected errors ["generics_defaults_specialization.py:42:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'SubclassMe[int, Any]' [invalid-annotation]"] -Line 45: Unexpected errors ['generics_defaults_specialization.py:45:23: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Bar is not indexable [not-indexable]'] -Line 46: Unexpected errors ['generics_defaults_specialization.py:46:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Bar is not indexable [not-indexable]'] -Line 47: Unexpected errors ['generics_defaults_specialization.py:47:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Bar is not indexable [not-indexable]', 'generics_defaults_specialization.py:47:26: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Bar is not indexable [not-indexable]'] -Line 53: Unexpected errors ['generics_defaults_specialization.py:53:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 58: Unexpected errors ["generics_defaults_specialization.py:58:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 65: Unexpected errors ['generics_defaults_specialization.py:65:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Baz is not indexable [not-indexable]', "generics_defaults_specialization.py:65:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Baz[int, str]' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/generics_paramspec_basic.toml b/conformance/results/pytype/generics_paramspec_basic.toml deleted file mode 100644 index e57c04905..000000000 --- a/conformance/results/pytype/generics_paramspec_basic.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support ParamSpec. -""" -output = """ -AssertionError: -""" -conformance_automated = "Fail" -errors_diff = """ -Line 10: Expected 1 errors -Line 15: Expected 1 errors -Line 23: Expected 1 errors -Line 27: Expected 1 errors -Line 31: Expected 1 errors -Line 35: Expected 1 errors -Line 39: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_paramspec_components.toml b/conformance/results/pytype/generics_paramspec_components.toml deleted file mode 100644 index 247d208ed..000000000 --- a/conformance/results/pytype/generics_paramspec_components.toml +++ /dev/null @@ -1,26 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support ParamSpec. -""" -output = """ -NotImplementedError: ParamSpecArgs -""" -conformance_automated = "Fail" -errors_diff = """ -Line 17: Expected 1 errors -Line 20: Expected 1 errors -Line 23: Expected 1 errors -Line 26: Expected 1 errors -Line 30: Expected 1 errors -Line 35: Expected 1 errors -Line 36: Expected 1 errors -Line 38: Expected 1 errors -Line 41: Expected 1 errors -Line 49: Expected 1 errors -Line 51: Expected 1 errors -Line 60: Expected 1 errors -Line 70: Expected 1 errors -Line 72: Expected 1 errors -Line 83: Expected 1 errors -Line 98: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_paramspec_semantics.toml b/conformance/results/pytype/generics_paramspec_semantics.toml deleted file mode 100644 index d9d0175b6..000000000 --- a/conformance/results/pytype/generics_paramspec_semantics.toml +++ /dev/null @@ -1,19 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support ParamSpec. -""" -output = """ -AssertionError: -""" -conformance_automated = "Fail" -errors_diff = """ -Line 26: Expected 1 errors -Line 27: Expected 1 errors -Line 61: Expected 1 errors -Line 98: Expected 1 errors -Line 108: Expected 1 errors -Line 120: Expected 1 errors -Line 127: Expected 1 errors -Line 132: Expected 1 errors -Line 137: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_paramspec_specialization.toml b/conformance/results/pytype/generics_paramspec_specialization.toml deleted file mode 100644 index cbe272e96..000000000 --- a/conformance/results/pytype/generics_paramspec_specialization.toml +++ /dev/null @@ -1,79 +0,0 @@ -conformant = "Partial" -notes = """ -Rejects valid specialization of ParamSpec using list expression. -Does not reject invalid specialization of class with both TypeVar and ParamSpec. -Reports error for valid method call involving ParamSpec. -""" -output = """ -generics_paramspec_specialization.py:32:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[int, bool]' [invalid-annotation] - -def func22(x: ClassB[int, [int, bool], ...]) -> str: # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:32:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Ellipsis' [invalid-annotation] - -def func22(x: ClassB[int, [int, bool], ...]) -> str: # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:36:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Ellipsis' [invalid-annotation] - -def func23(x: ClassA[int, ...]) -> str: # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:40:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[]' [invalid-annotation] - -def func24(x: ClassB[int, [], []]) -> str: # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:52:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[int, str, bool]' [invalid-annotation] - -def func30(x: ClassC[[int, str, bool]]) -> None: # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:53:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func30: Function expects 1 arg(s), got 3 [wrong-arg-count] - - x.f(0, "", True) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:54:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func30: Function expects 1 arg(s), got 3 [wrong-arg-count] - - x.f("", "", True) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:55:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func30: Function expects 1 arg(s), got 3 [wrong-arg-count] - - x.f(0, "", "") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:58:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'ClassC[int, str, bool]' [invalid-annotation] - -def func31(x: ClassC[int, str, bool]) -> None: # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:59:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func31: Function expects 1 arg(s), got 3 [wrong-arg-count] - - x.f(0, "", True) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:60:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func31: Function expects 1 arg(s), got 3 [wrong-arg-count] - - x.f("", "", True) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_paramspec_specialization.py:61:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func31: Function expects 1 arg(s), got 3 [wrong-arg-count] - - x.f(0, "", "") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 44: Expected 1 errors -Line 32: Unexpected errors ["generics_paramspec_specialization.py:32:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[int, bool]' [invalid-annotation]", "generics_paramspec_specialization.py:32:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Ellipsis' [invalid-annotation]"] -Line 36: Unexpected errors ["generics_paramspec_specialization.py:36:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Ellipsis' [invalid-annotation]"] -Line 40: Unexpected errors ["generics_paramspec_specialization.py:40:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[]' [invalid-annotation]"] -Line 52: Unexpected errors ["generics_paramspec_specialization.py:52:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '[int, str, bool]' [invalid-annotation]"] -Line 53: Unexpected errors ['generics_paramspec_specialization.py:53:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func30: Function expects 1 arg(s), got 3 [wrong-arg-count]'] -Line 58: Unexpected errors ["generics_paramspec_specialization.py:58:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'ClassC[int, str, bool]' [invalid-annotation]"] -Line 59: Unexpected errors ['generics_paramspec_specialization.py:59:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func31: Function expects 1 arg(s), got 3 [wrong-arg-count]'] -""" diff --git a/conformance/results/pytype/generics_scoping.toml b/conformance/results/pytype/generics_scoping.toml deleted file mode 100644 index 32c0fd18d..000000000 --- a/conformance/results/pytype/generics_scoping.toml +++ /dev/null @@ -1,96 +0,0 @@ -conformant = "Partial" -notes = """ -Fails to reject type alias within generic class that uses class's type variable. -Fails to reject unbound type variable in constructor call in global scope. -""" -output = """ -generics_scoping.py:29:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function MyClass.meth_2 was called with the wrong arguments [wrong-arg-types] - -a.meth_2('a') # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_scoping.py:50:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in fun_3: Invalid type annotation 'list[S]' for z [invalid-annotation] - - z: list[S] = [] # E - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -generics_scoping.py:54:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Bar: Invalid type annotation 'list[S]' for an_attr [invalid-annotation] - - an_attr: list[S] = [] # E - \u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_scoping.py:63:23: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in fun_4: Invalid type annotation 'T' [invalid-annotation] - - a_list: list[T] = [] # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -generics_scoping.py:74:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Outer' [invalid-annotation] - -class Outer(Generic[T]): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - class Bad(Iterable[T]): # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - class AlsoBad: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - x: list[T] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def __init__(self, x: list[T]) -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.x = x -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - class Inner(Iterable[S]): # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - attr: Inner[T] # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - alias: TypeAlias = list[T] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def __init__(self, attr: Inner[T]) -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.attr = attr -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_scoping.py:78:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in AlsoBad: Invalid type annotation 'list[T]' for x [invalid-annotation] - - x: list[T] # E - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_scoping.py:80:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in AlsoBad: Invalid type annotation 'T' [invalid-annotation] - - def __init__(self, x: list[T]) -> None: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self.x = x -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_scoping.py:94:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T' for global_var1 [invalid-annotation] - -global_var1: T # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_scoping.py:95:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[T]' for global_var2 [invalid-annotation] - -global_var2: list[T] = [] # E -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 65: Expected 1 errors -Line 75: Expected 1 errors -Line 87: Expected 1 errors -Line 96: Expected 1 errors -Line 63: Unexpected errors ["generics_scoping.py:63:23: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in fun_4: Invalid type annotation 'T' [invalid-annotation]"] -Line 74: Unexpected errors ["generics_scoping.py:74:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Outer' [invalid-annotation]"] -Line 80: Unexpected errors ["generics_scoping.py:80:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in AlsoBad: Invalid type annotation 'T' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/generics_self_advanced.toml b/conformance/results/pytype/generics_self_advanced.toml deleted file mode 100644 index c2cc90e86..000000000 --- a/conformance/results/pytype/generics_self_advanced.toml +++ /dev/null @@ -1,91 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `Self` type. -""" -output = """ -generics_self_advanced.py:12:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in prop1: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 19, in current file -generics_self_advanced.py:12:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in prop1: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 18, in current file -generics_self_advanced.py:19:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : ParentA [assert-type] - -assert_type(ChildA().prop1, ChildA) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:29:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method1: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 38, in method2 -generics_self_advanced.py:29:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method1: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:35:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method2: ChildB [assert-type] - - assert_type(self, Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:36:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method2: list[ChildB] [assert-type] - - assert_type(self.a, list[Self]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:37:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method2: ChildB [assert-type] - - assert_type(self.a[0], Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:38:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method2: ChildB [assert-type] - - assert_type(self.method1(), Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:42:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method3: type[ChildB] [assert-type] - - assert_type(cls, type[Self]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:43:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method3: list[ChildB] [assert-type] - - assert_type(cls.a, list[Self]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:44:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method3: ChildB [assert-type] - - assert_type(cls.a[0], Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_advanced.py:45:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method3: ChildB [assert-type] - - assert_type(cls.method1(), Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 12: Unexpected errors ['generics_self_advanced.py:12:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in prop1: bad return type [bad-return-type]', 'generics_self_advanced.py:12:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in prop1: bad return type [bad-return-type]'] -Line 19: Unexpected errors ['generics_self_advanced.py:19:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : ParentA [assert-type]'] -Line 29: Unexpected errors ['generics_self_advanced.py:29:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method1: bad return type [bad-return-type]', 'generics_self_advanced.py:29:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method1: bad return type [bad-return-type]'] -Line 35: Unexpected errors ['generics_self_advanced.py:35:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method2: ChildB [assert-type]'] -Line 36: Unexpected errors ['generics_self_advanced.py:36:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method2: list[ChildB] [assert-type]'] -Line 37: Unexpected errors ['generics_self_advanced.py:37:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method2: ChildB [assert-type]'] -Line 38: Unexpected errors ['generics_self_advanced.py:38:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method2: ChildB [assert-type]'] -Line 42: Unexpected errors ['generics_self_advanced.py:42:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method3: type[ChildB] [assert-type]'] -Line 43: Unexpected errors ['generics_self_advanced.py:43:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method3: list[ChildB] [assert-type]'] -Line 44: Unexpected errors ['generics_self_advanced.py:44:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method3: ChildB [assert-type]'] -Line 45: Unexpected errors ['generics_self_advanced.py:45:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method3: ChildB [assert-type]'] -""" diff --git a/conformance/results/pytype/generics_self_attributes.toml b/conformance/results/pytype/generics_self_attributes.toml deleted file mode 100644 index 8079a601d..000000000 --- a/conformance/results/pytype/generics_self_attributes.toml +++ /dev/null @@ -1,15 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `Self` type. -""" -output = """ -generics_self_attributes.py:26:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function OrdinalLinkedList.__init__ was called with the wrong arguments [wrong-arg-types] - -xs = OrdinalLinkedList(value=1, next=LinkedList[int](value=2)) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 32: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_self_basic.toml b/conformance/results/pytype/generics_self_basic.toml deleted file mode 100644 index 28ff372ae..000000000 --- a/conformance/results/pytype/generics_self_basic.toml +++ /dev/null @@ -1,70 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `Self` type. -""" -output = """ -generics_self_basic.py:14:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in set_scale: Shape [assert-type] - - assert_type(self, Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_basic.py:14:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in set_scale: Circle [assert-type] - - assert_type(self, Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 52, in current file -generics_self_basic.py:27:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in from_config: type[Shape] [assert-type] - - assert_type(cls, type[Self]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 54, in current file -generics_self_basic.py:27:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in from_config: type[Circle] [assert-type] - - assert_type(cls, type[Self]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 55, in current file -generics_self_basic.py:40:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in difference: Shape [assert-type] - - assert_type(other, Self) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_basic.py:64:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in set_value: bad return type [bad-return-type] - - def set_value(self, value: T) -> Self: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -Called from (traceback): - line 75, in object_with_concrete_type -generics_self_basic.py:64:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in set_value: bad return type [bad-return-type] - - def set_value(self, value: T) -> Self: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -Called from (traceback): - line 74, in object_with_concrete_type -generics_self_basic.py:64:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in set_value: bad return type [bad-return-type] - - def set_value(self, value: T) -> Self: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -generics_self_basic.py:67:26: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Container: unsupported operand type(s) for item retrieval: 'Self: TypeVar' and 'int: type[int]' [unsupported-operands] - - def foo(self, other: Self[int]) -> None: # E - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 20: Expected 1 errors -Line 33: Expected 1 errors -Line 14: Unexpected errors ['generics_self_basic.py:14:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in set_scale: Shape [assert-type]', 'generics_self_basic.py:14:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in set_scale: Circle [assert-type]'] -Line 27: Unexpected errors ['generics_self_basic.py:27:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in from_config: type[Shape] [assert-type]', 'generics_self_basic.py:27:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in from_config: type[Circle] [assert-type]'] -Line 40: Unexpected errors ['generics_self_basic.py:40:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in difference: Shape [assert-type]'] -Line 64: Unexpected errors ['generics_self_basic.py:64:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in set_value: bad return type [bad-return-type]', 'generics_self_basic.py:64:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in set_value: bad return type [bad-return-type]', 'generics_self_basic.py:64:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in set_value: bad return type [bad-return-type]'] -""" diff --git a/conformance/results/pytype/generics_self_protocols.toml b/conformance/results/pytype/generics_self_protocols.toml deleted file mode 100644 index 2f76c782b..000000000 --- a/conformance/results/pytype/generics_self_protocols.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject protocol compatibility due to method `Self` return type. -""" -output = """ - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 61: Expected 1 errors -Line 64: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_self_usage.toml b/conformance/results/pytype/generics_self_usage.toml deleted file mode 100644 index 84de50aed..000000000 --- a/conformance/results/pytype/generics_self_usage.toml +++ /dev/null @@ -1,78 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `Self` type. -""" -output = """ -generics_self_usage.py:58:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in foo: Invalid type annotation 'Self' [invalid-annotation] - - def nested(z: int, inner_self: Self) -> Self: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - print(z) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - print(inner_self.x) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return inner_self -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_usage.py:73:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Self' [invalid-annotation] - -def foo(bar: Self) -> Self: ... # E: not within a class -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_usage.py:76:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Self' for bar [invalid-annotation] - -bar: Self # E: not within a class -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_usage.py:82:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in has_existing_self_annotation: bad return type [bad-return-type] - - def has_existing_self_annotation(self: TFoo2) -> Self: ... # E -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -generics_self_usage.py:86:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in return_concrete_type: bad return type [bad-return-type] - - return Foo3() # E (see FooChild below for rationale) - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 92, in child_method -generics_self_usage.py:103:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: Self [base-class-error] - -class Baz2(Self): ... # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_usage.py:111:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Base: Invalid type annotation 'Self' [invalid-annotation] - - def make() -> Self: # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_usage.py:116:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Base: Invalid type annotation 'Self' [invalid-annotation] - - def return_parameter(foo: Self) -> Self: # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_self_usage.py:122:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __new__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_self_usage.py:126:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __mul__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 101: Expected 1 errors -Line 106: Expected 1 errors -Line 121: Expected 1 errors -Line 125: Expected 1 errors -Line 58: Unexpected errors ["generics_self_usage.py:58:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in foo: Invalid type annotation 'Self' [invalid-annotation]"] -Line 122: Unexpected errors ['generics_self_usage.py:122:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __new__: bad return type [bad-return-type]'] -Line 126: Unexpected errors ['generics_self_usage.py:126:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __mul__: bad return type [bad-return-type]'] -""" diff --git a/conformance/results/pytype/generics_syntax_compatibility.toml b/conformance/results/pytype/generics_syntax_compatibility.toml deleted file mode 100644 index 55006657c..000000000 --- a/conformance/results/pytype/generics_syntax_compatibility.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. -""" -output = """ -SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 14) -""" -conformance_automated = "Fail" -errors_diff = """ -Line 14: Expected 1 errors -Line 26: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_syntax_declarations.toml b/conformance/results/pytype/generics_syntax_declarations.toml deleted file mode 100644 index 3960f34b1..000000000 --- a/conformance/results/pytype/generics_syntax_declarations.toml +++ /dev/null @@ -1,20 +0,0 @@ -conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. -""" -output = """ -SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 13) -""" -conformance_automated = "Fail" -errors_diff = """ -Line 17: Expected 1 errors -Line 25: Expected 1 errors -Line 32: Expected 1 errors -Line 44: Expected 1 errors -Line 48: Expected 1 errors -Line 60: Expected 1 errors -Line 64: Expected 1 errors -Line 71: Expected 1 errors -Line 75: Expected 1 errors -Line 79: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_syntax_infer_variance.toml b/conformance/results/pytype/generics_syntax_infer_variance.toml deleted file mode 100644 index 05c5d9bee..000000000 --- a/conformance/results/pytype/generics_syntax_infer_variance.toml +++ /dev/null @@ -1,28 +0,0 @@ -conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. -""" -output = """ -SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 132) -""" -conformance_automated = "Fail" -errors_diff = """ -Line 15: Expected 1 errors -Line 17: Expected 1 errors -Line 29: Expected 1 errors -Line 37: Expected 1 errors -Line 46: Expected 1 errors -Line 75: Expected 1 errors -Line 86: Expected 1 errors -Line 102: Expected 1 errors -Line 103: Expected 1 errors -Line 117: Expected 1 errors -Line 118: Expected 1 errors -Line 125: Expected 1 errors -Line 126: Expected 1 errors -Line 127: Expected 1 errors -Line 128: Expected 1 errors -Line 136: Expected 1 errors -Line 144: Expected 1 errors -Line 155: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_syntax_scoping.toml b/conformance/results/pytype/generics_syntax_scoping.toml deleted file mode 100644 index 0e811a233..000000000 --- a/conformance/results/pytype/generics_syntax_scoping.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. -""" -output = """ -SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 14) -""" -conformance_automated = "Fail" -errors_diff = """ -Line 14: Expected 1 errors -Line 18: Expected 1 errors -Line 35: Expected 1 errors -Line 44: Expected 1 errors -Line 92: Expected 1 errors -Line 95: Expected 1 errors -Line 98: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_type_erasure.toml b/conformance/results/pytype/generics_type_erasure.toml deleted file mode 100644 index ac5e34ce1..000000000 --- a/conformance/results/pytype/generics_type_erasure.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Unsupported" -output = """ -NotImplementedError: ParameterizedClass -""" -conformance_automated = "Fail" -errors_diff = """ -Line 38: Expected 1 errors -Line 40: Expected 1 errors -Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -""" diff --git a/conformance/results/pytype/generics_typevartuple_args.toml b/conformance/results/pytype/generics_typevartuple_args.toml deleted file mode 100644 index f49671e37..000000000 --- a/conformance/results/pytype/generics_typevartuple_args.toml +++ /dev/null @@ -1,134 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. -""" -output = """ -generics_typevartuple_args.py:10:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import TypeVarTuple, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:13:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:16:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute '__iter__' on TypeVarTuple [attribute-error] - -def args_to_tuple(*args: *Ts) -> tuple[*Ts]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:16:34: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def args_to_tuple(*args: *Ts) -> tuple[*Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:17:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in args_to_tuple: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 20, in current file -generics_typevartuple_args.py:20:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Any] [assert-type] - -assert_type(args_to_tuple(1, "a"), tuple[int, str]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:27:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter] - -def exec_le(path: str, *args: * tuple[*Ts, Env], env: Env | None = None) -> tuple[*Ts]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:27:33: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def exec_le(path: str, *args: * tuple[*Ts, Env], env: Env | None = None) -> tuple[*Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:27:77: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def exec_le(path: str, *args: * tuple[*Ts, Env], env: Env | None = None) -> tuple[*Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:28:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in exec_le: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 31, in current file -generics_typevartuple_args.py:31:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Any] [assert-type] - -assert_type(exec_le("", Env()), tuple[()]) # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:32:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Any] [assert-type] - -assert_type(exec_le("", 0, "", Env()), tuple[int, str]) # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:42:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter] - -def func1(*args: * tuple[int, ...]) -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:51:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter] - -def func2(*args: * tuple[int, *tuple[str, ...], str]) -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:51:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(*args: * tuple[int, *tuple[str, ...], str]) -> None: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:62:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter] - -def func3(*args: * tuple[int, str]) -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:70:18: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func4(*args: tuple[*Ts]): - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_args.py:75:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function func4 was called with the wrong arguments [wrong-arg-types] - -func4((0,), (1, 2)) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 33: Expected 1 errors -Line 34: Expected 1 errors -Line 48: Expected 1 errors -Line 57: Expected 1 errors -Line 58: Expected 1 errors -Line 59: Expected 1 errors -Line 67: Expected 1 errors -Line 76: Expected 1 errors -Line 10: Unexpected errors ['generics_typevartuple_args.py:10:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 13: Unexpected errors ['generics_typevartuple_args.py:13:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 16: Unexpected errors ["generics_typevartuple_args.py:16:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : No attribute '__iter__' on TypeVarTuple [attribute-error]", "generics_typevartuple_args.py:16:34: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 17: Unexpected errors ['generics_typevartuple_args.py:17:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in args_to_tuple: bad return type [bad-return-type]'] -Line 20: Unexpected errors ['generics_typevartuple_args.py:20:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Any] [assert-type]'] -Line 27: Unexpected errors ["generics_typevartuple_args.py:27:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter]", "generics_typevartuple_args.py:27:33: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_args.py:27:77: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 28: Unexpected errors ['generics_typevartuple_args.py:28:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in exec_le: bad return type [bad-return-type]'] -Line 31: Unexpected errors ['generics_typevartuple_args.py:31:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Any] [assert-type]'] -Line 32: Unexpected errors ['generics_typevartuple_args.py:32:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Any] [assert-type]'] -Line 42: Unexpected errors ["generics_typevartuple_args.py:42:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter]"] -Line 51: Unexpected errors ["generics_typevartuple_args.py:51:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter]", "generics_typevartuple_args.py:51:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 62: Unexpected errors ["generics_typevartuple_args.py:62:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter]"] -Line 70: Unexpected errors ["generics_typevartuple_args.py:70:18: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/generics_typevartuple_basic.toml b/conformance/results/pytype/generics_typevartuple_basic.toml deleted file mode 100644 index 0b78be1c5..000000000 --- a/conformance/results/pytype/generics_typevartuple_basic.toml +++ /dev/null @@ -1,306 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. -""" -output = """ -generics_typevartuple_basic.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import Generic, NewType, TypeVarTuple, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:9:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:12:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array1(Generic[*Ts]): - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:16:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute '__iter__' on TypeVarTuple [attribute-error] - -def func1(*args: *Ts) -> tuple[*Ts]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:16:26: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func1(*args: *Ts) -> tuple[*Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:17:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:20:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Shape = TypeVarTuple("Shape") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:23:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array(Generic[*Shape]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:24:31: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Array: Invalid type annotation '' [invalid-annotation] - - def __init__(self, shape: tuple[*Shape]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:25:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Invalid type annotation 'tuple[*Shape,]' [invalid-annotation] - - self._shape: tuple[*Shape] = shape - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:27:28: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Array: Invalid type annotation '' [invalid-annotation] - - def get_shape(self) -> tuple[*Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:36:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -v1: Array[Height, Width] = Array((Height(1), Width(2))) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Array[Height, Width]' [invalid-annotation] - -v1: Array[Height, Width] = Array((Height(1), Width(2))) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:36:28: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types] - -v1: Array[Height, Width] = Array((Height(1), Width(2))) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:37:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -v2: Array[Batch, Height, Width] = Array((Batch(1), Height(1), Width(1))) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:37:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Array[Batch, Height, Width]' [invalid-annotation] - -v2: Array[Batch, Height, Width] = Array((Batch(1), Height(1), Width(1))) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:37:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types] - -v2: Array[Batch, Height, Width] = Array((Batch(1), Height(1), Width(1))) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:38:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -v3: Array[Time, Batch, Height, Width] = Array( - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:38:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Array[Time, Batch, Height, Width]' [invalid-annotation] - -v3: Array[Time, Batch, Height, Width] = Array( -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:38:41: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types] - -v3: Array[Time, Batch, Height, Width] = Array( - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - (Time(1), Batch(1), Height(1), Width(1)) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -) # OK -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:42:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -v4: Array[Height, Width] = Array(Height(1)) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:42:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Array[Height, Width]' [invalid-annotation] - -v4: Array[Height, Width] = Array(Height(1)) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:42:28: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types] - -v4: Array[Height, Width] = Array(Height(1)) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:43:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -v5: Array[Batch, Height, Width] = Array((Batch(1), Width(1))) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:43:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Array[Batch, Height, Width]' [invalid-annotation] - -v5: Array[Batch, Height, Width] = Array((Batch(1), Width(1))) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:43:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types] - -v5: Array[Batch, Height, Width] = Array((Batch(1), Width(1))) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:44:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -v6: Array[Time, Batch, Height, Width] = Array( # E[v6] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:44:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Array[Time, Batch, Height, Width]' [invalid-annotation] - -v6: Array[Time, Batch, Height, Width] = Array( # E[v6] -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:44:41: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types] - -v6: Array[Time, Batch, Height, Width] = Array( # E[v6] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - (Time(1), Batch(1), Width(1), Height(1)) # E[v6] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m -) -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:52:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class ClassA(Generic[Shape]): # E: not unpacked - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:53:31: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Invalid type annotation '' [invalid-annotation] - - def __init__(self, shape: tuple[Shape]): # E: not unpacked - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:54:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Invalid type annotation 'tuple[*Shape,]' [invalid-annotation] - - self._shape: tuple[*Shape] = shape - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:56:28: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Invalid type annotation '' [invalid-annotation] - - def get_shape(self) -> tuple[Shape]: # E: not unpacked - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:59:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassA: Invalid type annotation '' for args [invalid-annotation] - - def method1(*args: Shape) -> None: # E: not unpacked - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:65:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 3 [wrong-arg-count] - -Ts1 = TypeVarTuple("Ts1", covariant=True) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:66:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 4 [wrong-arg-count] - -Ts2 = TypeVarTuple("Ts2", int, float) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:67:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 3 [wrong-arg-count] - -Ts3 = TypeVarTuple("Ts3", bound=int) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:75:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(arg1: tuple[*Ts], arg2: tuple[*Ts]) -> tuple[*Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:75:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(arg1: tuple[*Ts], arg2: tuple[*Ts]) -> tuple[*Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:75:50: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(arg1: tuple[*Ts], arg2: tuple[*Ts]) -> tuple[*Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:76:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 84, in current file -generics_typevartuple_basic.py:84:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Any] [assert-type] - -assert_type(func2((0,), (1,)), tuple[int]) # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:90:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function func2 was called with the wrong arguments [wrong-arg-types] - -func2((0, 0), (0,)) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:93:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def multiply(x: Array[*Shape], y: Array[*Shape]) -> Array[*Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:93:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def multiply(x: Array[*Shape], y: Array[*Shape]) -> Array[*Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:93:53: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def multiply(x: Array[*Shape], y: Array[*Shape]) -> Array[*Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:94:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in multiply: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:97:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func3(x: Array[Height], y: Array[Width], z: Array[Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:97:32: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func3(x: Array[Height], y: Array[Width], z: Array[Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:97:49: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func3(x: Array[Height], y: Array[Width], z: Array[Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:106:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array3(Generic[*Ts1, *Ts2]): # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_basic.py:106:22: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -class Array3(Generic[*Ts1, *Ts2]): # E - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 89: Expected 1 errors -Line 99: Expected 1 errors -Line 100: Expected 1 errors -Line 7: Unexpected errors ['generics_typevartuple_basic.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 9: Unexpected errors ['generics_typevartuple_basic.py:9:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 12: Unexpected errors ["generics_typevartuple_basic.py:12:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 16: Unexpected errors ["generics_typevartuple_basic.py:16:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : No attribute '__iter__' on TypeVarTuple [attribute-error]", "generics_typevartuple_basic.py:16:26: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 17: Unexpected errors ['generics_typevartuple_basic.py:17:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: bad return type [bad-return-type]'] -Line 20: Unexpected errors ['generics_typevartuple_basic.py:20:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 23: Unexpected errors ["generics_typevartuple_basic.py:23:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 24: Unexpected errors ["generics_typevartuple_basic.py:24:31: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Array: Invalid type annotation '' [invalid-annotation]"] -Line 25: Unexpected errors ["generics_typevartuple_basic.py:25:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __init__: Invalid type annotation 'tuple[*Shape,]' [invalid-annotation]"] -Line 27: Unexpected errors ["generics_typevartuple_basic.py:27:28: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Array: Invalid type annotation '' [invalid-annotation]"] -Line 36: Unexpected errors ['generics_typevartuple_basic.py:36:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', "generics_typevartuple_basic.py:36:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Array[Height, Width]' [invalid-annotation]", 'generics_typevartuple_basic.py:36:28: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] -Line 37: Unexpected errors ['generics_typevartuple_basic.py:37:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', "generics_typevartuple_basic.py:37:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Array[Batch, Height, Width]' [invalid-annotation]", 'generics_typevartuple_basic.py:37:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] -Line 38: Unexpected errors ['generics_typevartuple_basic.py:38:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', "generics_typevartuple_basic.py:38:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Array[Time, Batch, Height, Width]' [invalid-annotation]", 'generics_typevartuple_basic.py:38:41: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] -Line 54: Unexpected errors ["generics_typevartuple_basic.py:54:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __init__: Invalid type annotation 'tuple[*Shape,]' [invalid-annotation]"] -Line 75: Unexpected errors ["generics_typevartuple_basic.py:75:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_basic.py:75:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_basic.py:75:50: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 76: Unexpected errors ['generics_typevartuple_basic.py:76:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: bad return type [bad-return-type]'] -Line 84: Unexpected errors ['generics_typevartuple_basic.py:84:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Any] [assert-type]'] -Line 93: Unexpected errors ['generics_typevartuple_basic.py:93:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_basic.py:93:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_basic.py:93:53: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 94: Unexpected errors ['generics_typevartuple_basic.py:94:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in multiply: bad return type [bad-return-type]'] -Line 97: Unexpected errors ['generics_typevartuple_basic.py:97:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_basic.py:97:32: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_basic.py:97:49: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -""" diff --git a/conformance/results/pytype/generics_typevartuple_callable.toml b/conformance/results/pytype/generics_typevartuple_callable.toml deleted file mode 100644 index c2cf17829..000000000 --- a/conformance/results/pytype/generics_typevartuple_callable.toml +++ /dev/null @@ -1,128 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. -""" -output = """ -generics_typevartuple_callable.py:10:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import Callable, TypeVar, TypeVarTuple, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:12:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:17:61: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Process: Invalid type annotation '' [invalid-annotation] - - def __init__(self, target: Callable[[*Ts], None], args: tuple[*Ts]) -> None: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:17:32: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Process: Invalid type annotation '' [invalid-annotation] - - def __init__(self, target: Callable[[*Ts], None], args: tuple[*Ts]) -> None: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:25:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Process.__init__ was called with the wrong arguments [wrong-arg-types] - -Process(target=func1, args=(0, "")) # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:26:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Process.__init__ was called with the wrong arguments [wrong-arg-types] - -Process(target=func1, args=("", 0)) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:29:57: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(f: Callable[[int, *Ts, T], tuple[T, *Ts]]) -> tuple[*Ts, T]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:29:38: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(f: Callable[[int, *Ts, T], tuple[T, *Ts]]) -> tuple[*Ts, T]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:29:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(f: Callable[[int, *Ts, T], tuple[T, *Ts]]) -> tuple[*Ts, T]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:30:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 42, in current file -generics_typevartuple_callable.py:34:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in callback1: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:38:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in callback2: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:41:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function func2 was called with the wrong arguments [wrong-arg-types] - -assert_type(func2(callback1), tuple[str, int, complex]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:41:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(func2(callback1), tuple[str, int, complex]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:42:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Any] [assert-type] - -assert_type(func2(callback2), tuple[str]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:45:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter] - -def func3(*args: * tuple[int, *Ts, T]) -> tuple[T, *Ts]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:45:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func3(*args: * tuple[int, *Ts, T]) -> tuple[T, *Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:45:43: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func3(*args: * tuple[int, *Ts, T]) -> tuple[T, *Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_callable.py:46:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 49, in current file -generics_typevartuple_callable.py:49:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Any] [assert-type] - -assert_type(func3(1, "", 3j, 3.4), tuple[float, str, complex]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 10: Unexpected errors ['generics_typevartuple_callable.py:10:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 12: Unexpected errors ['generics_typevartuple_callable.py:12:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 17: Unexpected errors ["generics_typevartuple_callable.py:17:61: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Process: Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_callable.py:17:32: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Process: Invalid type annotation '' [invalid-annotation]"] -Line 25: Unexpected errors ['generics_typevartuple_callable.py:25:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function Process.__init__ was called with the wrong arguments [wrong-arg-types]'] -Line 29: Unexpected errors ["generics_typevartuple_callable.py:29:57: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_callable.py:29:38: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_callable.py:29:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 30: Unexpected errors ['generics_typevartuple_callable.py:30:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: bad return type [bad-return-type]'] -Line 34: Unexpected errors ['generics_typevartuple_callable.py:34:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in callback1: bad return type [bad-return-type]'] -Line 38: Unexpected errors ['generics_typevartuple_callable.py:38:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in callback2: bad return type [bad-return-type]'] -Line 41: Unexpected errors ['generics_typevartuple_callable.py:41:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function func2 was called with the wrong arguments [wrong-arg-types]', 'generics_typevartuple_callable.py:41:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 42: Unexpected errors ['generics_typevartuple_callable.py:42:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Any] [assert-type]'] -Line 45: Unexpected errors ["generics_typevartuple_callable.py:45:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'self' in call to function tuple.__iter__ [missing-parameter]", "generics_typevartuple_callable.py:45:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_callable.py:45:43: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 46: Unexpected errors ['generics_typevartuple_callable.py:46:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: bad return type [bad-return-type]'] -Line 49: Unexpected errors ['generics_typevartuple_callable.py:49:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Any] [assert-type]'] -""" diff --git a/conformance/results/pytype/generics_typevartuple_concat.toml b/conformance/results/pytype/generics_typevartuple_concat.toml deleted file mode 100644 index aa1708948..000000000 --- a/conformance/results/pytype/generics_typevartuple_concat.toml +++ /dev/null @@ -1,155 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. -""" -output = """ -generics_typevartuple_concat.py:9:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import Generic, NewType, TypeVar, TypeVarTuple, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:17:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Shape = TypeVarTuple("Shape") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:18:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:22:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array(Generic[*Ts]): - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:26:23: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def add_batch_axis(x: Array[*Shape]) -> Array[Batch, *Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:26:41: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def add_batch_axis(x: Array[*Shape]) -> Array[Batch, *Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:27:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in add_batch_axis: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:30:23: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def del_batch_axis(x: Array[Batch, *Shape]) -> Array[*Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:30:48: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def del_batch_axis(x: Array[Batch, *Shape]) -> Array[*Shape]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:31:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in del_batch_axis: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:34:27: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def add_batch_channels(x: Array[*Shape]) -> Array[Batch, *Shape, Channels]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:34:45: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def add_batch_channels(x: Array[*Shape]) -> Array[Batch, *Shape, Channels]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:35:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in add_batch_channels: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:38:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func1(a: Array[Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:40:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: class Array is not indexable [not-indexable] - - assert_type(b, Array[Batch, Height, Width]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:42:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: class Array is not indexable [not-indexable] - - assert_type(c, Array[Height, Width]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:44:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: class Array is not indexable [not-indexable] - - assert_type(d, Array[Batch, Height, Width, Channels]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:47:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T' [invalid-annotation] - -def prefix_tuple(x: T, y: tuple[*Ts]) -> tuple[T, *Ts]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:47:27: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def prefix_tuple(x: T, y: tuple[*Ts]) -> tuple[T, *Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:47:42: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def prefix_tuple(x: T, y: tuple[*Ts]) -> tuple[T, *Ts]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:48:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in prefix_tuple: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:51:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function prefix_tuple was called with the wrong arguments [wrong-arg-types] - -z = prefix_tuple(x=0, y=(True, "a")) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:52:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(z, tuple[int, bool, str]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:55:55: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def move_first_element_to_last(tup: tuple[T, *Ts]) -> tuple[*Ts, T]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_concat.py:55:37: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def move_first_element_to_last(tup: tuple[T, *Ts]) -> tuple[*Ts, T]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 9: Unexpected errors ['generics_typevartuple_concat.py:9:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 17: Unexpected errors ['generics_typevartuple_concat.py:17:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 18: Unexpected errors ['generics_typevartuple_concat.py:18:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 22: Unexpected errors ["generics_typevartuple_concat.py:22:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 26: Unexpected errors ['generics_typevartuple_concat.py:26:23: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_concat.py:26:41: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 27: Unexpected errors ['generics_typevartuple_concat.py:27:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in add_batch_axis: bad return type [bad-return-type]'] -Line 30: Unexpected errors ['generics_typevartuple_concat.py:30:23: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_concat.py:30:48: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 31: Unexpected errors ['generics_typevartuple_concat.py:31:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in del_batch_axis: bad return type [bad-return-type]'] -Line 34: Unexpected errors ['generics_typevartuple_concat.py:34:27: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_concat.py:34:45: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 35: Unexpected errors ['generics_typevartuple_concat.py:35:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in add_batch_channels: bad return type [bad-return-type]'] -Line 38: Unexpected errors ['generics_typevartuple_concat.py:38:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 40: Unexpected errors ['generics_typevartuple_concat.py:40:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: class Array is not indexable [not-indexable]'] -Line 42: Unexpected errors ['generics_typevartuple_concat.py:42:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: class Array is not indexable [not-indexable]'] -Line 44: Unexpected errors ['generics_typevartuple_concat.py:44:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: class Array is not indexable [not-indexable]'] -Line 47: Unexpected errors ["generics_typevartuple_concat.py:47:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T' [invalid-annotation]", "generics_typevartuple_concat.py:47:27: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_concat.py:47:42: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 48: Unexpected errors ['generics_typevartuple_concat.py:48:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in prefix_tuple: bad return type [bad-return-type]'] -Line 51: Unexpected errors ['generics_typevartuple_concat.py:51:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function prefix_tuple was called with the wrong arguments [wrong-arg-types]'] -Line 52: Unexpected errors ['generics_typevartuple_concat.py:52:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -Line 55: Unexpected errors ["generics_typevartuple_concat.py:55:55: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "generics_typevartuple_concat.py:55:37: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/generics_typevartuple_overloads.toml b/conformance/results/pytype/generics_typevartuple_overloads.toml deleted file mode 100644 index 6a56bcbe6..000000000 --- a/conformance/results/pytype/generics_typevartuple_overloads.toml +++ /dev/null @@ -1,72 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. -""" -output = """ -generics_typevartuple_overloads.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import Any, Generic, TypeVar, TypeVarTuple, assert_type, overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:10:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Shape = TypeVarTuple("Shape") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:16:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array(Generic[*Shape]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:18:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Array: class Array is not indexable [not-indexable] - - def transpose(self: "Array[Axis1, Axis2]") -> "Array[Axis2, Axis1]": - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:22:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Array: class Array is not indexable [not-indexable] - - def transpose(self: "Array[Axis1, Axis2, Axis3]") -> "Array[Axis3, Axis2, Axis1]": - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:26:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in transpose: bad return type [bad-return-type] - - pass - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:29:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func1(a: Array[Axis1, Axis2], b: Array[Axis1, Axis2, Axis3]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:29:38: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func1(a: Array[Axis1, Axis2], b: Array[Axis1, Axis2, Axis3]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:30:32: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: class Array is not indexable [not-indexable] - - assert_type(a.transpose(), Array[Axis2, Axis1]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_overloads.py:31:32: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: class Array is not indexable [not-indexable] - - assert_type(b.transpose(), Array[Axis3, Axis2, Axis1]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 7: Unexpected errors ['generics_typevartuple_overloads.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 10: Unexpected errors ['generics_typevartuple_overloads.py:10:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 16: Unexpected errors ["generics_typevartuple_overloads.py:16:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 18: Unexpected errors ['generics_typevartuple_overloads.py:18:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Array: class Array is not indexable [not-indexable]'] -Line 22: Unexpected errors ['generics_typevartuple_overloads.py:22:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in Array: class Array is not indexable [not-indexable]'] -Line 26: Unexpected errors ['generics_typevartuple_overloads.py:26:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in transpose: bad return type [bad-return-type]'] -Line 29: Unexpected errors ['generics_typevartuple_overloads.py:29:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_overloads.py:29:38: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 30: Unexpected errors ['generics_typevartuple_overloads.py:30:32: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: class Array is not indexable [not-indexable]'] -Line 31: Unexpected errors ['generics_typevartuple_overloads.py:31:32: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: class Array is not indexable [not-indexable]'] -""" diff --git a/conformance/results/pytype/generics_typevartuple_specialization.toml b/conformance/results/pytype/generics_typevartuple_specialization.toml deleted file mode 100644 index ea620c39e..000000000 --- a/conformance/results/pytype/generics_typevartuple_specialization.toml +++ /dev/null @@ -1,454 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. -""" -output = """ -generics_typevartuple_specialization.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import Any, Generic, NewType, TypeVar, TypeVarTuple, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:10:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:16:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array(Generic[*Ts]): - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:24:27: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def takes_any_array2(arr: Array[*tuple[Any, ...]]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:28:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func1(x: Array[Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:33:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func2(y: Array[Time, Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:41:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -IntTuple = tuple[int, *Ts] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:42:25: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -NamedArray = tuple[str, Array[*Ts]] - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:45:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[str, Array][Height]' [invalid-annotation] - -def func3(a: IntTuple[float, bool], b: NamedArray[Height]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:45:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][float, bool]' [invalid-annotation] - -def func3(a: IntTuple[float, bool], b: NamedArray[Height]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:46:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: tuple[Any] [assert-type] - - assert_type(a, tuple[int, float, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:47:31: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: class Array is not indexable [not-indexable] - - assert_type(b, tuple[str, Array[Height]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:51:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func4: tuple[Any] [assert-type] - - assert_type(a, tuple[int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:55:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Shape = TypeVarTuple("Shape") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:59:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array2(Generic[DType, *Shape]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:63:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array2 is not indexable [not-indexable] - -FloatArray = Array2[float, *Shape] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:64:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array2 is not indexable [not-indexable] - -Array1D = Array2[DType, Any] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:67:28: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array2 is not indexable [not-indexable] - -def func5_0(a: Array1D, b: Array1D[int]): - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:68:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5_0: class Array2 is not indexable [not-indexable] - - assert_type(a, Array2[Any, Any]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:69:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5_0: class Array2 is not indexable [not-indexable] - - assert_type(b, Array2[int, Any]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:76:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array2 is not indexable [not-indexable] - -def func5_1(x: FloatArray[Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:80:46: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array2 is not indexable [not-indexable] - -def takes_float_array_with_specific_shape(y: FloatArray[Height, Width]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:89:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -VariadicTuple = tuple[T, *Ts] - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:92:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][str, int]' [invalid-annotation] - -def func6(a: VariadicTuple[str, int], b: VariadicTuple[float], c: VariadicTuple): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:92:42: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][float]' [invalid-annotation] - -def func6(a: VariadicTuple[str, int], b: VariadicTuple[float], c: VariadicTuple): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:93:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func6: tuple[Any] [assert-type] - - assert_type(a, tuple[str, int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:94:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func6: tuple[Any] [assert-type] - - assert_type(b, tuple[float]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:95:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func6: Invalid type annotation '' [invalid-annotation] - - assert_type(c, tuple[Any, *tuple[Any, ...]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:98:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts1 = TypeVarTuple("Ts1") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:99:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts2 = TypeVarTuple("Ts2") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:101:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -IntTupleVar = tuple[int, *Ts1] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:102:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -IntFloatTupleVar = IntTupleVar[float, *Ts2] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:103:21: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -IntFloatsTupleVar = IntTupleVar[*tuple[float, ...]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:109:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -IntTupleGeneric[*Ts] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:110:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -IntTupleGeneric[*tuple[float, ...]] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:117:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA1 = tuple[*Ts, T1, T2] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:118:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA2 = tuple[T1, T2, *Ts] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:119:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA3 = tuple[T1, *Ts, T2, T3] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:120:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA4 = tuple[T1, T2, *tuple[int, ...]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:121:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA5 = tuple[T1, *Ts, T2, *Ts] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:121:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -TA5 = tuple[T1, *Ts, T2, *Ts] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:122:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA6 = tuple[T1, *Ts, T2, *tuple[int, ...]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:122:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -TA6 = tuple[T1, *Ts, T2, *tuple[int, ...]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:125:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA7 = tuple[*Ts, T1, T2] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:127:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][int]' [invalid-annotation] - -v1: TA7[int] # E: requires at least two type arguments - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:130:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -def func7(a: TA7[*Ts, T1, T2]) -> tuple[tuple[*Ts], T1, T2]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:130:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T2' [invalid-annotation] - -def func7(a: TA7[*Ts, T1, T2]) -> tuple[tuple[*Ts], T1, T2]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:130:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T1' [invalid-annotation] - -def func7(a: TA7[*Ts, T1, T2]) -> tuple[tuple[*Ts], T1, T2]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:130:41: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func7(a: TA7[*Ts, T1, T2]) -> tuple[tuple[*Ts], T1, T2]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:131:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:134:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][str, bool]' [invalid-annotation] - -def func8(a: TA7[str, bool], b: TA7[str, bool, float], c: TA7[str, bool, float, int]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:134:33: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float]' [invalid-annotation] - -def func8(a: TA7[str, bool], b: TA7[str, bool, float], c: TA7[str, bool, float, int]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:134:59: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float, int]' [invalid-annotation] - -def func8(a: TA7[str, bool], b: TA7[str, bool, float], c: TA7[str, bool, float, int]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:135:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: tuple[tuple[Any], Any, Any] [assert-type] - - assert_type(func7(a), tuple[tuple[()], str, bool]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:136:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: tuple[tuple[Any], Any, Any] [assert-type] - - assert_type(func7(b), tuple[tuple[str], bool, float]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:137:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: tuple[tuple[Any], Any, Any] [assert-type] - - assert_type(func7(c), tuple[tuple[str, bool], float, int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:140:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA8 = tuple[T1, *Ts, T2, T3] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:143:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -def func9(a: TA8[T1, *Ts, T2, T3]) -> tuple[tuple[*Ts], T1, T2, T3]: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:143:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T3' [invalid-annotation] - -def func9(a: TA8[T1, *Ts, T2, T3]) -> tuple[tuple[*Ts], T1, T2, T3]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:143:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T2' [invalid-annotation] - -def func9(a: TA8[T1, *Ts, T2, T3]) -> tuple[tuple[*Ts], T1, T2, T3]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:143:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T1' [invalid-annotation] - -def func9(a: TA8[T1, *Ts, T2, T3]) -> tuple[tuple[*Ts], T1, T2, T3]: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:143:45: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func9(a: TA8[T1, *Ts, T2, T3]) -> tuple[tuple[*Ts], T1, T2, T3]: - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:144:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:147:15: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float]' [invalid-annotation] - -def func10(a: TA8[str, bool, float], b: TA8[str, bool, float, int]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:147:41: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float, int]' [invalid-annotation] - -def func10(a: TA8[str, bool, float], b: TA8[str, bool, float, int]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:148:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func10: tuple[tuple[Any], Any, Any, Any] [assert-type] - - assert_type(func9(a), tuple[tuple[()], str, bool, float]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:149:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func10: tuple[tuple[Any], Any, Any, Any] [assert-type] - - assert_type(func9(b), tuple[tuple[bool], str, float, int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:152:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA9 = tuple[*Ts, T1] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:153:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -TA10 = TA9[*tuple[int, ...]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:156:24: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -def func11(a: TA10, b: TA9[*tuple[int, ...], str], c: TA9[*tuple[int, ...], str]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:156:55: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -def func11(a: TA10, b: TA9[*tuple[int, ...], str], c: TA9[*tuple[int, ...], str]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:157:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func11: Invalid type annotation '' [invalid-annotation] - - assert_type(a, tuple[*tuple[int, ...], int]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:158:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func11: Invalid type annotation '' [invalid-annotation] - - assert_type(b, tuple[*tuple[int, ...], str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:159:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func11: Invalid type annotation '' [invalid-annotation] - - assert_type(c, tuple[*tuple[int, ...], str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:162:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -TA11 = tuple[T, *Ts1] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_specialization.py:163:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation] - -TA12 = TA11[*Ts2] # E - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 7: Unexpected errors ['generics_typevartuple_specialization.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 10: Unexpected errors ['generics_typevartuple_specialization.py:10:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 16: Unexpected errors ["generics_typevartuple_specialization.py:16:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 24: Unexpected errors ['generics_typevartuple_specialization.py:24:27: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 28: Unexpected errors ['generics_typevartuple_specialization.py:28:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 33: Unexpected errors ['generics_typevartuple_specialization.py:33:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 41: Unexpected errors ["generics_typevartuple_specialization.py:41:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 42: Unexpected errors ['generics_typevartuple_specialization.py:42:25: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 45: Unexpected errors ["generics_typevartuple_specialization.py:45:40: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[str, Array][Height]' [invalid-annotation]", "generics_typevartuple_specialization.py:45:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][float, bool]' [invalid-annotation]"] -Line 46: Unexpected errors ['generics_typevartuple_specialization.py:46:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: tuple[Any] [assert-type]'] -Line 47: Unexpected errors ['generics_typevartuple_specialization.py:47:31: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: class Array is not indexable [not-indexable]'] -Line 51: Unexpected errors ['generics_typevartuple_specialization.py:51:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func4: tuple[Any] [assert-type]'] -Line 55: Unexpected errors ['generics_typevartuple_specialization.py:55:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 59: Unexpected errors ["generics_typevartuple_specialization.py:59:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 63: Unexpected errors ['generics_typevartuple_specialization.py:63:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array2 is not indexable [not-indexable]'] -Line 64: Unexpected errors ['generics_typevartuple_specialization.py:64:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array2 is not indexable [not-indexable]'] -Line 67: Unexpected errors ['generics_typevartuple_specialization.py:67:28: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array2 is not indexable [not-indexable]'] -Line 68: Unexpected errors ['generics_typevartuple_specialization.py:68:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5_0: class Array2 is not indexable [not-indexable]'] -Line 69: Unexpected errors ['generics_typevartuple_specialization.py:69:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5_0: class Array2 is not indexable [not-indexable]'] -Line 76: Unexpected errors ['generics_typevartuple_specialization.py:76:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array2 is not indexable [not-indexable]'] -Line 80: Unexpected errors ['generics_typevartuple_specialization.py:80:46: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array2 is not indexable [not-indexable]'] -Line 89: Unexpected errors ["generics_typevartuple_specialization.py:89:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 92: Unexpected errors ["generics_typevartuple_specialization.py:92:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][str, int]' [invalid-annotation]", "generics_typevartuple_specialization.py:92:42: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][float]' [invalid-annotation]"] -Line 93: Unexpected errors ['generics_typevartuple_specialization.py:93:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func6: tuple[Any] [assert-type]'] -Line 94: Unexpected errors ['generics_typevartuple_specialization.py:94:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func6: tuple[Any] [assert-type]'] -Line 95: Unexpected errors ["generics_typevartuple_specialization.py:95:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func6: Invalid type annotation '' [invalid-annotation]"] -Line 98: Unexpected errors ['generics_typevartuple_specialization.py:98:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 99: Unexpected errors ['generics_typevartuple_specialization.py:99:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 101: Unexpected errors ["generics_typevartuple_specialization.py:101:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 102: Unexpected errors ["generics_typevartuple_specialization.py:102:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation]"] -Line 103: Unexpected errors ["generics_typevartuple_specialization.py:103:21: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation]"] -Line 117: Unexpected errors ["generics_typevartuple_specialization.py:117:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 118: Unexpected errors ["generics_typevartuple_specialization.py:118:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 119: Unexpected errors ["generics_typevartuple_specialization.py:119:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 120: Unexpected errors ["generics_typevartuple_specialization.py:120:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 125: Unexpected errors ["generics_typevartuple_specialization.py:125:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 130: Unexpected errors ["generics_typevartuple_specialization.py:130:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation]", "generics_typevartuple_specialization.py:130:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T2' [invalid-annotation]", "generics_typevartuple_specialization.py:130:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T1' [invalid-annotation]", "generics_typevartuple_specialization.py:130:41: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 131: Unexpected errors ['generics_typevartuple_specialization.py:131:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func7: bad return type [bad-return-type]'] -Line 134: Unexpected errors ["generics_typevartuple_specialization.py:134:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][str, bool]' [invalid-annotation]", "generics_typevartuple_specialization.py:134:33: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float]' [invalid-annotation]", "generics_typevartuple_specialization.py:134:59: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float, int]' [invalid-annotation]"] -Line 135: Unexpected errors ['generics_typevartuple_specialization.py:135:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func8: tuple[tuple[Any], Any, Any] [assert-type]'] -Line 136: Unexpected errors ['generics_typevartuple_specialization.py:136:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func8: tuple[tuple[Any], Any, Any] [assert-type]'] -Line 137: Unexpected errors ['generics_typevartuple_specialization.py:137:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func8: tuple[tuple[Any], Any, Any] [assert-type]'] -Line 140: Unexpected errors ["generics_typevartuple_specialization.py:140:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 143: Unexpected errors ["generics_typevartuple_specialization.py:143:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation]", "generics_typevartuple_specialization.py:143:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T3' [invalid-annotation]", "generics_typevartuple_specialization.py:143:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T2' [invalid-annotation]", "generics_typevartuple_specialization.py:143:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T1' [invalid-annotation]", "generics_typevartuple_specialization.py:143:45: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 144: Unexpected errors ['generics_typevartuple_specialization.py:144:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: bad return type [bad-return-type]'] -Line 147: Unexpected errors ["generics_typevartuple_specialization.py:147:15: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float]' [invalid-annotation]", "generics_typevartuple_specialization.py:147:41: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][str, bool, float, int]' [invalid-annotation]"] -Line 148: Unexpected errors ['generics_typevartuple_specialization.py:148:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func10: tuple[tuple[Any], Any, Any, Any] [assert-type]'] -Line 149: Unexpected errors ['generics_typevartuple_specialization.py:149:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func10: tuple[tuple[Any], Any, Any, Any] [assert-type]'] -Line 152: Unexpected errors ["generics_typevartuple_specialization.py:152:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 153: Unexpected errors ["generics_typevartuple_specialization.py:153:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation]"] -Line 156: Unexpected errors ["generics_typevartuple_specialization.py:156:24: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation]", "generics_typevartuple_specialization.py:156:55: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[Any][]' [invalid-annotation]"] -Line 157: Unexpected errors ["generics_typevartuple_specialization.py:157:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func11: Invalid type annotation '' [invalid-annotation]"] -Line 158: Unexpected errors ["generics_typevartuple_specialization.py:158:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func11: Invalid type annotation '' [invalid-annotation]"] -Line 159: Unexpected errors ["generics_typevartuple_specialization.py:159:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func11: Invalid type annotation '' [invalid-annotation]"] -Line 162: Unexpected errors ["generics_typevartuple_specialization.py:162:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/generics_typevartuple_unpack.toml b/conformance/results/pytype/generics_typevartuple_unpack.toml deleted file mode 100644 index b19a75825..000000000 --- a/conformance/results/pytype/generics_typevartuple_unpack.toml +++ /dev/null @@ -1,74 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. -""" -output = """ -generics_typevartuple_unpack.py:7:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import Any, Generic, NewType, TypeVarTuple -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:14:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:17:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Generic' [invalid-annotation] - -class Array(Generic[*Ts]): - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:21:31: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def process_batch_channels(x: Array[Batch, *tuple[Any, ...], Channels]) -> None: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:26:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - - x: Array[Batch, Height, Width, Channels], y: Array[Batch, Channels], z: Array[Batch] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:26:50: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - - x: Array[Batch, Height, Width, Channels], y: Array[Batch, Channels], z: Array[Batch] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:26:77: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - - x: Array[Batch, Height, Width, Channels], y: Array[Batch, Channels], z: Array[Batch] - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:33:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Shape = TypeVarTuple("Shape") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:36:30: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def expect_variadic_array(x: Array[Batch, *Shape]) -> None: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:40:29: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def expect_precise_array(x: Array[Batch, Height, Width, Channels]) -> None: - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_typevartuple_unpack.py:44:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : class Array is not indexable [not-indexable] - -def func4(y: Array[*tuple[Any, ...]]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 30: Expected 1 errors -Line 7: Unexpected errors ['generics_typevartuple_unpack.py:7:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 14: Unexpected errors ['generics_typevartuple_unpack.py:14:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 17: Unexpected errors ["generics_typevartuple_unpack.py:17:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Generic' [invalid-annotation]"] -Line 21: Unexpected errors ['generics_typevartuple_unpack.py:21:31: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 26: Unexpected errors ['generics_typevartuple_unpack.py:26:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_unpack.py:26:50: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]', 'generics_typevartuple_unpack.py:26:77: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 33: Unexpected errors ['generics_typevartuple_unpack.py:33:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 36: Unexpected errors ['generics_typevartuple_unpack.py:36:30: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 40: Unexpected errors ['generics_typevartuple_unpack.py:40:29: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -Line 44: Unexpected errors ['generics_typevartuple_unpack.py:44:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : class Array is not indexable [not-indexable]'] -""" diff --git a/conformance/results/pytype/generics_upper_bound.toml b/conformance/results/pytype/generics_upper_bound.toml deleted file mode 100644 index 756776a8e..000000000 --- a/conformance/results/pytype/generics_upper_bound.toml +++ /dev/null @@ -1,41 +0,0 @@ -conformant = "Partial" -notes = """ -Does not properly support assert_type. -""" -output = """ -generics_upper_bound.py:24:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Test: Invalid TypeVar: bound cannot contain TypeVars [invalid-typevar] - - T_Bad1 = TypeVar("T_Bad1", bound=list[T]) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_upper_bound.py:37:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : list [assert-type] - -assert_type(longer([1], [1, 2]), list[int]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_upper_bound.py:38:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : set [assert-type] - -assert_type(longer({1}, {1, 2}), set[int]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_upper_bound.py:43:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Union[list, set] [assert-type] - -assert_type(longer([1], {1, 2}), list[int] | set[int]) # E? -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_upper_bound.py:51:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function longer was called with the wrong arguments [wrong-arg-types] - -longer(3, 3) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_upper_bound.py:56:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid TypeVar: constraints and a bound are mutually exclusive [invalid-typevar] - -T_Bad2 = TypeVar("T_Bad2", str, int, bound="int") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 37: Unexpected errors ['generics_upper_bound.py:37:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : list [assert-type]'] -Line 38: Unexpected errors ['generics_upper_bound.py:38:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : set [assert-type]'] -""" diff --git a/conformance/results/pytype/generics_variance.toml b/conformance/results/pytype/generics_variance.toml deleted file mode 100644 index 46ec8ed46..000000000 --- a/conformance/results/pytype/generics_variance.toml +++ /dev/null @@ -1,55 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support covariant or contravariant TypeVars. -""" -output = """ -generics_variance.py:14:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -X1 = TypeVar("X1", covariant=True, contravariant=True) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_variance.py:14:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -X1 = TypeVar("X1", covariant=True, contravariant=True) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_variance.py:18:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T_co = TypeVar("T_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_variance.py:19:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -T_contra = TypeVar("T_contra", contravariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -generics_variance.py:27:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __iter__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -generics_variance.py:52:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -B_co = TypeVar("B_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 77: Expected 1 errors -Line 81: Expected 1 errors -Line 93: Expected 1 errors -Line 105: Expected 1 errors -Line 113: Expected 1 errors -Line 163: Expected 1 errors -Line 167: Expected 1 errors -Line 191: Expected 1 errors -Lines 125, 126: Expected error (tag 'CoContra_Child2') -Lines 131, 132: Expected error (tag 'CoContra_Child3') -Lines 141, 142: Expected error (tag 'CoContra_Child5') -Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') -Line 18: Unexpected errors ['generics_variance.py:18:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 19: Unexpected errors ['generics_variance.py:19:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] -Line 27: Unexpected errors ['generics_variance.py:27:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __iter__: bad return type [bad-return-type]'] -Line 52: Unexpected errors ['generics_variance.py:52:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/generics_variance_inference.toml b/conformance/results/pytype/generics_variance_inference.toml deleted file mode 100644 index 67937210c..000000000 --- a/conformance/results/pytype/generics_variance_inference.toml +++ /dev/null @@ -1,33 +0,0 @@ -conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. -""" -output = """ -SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 15) -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Expected 1 errors -Line 25: Expected 1 errors -Line 28: Expected 1 errors -Line 41: Expected 1 errors -Line 49: Expected 1 errors -Line 58: Expected 1 errors -Line 67: Expected 1 errors -Line 80: Expected 1 errors -Line 96: Expected 1 errors -Line 97: Expected 1 errors -Line 111: Expected 1 errors -Line 112: Expected 1 errors -Line 119: Expected 1 errors -Line 120: Expected 1 errors -Line 121: Expected 1 errors -Line 122: Expected 1 errors -Line 130: Expected 1 errors -Line 138: Expected 1 errors -Line 149: Expected 1 errors -Line 169: Expected 1 errors -Line 170: Expected 1 errors -Line 181: Expected 1 errors -Line 194: Expected 1 errors -""" diff --git a/conformance/results/pytype/historical_positional.toml b/conformance/results/pytype/historical_positional.toml deleted file mode 100644 index 563658c06..000000000 --- a/conformance/results/pytype/historical_positional.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Partial" -notes = """ -Does not apply rules for pre-3.8 positional-only parameters in some cases. -Does not reject positional-only parameter after non-positional-only parameter. -""" -output = """ -historical_positional.py:43:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument __x to function A.m1 [wrong-keyword-args] - -a.m1(__x=3) # E -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 18: Expected 1 errors -Line 26: Expected 1 errors -Line 38: Expected 1 errors -""" diff --git a/conformance/results/pytype/literals_interactions.toml b/conformance/results/pytype/literals_interactions.toml deleted file mode 100644 index a9a4375b2..000000000 --- a/conformance/results/pytype/literals_interactions.toml +++ /dev/null @@ -1,87 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly rejects some legal Literal annotations. -Does not reject some illegal Literal annotations. -Does not use Literal to distinguish overloads. -Does not narrow based on `x is Literal` type guard pattern. -Does not narrow based on `x == Literal` type guard pattern. -""" -output = """ -literals_interactions.py:11:76: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -def func1(v: tuple[int, str, list[bool]], a: Literal[0], b: Literal[5], c: Literal[-5]): - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_interactions.py:46:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in open: bad return type [bad-return-type] - - pass - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 51, in current file -literals_interactions.py:46:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in open: bad return type [bad-return-type] - - pass - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 50, in current file -literals_interactions.py:46:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in open: bad return type [bad-return-type] - - pass - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 49, in current file -literals_interactions.py:61:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __add__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -literals_interactions.py:64:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __matmul__: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -literals_interactions.py:67:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in transpose: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -literals_interactions.py:72:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Matrix[Any, int] [assert-type] - - assert_type(c, Matrix[Literal[2], Literal[7]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_interactions.py:93:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in parse_status1: Union[Status, str] [assert-type] - - assert_type(s, str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_interactions.py:106:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in parse_status2: Function expects_bad_status was called with the wrong arguments [wrong-arg-types] - - return expects_bad_status(status) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_interactions.py:109:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in parse_status2: Function expects_pending_status was called with the wrong arguments [wrong-arg-types] - - expects_pending_status(status) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 15: Expected 1 errors -Line 16: Expected 1 errors -Line 17: Expected 1 errors -Line 18: Expected 1 errors -Line 11: Unexpected errors ["literals_interactions.py:11:76: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]"] -Line 46: Unexpected errors ['literals_interactions.py:46:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in open: bad return type [bad-return-type]', 'literals_interactions.py:46:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in open: bad return type [bad-return-type]', 'literals_interactions.py:46:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in open: bad return type [bad-return-type]'] -Line 61: Unexpected errors ['literals_interactions.py:61:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __add__: bad return type [bad-return-type]'] -Line 64: Unexpected errors ['literals_interactions.py:64:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __matmul__: bad return type [bad-return-type]'] -Line 67: Unexpected errors ['literals_interactions.py:67:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in transpose: bad return type [bad-return-type]'] -Line 72: Unexpected errors ['literals_interactions.py:72:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: Matrix[Any, int] [assert-type]'] -Line 93: Unexpected errors ['literals_interactions.py:93:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in parse_status1: Union[Status, str] [assert-type]'] -Line 106: Unexpected errors ['literals_interactions.py:106:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in parse_status2: Function expects_bad_status was called with the wrong arguments [wrong-arg-types]'] -Line 109: Unexpected errors ['literals_interactions.py:109:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in parse_status2: Function expects_pending_status was called with the wrong arguments [wrong-arg-types]'] -""" diff --git a/conformance/results/pytype/literals_literalstring.toml b/conformance/results/pytype/literals_literalstring.toml deleted file mode 100644 index 1a86e0b8c..000000000 --- a/conformance/results/pytype/literals_literalstring.toml +++ /dev/null @@ -1,89 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `LiteralString` special form. -""" -output = """ -literals_literalstring.py:8:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.LiteralString not supported yet [not-supported-yet] - -from typing import ( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - Any, -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - Generic, -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - Literal, -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - LiteralString, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - Sequence, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - TypeVar, -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - assert_type, -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - overload, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m -) -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -literals_literalstring.py:24:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in my_function: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -literals_literalstring.py:36:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad_union: Literal["hello", LiteralString] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_literalstring.py:37:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad_nesting: Literal[LiteralString] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_literalstring.py:43:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for x2 does not match type of assignment [annotation-type-mismatch] - - x2: Literal[""] = b # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -literals_literalstring.py:74:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Type annotation for x3 does not match type of assignment [annotation-type-mismatch] - - x3: LiteralString = 3 # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -literals_literalstring.py:75:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Type annotation for x4 does not match type of assignment [annotation-type-mismatch] - - x4: LiteralString = b"test" # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -literals_literalstring.py:162:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 166, in current file -literals_literalstring.py:162:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 165, in current file -literals_literalstring.py:167:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : B [assert-type] - -assert_type(func8(str(1)), A) # Third overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 66: Expected 1 errors -Line 120: Expected 1 errors -Line 134: Expected 1 errors -Line 171: Expected 1 errors -Line 8: Unexpected errors ['literals_literalstring.py:8:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.LiteralString not supported yet [not-supported-yet]'] -Line 24: Unexpected errors ['literals_literalstring.py:24:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in my_function: bad return type [bad-return-type]'] -Line 162: Unexpected errors ['literals_literalstring.py:162:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func8: bad return type [bad-return-type]', 'literals_literalstring.py:162:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func8: bad return type [bad-return-type]'] -Line 167: Unexpected errors ['literals_literalstring.py:167:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : B [assert-type]'] -""" diff --git a/conformance/results/pytype/literals_parameterizations.toml b/conformance/results/pytype/literals_parameterizations.toml deleted file mode 100644 index a1751be55..000000000 --- a/conformance/results/pytype/literals_parameterizations.toml +++ /dev/null @@ -1,106 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `Literal` type annotation. -""" -output = """ -literals_parameterizations.py:17:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -good1: Literal[26] - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:18:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -good2: Literal[0x1A] - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:19:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -good3: Literal[-4] - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:33:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -AllModes = Literal[ReadOnlyMode, WriteAndTruncateMode, WriteNoTruncateMode, AppendMode] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:35:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -good11: Literal[Literal[Literal[1, 2, 3], "foo"], 5, None] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:35:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -good11: Literal[Literal[Literal[1, 2, 3], "foo"], 5, None] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:42:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad2: Literal["foo".replace("o", "b")] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:43:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad3: Literal[4 + 3j] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:44:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad4: Literal[~5] # E - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:47:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad7: Literal[{"a": "b", "c": "d"}] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:48:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad8: Literal[int] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:50:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad10: Literal[T] # E - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:51:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad11: Literal[3.14] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:53:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -bad13: Literal[...] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:61:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal[my_function]' [invalid-annotation] - -y: Literal[my_function] = my_function # E -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -literals_parameterizations.py:61:4: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -y: Literal[my_function] = my_function # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_parameterizations.py:65:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Type annotation for x1 does not match type of assignment [annotation-type-mismatch] - - x1: Literal["Color.RED"] = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 41: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 49: Expected 1 errors -Line 52: Expected 1 errors -Line 56: Expected 1 errors -Line 60: Expected 1 errors -Line 17: Unexpected errors ["literals_parameterizations.py:17:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]"] -Line 18: Unexpected errors ["literals_parameterizations.py:18:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]"] -Line 19: Unexpected errors ["literals_parameterizations.py:19:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]"] -Line 33: Unexpected errors ["literals_parameterizations.py:33:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]"] -Line 35: Unexpected errors ["literals_parameterizations.py:35:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]", "literals_parameterizations.py:35:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/literals_semantics.toml b/conformance/results/pytype/literals_semantics.toml deleted file mode 100644 index e443c9509..000000000 --- a/conformance/results/pytype/literals_semantics.toml +++ /dev/null @@ -1,62 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `Literal` type annotation. -""" -output = """ -literals_semantics.py:10:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - -v2: Literal[3] = 4 # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -literals_semantics.py:12:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -v3: L[-3] = -3 - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -literals_semantics.py:12:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'L[-3]' [invalid-annotation] - -v3: L[-3] = -3 -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -literals_semantics.py:16:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -def func1(a: Literal[20], b: Literal[0x14], c: Literal[0b10100]): - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_semantics.py:16:30: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -def func1(a: Literal[20], b: Literal[0x14], c: Literal[0b10100]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_semantics.py:16:48: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Literal' [invalid-annotation] - -def func1(a: Literal[20], b: Literal[0x14], c: Literal[0b10100]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -literals_semantics.py:17:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Invalid type annotation 'Literal[20]' [invalid-annotation] - - x1: Literal[0x14] = a - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -literals_semantics.py:18:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Invalid type annotation 'Literal[20]' [invalid-annotation] - - x2: Literal[0x14] = b - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -literals_semantics.py:19:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Invalid type annotation 'Literal[20]' [invalid-annotation] - - x3: Literal[0x14] = c - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Expected 1 errors -Line 25: Expected 1 errors -Line 33: Expected 1 errors -Line 12: Unexpected errors ["literals_semantics.py:12:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]", "literals_semantics.py:12:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'L[-3]' [invalid-annotation]"] -Line 16: Unexpected errors ["literals_semantics.py:16:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]", "literals_semantics.py:16:30: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]", "literals_semantics.py:16:48: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'Literal' [invalid-annotation]"] -Line 17: Unexpected errors ["literals_semantics.py:17:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Invalid type annotation 'Literal[20]' [invalid-annotation]"] -Line 18: Unexpected errors ["literals_semantics.py:18:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Invalid type annotation 'Literal[20]' [invalid-annotation]"] -Line 19: Unexpected errors ["literals_semantics.py:19:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Invalid type annotation 'Literal[20]' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/namedtuples_define_class.toml b/conformance/results/pytype/namedtuples_define_class.toml deleted file mode 100644 index 189add7c1..000000000 --- a/conformance/results/pytype/namedtuples_define_class.toml +++ /dev/null @@ -1,81 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly rejects valid index of named tuple instance when using a negative index. -Does not evaluate correct type for indexed named tuple instance with slice. -Does not reject named tuple element with no default value after one with a default. -Does not reject override of named tuple attribute in child class. -Evaluates incorrect type for named tuple entry with a generic type. -Does not reject incorrect argument type passed to specialized generic named tuple constructor. -Does not reject attempt to use NamedTuple with multiple inheritance. -""" -output = """ -namedtuples_define_class.py:27:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Union[int, str] [assert-type] - -assert_type(p1[-2], int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:28:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Union[int, str] [assert-type] - -assert_type(p1[-3], int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:29:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Union[int, str], ...] [assert-type] - -assert_type(p1[0:2], tuple[int, int]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:30:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Union[int, str], ...] [assert-type] - -assert_type(p1[0:], tuple[int, int, str]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:44:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'y' in call to function Point.__new__ [missing-parameter] - -p5 = Point(1) # E - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:45:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'y' in call to function Point.__new__ [missing-parameter] - -p6 = Point(x=1) # E - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:46:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point.__new__ was called with the wrong arguments [wrong-arg-types] - -p7 = Point(1, "") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:47:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point.__new__ was called with the wrong arguments [wrong-arg-types] - -p8 = Point(1, 2, units=3) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:48:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point.__new__ expects 3 arg(s), got 5 [wrong-arg-count] - -p9 = Point(1, 2, "", "") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:49:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument other to function Point.__new__ [wrong-keyword-args] - -p10 = Point(1, 2, "", other="") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_class.py:95:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(pr1[1], float) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 32: Expected 1 errors -Line 33: Expected 1 errors -Line 59: Expected 1 errors -Line 79: Expected 1 errors -Line 98: Expected 1 errors -Line 105: Expected 1 errors -Line 27: Unexpected errors ['namedtuples_define_class.py:27:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Union[int, str] [assert-type]'] -Line 28: Unexpected errors ['namedtuples_define_class.py:28:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Union[int, str] [assert-type]'] -Line 29: Unexpected errors ['namedtuples_define_class.py:29:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Union[int, str], ...] [assert-type]'] -Line 30: Unexpected errors ['namedtuples_define_class.py:30:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Union[int, str], ...] [assert-type]'] -Line 95: Unexpected errors ['namedtuples_define_class.py:95:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -""" diff --git a/conformance/results/pytype/namedtuples_define_functional.toml b/conformance/results/pytype/namedtuples_define_functional.toml deleted file mode 100644 index f18a771b4..000000000 --- a/conformance/results/pytype/namedtuples_define_functional.toml +++ /dev/null @@ -1,72 +0,0 @@ -conformant = "Partial" -notes = """ -Does not handle illegal named tuple names the same as runtime. -Does not support defaults in functional form. -""" -output = """ -namedtuples_define_functional.py:16:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'y' in call to function Point1.__new__ [missing-parameter] - -p1_3 = Point1(2.3) # E - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:21:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'x' in call to function Point2.__new__ [missing-parameter] - -p2_3 = Point2() # E - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:26:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point3.__new__ expects 3 arg(s), got 4 [wrong-arg-count] - -p3_3 = Point3(1, 2, 3) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:31:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument z to function Point4.__new__ [wrong-keyword-args] - -p4_3 = Point4(1, z=3) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:36:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point5.__new__ was called with the wrong arguments [wrong-arg-types] - -p5_3 = Point5(2, "1") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:37:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point5.__new__ expects 3 arg(s), got 4 [wrong-arg-count] - -p5_4 = Point5(1, 2, 3) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:42:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point6.__new__ was called with the wrong arguments [wrong-arg-types] - -p6_3 = Point6(2, "1") # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:43:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function Point6.__new__ was called with the wrong arguments [wrong-arg-types] - -p6_4 = Point6(x=1.1, y=2) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:52:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : collections.namedtuple argument 'a' is not a valid typename or field name. [invalid-namedtuple-arg] - -NT1 = namedtuple("NT1", ["a", "a"]) # E?: duplicate field name - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:53:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : collections.namedtuple argument 'def' is not a valid typename or field name. [invalid-namedtuple-arg] - -NT2 = namedtuple("NT2", ["abc", "def"]) # E?: illegal field name - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:54:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : collections.namedtuple argument 'def' is not a valid typename or field name. [invalid-namedtuple-arg] - -NT3 = namedtuple("NT3", ["abc", "def"], rename=False) # E?: illegal field name - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_define_functional.py:63:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function collections.namedtuple was called with the wrong arguments [wrong-arg-types] - -NT5 = namedtuple("NT5", "a b c", defaults=(1, 2)) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 66: Expected 1 errors -Line 63: Unexpected errors ['namedtuples_define_functional.py:63:7: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function collections.namedtuple was called with the wrong arguments [wrong-arg-types]'] -""" diff --git a/conformance/results/pytype/namedtuples_type_compat.toml b/conformance/results/pytype/namedtuples_type_compat.toml deleted file mode 100644 index a649efd7f..000000000 --- a/conformance/results/pytype/namedtuples_type_compat.toml +++ /dev/null @@ -1,16 +0,0 @@ -conformant = "Pass" -output = """ -namedtuples_type_compat.py:22:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v3 does not match type of assignment [annotation-type-mismatch] - -v3: tuple[int, int] = p # E: too few elements -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -namedtuples_type_compat.py:23:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v4 does not match type of assignment [annotation-type-mismatch] - -v4: tuple[int, str, str] = p # E: incompatible element type -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/namedtuples_usage.toml b/conformance/results/pytype/namedtuples_usage.toml deleted file mode 100644 index 91aabf28c..000000000 --- a/conformance/results/pytype/namedtuples_usage.toml +++ /dev/null @@ -1,48 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly rejects valid index of named tuple instance when using a negative index. -Does not report out-of-range index access with named tuple instance. -Does not reject attempt to overwrite named tuple entry by name. -Does not reject attempt to delete named tuple entry by name. -""" -output = """ -namedtuples_usage.py:31:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Union[int, str] [assert-type] - -assert_type(p[-2], int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_usage.py:32:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Union[int, str] [assert-type] - -assert_type(p[-3], int) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -namedtuples_usage.py:41:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for item assignment: Point [unsupported-operands] - -p[0] = 3 # E -\u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -namedtuples_usage.py:43:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for item deletion: Point [unsupported-operands] - -del p[0] # E - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -namedtuples_usage.py:52:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Cannot unpack 3 values into 2 variables [bad-unpacking] - -x2, y2 = p # E: too few values to unpack -\u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -namedtuples_usage.py:53:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Cannot unpack 3 values into 4 variables [bad-unpacking] - -x3, y3, unit3, other = p # E: too many values to unpack -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 34: Expected 1 errors -Line 35: Expected 1 errors -Line 40: Expected 1 errors -Line 42: Expected 1 errors -Line 31: Unexpected errors ['namedtuples_usage.py:31:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Union[int, str] [assert-type]'] -Line 32: Unexpected errors ['namedtuples_usage.py:32:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Union[int, str] [assert-type]'] -""" diff --git a/conformance/results/pytype/narrowing_typeguard.toml b/conformance/results/pytype/narrowing_typeguard.toml deleted file mode 100644 index da2f78df4..000000000 --- a/conformance/results/pytype/narrowing_typeguard.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject TypeGuard method with too few parameters. -""" -output = """ -narrowing_typeguard.py:128:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_callable_str was called with the wrong arguments [wrong-arg-types] - -takes_callable_str(simple_typeguard) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -narrowing_typeguard.py:148:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_callable_str_proto was called with the wrong arguments [wrong-arg-types] - -takes_callable_str_proto(simple_typeguard) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 102: Expected 1 errors -Line 107: Expected 1 errors -""" diff --git a/conformance/results/pytype/narrowing_typeis.toml b/conformance/results/pytype/narrowing_typeis.toml deleted file mode 100644 index 7101206c1..000000000 --- a/conformance/results/pytype/narrowing_typeis.toml +++ /dev/null @@ -1,48 +0,0 @@ -conformant = "Partial" -notes = """ -Does not narrow correctly on generic tuple type. -Does not reject covariant use of TypeIs. -Does not reject TypeIs where return type is not consistent with input type due to variance. -""" -output = """ -narrowing_typeis.py:19:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: tuple[str, ...] [assert-type] - - assert_type(names, tuple[str, str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -narrowing_typeis.py:132:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_callable_str was called with the wrong arguments [wrong-arg-types] - -takes_callable_str(simple_typeguard) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -narrowing_typeis.py:152:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_callable_str_proto was called with the wrong arguments [wrong-arg-types] - -takes_callable_str_proto(simple_typeguard) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -narrowing_typeis.py:169:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_typeguard was called with the wrong arguments [wrong-arg-types] - -takes_typeguard(is_int_typeis) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -narrowing_typeis.py:170:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function takes_typeis was called with the wrong arguments [wrong-arg-types] - -takes_typeis(is_int_typeguard) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -narrowing_typeis.py:195:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : TypeIs[str] is not consistent with input type int [invalid-function-definition] - -def bad_typeis(x: int) -> TypeIs[str]: # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return isinstance(x, str) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 105: Expected 1 errors -Line 110: Expected 1 errors -Line 191: Expected 1 errors -Line 199: Expected 1 errors -Line 19: Unexpected errors ['narrowing_typeis.py:19:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: tuple[str, ...] [assert-type]'] -""" diff --git a/conformance/results/pytype/overloads_basic.toml b/conformance/results/pytype/overloads_basic.toml deleted file mode 100644 index d1e57904c..000000000 --- a/conformance/results/pytype/overloads_basic.toml +++ /dev/null @@ -1,25 +0,0 @@ -conformant = "Partial" -notes = """ -""" -output = """ -overloads_basic.py:33:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __getitem__: bad return type [bad-return-type] - - return b"" - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_basic.py:39:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : unsupported operand type(s) for item retrieval: Bytes and str [unsupported-operands] - -b[""] # E: no matching overload -\u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -overloads_basic.py:60:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in map: bad return type [bad-return-type] - - pass - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 33: Unexpected errors ['overloads_basic.py:33:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in __getitem__: bad return type [bad-return-type]'] -Line 60: Unexpected errors ['overloads_basic.py:60:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in map: bad return type [bad-return-type]'] -""" diff --git a/conformance/results/pytype/overloads_consistency.toml b/conformance/results/pytype/overloads_consistency.toml deleted file mode 100644 index 58abf8d76..000000000 --- a/conformance/results/pytype/overloads_consistency.toml +++ /dev/null @@ -1,56 +0,0 @@ -conformant = "Fail" -notes = """ -Doesn't appear to validate overload consistency at all. -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 25, 28: Expected error (tag 'return_type') -Lines 41, 44: Expected error (tag 'parameter_type') -Line 29: Unexpected errors ['overloads_consistency.py:29:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in return_type: bad return type [bad-return-type]'] -Line 45: Unexpected errors ['overloads_consistency.py:45:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in parameter_type: bad return type [bad-return-type]'] -Line 74: Unexpected errors ['overloads_consistency.py:74:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in returns_coroutine: bad return type [bad-return-type]'] -Line 89: Unexpected errors ['overloads_consistency.py:89:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in returns_coroutine_2: bad return type [bad-return-type]', 'overloads_consistency.py:89:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in returns_coroutine_2: bad return type [bad-return-type]'] -Line 108: Unexpected errors ['overloads_consistency.py:108:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function decorated expects 0 arg(s), got 1 [wrong-arg-count]'] -Line 116: Unexpected errors ["overloads_consistency.py:116:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Missing parameter 'z' in call to function decorated [missing-parameter]"] -""" -output = """ -overloads_consistency.py:29:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in return_type: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_consistency.py:45:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in parameter_type: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_consistency.py:74:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in returns_coroutine: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_consistency.py:89:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in returns_coroutine_2: bad return type [bad-return-type] - - return _wrapped(x) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_consistency.py:89:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in returns_coroutine_2: bad return type [bad-return-type] - - return _wrapped(x) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_consistency.py:108:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function decorated expects 0 arg(s), got 1 [wrong-arg-count] - -def decorated() -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -overloads_consistency.py:116:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'z' in call to function decorated [missing-parameter] - -def decorated(y: bytes, z: bytes) -> bytes: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return b"" -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/overloads_definitions.toml b/conformance/results/pytype/overloads_definitions.toml deleted file mode 100644 index 01f5bab94..000000000 --- a/conformance/results/pytype/overloads_definitions.toml +++ /dev/null @@ -1,302 +0,0 @@ -conformant = "Fail" -notes = """ -Does not reject a function with a single @overload signature. -Does not reject a function with @overload signature but no implementation. -Does not allow an overload with no implementation in a Protocol or an abstract base class. -Does not error on overloads inconsistently decorated with `@staticmethod` or `@classmethod`. -Does not enforce any rules on location of @final or @override decorators. -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 15, 16: Expected error (tag 'func1') -Lines 27, 28: Expected error (tag 'func2') -Lines 58, 59: Expected error (tag 'not_abstract') -Lines 71, 73, 78, 81: Expected error (tag 'func5') -Lines 84, 86, 90, 94: Expected error (tag 'func6') -Lines 121, 123, 127: Expected error (tag 'invalid_final') -Lines 135, 136, 137, 141, 142: Expected error (tag 'invalid_final_2') -Lines 220, 221, 222, 225, 226: Expected error (tag 'override_impl') -Line 6: Unexpected errors ['overloads_definitions.py:6:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.override not supported yet [not-supported-yet]'] -Line 43: Unexpected errors ["overloads_definitions.py:43:37: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable]"] -Line 53: Unexpected errors ["overloads_definitions.py:53:37: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable]"] -Line 63: Unexpected errors ["overloads_definitions.py:63:44: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable]"] -Line 74: Unexpected errors ['overloads_definitions.py:74:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]'] -Line 79: Unexpected errors ['overloads_definitions.py:79:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func5: bad return type [bad-return-type]'] -Line 95: Unexpected errors ['overloads_definitions.py:95:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func6: bad return type [bad-return-type]'] -Line 117: Unexpected errors ['overloads_definitions.py:117:56: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in final_method: bad return type [bad-return-type]', 'overloads_definitions.py:117:56: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in final_method: bad return type [bad-return-type]'] -Line 130: Unexpected errors ['overloads_definitions.py:130:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final: bad return type [bad-return-type]', 'overloads_definitions.py:130:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final: bad return type [bad-return-type]'] -Line 146: Unexpected errors ['overloads_definitions.py:146:59: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final_2: bad return type [bad-return-type]', 'overloads_definitions.py:146:59: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in invalid_final_2: bad return type [bad-return-type]'] -Line 159: Unexpected errors ['overloads_definitions.py:159:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_override: bad return type [bad-return-type]', 'overloads_definitions.py:159:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_override: bad return type [bad-return-type]'] -Line 167: Unexpected errors ['overloads_definitions.py:167:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in to_override: bad return type [bad-return-type]', 'overloads_definitions.py:167:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in to_override: bad return type [bad-return-type]'] -Line 184: Unexpected errors ['overloads_definitions.py:184:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in final_method: bad return type [bad-return-type]', 'overloads_definitions.py:184:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in final_method: bad return type [bad-return-type]'] -Line 199: Unexpected errors ['overloads_definitions.py:199:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in bad_override: bad return type [bad-return-type]', 'overloads_definitions.py:199:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in bad_override: bad return type [bad-return-type]'] -Line 215: Unexpected errors ['overloads_definitions.py:215:57: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_override: bad return type [bad-return-type]', 'overloads_definitions.py:215:57: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in good_override: bad return type [bad-return-type]'] -Line 229: Unexpected errors ['overloads_definitions.py:229:55: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in to_override: bad return type [bad-return-type]', 'overloads_definitions.py:229:55: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in to_override: bad return type [bad-return-type]'] -""" -output = """ -overloads_definitions.py:6:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.override not supported yet [not-supported-yet] - -from typing import ( -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - final, -\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - Protocol, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - overload, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - override, -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m -) -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_definitions.py:43:37: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: @typing.overload-decorated 'MyProto.func3' object is not callable [not-callable] - - def func3(self, x: str) -> str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:53:37: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func4: @typing.overload-decorated 'MyAbstractBase.func4' object is not callable [not-callable] - - def func4(self, x: str) -> str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:63:44: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in not_abstract: @typing.overload-decorated 'MyAbstractBase.not_abstract' object is not callable [not-callable] - - def not_abstract(self, x: str) -> str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:74:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:79:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:95:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func6: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_definitions.py:117:56: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in final_method: bad return type [bad-return-type] - - def final_method(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:117:56: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in final_method: bad return type [bad-return-type] - - def final_method(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:130:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final: bad return type [bad-return-type] - - def invalid_final(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_definitions.py:130:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final: bad return type [bad-return-type] - - def invalid_final(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_definitions.py:146:59: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final_2: bad return type [bad-return-type] - - def invalid_final_2(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:146:59: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in invalid_final_2: bad return type [bad-return-type] - - def invalid_final_2(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:159:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_override: bad return type [bad-return-type] - - def good_override(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_definitions.py:159:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_override: bad return type [bad-return-type] - - def good_override(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_definitions.py:167:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in to_override: bad return type [bad-return-type] - - def to_override(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_definitions.py:167:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in to_override: bad return type [bad-return-type] - - def to_override(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_definitions.py:170:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class Child overrides final method final_method, defined in base class Base [final-error] - -class Child(Base): # E[override-final] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # The correctly-decorated @final method `Base.final_method` should cause an -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # error if overridden in a child class (we use an overload here to avoid -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # questions of override LSP compatibility and focus only on the override): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload # E[override-final] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def final_method(self, x: int) -> int: ... -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def final_method(self, x: str) -> str: ... -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def final_method( # E[override-final] can't override final method -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - self, x: int | str -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ) -> int | str: # E[override-final] can't override final method -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - # This is the right way to mark an overload as @override (decorate -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # implementation only), so the use of @override should cause an error -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # (because there's no `Base.bad_override` method): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload # E[bad_override] marked as override but doesn't exist in base -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def bad_override(self, x: int) -> int: # E[bad_override] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def bad_override(self, x: str) -> str: ... -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @override # E[bad_override] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def bad_override(self, x: int | str) -> int | str: # E[bad_override] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - # This is also a correctly-decorated overloaded @override, which is -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # overriding a method that does exist in the base, so there should be no -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # error. We need both this test and the previous one, because in the -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # previous test, an incorrect error about the use of @override decorator -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # could appear on the same line as the expected error about overriding a -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # method that doesn't exist in base: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def good_override(self, x: int) -> int: ... -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def good_override(self, x: str) -> str: ... -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @override -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def good_override(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - # This is the wrong way to use @override with an overloaded method, and -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - # should emit an error: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload # E[override_impl+]: @override should appear only on implementation -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - @override # E[override_impl+] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def to_override(self, x: int) -> int: ... # E[override_impl+] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - @override # E[override_impl+] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def to_override(self, x: str) -> str: ... # E[override_impl+] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @override -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def to_override(self, x: int | str) -> int | str: ... -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_definitions.py:184:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in final_method: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:184:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in final_method: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:191:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Child: Attribute 'bad_override' not found on any parent class [override-error] - - def bad_override(self, x: int) -> int: # E[bad_override] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_definitions.py:199:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in bad_override: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:199:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in bad_override: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:215:57: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_override: bad return type [bad-return-type] - - def good_override(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:215:57: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in good_override: bad return type [bad-return-type] - - def good_override(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:229:55: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in to_override: bad return type [bad-return-type] - - def to_override(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -overloads_definitions.py:229:55: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in to_override: bad return type [bad-return-type] - - def to_override(self, x: int | str) -> int | str: ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/overloads_definitions_stub.toml b/conformance/results/pytype/overloads_definitions_stub.toml deleted file mode 100644 index 24d83050a..000000000 --- a/conformance/results/pytype/overloads_definitions_stub.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Fail" -notes = """ -Does not enforce any of the specified rules regarding overload definitions. -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 13, 14: Expected error (tag 'func1') -Lines 32, 33, 37: Expected error (tag 'func5') -Lines 39, 41, 44: Expected error (tag 'func6') -Lines 67, 69, 71, 73: Expected error (tag 'invalid_final') -Lines 80, 82, 84, 86: Expected error (tag 'invalid_final_2') -Lines 102, 107, 108, 111, 113: Expected error (tag 'override-final') -Lines 120, 121, 122: Expected error (tag 'bad_override') -Lines 143, 147, 149: Expected error (tag 'override_impl') -""" -output = """ -""" diff --git a/conformance/results/pytype/overloads_evaluation.toml b/conformance/results/pytype/overloads_evaluation.toml deleted file mode 100644 index 6efdfacc7..000000000 --- a/conformance/results/pytype/overloads_evaluation.toml +++ /dev/null @@ -1,173 +0,0 @@ -conformant = "Partial" -notes = """ -Does not perform argument expansion (on any types) when matching overloads. -Does not treat multiple matches due to gradual types as ambiguous. -Does not prefer variadic match to indeterminate-length unpacked argument. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 115: Expected 1 errors -Line 33: Unexpected errors ['overloads_evaluation.py:33:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example1_1: bad return type [bad-return-type]'] -Line 62: Unexpected errors ['overloads_evaluation.py:62:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example1_2: bad return type [bad-return-type]', 'overloads_evaluation.py:62:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example1_2: bad return type [bad-return-type]'] -Line 85: Unexpected errors ['overloads_evaluation.py:85:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example2: bad return type [bad-return-type]'] -Line 106: Unexpected errors ['overloads_evaluation.py:106:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_union: str [assert-type]'] -Line 130: Unexpected errors ['overloads_evaluation.py:130:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_bool: bad return type [bad-return-type]', 'overloads_evaluation.py:130:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_bool: bad return type [bad-return-type]'] -Line 134: Unexpected errors ['overloads_evaluation.py:134:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_bool: Function expand_bool was called with the wrong arguments [wrong-arg-types]'] -Line 135: Unexpected errors ['overloads_evaluation.py:135:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_bool: Any [assert-type]'] -Line 156: Unexpected errors ['overloads_evaluation.py:156:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_enum: bad return type [bad-return-type]'] -Line 160: Unexpected errors ['overloads_evaluation.py:160:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_enum: Function expand_enum was called with the wrong arguments [wrong-arg-types]'] -Line 161: Unexpected errors ['overloads_evaluation.py:161:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_enum: Any [assert-type]'] -Line 176: Unexpected errors ['overloads_evaluation.py:176:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_type_union: bad return type [bad-return-type]'] -Line 181: Unexpected errors ['overloads_evaluation.py:181:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_type_union: int [assert-type]'] -Line 200: Unexpected errors ['overloads_evaluation.py:200:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_tuple: bad return type [bad-return-type]'] -Line 205: Unexpected errors ['overloads_evaluation.py:205:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_tuple: int [assert-type]'] -Line 224: Unexpected errors ['overloads_evaluation.py:224:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in variadic: bad return type [bad-return-type]'] -Line 234: Unexpected errors ['overloads_evaluation.py:234:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_variadic: str [assert-type]'] -Line 264: Unexpected errors ['overloads_evaluation.py:264:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_example4: list[int] [assert-type]'] -Line 280: Unexpected errors ['overloads_evaluation.py:280:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_example5: list[int] [assert-type]'] -Line 291: Unexpected errors ['overloads_evaluation.py:291:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example6: bad return type [bad-return-type]', 'overloads_evaluation.py:291:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example6: bad return type [bad-return-type]', 'overloads_evaluation.py:291:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example6: bad return type [bad-return-type]'] -Line 345: Unexpected errors ['overloads_evaluation.py:345:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_example7: list[int] [assert-type]'] -""" -output = """ -overloads_evaluation.py:33:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example1_1: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -Called from (traceback): - line 48, in current file -overloads_evaluation.py:38:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Missing parameter 'x' in call to function example1_1 [missing-parameter] - -example1_1() # E: no matching overload -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:46:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function example1_1 was called with the wrong arguments [wrong-arg-types] - -example1_1(1, 1) # E: Literal[1] not assignable to str -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:51:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function example1_1 was called with the wrong arguments [wrong-arg-types] - -example1_1(1) # E: Literal[1] not assignable to str -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:62:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example1_2: bad return type [bad-return-type] - -def example1_2(b: bool = True) -> float: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_evaluation.py:62:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example1_2: bad return type [bad-return-type] - -def example1_2(b: bool = True) -> float: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_evaluation.py:85:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example2: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_evaluation.py:106:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_expand_union: str [assert-type] - - assert_type(ret1, int | str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:130:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in expand_bool: bad return type [bad-return-type] - - return int(x) - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:130:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in expand_bool: bad return type [bad-return-type] - - return int(x) - \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:134:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_expand_bool: Function expand_bool was called with the wrong arguments [wrong-arg-types] - - ret1 = expand_bool(v) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:135:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_expand_bool: Any [assert-type] - - assert_type(ret1, Literal[0, 1]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:156:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in expand_enum: bad return type [bad-return-type] - - return x.value - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:160:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_expand_enum: Function expand_enum was called with the wrong arguments [wrong-arg-types] - - ret1 = expand_enum(v) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:161:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_expand_enum: Any [assert-type] - - assert_type(ret1, Literal[0, 1]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:176:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in expand_type_union: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_evaluation.py:181:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_expand_type_union: int [assert-type] - - assert_type(ret1, int | str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:200:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in expand_tuple: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_evaluation.py:205:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_expand_tuple: int [assert-type] - - assert_type(ret1, int | str) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:224:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in variadic: bad return type [bad-return-type] - - return 1 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -overloads_evaluation.py:234:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_variadic: str [assert-type] - - assert_type(ret1, int) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:264:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_example4: list[int] [assert-type] - - assert_type(ret2, Any) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:280:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_example5: list[int] [assert-type] - - assert_type(example5(b), Any) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -overloads_evaluation.py:291:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example6: bad return type [bad-return-type] - -def example6(a: float, b: T) -> T: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -Called from (traceback): - line 321, in check_example6 -overloads_evaluation.py:291:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example6: bad return type [bad-return-type] - -def example6(a: float, b: T) -> T: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -Called from (traceback): - line 315, in check_example6 -overloads_evaluation.py:291:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example6: bad return type [bad-return-type] - -def example6(a: float, b: T) -> T: ... -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - -overloads_evaluation.py:345:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_example7: list[int] [assert-type] - - assert_type(ret3, Any) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" diff --git a/conformance/results/pytype/protocols_class_objects.toml b/conformance/results/pytype/protocols_class_objects.toml deleted file mode 100644 index f294b7008..000000000 --- a/conformance/results/pytype/protocols_class_objects.toml +++ /dev/null @@ -1,33 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject protocol class assigned to type[Proto]. -Incorrectly reports some class objects as incompatible with a protocol. -Fails to report some class objects as incompatible with a protocol. -""" -output = """ -protocols_class_objects.py:50:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method1: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -protocols_class_objects.py:100:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function CMeta.__init__ was called with the wrong arguments [wrong-arg-types] - -class ConcreteC3(metaclass=CMeta): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -Line 34: Expected 1 errors -Line 58: Expected 1 errors -Line 74: Expected 1 errors -Line 104: Expected 1 errors -Line 106: Expected 1 errors -Line 107: Expected 1 errors -Line 108: Expected 1 errors -Line 50: Unexpected errors ['protocols_class_objects.py:50:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method1: bad return type [bad-return-type]'] -Line 100: Unexpected errors ['protocols_class_objects.py:100:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function CMeta.__init__ was called with the wrong arguments [wrong-arg-types]'] -""" diff --git a/conformance/results/pytype/protocols_definition.toml b/conformance/results/pytype/protocols_definition.toml deleted file mode 100644 index 0c6fb35eb..000000000 --- a/conformance/results/pytype/protocols_definition.toml +++ /dev/null @@ -1,77 +0,0 @@ -conformant = "Partial" -notes = """ -Reports errors for protocol static method with "..." implementation. -Does not report error when instance variable is set through "self" access in protocol class. -Does not report protocol mismatch when concrete class has attribute with covariant type and protocol attribute is mutable. -Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar. -Does not reject read-only property in concrete class when attribute in protocol is mutable. -Does not reject covariant attribute type when protocol attribute is mutable. -Does not detect protocol mismatch if concrete method is missing annotations. -Does not detect protocol mismatch if concrete method's parameters are keyword-only. -Does not detect protocol mismatch if concrete method's parameters are position-only. -Does not detect protocol mismatch if concrete method is a classmethod. -Does not detect protocol mismatch if concrete method is a staticmethod. -Does not reject read-only property in concrete class when protocol has settable property. -Does not reject immutable named tuple attribute in concrete class when protocol attribute is mutable. -Does not reject immutable frozen dataclass attribute in concrete class when protocol attribute is mutable. -""" -output = """ -protocols_definition.py:30:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function close_all was called with the wrong arguments [wrong-arg-types] - -close_all([1]) # E: 'int' has no 'close' method -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_definition.py:45:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in third: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -protocols_definition.py:114:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v2_bad1 does not match type of assignment [annotation-type-mismatch] - -v2_bad1: Template2 = Concrete2_Bad1() # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -protocols_definition.py:115:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v2_bad2 does not match type of assignment [annotation-type-mismatch] - -v2_bad2: Template2 = Concrete2_Bad2() # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -protocols_definition.py:156:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v3_bad1 does not match type of assignment [annotation-type-mismatch] - -v3_bad1: Template3 = Concrete3_Bad1() # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -protocols_definition.py:159:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v3_bad4 does not match type of assignment [annotation-type-mismatch] - -v3_bad4: Template3 = Concrete3_Bad4() # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -protocols_definition.py:218:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v4_bad1 does not match type of assignment [annotation-type-mismatch] - -v4_bad1: Template4 = Concrete4_Bad1() # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -protocols_definition.py:219:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for v4_bad2 does not match type of assignment [annotation-type-mismatch] - -v4_bad2: Template4 = Concrete4_Bad2() # E -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 67: Expected 1 errors -Line 116: Expected 1 errors -Line 117: Expected 1 errors -Line 157: Expected 1 errors -Line 158: Expected 1 errors -Line 160: Expected 1 errors -Line 285: Expected 1 errors -Line 286: Expected 1 errors -Line 287: Expected 1 errors -Line 288: Expected 1 errors -Line 289: Expected 1 errors -Line 339: Expected 1 errors -Line 340: Expected 1 errors -Line 341: Expected 1 errors -Line 45: Unexpected errors ['protocols_definition.py:45:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in third: bad return type [bad-return-type]'] -""" diff --git a/conformance/results/pytype/protocols_explicit.toml b/conformance/results/pytype/protocols_explicit.toml deleted file mode 100644 index 5dbd6b44e..000000000 --- a/conformance/results/pytype/protocols_explicit.toml +++ /dev/null @@ -1,36 +0,0 @@ -conformant = "Partial" -notes = """ -Reports errors for protocol static method with "..." implementation. -Does not report error when calling unimplemented protocol method from derived class. -Does not report type incompatibility when assigning to attribute defined in protocol. -Does not reject instantiation of class that derives from protocol but doesn't implement attribute. -Does not report instantiation of class that derives from protocol but doesn't implement method. -""" -output = """ -protocols_explicit.py:14:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in draw: bad return type [bad-return-type] - - ... - \u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -Called from (traceback): - line 27, in draw -protocols_explicit.py:60:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't instantiate Point with abstract methods intensity [not-instantiable] - -p = Point(0, 0, "") # E: Cannot instantiate abstract class - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_explicit.py:165:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't instantiate Concrete7A with abstract methods method1 [not-instantiable] - -c7a = Concrete7A() # E: cannot instantiate abstract class - \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 27: Expected 1 errors -Line 56: Expected 1 errors -Line 90: Expected 1 errors -Line 110: Expected 1 errors -Line 135: Expected 1 errors -Line 14: Unexpected errors ['protocols_explicit.py:14:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in draw: bad return type [bad-return-type]'] -""" diff --git a/conformance/results/pytype/protocols_generic.toml b/conformance/results/pytype/protocols_generic.toml deleted file mode 100644 index 3de697592..000000000 --- a/conformance/results/pytype/protocols_generic.toml +++ /dev/null @@ -1,60 +0,0 @@ -conformant = "Partial" -notes = """ -Does not correctly enforce contravariance in protocol type compatibility tests. -Does not correctly enforce invariance in protocol type compatibility tests. -Does not detect protocol mismatch when method-scoped TypeVar is used in protocol. -""" -output = """ -protocols_generic.py:12:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T_co = TypeVar("T_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_generic.py:13:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -T_contra = TypeVar("T_contra", contravariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_generic.py:40:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for p2 does not match type of assignment [annotation-type-mismatch] - -p2: Proto1[int, str] = Concrete1() # E: incompatible type -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_generic.py:44:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Proto2' [invalid-annotation] - -class Proto2(Protocol[T_co], Generic[T_co]): # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -protocols_generic.py:56:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - - v2: Box[int] = box_float # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_generic.py:65:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Type annotation for v1 does not match type of assignment [annotation-type-mismatch] - - v1: Sender[int] = sender_float # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_generic.py:75:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - - v2: AttrProto[int] = attr_float # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_generic.py:146:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for hp3 does not match type of assignment [annotation-type-mismatch] - -hp3: HasPropertyProto = ConcreteHasProperty3() # E -\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 66: Expected 1 errors -Line 74: Expected 1 errors -Line 145: Expected 1 errors -Line 147: Expected 1 errors -Line 12: Unexpected errors ['protocols_generic.py:12:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 13: Unexpected errors ['protocols_generic.py:13:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] -Line 65: Unexpected errors ['protocols_generic.py:65:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: Type annotation for v1 does not match type of assignment [annotation-type-mismatch]'] -""" diff --git a/conformance/results/pytype/protocols_merging.toml b/conformance/results/pytype/protocols_merging.toml deleted file mode 100644 index 28275fdd8..000000000 --- a/conformance/results/pytype/protocols_merging.toml +++ /dev/null @@ -1,36 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject a protocol class that derives from a non-protocol class. -Does not report attempt to instantiate abstract class downgraded from protocol class. -""" -output = """ -protocols_merging.py:52:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for s6 does not match type of assignment [annotation-type-mismatch] - -s6: SizedAndClosable1 = SCConcrete2() # E: doesn't implement `__len__` -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_merging.py:53:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for s7 does not match type of assignment [annotation-type-mismatch] - -s7: SizedAndClosable2 = SCConcrete2() # E: doesn't implement `__len__` -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_merging.py:54:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for s8 does not match type of assignment [annotation-type-mismatch] - -s8: SizedAndClosable3 = SCConcrete2() # E: SizedAndClosable3 is not a protocol -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_merging.py:82:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't instantiate SizedAndClosable4 with abstract methods close [not-instantiable] - -x = SizedAndClosable4() # E: cannot instantiate abstract class - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_merging.py:83:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for y does not match type of assignment [annotation-type-mismatch] - -y: SizedAndClosable4 = SCConcrete1() # E -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 67: Expected 1 errors -""" diff --git a/conformance/results/pytype/protocols_modules.toml b/conformance/results/pytype/protocols_modules.toml deleted file mode 100644 index 77c9ae318..000000000 --- a/conformance/results/pytype/protocols_modules.toml +++ /dev/null @@ -1,24 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report incompatibilities for protocol methods. -""" -output = """ -protocols_modules.py:10:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't find module '_protocols_modules1'. [import-error] - -import _protocols_modules1 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_modules.py:11:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't find module '_protocols_modules2'. [import-error] - -import _protocols_modules2 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 26: Expected 1 errors -Line 48: Expected 1 errors -Line 49: Expected 1 errors -Line 10: Unexpected errors ["protocols_modules.py:10:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Can't find module '_protocols_modules1'. [import-error]"] -Line 11: Unexpected errors ["protocols_modules.py:11:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Can't find module '_protocols_modules2'. [import-error]"] -""" diff --git a/conformance/results/pytype/protocols_recursive.toml b/conformance/results/pytype/protocols_recursive.toml deleted file mode 100644 index 419fa160b..000000000 --- a/conformance/results/pytype/protocols_recursive.toml +++ /dev/null @@ -1,27 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly reports type error for some recursive protocols. -""" -output = """ -protocols_recursive.py:11:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T_co = TypeVar("T_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_recursive.py:12:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -T_contra = TypeVar("T_contra", contravariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_recursive.py:81:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Any [assert-type] - -assert_type(v1, list[int]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 11: Unexpected errors ['protocols_recursive.py:11:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 12: Unexpected errors ['protocols_recursive.py:12:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] -Line 81: Unexpected errors ['protocols_recursive.py:81:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Any [assert-type]'] -""" diff --git a/conformance/results/pytype/protocols_runtime_checkable.toml b/conformance/results/pytype/protocols_runtime_checkable.toml deleted file mode 100644 index 259caef2e..000000000 --- a/conformance/results/pytype/protocols_runtime_checkable.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not reject isinstance or issubclass call for protocol that is not runtime_checkable. -Does not reject issubclass call for data protocol. -Does not report unsafe overlap for runtime_checkable protocol. -""" -output = """ - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 23: Expected 1 errors -Line 55: Expected 1 errors -Line 61: Expected 1 errors -Line 88: Expected 1 errors -Line 92: Expected 1 errors -Line 96: Expected 1 errors -""" diff --git a/conformance/results/pytype/protocols_self.toml b/conformance/results/pytype/protocols_self.toml deleted file mode 100644 index a6a63cb46..000000000 --- a/conformance/results/pytype/protocols_self.toml +++ /dev/null @@ -1,33 +0,0 @@ -conformant = "Partial" -notes = """ -Does not properly handle Self type within a protocol. -""" -output = """ -protocols_self.py:36:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T1_co = TypeVar("T1_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_self.py:37:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T2_co = TypeVar("T2_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_self.py:72:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for a2 does not match type of assignment [annotation-type-mismatch] - -a2: P2Parent[str] = C2[str]() # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_self.py:73:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for b2 does not match type of assignment [annotation-type-mismatch] - -b2: P2Child[str] = C2[str]() # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 36: Unexpected errors ['protocols_self.py:36:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 37: Unexpected errors ['protocols_self.py:37:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 72: Unexpected errors ['protocols_self.py:72:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for a2 does not match type of assignment [annotation-type-mismatch]'] -Line 73: Unexpected errors ['protocols_self.py:73:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for b2 does not match type of assignment [annotation-type-mismatch]'] -""" diff --git a/conformance/results/pytype/protocols_subtyping.toml b/conformance/results/pytype/protocols_subtyping.toml deleted file mode 100644 index 2908ac1b0..000000000 --- a/conformance/results/pytype/protocols_subtyping.toml +++ /dev/null @@ -1,37 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject attempt to instantiate protocol class. -Does not report some protocol type compatibility violations involving contravariance. -""" -output = """ -protocols_subtyping.py:38:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - - v2: Concrete2 = p2 # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_subtyping.py:55:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - - v2: Proto3 = p2 # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -protocols_subtyping.py:83:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -S_co = TypeVar("S_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_subtyping.py:84:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -T_contra = TypeVar("T_contra", contravariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 16: Expected 1 errors -Line 79: Expected 1 errors -Line 80: Expected 1 errors -Line 102: Expected 1 errors -Line 103: Expected 1 errors -Line 83: Unexpected errors ['protocols_subtyping.py:83:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 84: Unexpected errors ['protocols_subtyping.py:84:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/protocols_variance.toml b/conformance/results/pytype/protocols_variance.toml deleted file mode 100644 index a3089e61a..000000000 --- a/conformance/results/pytype/protocols_variance.toml +++ /dev/null @@ -1,34 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not detect incorrect TypeVar variance within generic protocols. -""" -output = """ -protocols_variance.py:12:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T1_co = TypeVar("T1_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_variance.py:13:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] - -T1_contra = TypeVar("T1_contra", contravariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -protocols_variance.py:15:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -R = TypeVar("R", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 21: Expected 1 errors -Line 40: Expected 1 errors -Line 56: Expected 1 errors -Line 61: Expected 1 errors -Line 66: Expected 1 errors -Line 71: Expected 1 errors -Line 104: Expected 1 errors -Line 12: Unexpected errors ['protocols_variance.py:12:9: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 13: Unexpected errors ['protocols_variance.py:13:13: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] -Line 15: Unexpected errors ['protocols_variance.py:15:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/qualifiers_annotated.toml b/conformance/results/pytype/qualifiers_annotated.toml deleted file mode 100644 index 86e4ce6b4..000000000 --- a/conformance/results/pytype/qualifiers_annotated.toml +++ /dev/null @@ -1,78 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject some illegal type expression forms used in Annotated. -Does not report type incompatibility between Annotated and type[T]. -Does not reject call of Annotated. -Does not allow TypeVar to be used in type alias when wrapped with Annotated. -""" -output = """ -qualifiers_annotated.py:43:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '[int, str]' for Bad1 [invalid-annotation] - -Bad1: Annotated[[int, str], ""] # E: invalid type expression -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:44:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '((int, str),)' for Bad2 [invalid-annotation] - -Bad2: Annotated[((int, str),), ""] # E: invalid type expression -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:45:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for Bad3 [invalid-annotation] - -Bad3: Annotated[[int for i in range(1)], ""] # E: invalid type expression -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:46:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation "{'a': 'b'}" for Bad4 [invalid-annotation] - -Bad4: Annotated[{"a": "b"}, ""] # E: invalid type expression -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:50:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Name 'var1' is not defined [name-error] - -Bad8: Annotated[var1, ""] # E: invalid type expression - \u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:51:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'True' for Bad9 [invalid-annotation] - -Bad9: Annotated[True, ""] # E: invalid type expression -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:52:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '1' for Bad10 [invalid-annotation] - -Bad10: Annotated[1, ""] # E: invalid type expression -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:54:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' for Bad12 [invalid-annotation] - -Bad12: Annotated[f"{'int'}", ""] # E: invalid type expression -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:64:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Annotated' [invalid-annotation] - -Bad13: Annotated[int] # E: requires at least two arguments - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:91:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : 'Annotated' object is not callable [not-callable] - -Annotated() # E -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_annotated.py:121:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid TypeVar: TypeVar('T') must be stored as 'T', not 'TA3' [invalid-typevar] - -TA3 = Annotated[T, ""] -\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 49: Expected 1 errors -Line 53: Expected 1 errors -Line 76: Expected 1 errors -Line 77: Expected 1 errors -Line 84: Expected 1 errors -Line 85: Expected 1 errors -Line 92: Expected 1 errors -Line 93: Expected 1 errors -Line 121: Unexpected errors ["qualifiers_annotated.py:121:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid TypeVar: TypeVar('T') must be stored as 'T', not 'TA3' [invalid-typevar]"] -""" diff --git a/conformance/results/pytype/qualifiers_final_annotation.toml b/conformance/results/pytype/qualifiers_final_annotation.toml deleted file mode 100644 index 7a9dd829a..000000000 --- a/conformance/results/pytype/qualifiers_final_annotation.toml +++ /dev/null @@ -1,142 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report Final variable with missing initialization. -Does not reject Final instance variable declared outside of __init__ method. -Does not reject modification of global variable declared Final. -Does not reject modification of local variable declared Final. -Does not reject modification of imported variable declared Final. -""" -output = """ -qualifiers_final_annotation.py:18:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Final[str, int]' [invalid-annotation] - -BAD2: Final[str, int] = "" # E: only one type argument allowed -\u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:18:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Final' [invalid-annotation] - -BAD2: Final[str, int] = "" # E: only one type argument allowed - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:54:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in __init__: Assigning to attribute ID5, which was annotated with Final [final-error] - - self.ID5 = 0 # E: Already initialized - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:65:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method1: Assigning to attribute ID7, which was annotated with Final [final-error] - - self.ID7 = 0 # E: cannot modify Final value - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:67:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method1: Assigning to attribute ID7, which was annotated with Final [final-error] - - self.ID7 += 1 # E: cannot modify Final value - \u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:71:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Assigning to variable RATE, which was annotated with Final [final-error] - -RATE = 300 # E: Cannot redefine Final value -\u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:81:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Assigning to attribute DEFAULT_ID, which was annotated with Final [final-error] - -ClassB.DEFAULT_ID = 0 # E: Cannot redefined value -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:93:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class ClassCChild overrides final class attribute BORDER_WIDTH, defined in base class ClassC [final-error] - -class ClassCChild(ClassC): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - BORDER_WIDTH = 2.5 # E: Cannot override Final value -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - __private = 0 # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:107:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Type annotation for VALUE2 does not match type of assignment [annotation-type-mismatch] - - VALUE2: ClassVar[Final] = 1 # E: Final cannot be used with ClassVar - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:107:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Invalid use of typing.Final [final-error] - - VALUE2: ClassVar[Final] = 1 # E: Final cannot be used with ClassVar - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:107:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Invalid use of typing.Final [final-error] - - VALUE2: ClassVar[Final] = 1 # E: Final cannot be used with ClassVar - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:107:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Invalid type annotation 'ClassVar[Final]' [invalid-annotation] - - VALUE2: ClassVar[Final] = 1 # E: Final cannot be used with ClassVar - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:108:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in ClassD: Type annotation for VALUE3 does not match type of assignment [annotation-type-mismatch] - - VALUE3: Final[ClassVar] = 1 # E: Final cannot be used with ClassVar - \u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:118:4: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid use of typing.Final [final-error] - -x: list[Final[int]] = [] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:118:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'list[Final[int]]' [invalid-annotation] - -x: list[Final[int]] = [] # E -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:121:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid use of typing.Final [final-error] - -def func1(x: Final[list[int]]) -> None: # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:134:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid keyword argument a to function N.__new__ [wrong-keyword-args] - -N(a=1) # E -\u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:135:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function N.__new__ was called with the wrong arguments [wrong-arg-types] - -N(x="", y="") # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:145:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Assigning to variable x, which was annotated with Final [final-error] - - x += 1 # E: cannot modify Final value - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:164:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't find module '_qualifiers_final_annotation_1'. [import-error] - -from _qualifiers_final_annotation_1 import TEN -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_annotation.py:168:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Can't find module '_qualifiers_final_annotation_2'. [import-error] - -from _qualifiers_final_annotation_2 import * -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 16: Expected 1 errors -Line 34: Expected 1 errors -Line 38: Expected 1 errors -Line 62: Expected 1 errors -Line 63: Expected 1 errors -Line 94: Expected 1 errors -Line 141: Expected 1 errors -Line 147: Expected 1 errors -Line 149: Expected 1 errors -Line 152: Expected 1 errors -Line 155: Expected 1 errors -Line 166: Expected 1 errors -Line 170: Expected 1 errors -Line 93: Unexpected errors ['qualifiers_final_annotation.py:93:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class ClassCChild overrides final class attribute BORDER_WIDTH, defined in base class ClassC [final-error]'] -Line 164: Unexpected errors ["qualifiers_final_annotation.py:164:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Can't find module '_qualifiers_final_annotation_1'. [import-error]"] -Line 168: Unexpected errors ["qualifiers_final_annotation.py:168:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Can't find module '_qualifiers_final_annotation_2'. [import-error]"] -""" diff --git a/conformance/results/pytype/qualifiers_final_decorator.toml b/conformance/results/pytype/qualifiers_final_decorator.toml deleted file mode 100644 index 3910ac781..000000000 --- a/conformance/results/pytype/qualifiers_final_decorator.toml +++ /dev/null @@ -1,265 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report error for overloaded @final method defined in stub file. -Does not report error for overload that is marked @final when implementation is not. -""" -output = """ -qualifiers_final_decorator.py:8:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Couldn't import pyi for '_qualifiers_final_decorator' [pyi-error] - -from _qualifiers_final_decorator import Base3, Base4 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:21:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Cannot subclass final class: Base1 [final-error] - -class Derived1(Base1): # E: Cannot inherit from final class "Base" -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:52:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method4: bad return type [bad-return-type] - - return 0 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:55:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class Derived2 overrides final method method4, defined in base class Base2 [final-error] - -class Derived2(Base2): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method1(self) -> None: # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @classmethod # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method2(cls) -> None: # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @staticmethod # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method3() -> None: # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: int) -> int: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: str) -> str: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def method4(self, x: int | str) -> int | str: # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return 0 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:55:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class Derived2 overrides final method method3, defined in base class Base2 [final-error] - -class Derived2(Base2): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method1(self) -> None: # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @classmethod # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method2(cls) -> None: # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @staticmethod # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method3() -> None: # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: int) -> int: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: str) -> str: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def method4(self, x: int | str) -> int | str: # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return 0 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:55:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class Derived2 overrides final method method2, defined in base class Base2 [final-error] - -class Derived2(Base2): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method1(self) -> None: # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @classmethod # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method2(cls) -> None: # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @staticmethod # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method3() -> None: # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: int) -> int: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: str) -> str: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def method4(self, x: int | str) -> int | str: # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return 0 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:55:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class Derived2 overrides final method method1, defined in base class Base2 [final-error] - -class Derived2(Base2): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method1(self) -> None: # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @classmethod # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method2(cls) -> None: # E[method2] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @staticmethod # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method3() -> None: # E[method3] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: int) -> int: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - @overload -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method4(self, x: str) -> str: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -\u001b[1m\u001b[31m\u001b[39m\u001b[0m - def method4(self, x: int | str) -> int | str: # E[method4] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - return 0 -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:76:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method4: bad return type [bad-return-type] - - return 0 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:90:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method: bad return type [bad-return-type] - - return 0 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:103:16: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in method: bad return type [bad-return-type] - - return 0 - \u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:117:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Class Derived5 overrides final method method, defined in base class Base5_2 [final-error] - -class Derived5(Base5_1, Base5_2): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - def method(self) -> None: # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:118:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in Derived5: Overriding method signature mismatch [signature-mismatch] - - def method(self) -> None: # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ... -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -qualifiers_final_decorator.py:125:2: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Cannot apply @final decorator to func1 [final-error] - -@final # E[func]: not allowed on non-method function. - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 56: Expected 1 errors -Lines 59, 60: Expected error (tag 'method2') -Lines 63, 64: Expected error (tag 'method3') -Lines 67, 75: Expected error (tag 'method4') -Lines 80, 89: Expected error (tag 'Derived3') -Lines 84, 85, 86: Expected error (tag 'Derived3-2') -Lines 94, 102: Expected error (tag 'Derived4') -Line 8: Unexpected errors ["qualifiers_final_decorator.py:8:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Couldn't import pyi for '_qualifiers_final_decorator' [pyi-error]"] -Line 52: Unexpected errors ['qualifiers_final_decorator.py:52:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method4: bad return type [bad-return-type]'] -Line 55: Unexpected errors ['qualifiers_final_decorator.py:55:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class Derived2 overrides final method method4, defined in base class Base2 [final-error]', 'qualifiers_final_decorator.py:55:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class Derived2 overrides final method method3, defined in base class Base2 [final-error]', 'qualifiers_final_decorator.py:55:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class Derived2 overrides final method method2, defined in base class Base2 [final-error]', 'qualifiers_final_decorator.py:55:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class Derived2 overrides final method method1, defined in base class Base2 [final-error]'] -Line 76: Unexpected errors ['qualifiers_final_decorator.py:76:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method4: bad return type [bad-return-type]'] -Line 90: Unexpected errors ['qualifiers_final_decorator.py:90:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method: bad return type [bad-return-type]'] -Line 103: Unexpected errors ['qualifiers_final_decorator.py:103:16: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in method: bad return type [bad-return-type]'] -Line 117: Unexpected errors ['qualifiers_final_decorator.py:117:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Class Derived5 overrides final method method, defined in base class Base5_2 [final-error]'] -""" diff --git a/conformance/results/pytype/specialtypes_any.toml b/conformance/results/pytype/specialtypes_any.toml deleted file mode 100644 index a339ad0a1..000000000 --- a/conformance/results/pytype/specialtypes_any.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/specialtypes_never.toml b/conformance/results/pytype/specialtypes_never.toml deleted file mode 100644 index 7a2318585..000000000 --- a/conformance/results/pytype/specialtypes_never.toml +++ /dev/null @@ -1,47 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand NoReturn or Never. -""" -output = """ -specialtypes_never.py:11:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet] - -T_co = TypeVar("T_co", covariant=True) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_never.py:21:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: bad return type [bad-return-type] - - sys.exit(1) \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - sys.exit(1) -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_never.py:68:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func6: Type annotation for v1 does not match type of assignment [annotation-type-mismatch] - - v1: int = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -specialtypes_never.py:69:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func6: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - - v2: str = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -specialtypes_never.py:70:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func6: Type annotation for v3 does not match type of assignment [annotation-type-mismatch] - - v3: list[str] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -specialtypes_never.py:86:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: Type annotation for v3 does not match type of assignment [annotation-type-mismatch] - - v3: list[int] = c # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 19: Expected 1 errors -Line 105: Expected 1 errors -Line 11: Unexpected errors ['specialtypes_never.py:11:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] -Line 21: Unexpected errors ['specialtypes_never.py:21:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: bad return type [bad-return-type]'] -Line 68: Unexpected errors ['specialtypes_never.py:68:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func6: Type annotation for v1 does not match type of assignment [annotation-type-mismatch]'] -Line 69: Unexpected errors ['specialtypes_never.py:69:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func6: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] -Line 70: Unexpected errors ['specialtypes_never.py:70:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func6: Type annotation for v3 does not match type of assignment [annotation-type-mismatch]'] -""" diff --git a/conformance/results/pytype/specialtypes_none.toml b/conformance/results/pytype/specialtypes_none.toml deleted file mode 100644 index 03a38e99d..000000000 --- a/conformance/results/pytype/specialtypes_none.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Partial" -notes = """ -Does not detect type incompatibility between None and type[None]. -Does not detect type incompatibility between None and incompatible protocol. -""" -output = """ -specialtypes_none.py:21:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function func1 was called with the wrong arguments [wrong-arg-types] - -func1(type(None)) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_none.py:41:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function func2 was called with the wrong arguments [wrong-arg-types] - -func2(None) # E: not compatible -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 27: Expected 1 errors -""" diff --git a/conformance/results/pytype/specialtypes_promotions.toml b/conformance/results/pytype/specialtypes_promotions.toml deleted file mode 100644 index 8380712e2..000000000 --- a/conformance/results/pytype/specialtypes_promotions.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Pass" -output = """ -specialtypes_promotions.py:13:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: No attribute 'numerator' on float [attribute-error] - - f.numerator # E - \u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/specialtypes_type.toml b/conformance/results/pytype/specialtypes_type.toml deleted file mode 100644 index 98f8ffbb2..000000000 --- a/conformance/results/pytype/specialtypes_type.toml +++ /dev/null @@ -1,83 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject Callable when passed to type[T]. -Does not allow access to known attributes from object of type `type[Any]`. -""" -output = """ -specialtypes_type.py:56:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function func4 was called with the wrong arguments [wrong-arg-types] - -func4(TeamUser) # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:64:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'T' [invalid-annotation] - -def func5(x: type[T]) -> None: -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:76:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'type[int, str]' [invalid-annotation] - -bad_type1: type[int, str] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:98:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: Any [assert-type] - - assert_type(a.__mro__, tuple[type, ...]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:102:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: Any [assert-type] - - assert_type(b.__mro__, tuple[type, ...]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:106:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: Any [assert-type] - - assert_type(c.__mro__, tuple[type, ...]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:110:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: Any [assert-type] - - assert_type(d.__mro__, tuple[type, ...]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:117:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: No attribute 'unknown' on type[object] [attribute-error] - - a.unknown # E - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:120:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: No attribute 'unknown' on type[object] [attribute-error] - - b.unknown # E - \u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:143:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'unknown' on type[type] [attribute-error] - -TA1.unknown # E -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:144:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'unknown' on type[type] [attribute-error] - -TA2.unknown # E -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:145:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'unknown' on type[type] [attribute-error] - -TA3.unknown # E -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -specialtypes_type.py:146:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : No attribute 'unknown' on type[type] [attribute-error] - -TA4.unknown # E -\u001b[1m\u001b[31m~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 70: Expected 1 errors -Line 64: Unexpected errors ["specialtypes_type.py:64:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'T' [invalid-annotation]"] -Line 98: Unexpected errors ['specialtypes_type.py:98:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func7: Any [assert-type]'] -Line 102: Unexpected errors ['specialtypes_type.py:102:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func7: Any [assert-type]'] -Line 106: Unexpected errors ['specialtypes_type.py:106:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func7: Any [assert-type]'] -Line 110: Unexpected errors ['specialtypes_type.py:110:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func7: Any [assert-type]'] -""" diff --git a/conformance/results/pytype/tuples_type_compat.toml b/conformance/results/pytype/tuples_type_compat.toml deleted file mode 100644 index d7c191764..000000000 --- a/conformance/results/pytype/tuples_type_compat.toml +++ /dev/null @@ -1,318 +0,0 @@ -conformant = "Partial" -notes = """ -Does not support unpacked tuple forms. -Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`. -Does not support tuple narrowing based on `len()` type guard (optional). -""" -output = """ -tuples_type_compat.py:15:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - - v2: tuple[int, int] = t1 # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:22:31: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(t1: tuple[int], t2: tuple[int, *tuple[int, ...]], t3: tuple[int, ...]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:27:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Invalid type annotation 'tuple[int, *tuple[int, ...]]' [invalid-annotation] - - v2: tuple[int, *tuple[int, ...]] - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:47:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Invalid type annotation 'tuple[int, *tuple[str, ...]]' [invalid-annotation] - - v6: tuple[int, *tuple[str, ...]] = t3 # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:70:56: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -Func5Input: TypeAlias = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:75:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: tuple [assert-type] - - assert_type(val, tuple[int]) # E[func5_1] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:80:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: tuple [assert-type] - - assert_type(val, tuple[str, str] | tuple[int, int]) # E[func5_2] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:85:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func5: tuple [assert-type] - - assert_type(val, tuple[int, str, int]) # E[func5_3] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:94:56: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -Func6Input: TypeAlias = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:126:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: tuple[Union[int, str], Union[int, str]] [assert-type] - - assert_type(subj, tuple[int | str, str]) # E[func7_1] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:129:13: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func7: tuple[Union[int, str], Union[int, str]] [assert-type] - - assert_type(subj, tuple[int | str, int]) # E[func7_2] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:147:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - - t1: tuple[complex, list[int]], t2: tuple[int, *tuple[str, ...]], t3: tuple[()] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:152:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: Sequence [assert-type] - - assert_type(test_seq(t2), Sequence[int | str]) # Could be Sequence[object] - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:153:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func8: Sequence [assert-type] - - assert_type(test_seq(t3), Sequence[Never]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:156:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t1 does not match type of assignment [annotation-type-mismatch] - -t1: tuple[int, *tuple[str]] = (1, "") # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:156:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[int, *tuple[str]]' [invalid-annotation] - -t1: tuple[int, *tuple[str]] = (1, "") # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:156:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t1: tuple[int, *tuple[str]] = (1, "") # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:157:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t1 does not match type of assignment [annotation-type-mismatch] - -t1 = (1, "", "") # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:159:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[int, *tuple[str, ...]]' [invalid-annotation] - -t2: tuple[int, *tuple[str, ...]] = (1,) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:159:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t2: tuple[int, *tuple[str, ...]] = (1,) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:160:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch] - -t2 = (1, "") # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:161:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch] - -t2 = (1, "", "") # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:162:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch] - -t2 = (1, 1, "") # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:163:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch] - -t2 = (1, "", 1) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:166:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch] - -t3: tuple[int, *tuple[str, ...], int] = (1, 2) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:166:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[int, *tuple[str, ...], int]' [invalid-annotation] - -t3: tuple[int, *tuple[str, ...], int] = (1, 2) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:166:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t3: tuple[int, *tuple[str, ...], int] = (1, 2) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:167:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch] - -t3 = (1, "", 2) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:168:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch] - -t3 = (1, "", "", 2) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:169:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch] - -t3 = (1, "", "") # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:170:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch] - -t3 = (1, "", "", 1.2) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:172:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[*tuple[str, ...], int]' [invalid-annotation] - -t4: tuple[*tuple[str, ...], int] = (1,) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:172:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t4: tuple[*tuple[str, ...], int] = (1,) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_compat.py:173:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch] - -t4 = ("", 1) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:174:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch] - -t4 = ("", "", 1) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:175:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch] - -t4 = (1, "", 1) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:176:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch] - -t4 = ("", "", 1.2) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:180:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t1 does not match type of assignment [annotation-type-mismatch] - - t1: tuple[str, str, *tuple[int, ...]] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:180:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[str, str, *tuple[int, ...]]' [invalid-annotation] - - t1: tuple[str, str, *tuple[int, ...]] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:181:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t2 does not match type of assignment [annotation-type-mismatch] - - t2: tuple[str, str, *tuple[int]] = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:181:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[str, str, *tuple[int]]' [invalid-annotation] - - t2: tuple[str, str, *tuple[int]] = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:182:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t3 does not match type of assignment [annotation-type-mismatch] - - t3: tuple[str, *tuple[str, ...]] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:182:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[str, *tuple[str, ...]]' [invalid-annotation] - - t3: tuple[str, *tuple[str, ...]] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:183:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t4 does not match type of assignment [annotation-type-mismatch] - - t4: tuple[str, str, *tuple[str, ...]] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:183:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[str, str, *tuple[str, ...]]' [invalid-annotation] - - t4: tuple[str, str, *tuple[str, ...]] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:184:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t5 does not match type of assignment [annotation-type-mismatch] - - t5: tuple[str, str, str, *tuple[str, ...]] = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:184:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[str, str, str, *tuple[str, ...]]' [invalid-annotation] - - t5: tuple[str, str, str, *tuple[str, ...]] = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:185:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t6 does not match type of assignment [annotation-type-mismatch] - - t6: tuple[str, *tuple[int, ...], str] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:185:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[str, *tuple[int, ...], str]' [invalid-annotation] - - t6: tuple[str, *tuple[int, ...], str] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:186:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t7 does not match type of assignment [annotation-type-mismatch] - - t7: tuple[*tuple[str, ...], str] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:186:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[*tuple[str, ...], str]' [invalid-annotation] - - t7: tuple[*tuple[str, ...], str] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:187:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t8 does not match type of assignment [annotation-type-mismatch] - - t8: tuple[*tuple[str, ...], str] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:187:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[*tuple[str, ...], str]' [invalid-annotation] - - t8: tuple[*tuple[str, ...], str] = a # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:188:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Type annotation for t9 does not match type of assignment [annotation-type-mismatch] - - t9: tuple[*tuple[str, ...], str, str, str] = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_compat.py:188:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func9: Invalid type annotation 'tuple[*tuple[str, ...], str, str, str]' [invalid-annotation] - - t9: tuple[*tuple[str, ...], str, str, str] = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -Line 32: Expected 1 errors -Line 33: Expected 1 errors -Line 43: Expected 1 errors -Line 62: Expected 1 errors -Lines 101, 102: Expected error (tag 'func6_1') -Lines 106, 107: Expected error (tag 'func6_2') -Lines 111, 112: Expected error (tag 'func6_3') -Line 22: Unexpected errors ["tuples_type_compat.py:22:31: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 27: Unexpected errors ["tuples_type_compat.py:27:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: Invalid type annotation 'tuple[int, *tuple[int, ...]]' [invalid-annotation]"] -Line 47: Unexpected errors ["tuples_type_compat.py:47:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: Invalid type annotation 'tuple[int, *tuple[str, ...]]' [invalid-annotation]"] -Line 70: Unexpected errors ["tuples_type_compat.py:70:56: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 94: Unexpected errors ["tuples_type_compat.py:94:56: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 147: Unexpected errors ["tuples_type_compat.py:147:40: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 152: Unexpected errors ['tuples_type_compat.py:152:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func8: Sequence [assert-type]'] -Line 153: Unexpected errors ['tuples_type_compat.py:153:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func8: Sequence [assert-type]'] -Line 156: Unexpected errors ['tuples_type_compat.py:156:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t1 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:156:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[int, *tuple[str]]' [invalid-annotation]", "tuples_type_compat.py:156:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 159: Unexpected errors ["tuples_type_compat.py:159:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[int, *tuple[str, ...]]' [invalid-annotation]", "tuples_type_compat.py:159:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 160: Unexpected errors ['tuples_type_compat.py:160:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] -Line 161: Unexpected errors ['tuples_type_compat.py:161:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] -Line 166: Unexpected errors ['tuples_type_compat.py:166:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:166:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[int, *tuple[str, ...], int]' [invalid-annotation]", "tuples_type_compat.py:166:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 167: Unexpected errors ['tuples_type_compat.py:167:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]'] -Line 168: Unexpected errors ['tuples_type_compat.py:168:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]'] -Line 172: Unexpected errors ["tuples_type_compat.py:172:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[*tuple[str, ...], int]' [invalid-annotation]", "tuples_type_compat.py:172:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 173: Unexpected errors ['tuples_type_compat.py:173:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch]'] -Line 174: Unexpected errors ['tuples_type_compat.py:174:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch]'] -Line 180: Unexpected errors ['tuples_type_compat.py:180:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Type annotation for t1 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:180:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Invalid type annotation 'tuple[str, str, *tuple[int, ...]]' [invalid-annotation]"] -Line 182: Unexpected errors ['tuples_type_compat.py:182:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Type annotation for t3 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:182:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Invalid type annotation 'tuple[str, *tuple[str, ...]]' [invalid-annotation]"] -Line 183: Unexpected errors ['tuples_type_compat.py:183:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Type annotation for t4 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:183:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Invalid type annotation 'tuple[str, str, *tuple[str, ...]]' [invalid-annotation]"] -Line 185: Unexpected errors ['tuples_type_compat.py:185:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Type annotation for t6 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:185:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Invalid type annotation 'tuple[str, *tuple[int, ...], str]' [invalid-annotation]"] -Line 186: Unexpected errors ['tuples_type_compat.py:186:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Type annotation for t7 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:186:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Invalid type annotation 'tuple[*tuple[str, ...], str]' [invalid-annotation]"] -Line 187: Unexpected errors ['tuples_type_compat.py:187:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Type annotation for t8 does not match type of assignment [annotation-type-mismatch]', "tuples_type_compat.py:187:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func9: Invalid type annotation 'tuple[*tuple[str, ...], str]' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/tuples_type_form.toml b/conformance/results/pytype/tuples_type_form.toml deleted file mode 100644 index 8ecf9d221..000000000 --- a/conformance/results/pytype/tuples_type_form.toml +++ /dev/null @@ -1,71 +0,0 @@ -conformant = "Pass" -output = """ -tuples_type_form.py:12:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t1 does not match type of assignment [annotation-type-mismatch] - -t1 = (1, 2) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_form.py:14:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch] - -t2 = (1,) # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_form.py:15:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch] - -t2 = (1, "") # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_type_form.py:25:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t10 does not match type of assignment [annotation-type-mismatch] - -t10 = (1,) # E -\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -tuples_type_form.py:36:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for t20 does not match type of assignment [annotation-type-mismatch] - -t20 = (1, 2, 3, "") # E -\u001b[1m\u001b[31m~~~\u001b[39m\u001b[0m - -tuples_type_form.py:40:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[int, int, Any]' [invalid-annotation] - -t31: tuple[int, int, ...] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_form.py:41:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Ellipsis' [invalid-annotation] - -t32: tuple[...] # E - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_form.py:42:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[Any, int]' [invalid-annotation] - -t33: tuple[..., int] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_form.py:42:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Ellipsis' [invalid-annotation] - -t33: tuple[..., int] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_form.py:43:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[int, Any, int]' [invalid-annotation] - -t34: tuple[int, ..., int] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_form.py:43:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'Ellipsis' [invalid-annotation] - -t34: tuple[int, ..., int] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_form.py:44:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t35: tuple[*tuple[str], ...] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_type_form.py:45:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t36: tuple[*tuple[str, ...], ...] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/tuples_unpacked.toml b/conformance/results/pytype/tuples_unpacked.toml deleted file mode 100644 index 1b2f6febd..000000000 --- a/conformance/results/pytype/tuples_unpacked.toml +++ /dev/null @@ -1,167 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support `typing.Unpack`. -Does not support unpacked tuples within a tuple type form. -""" -output = """ -tuples_unpacked.py:13:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.Unpack not supported yet [not-supported-yet] - -from typing import TypeVarTuple, Unpack, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:13:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet] - -from typing import TypeVarTuple, Unpack, assert_type -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:16:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func1(x: tuple[int, *tuple[bool, bool], str]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:17:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: tuple[Any] [assert-type] - - assert_type(x, tuple[int, bool, bool, str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:18:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Invalid type annotation '' [invalid-annotation] - - assert_type(x, tuple[*tuple[int, bool], bool, str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:19:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Invalid type annotation '' [invalid-annotation] - - assert_type(x, tuple[int, bool, *tuple[bool, str]]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:25:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func2(x: tuple[int, *tuple[bool, ...], str]): - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:26:20: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Invalid type annotation '' [invalid-annotation] - - assert_type(x, tuple[int, *tuple[bool, ...], str]) - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:31:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for u1 does not match type of assignment [annotation-type-mismatch] - -u1: tuple[*tuple[int], *tuple[int]] = (int(1), int(1)) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_unpacked.py:31:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation 'tuple[*tuple[int], *tuple[int]]' [invalid-annotation] - -u1: tuple[*tuple[int], *tuple[int]] = (int(1), int(1)) # OK -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_unpacked.py:31:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -u1: tuple[*tuple[int], *tuple[int]] = (int(1), int(1)) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:31:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -u1: tuple[*tuple[int], *tuple[int]] = (int(1), int(1)) # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:32:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : tuple[Any] [assert-type] - -assert_type(u1, tuple[int, int]) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:33:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -u2: tuple[*tuple[int, ...], *tuple[int]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:33:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -u2: tuple[*tuple[int, ...], *tuple[int]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:38:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t1: tuple[*tuple[str], *tuple[str]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:38:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -t1: tuple[*tuple[str], *tuple[str]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:39:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t2: tuple[*tuple[str, *tuple[str, ...]]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:39:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t2: tuple[*tuple[str, *tuple[str, ...]]] # OK - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:40:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t3: tuple[*tuple[str, ...], *tuple[int, ...]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:40:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -t3: tuple[*tuple[str, ...], *tuple[int, ...]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:41:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t4: tuple[*tuple[str, *tuple[str, ...]], *tuple[int, ...]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:41:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -t4: tuple[*tuple[str, *tuple[str, ...]], *tuple[int, ...]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:41:11: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types] - -t4: tuple[*tuple[str, *tuple[str, ...]], *tuple[int, ...]] # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:46:6: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count] - -Ts = TypeVarTuple("Ts") - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:49:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid type annotation '' [invalid-annotation] - -def func3(t: tuple[*Ts]): - \u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m - -tuples_unpacked.py:50:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Invalid type annotation 'tuple[*tuple[str], *Ts]' [invalid-annotation] - - t5: tuple[*tuple[str], *Ts] # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -tuples_unpacked.py:51:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func3: Invalid type annotation 'tuple[*tuple[str, ...], *Ts]' [invalid-annotation] - - t6: tuple[*tuple[str, ...], *Ts] # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 59: Expected 1 errors -Lines 60, 61: Expected error (tag 't14') -Line 13: Unexpected errors ['tuples_unpacked.py:13:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.Unpack not supported yet [not-supported-yet]', 'tuples_unpacked.py:13:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.TypeVarTuple not supported yet [not-supported-yet]'] -Line 16: Unexpected errors ["tuples_unpacked.py:16:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 17: Unexpected errors ['tuples_unpacked.py:17:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: tuple[Any] [assert-type]'] -Line 18: Unexpected errors ["tuples_unpacked.py:18:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Invalid type annotation '' [invalid-annotation]"] -Line 19: Unexpected errors ["tuples_unpacked.py:19:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Invalid type annotation '' [invalid-annotation]"] -Line 25: Unexpected errors ["tuples_unpacked.py:25:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 26: Unexpected errors ["tuples_unpacked.py:26:20: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: Invalid type annotation '' [invalid-annotation]"] -Line 31: Unexpected errors ['tuples_unpacked.py:31:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for u1 does not match type of assignment [annotation-type-mismatch]', "tuples_unpacked.py:31:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation 'tuple[*tuple[int], *tuple[int]]' [invalid-annotation]", "tuples_unpacked.py:31:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", 'tuples_unpacked.py:31:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] -Line 32: Unexpected errors ['tuples_unpacked.py:32:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : tuple[Any] [assert-type]'] -Line 33: Unexpected errors ["tuples_unpacked.py:33:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", 'tuples_unpacked.py:33:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] -Line 38: Unexpected errors ["tuples_unpacked.py:38:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", 'tuples_unpacked.py:38:11: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] -Line 39: Unexpected errors ["tuples_unpacked.py:39:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]", "tuples_unpacked.py:39:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 46: Unexpected errors ['tuples_unpacked.py:46:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 49: Unexpected errors ["tuples_unpacked.py:49:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid type annotation '' [invalid-annotation]"] -Line 50: Unexpected errors ["tuples_unpacked.py:50:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func3: Invalid type annotation 'tuple[*tuple[str], *Ts]' [invalid-annotation]"] -""" diff --git a/conformance/results/pytype/typeddicts_alt_syntax.toml b/conformance/results/pytype/typeddicts_alt_syntax.toml deleted file mode 100644 index 62574fb06..000000000 --- a/conformance/results/pytype/typeddicts_alt_syntax.toml +++ /dev/null @@ -1,25 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of variable as second argument to `TypedDict` call. -Does not report when name of TypedDict doesn't match assigned identifier name. -Does not support keyword-argument form of alternative syntax (deprecated in 3.11). -""" -output = """ -typeddicts_alt_syntax.py:27:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function typing.TypedDict was called with the wrong arguments [wrong-arg-types] - -BadTypedDict2 = TypedDict("BadTypedDict2", {1: str}) # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_alt_syntax.py:41:10: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Function typing.TypedDict expects 2 arg(s), got 3 [wrong-arg-count] - -Movie2 = TypedDict("Movie2", name=str, year=int) # E? - \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 23: Expected 1 errors -Line 31: Expected 1 errors -Line 35: Expected 1 errors -Line 45: Expected 1 errors -""" diff --git a/conformance/results/pytype/typeddicts_class_syntax.toml b/conformance/results/pytype/typeddicts_class_syntax.toml deleted file mode 100644 index d3a7ae736..000000000 --- a/conformance/results/pytype/typeddicts_class_syntax.toml +++ /dev/null @@ -1,26 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject methods within TypedDict class. -Does not report when metaclass is provided. -Does not report when other keyword argument is provided. -""" -output = """ -typeddicts_class_syntax.py:57:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: Generic[T] [base-class-error] - -class GenericTypedDict(TypedDict, Generic[T]): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - name: str -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - value: T -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -Line 44: Expected 1 errors -Line 49: Expected 1 errors -Lines 33, 34: Expected error (tag 'method2') -Lines 38, 39: Expected error (tag 'method3') -Line 57: Unexpected errors ['typeddicts_class_syntax.py:57:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: Generic[T] [base-class-error]'] -""" diff --git a/conformance/results/pytype/typeddicts_final.toml b/conformance/results/pytype/typeddicts_final.toml deleted file mode 100644 index a339ad0a1..000000000 --- a/conformance/results/pytype/typeddicts_final.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/typeddicts_inheritance.toml b/conformance/results/pytype/typeddicts_inheritance.toml deleted file mode 100644 index ca9002699..000000000 --- a/conformance/results/pytype/typeddicts_inheritance.toml +++ /dev/null @@ -1,27 +0,0 @@ -conformant = "Pass" -output = """ -typeddicts_inheritance.py:44:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: NonTypedDict [base-class-error] - -class BadTypedDict(TypedDict, NonTypedDict): # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - pass -\u001b[1m\u001b[31m~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_inheritance.py:54:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: X1 [base-class-error] - -class Y1(X1): # E[Y1] -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - x: int # E[Y1]: cannot overwrite TypedDict field "x" -\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_inheritance.py:65:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: Y2 [base-class-error] - -class XYZ2(X2, Y2): # E: cannot overwrite TypedDict field "x" while merging -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - xyz: bool -\u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pytype/typeddicts_operations.toml b/conformance/results/pytype/typeddicts_operations.toml deleted file mode 100644 index a01d0edeb..000000000 --- a/conformance/results/pytype/typeddicts_operations.toml +++ /dev/null @@ -1,45 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report type violation with TypedDict value assignment. -Does not report reference to unknown key in TypedDict. -Does not reject `clear` method on TypedDict with required keys. -Does not reject delete operation for required key in TypedDict. -""" -output = """ -typeddicts_operations.py:28:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for movie does not match type of assignment [annotation-type-mismatch] - -movie = {"name": "Blade Runner"} # E: year is missing -\u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -typeddicts_operations.py:29:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for movie does not match type of assignment [annotation-type-mismatch] - -movie = {"name": "Blade Runner", "year": 1982.1} # E: year is wrong type -\u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -typeddicts_operations.py:32:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for movie does not match type of assignment [annotation-type-mismatch] - -movie = {"name": "", "year": 1900, "other": 2} # E: extra key -\u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -typeddicts_operations.py:37:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for movie does not match type of assignment [annotation-type-mismatch] - - movie: Movie = {variable_key: "", "year": 1900} # E: variable key - \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m - -typeddicts_operations.py:60:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : str [assert-type] - -assert_type(movie_optional.get("name"), str | None) -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 22: Expected 1 errors -Line 23: Expected 1 errors -Line 24: Expected 1 errors -Line 26: Expected 1 errors -Line 47: Expected 1 errors -Line 49: Expected 1 errors -Line 62: Expected 1 errors -Line 60: Unexpected errors ['typeddicts_operations.py:60:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : str [assert-type]'] -""" diff --git a/conformance/results/pytype/typeddicts_readonly.toml b/conformance/results/pytype/typeddicts_readonly.toml deleted file mode 100644 index fdf00b964..000000000 --- a/conformance/results/pytype/typeddicts_readonly.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Unsupported" -output = """ -typeddicts_readonly.py:8:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet] - -from typing_extensions import ReadOnly -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Expected 1 errors -Line 36: Expected 1 errors -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 60: Expected 1 errors -Line 61: Expected 1 errors -Line 8: Unexpected errors ['typeddicts_readonly.py:8:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/typeddicts_readonly_consistency.toml b/conformance/results/pytype/typeddicts_readonly_consistency.toml deleted file mode 100644 index 466a0505e..000000000 --- a/conformance/results/pytype/typeddicts_readonly_consistency.toml +++ /dev/null @@ -1,35 +0,0 @@ -conformant = "Unsupported" -output = """ -typeddicts_readonly_consistency.py:8:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet] - -from typing_extensions import ReadOnly -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_consistency.py:34:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for v1 does not match type of assignment [annotation-type-mismatch] - - v1: A1 = b # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -typeddicts_readonly_consistency.py:35:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] - - v2: A1 = c # OK - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -typeddicts_readonly_consistency.py:40:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Type annotation for v5 does not match type of assignment [annotation-type-mismatch] - - v5: C1 = a # E - \u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 37: Expected 1 errors -Line 38: Expected 1 errors -Line 81: Expected 1 errors -Line 82: Expected 1 errors -Line 84: Expected 1 errors -Line 85: Expected 1 errors -Line 8: Unexpected errors ['typeddicts_readonly_consistency.py:8:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] -Line 34: Unexpected errors ['typeddicts_readonly_consistency.py:34:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Type annotation for v1 does not match type of assignment [annotation-type-mismatch]'] -Line 35: Unexpected errors ['typeddicts_readonly_consistency.py:35:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] -""" diff --git a/conformance/results/pytype/typeddicts_readonly_inheritance.toml b/conformance/results/pytype/typeddicts_readonly_inheritance.toml deleted file mode 100644 index c8e735abb..000000000 --- a/conformance/results/pytype/typeddicts_readonly_inheritance.toml +++ /dev/null @@ -1,134 +0,0 @@ -conformant = "Unsupported" -output = """ -typeddicts_readonly_inheritance.py:8:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet] - -from typing_extensions import ReadOnly -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:18:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: NamedDict [base-class-error] - -class Album1(NamedDict): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - name: str -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - year: int -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:47:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: AlbumCollection [base-class-error] - -class RecordShop(AlbumCollection): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - name: str -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - albums: ReadOnly[list[Album1]] # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - alt: ReadOnly[list[str]] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:47:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: AlbumCollection [base-class-error] - -class RecordShop(AlbumCollection): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - name: str -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - albums: ReadOnly[list[Album1]] # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - alt: ReadOnly[list[str]] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:61:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: OptionalName [base-class-error] - -class RequiredName(OptionalName): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - name: ReadOnly[Required[str]] # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:65:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for d does not match type of assignment [annotation-type-mismatch] - -d: RequiredName = {} # E -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:75:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: OptionalIdent [base-class-error] - -class User(OptionalIdent): -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - ident: str # Required, mutable, and not an int -\u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:83:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for u does not match type of assignment [annotation-type-mismatch] - -u = {"ident": 3} # E -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:84:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for u does not match type of assignment [annotation-type-mismatch] - -u = {} # E -\u001b[1m\u001b[31m~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:93:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: F1 [base-class-error] - -class F3(F1): -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - a: ReadOnly[int] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:97:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: F1 [base-class-error] - -class F4(F1): -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - a: NotRequired[int] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:101:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: F1 [base-class-error] - -class F5(F1): -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - b: ReadOnly[Required[int]] # OK -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:105:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: F1 [base-class-error] - -class F6(F1): -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - c: ReadOnly[NotRequired[int]] # E -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:119:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: TD_A2 [base-class-error] - -class TD_A(TD_A1, TD_A2): ... # E: x is incompatible -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:119:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: TD_A2 [base-class-error] - -class TD_A(TD_A1, TD_A2): ... # E: x is incompatible -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:132:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: TD_B2 [base-class-error] - -class TD_B(TD_B1, TD_B2): ... # E: x is incompatible -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_inheritance.py:132:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Invalid base class: TD_B2 [base-class-error] - -class TD_B(TD_B1, TD_B2): ... # E: x is incompatible -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 36: Expected 1 errors -Line 50: Expected 1 errors -Line 82: Expected 1 errors -Line 94: Expected 1 errors -Line 98: Expected 1 errors -Line 106: Expected 1 errors -Line 8: Unexpected errors ['typeddicts_readonly_inheritance.py:8:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] -Line 18: Unexpected errors ['typeddicts_readonly_inheritance.py:18:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: NamedDict [base-class-error]'] -Line 47: Unexpected errors ['typeddicts_readonly_inheritance.py:47:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: AlbumCollection [base-class-error]', 'typeddicts_readonly_inheritance.py:47:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: AlbumCollection [base-class-error]'] -Line 61: Unexpected errors ['typeddicts_readonly_inheritance.py:61:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: OptionalName [base-class-error]'] -Line 75: Unexpected errors ['typeddicts_readonly_inheritance.py:75:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: OptionalIdent [base-class-error]'] -Line 93: Unexpected errors ['typeddicts_readonly_inheritance.py:93:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: F1 [base-class-error]'] -Line 97: Unexpected errors ['typeddicts_readonly_inheritance.py:97:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: F1 [base-class-error]'] -Line 101: Unexpected errors ['typeddicts_readonly_inheritance.py:101:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: F1 [base-class-error]'] -Line 105: Unexpected errors ['typeddicts_readonly_inheritance.py:105:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Invalid base class: F1 [base-class-error]'] -""" diff --git a/conformance/results/pytype/typeddicts_readonly_kwargs.toml b/conformance/results/pytype/typeddicts_readonly_kwargs.toml deleted file mode 100644 index d9462a9c7..000000000 --- a/conformance/results/pytype/typeddicts_readonly_kwargs.toml +++ /dev/null @@ -1,23 +0,0 @@ -conformant = "Unsupported" -output = """ -typeddicts_readonly_kwargs.py:8:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing.Unpack not supported yet [not-supported-yet] - -from typing import Protocol, TypedDict, Unpack -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_kwargs.py:9:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet] - -from typing_extensions import ReadOnly -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_readonly_kwargs.py:33:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in impl: New container type for kwargs does not match type annotation [container-type-mismatch] - - kwargs["key1"] = 3 # E - \u001b[1m\u001b[31m~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 8: Unexpected errors ['typeddicts_readonly_kwargs.py:8:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing.Unpack not supported yet [not-supported-yet]'] -Line 9: Unexpected errors ['typeddicts_readonly_kwargs.py:9:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/typeddicts_readonly_update.toml b/conformance/results/pytype/typeddicts_readonly_update.toml deleted file mode 100644 index 081375bd7..000000000 --- a/conformance/results/pytype/typeddicts_readonly_update.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Unsupported" -output = """ -typeddicts_readonly_update.py:9:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet] - -from typing_extensions import ReadOnly -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 23: Expected 1 errors -Line 9: Unexpected errors ['typeddicts_readonly_update.py:9:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] -""" diff --git a/conformance/results/pytype/typeddicts_required.toml b/conformance/results/pytype/typeddicts_required.toml deleted file mode 100644 index ff1737fd6..000000000 --- a/conformance/results/pytype/typeddicts_required.toml +++ /dev/null @@ -1,16 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of `Required` in non-TypedDict class. -Does not reject use of `Required` in function parameter annotation. -Does not reject nested use of `Required` in type annotation. -""" -output = """ -RecursionError: maximum recursion depth exceeded -""" -conformance_automated = "Fail" -errors_diff = """ -Line 12: Expected 1 errors -Line 19: Expected 1 errors -Line 62: Expected 1 errors -Line 63: Expected 1 errors -""" diff --git a/conformance/results/pytype/typeddicts_type_consistency.toml b/conformance/results/pytype/typeddicts_type_consistency.toml deleted file mode 100644 index f5be59879..000000000 --- a/conformance/results/pytype/typeddicts_type_consistency.toml +++ /dev/null @@ -1,38 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report some type violations for TypedDict type compatibility. -Incorrectly reports type violation in cases where there is none. -Does not report type incompatibility between TypedDict and `dict[str, Any]`. -""" -output = """ -typeddicts_type_consistency.py:62:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for a3 does not match type of assignment [annotation-type-mismatch] - -a3: A3 = b3 -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -typeddicts_type_consistency.py:65:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for b3 does not match type of assignment [annotation-type-mismatch] - -b3 = a3 # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -typeddicts_type_consistency.py:69:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for a3_1 does not match type of assignment [annotation-type-mismatch] - -a3_1: A3 = {"x": 0, "y": 0} # E -\u001b[1m\u001b[31m~~~~\u001b[39m\u001b[0m - -typeddicts_type_consistency.py:126:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for o2 does not match type of assignment [annotation-type-mismatch] - -o2: Outer1 = {"outer_key": {"inner_key": {"inner_key": 1}}} # E -\u001b[1m\u001b[31m~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 21: Expected 1 errors -Line 38: Expected 1 errors -Line 76: Expected 1 errors -Line 77: Expected 1 errors -Line 78: Expected 1 errors -Line 82: Expected 1 errors -Line 62: Unexpected errors ['typeddicts_type_consistency.py:62:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in : Type annotation for a3 does not match type of assignment [annotation-type-mismatch]'] -""" diff --git a/conformance/results/pytype/typeddicts_usage.toml b/conformance/results/pytype/typeddicts_usage.toml deleted file mode 100644 index 09e50f725..000000000 --- a/conformance/results/pytype/typeddicts_usage.toml +++ /dev/null @@ -1,27 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report errant use of TypedDict in `isinstance` call. -Does not reject use of TypedDict as TypeVar bound. -""" -output = """ -typeddicts_usage.py:23:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : TypedDict Movie does not contain key director [typed-dict-error] - -movie["director"] = "Ridley Scott" # E: invalid key 'director' -\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_usage.py:24:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for key year in TypedDict Movie does not match type of assignment [annotation-type-mismatch] - -movie["year"] = "1982" # E: invalid value type ("int" expected) -\u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m - -typeddicts_usage.py:28:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in : Type annotation for movie2 does not match type of assignment [annotation-type-mismatch] - -movie2: Movie = {"title": "Blade Runner", "year": 1982} # E -\u001b[1m\u001b[31m~~~~~~\u001b[39m\u001b[0m - -""" -conformance_automated = "Fail" -errors_diff = """ -Line 35: Expected 1 errors -Line 40: Expected 1 errors -""" diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml deleted file mode 100644 index 22d96d6b1..000000000 --- a/conformance/results/pytype/version.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "pytype 2024.10.11" -test_duration = 33.6 diff --git a/conformance/results/results.html b/conformance/results/results.html index c36fa49aa..b881e2373 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -159,899 +159,759 @@

Python Type System Conformance Test Results

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
mypy 1.15.0
-
1.8sec
+
1.5sec
pyright 1.1.400
1.1sec
pyre 0.9.23
-
9.8sec
-
pytype 2024.10.11
-
33.6sec
+
10.7sec
+
Type annotations
     annotations_coroutines Pass Pass PassPass
     annotations_forward_refs
Partial

Does not report error for a forward reference that is not enclosed in quotes.

Does not report error for use of quoted type with "|" operator (runtime error).

Incorrectly generates error for quoted type defined in class scope.

Pass
Partial

Does not report error for a forward reference that is not enclosed in quotes.

Does not report error for use of quoted type with "|" operator (runtime error).

Does not reject f-string in quoted type annotation.

Incorrectly generates error for quoted type defined in class scope.

Does not generate error for unquoted type defined in class scope.

Does not treat triple-quoted forward reference annotation as implicitly parenthesized.

Partial

Does not reject some illegal type expression forms when quoted.

Incorrectly generates error for quoted type defined in class scope.

Evaluates incorrect type for class variable annotated with quoted type expression.

Does not treat triple-quoted forward reference annotation as implicitly parenthesized.

     annotations_generators
Partial

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

Pass
Partial

Does not report invalid return type for generator when function implicitly returns None.

Incorrectly evaluates type of call to async generator.

Partial

Does not report invalid return type for generator when function implicitly returns None.

Reports invalid error when return type of generator is annotated as a compatible protocol.

Does not report type violation in `yield from` statement.

     annotations_methods
Pass*

Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.

Pass*

Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.

Pass*

Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.

Pass*

Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.

     annotations_typeexpr Pass Pass Pass
Partial

Does not reject call expressions in type annotation.

Does not reject call lambda expression in type annotation.

Does not reject list expression in type annotation.

Does not reject ternary expression in type annotation.

Does not reject f-string in type annotation.

Does not reject module in type annotation.

+
Special types in annotations
     specialtypes_any Pass Pass PassPass
     specialtypes_never Pass Pass
Partial

Does not treat Never as compatible with all other types.

Unsupported

Does not understand NoReturn or Never.

     specialtypes_none Pass Pass Pass
Partial

Does not detect type incompatibility between None and type[None].

Does not detect type incompatibility between None and incompatible protocol.

     specialtypes_promotions Pass Pass
Partial

Does not reject use of attribute that is compatible only with float.

Pass
     specialtypes_type
Partial

Does not treat `type` same as `type[Any]` for assert_type.

Does not allow access to unknown attributes from object of type `type[Any]`.

Pass
Partial

Does not reject Callable when passed to type[T].

Does not treat `type` same as `type[Any]` for assert_type.

Does not allow access to unknown attributes from object of type `type[Any]`.

Does not reject access to unknown attributes from object of type `Type[object]`.

Reports type incompatibility between `type` and `Callable[..., Any]`.

Partial

Does not reject Callable when passed to type[T].

Does not allow access to known attributes from object of type `type[Any]`.

+
Generics
     generics_base_class
Partial

Does not detect inconsistent type variable ordering.

Pass
Partial

Does not reject illegal use of Generic.

Does not allow using generic in assert_type expression.

Does not detect inconsistent type variable ordering.

Partial

False negative on passing SymbolTable to dict[str, list[object]].

Does not reject illegal use of Generic.

Wrong type variable order when inheriting from multiple generic base classes.

     generics_basic Pass Pass
Partial

False positives in examples using constrained type variables.

False negative for constraint parameterized by a type variable.

False negative in custom map example.

False positive using `iter`.

False negative for bad type arguments to Generic/Protocol.

False negative for generic metaclass.

Partial

False positives in examples using constrained type variables.

Argument 'covariant' to TypeVar not supported.

False negative for type variables missing from Generic/Protocol base class.

False negative for generic metaclass.

     generics_defaults Partial Pass
Unsupported

Does not support generic defaults.

Unsupported
     generics_defaults_referential Partial Pass UnsupportedUnsupported
     generics_defaults_specialization Partial Pass
Unsupported

Does not support generic defaults.

Unsupported
     generics_paramspec_basic Pass Pass
Partial

Does not enforce name consistency for ParamSpec assigned to identifier.

Incorrectly reports error for legitimate use of ParamSpec in generic type alias.

Does not reject ParamSpec when used in various invalid locations.

Unsupported

Does not support ParamSpec.

     generics_paramspec_components Pass Pass
Partial

Does not report illegal use of "P.args" on normal parameter.

Does not report error when P.args is specified but P.kwargs is missing.

Does not report error when P is out of scope and P.args and P.kwargs is used.

Does not report error when calling callback defined with ParamSpec with incorrect arguments.

Does not report error when keyword argument is specified between P.args and P.kwargs.

Does not report error when calling callable and argument is missing for concatenated parameters.

Unsupported

Does not support ParamSpec.

     generics_paramspec_semantics Pass
Pass*

Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed).

Pass
Unsupported

Does not support ParamSpec.

     generics_paramspec_specialization Pass Pass
Partial

Reports error for legitimate use of `...` to specialize ParamSpec

Partial

Rejects valid specialization of ParamSpec using list expression.

Does not reject invalid specialization of class with both TypeVar and ParamSpec.

Reports error for valid method call involving ParamSpec.

     generics_scoping
Partial

False negative on generic class nested within generic class with same type variable.

Pass
Partial

False negative on generic class nested within generic function with same type variable.

False negative on generic class nested within generic class with same type variable.

False negative on assert_type uses.

Partial

Fails to reject type alias within generic class that uses class's type variable.

Fails to reject unbound type variable in constructor call in global scope.

     generics_self_advanced
Partial

Does not infer the type of an unannotated `self` parameter to be type `Self`.

Does not retain `Self` when calling method that returns `Self`.

Does not infer the type of an unannotated `cls` parameter to be type `type[Self]`.

Does not retain `Self` when accessing attribute through `type[Self]`.

Pass
Partial

Does not handle use of `Self` within class body correctly.

False negatives on assert_type uses.

Unsupported

Does not understand `Self` type.

     generics_self_attributes Pass Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_basic Pass Pass
Partial

Does not handle use of `Self` as a generic type.

Unsupported

Does not understand `Self` type.

     generics_self_protocols Pass Pass
Partial

Does not reject protocol compatibility due to method `Self` return type.

Partial

Does not reject protocol compatibility due to method `Self` return type.

     generics_self_usage Pass Pass
Partial

Complains in some cases when `self: Self` is used explicitly.

Does not complain when `Self` is used on a function outside any class definition.

Does not complain when `self` is annotated explicitly (without `Self`) and `Self` is returned.

Does not complain on inheritance involving `Self`.

Does not complain on use of `Self` in static methods.

Does not complain on use of `Self` in metaclasses.

Unsupported

Does not understand `Self` type.

     generics_syntax_compatibility Pass Pass
Partial

False negative on mixing legacy and PEP695 syntax.

Does not detect mixing legacy and PEP695 syntax in methods.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_declarations Pass Pass
Partial

Does not detect incorrect use of legacy style syntax mixed with PEP695 syntax.

False negatives due to assert_type use.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet support.

Pass
Partial

Incorrectly determines that a class cannot be instantiated with __getitem__.

Incorrectly handles mixing legacy and PEP695 syntax.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_scoping
Partial

Does not following runtime scoping rules for type parameters in all cases.

Pass
Partial

Does not properly handle mixing legacy syntax with PEP695 syntax.

Unsupported

Type parameter syntax not yet support.

     generics_type_erasure
Partial

Infers Node[Never] instead of Node[Any] when argument is not provided.

False negative on instance attribute access on type(node).

Partial

no error for `type(n1).label`

Partial

Missing error regarding `type(instance).generic_attribute`.

Partial

Does not erase unspecified type variables to `Any` prior to `assert_type` handling.

False negatives on instance attribute access on the type.

Does not infer type of `DefaultDict` with explicit type parameters on constructor.

False negatives on assert_type uses.

Unsupported
     generics_typevartuple_args
Partial

Does not enforce that tuples captured by TypeVarTuple are same type.

Pass
Partial

Does not property handle TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_basic
Partial

Does not enforce that tuples captured by TypeVarTuple are same length.

Does not enforce that tuples captured by TypeVarTuple are same type.

Pass
Partial

Does not support TypeVarTuple.

False negatives due to assert_type.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_callable Pass Pass
Partial

False negatives due to assert_type.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_concat Pass Pass
Partial

False negatives due to assert_type.

False compatability error message.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_overloads Pass Pass
Unsupported

Does not support star expressions for `Unpack`.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_specialization
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.

"More than one Unpack" error message has no line number.

Pass
Unsupported

Does not support star expressions for `Unpack`.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_unpack Pass Pass Pass
Unsupported

Does not support TypeVarTuple.

     generics_upper_bound
Partial

Does not reject use of type variable within an upper bound.

Pass
Partial

False positives on valid type expression (`list[T]`) in `bound`.

Does not complain when bound is used alongside type constraints.

Partial

Does not properly support assert_type.

     generics_variance
Partial

Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible.

Pass
Partial

Does not reject a TypeVar that is defined as both covariant and contravariant.

Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible.

Unsupported

Does not support covariant or contravariant TypeVars.

     generics_variance_inference Pass Pass
Partial

Does not properly handle mixing legacy and PEP695 syntax.

False negative about a type variable not being present in the function's parameters.

Unsupported

Type parameter syntax not yet support.

+
Type qualifiers
     qualifiers_annotated
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
Partial

Does not reject Annotated with a single parameter.

Does not reject call of Annotated with no type arguments.

Partial

Does not reject some illegal type expression forms used in Annotated.

Does not report type incompatibility between Annotated and type[T].

Does not reject call of Annotated.

Does not allow TypeVar to be used in type alias when wrapped with Annotated.

     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
Partial

Does not report Final variable with missing initialization in module scope.

Does not report error for invalid nesting of Final and ClassVar.

Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition.

Does not reject modification of imported variable declared Final.

Partial

Does not report Final variable with missing initialization.

Does not reject Final instance variable declared outside of __init__ method.

Does not reject modification of global variable declared Final.

Does not reject modification of local variable declared Final.

Does not reject modification of imported variable declared Final.

     qualifiers_final_decorator Pass Pass
Partial

Reports error for overloaded method implementation marked @final if its overloads do not.

Does not report error for overloaded @final method defined in stub file.

Reports misleading error when overload is marked @final but implementation is not.

Partial

Does not report error for overloaded @final method defined in stub file.

Does not report error for overload that is marked @final when implementation is not.

+
Class type compatibility
     classes_classvar
Partial

Internal error if TypeVarTuple is used in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Rejects ClassVar nested in Annotated.

Does not reject use of ClassVar in TypeAlias definition.

Pass
Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Does not reject use of ClassVar as a generic type argument.

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Does not infer type from initialization for bare ClassVar.

Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Does not reject use of ClassVar as a generic type argument.

Rejects initialization of ClassVar if no type argument is provided.

Does not infer ClassVar with no type argument and no assigned value as Any.

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Does not reject assignment of ClassVar through instance of class.

     classes_override
Partial

Does not handle case where parent class derives from Any.

Pass Pass
Unsupported

Does not yet support the @override decorator.

+
Type aliases
     aliases_explicit
Partial

Does not reject specialization of type alias that has already been implicitly specialized.

Pass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

Incorrectly evaluates generic type alias with ParamSpec with missing type argument.

Does not report some illegal annotation forms as invalid type aliases.

Does not report invalid specialization of generic type aliases.

Incorrectly rejects import alias of `TypeAlias` when used to define type alias.

Does not report invalid specialization of already-specialized generic type alias.

Partial

Incorrectly reports error for type alias defined with ParamSpec.

Does not report invalid specialization of generic type alias with bound TypeVar.

Incorrectly evaluates generic type alias with ParamSpec with missing type argument.

Does not report some illegal annotation forms as invalid type aliases.

Does not report invalid specialization of already-specialized generic type alias.

     aliases_implicit Pass Pass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

Incorrectly evaluates generic type alias with ParamSpec with missing type argument.

Does not report invalid specialization of generic type aliases.

Does not report error for attempt to instantiate union type alias.

Does not report invalid specialization of already-specialized generic type alias.

Partial

Incorrectly reports error for type alias defined with ParamSpec.

Does not report invalid specialization of generic type alias with bound TypeVar.

Incorrectly evaluates generic type alias with ParamSpec with missing type argument.

Allows some illegal annotation forms to be interpreted as valid type aliases.

Does not report invalid specialization of already-specialized generic type alias.

     aliases_newtype Pass Pass
Partial

Does not reject use of NewType in `isinstance` call.

Does not reject use of NewType in class definition statement.

Does not report inconsistency between name of NewType and assigned identifier name.

Does not reject use of NewType with generic class with TypeVar.

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

Partial

Does not reject use of NewType in `isinstance` call.

Does not reject use of NewType in class definition statement.

Does not report inconsistency between name of NewType and assigned identifier name.

Does not reject use of NewType with generic class with TypeVar.

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

     aliases_recursive Pass Pass
Partial

Does not properly handle some recursive type aliases.

Does not properly handle specialization of generic recursive type aliases.

Partial

Does not detect type violation for some deeply-nested types.

Does not properly handle `|` for unions in some recursive type alias definitions.

Does not detect cyclical references in recursive type alias definition.

     aliases_type_statement
Partial

Does not reject type alias defined in function scope.

Pass
Partial

Does not complain when a type alias cannot be used as a base class.

Does not complain when a type alias cannot be used as a function.

Does not complain when a type statement definition combines new and old TypeVars.

Does not complain when a type statement definition uses old TypeVars.

Does not properly support recursive aliases.

Unsupported

Does not support `type` statement.

     aliases_typealiastype
Partial

Incorrectly rejects some recursive type aliases using TypeAliasType.

Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.

Partial

incorrectly allows undefined self reference

Unsupported

Support for TypeAliasType is not implemented.

Partial

Incorrectly allows undefined self reference.

Unsupported

Support for TypeAliasType is not implemented.

     aliases_variance Pass Pass Pass
Unsupported

Does not detect variance incompatibility.

+
Literals
     literals_interactions
Partial

Does not narrow type of `x` with `x in Literal` type guard pattern.

Pass
Partial

Does not detect out-of-bound tuple literal index.

Does not perform exhaustiveness checks on enums.

Does not narrow type of `x` with `x in Literal` type guard pattern.

Does not narrow type of `x` with `x == Literal` type guard pattern.

Partial

Incorrectly rejects some legal Literal annotations.

Does not reject some illegal Literal annotations.

Does not use Literal to distinguish overloads.

Does not narrow based on `x is Literal` type guard pattern.

Does not narrow based on `x == Literal` type guard pattern.

     literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

Pass
Partial

Incorrectly infers `str` rather than `LiteralString` when literal string `join` is used.

Unsupported

Does not understand `LiteralString` special form.

     literals_parameterizations
Partial

Does not reject tuple within Literal.

Pass
Partial

Does not support type aliases in Literal type expression.

Does not support nested Literal type expression.

Does not reject tuple in Literal type expression.

Does not reject "bare" Literal in type expression.

Unsupported

Does not understand `Literal` type annotation.

     literals_semantics Pass Pass Pass
Unsupported

Does not understand `Literal` type annotation.

+
Protocols
     protocols_class_objects Pass Pass
Partial

Does not reject protocol class assigned to type[Proto].

Incorrectly reports some class objects as incompatible with a protocol.

Fails to report some class objects as incompatible with a protocol.

Partial

Does not reject protocol class assigned to type[Proto].

Incorrectly reports some class objects as incompatible with a protocol.

Fails to report some class objects as incompatible with a protocol.

     protocols_definition
Partial

Does not detect protocol mismatch if concrete method is missing annotations.

Does not detect protocol mismatch if concrete method's parameters are position-only.

Pass
Partial

Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar or vice versa.

Does not reject read-only property in concrete class when attribute in protocol is mutable.

Does not reject covariant attribute type when protocol attribute is mutable.

Does not reject read-only property in concrete class when protocol has settable property.

Does not reject immutable named tuple attribute in concrete class when protocol attribute is mutable.

Does not reject immutable frozen dataclass attribute in concrete class when protocol attribute is mutable.

Partial

Reports errors for protocol static method with "..." implementation.

Does not report error when instance variable is set through "self" access in protocol class.

Does not report protocol mismatch when concrete class has attribute with covariant type and protocol attribute is mutable.

Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar.

Does not reject read-only property in concrete class when attribute in protocol is mutable.

Does not reject covariant attribute type when protocol attribute is mutable.

Does not detect protocol mismatch if concrete method is missing annotations.

Does not detect protocol mismatch if concrete method's parameters are keyword-only.

Does not detect protocol mismatch if concrete method's parameters are position-only.

Does not detect protocol mismatch if concrete method is a classmethod.

Does not detect protocol mismatch if concrete method is a staticmethod.

Does not reject read-only property in concrete class when protocol has settable property.

Does not reject immutable named tuple attribute in concrete class when protocol attribute is mutable.

Does not reject immutable frozen dataclass attribute in concrete class when protocol attribute is mutable.

     protocols_explicit
Pass*

Does not report unimplemented attributes for class that explicitly derives from protocol until it is instantiated.

Pass
Partial

Does not report error when calling unimplemented protocol method from derived class.

Does not report error when method is not implemented in derived class.

Partial

Reports errors for protocol static method with "..." implementation.

Does not report error when calling unimplemented protocol method from derived class.

Does not report type incompatibility when assigning to attribute defined in protocol.

Does not reject instantiation of class that derives from protocol but doesn't implement attribute.

Does not report instantiation of class that derives from protocol but doesn't implement method.

     protocols_generic Pass Pass
Partial

Does not reject the use of Protocol and Generic together as base classes.

Does not detect protocol mismatch when method-scoped TypeVar is used in protocol.

Partial

Does not correctly enforce contravariance in protocol type compatibility tests.

Does not correctly enforce invariance in protocol type compatibility tests.

Does not detect protocol mismatch when method-scoped TypeVar is used in protocol.

     protocols_merging Pass Pass Pass
Partial

Does not reject a protocol class that derives from a non-protocol class.

Does not report attempt to instantiate abstract class downgraded from protocol class.

     protocols_modules Pass Pass
Unsupported

Does not perform protocol checks for modules.

Partial

Does not report incompatibilities for protocol methods.

     protocols_recursive Pass Pass Pass
Partial

Incorrectly reports type error for some recursive protocols.

     protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Pass
Unsupported

Does not reject isinstance or issubclass call for protocol that is not runtime_checkable.

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

Unsupported

Does not reject isinstance or issubclass call for protocol that is not runtime_checkable.

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

     protocols_self Pass Pass Pass
Partial

Does not properly handle Self type within a protocol.

     protocols_subtyping Pass Pass Pass
Partial

Does not reject attempt to instantiate protocol class.

Does not report some protocol type compatibility violations involving contravariance.

     protocols_variance Pass Pass
Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

+
Callables
     callables_annotation
Partial

Incorrectly treats "*args: T, **kwargs: T" as "..." when T is specialized to Any.

Does not treat "*args: Any, **kargs: Any" as "..." when separated by keyword parameter.

Pass
Partial

Does not evaluate correct type for `*args: int` parameter.

Does not correctly implement type compatibility rules for "...".

Does not treat "*args: Any, **kwargs: Any" as "...".

Partial

Does not support Concatenate.

Does not treat "*args: Any, **kwargs: Any" as "...".

     callables_kwargs
Partial

Allows callable without kwargs to be assigned to callable with unpacked kwargs

Pass Pass
Unsupported

Does not understand Unpack in the context of **kwargs annotation.

     callables_protocol Pass Pass
Partial

Does not correctly handle callback protocol that declares attributes in all functions.

Does not report type incompatibility for callback protocol with positional-only parameters.

Incorrectly reports type compatibility error with callback that has *args and **kwargs.

Does not report type incompatibility for callback missing a default argument for positional parameter.

Does not report type incompatibility for callback missing a default argument for keyword parameter.

Unsupported

Does not properly handle type compatibility checks with callback protocols.

     callables_subtyping Pass Pass
Partial

Rejects standard parameter as incompatible with keyword-only parameter.

Rejects use of Callable with ParamSpec in TypeAlias definition.

Partial

Does not detect many subtyping rule violations for callables.

Does not correctly handle type alias parameterized by ParamSpec.

+
Constructors
     constructors_call_init
Partial

Does not report errors during binding to self parameter of __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Pass
Partial

Does not infer type of Self for self parameter of __init__ method.

Does not report errors during binding to self parameter of __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Incorrectly raises Incompatible overload type errors.

Incorrectly raises compatibility type errors.

Partial

Does not report errors during binding to self parameter of __init__ method.

Does not infer type of Self for self parameter of __init__ method.

Rejects valid type annotation for self parameter in __init__ method.

Does not support function-scoped TypeVars in self annotation in __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

     constructors_call_metaclass
Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

Does not skip evaluation of __new__ and __init__ if custom metaclass call returns non-class.

Pass
Partial

Does not evaluate __new__ if metaclass __call__ is defined.

Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

     constructors_call_new
Partial

Does not support __new__ return type that is not a subclass of the class being constructed.

Does not skip evaluation of __init__ based on __new__ return type.

Does not report errors during binding to cls parameter of __new__ method.

Pass
Partial

Does not support __new__ return type that is not a subclass of the class being constructed.

Does not report errors during binding to cls parameter of __new__ method.

Incorrectly raises compatibility type errors.

Partial

Does not honor explicit specialization of generic class when used in constructor call.

Does not support __new__ return type that is not a subclass of the class being constructed.

Does not skip evaluation of __init__ based on __new__ return type.

     constructors_call_type
Partial

Does not validate call to custom metaclass __call__ method through type[T].

Pass Pass
Partial

Does not validate call to custom metaclass __call__ method through type[T].

     constructors_callable
Partial

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.

Pass
Partial

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 use annotated type of self in __init__ method to generate return type of callable.

Incorrectly raises incompatibility type errors.

Partial

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 use annotated type of self in __init__ method to generate return type of callable.

     constructors_consistency
Pass*

Does not report inconsistency between __new__ and __init__ (optional).

Pass
Pass*

Does not report inconsistency between __new__ and __init__ (optional).

Pass*

Does not report inconsistency between __new__ and __init__ (optional).

+
Overloads
     overloads_basic Pass Pass PassPartial
     overloads_consistency Pass Pass
Partial

Does not apply decorator transforms before checking overload consistency.

Fail

Doesn't appear to validate overload consistency at all.

     overloads_definitions
Partial

Does not allow an overload with no implementation in an abstract base class.

Allows @override to be on all overloads and implementation, instead of just implementation.

Pass
Partial

Does not allow an overload with no implementation in a Protocol or an abstract base class.

Expects @final/@override on all overloads and implementation, instead of implementation only.

Fail

Does not reject a function with a single @overload signature.

Does not reject a function with @overload signature but no implementation.

Does not allow an overload with no implementation in a Protocol or an abstract base class.

Does not error on overloads inconsistently decorated with `@staticmethod` or `@classmethod`.

Does not enforce any rules on location of @final or @override decorators.

     overloads_definitions_stub
Partial

Allows @override to appear in a stub file not on the first overload.

Pass
Partial

Expects @final and @override to be present on all overloads, not just first.

Fail

Does not enforce any of the specified rules regarding overload definitions.

     overloads_evaluation
Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

Does not evaluate Any in some cases where overload is ambiguous.

Evaluates Any in some cases where overload is not ambiguous.

Partial

Does not evaluate Any in some cases where overload is ambiguous.

Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand type[A | B] to type[A] and type[B].

Does not expand tuple arguments to possible combinations.

Does not prefer variadic match to indeterminate-length unpacked argument.

Does not treat multiple matches due to gradual types as ambiguous.

Partial

Does not perform argument expansion (on any types) when matching overloads.

Does not treat multiple matches due to gradual types as ambiguous.

Does not prefer variadic match to indeterminate-length unpacked argument.

+
Exceptions
     exceptions_context_managers Pass Pass
Partial

assert_type causes failures.

Unsupported

Does not support code flow analysis.

+
Dataclasses
     dataclasses_descriptors
Partial

Does not correctly evaluate type of descriptor access.

Pass
Partial

Incorrectly generates error when calling constructor of dataclass with descriptor.

Incorrectly raises incompatibility type errors.

Unsupported

Does not understand descriptor objects in dataclass.

     dataclasses_final
Partial

Wrongly requires a Final dataclass field to be initialized at class level.

Doesn't support Final nested inside ClassVar.

Pass Pass
Partial

Doesn't handle Final nested inside ClassVar.

     dataclasses_frozen Pass Pass Pass
Unsupported

Does not report assignment to field within frozen dataclass instance.

Does not reject frozen dataclass inherited from non-frozen dataclass.

Does not reject non-frozen dataclass inherited from frozen dataclass.

     dataclasses_hash
Partial

Does not report when dataclass is not compatible with Hashable protocol.

Pass
Partial

Does not report when dataclass is not compatible with Hashable protocol.

Partial

Does not report when dataclass is not compatible with Hashable protocol.

     dataclasses_inheritance Pass Pass
Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

     dataclasses_kwonly
Partial

Incorrectly rejects kw_only field with default before positional field.

Pass
Partial

Rejects legitimate use of dataclass field with `kw_only=True`.

Partial

Incorrectly reports error when kw_only field has default value.

Incorrectly rejects kw_only field with default before positional field.

     dataclasses_order Pass Pass Pass
Partial

Does not report type incompatibility with comparison operator.

     dataclasses_postinit Pass Pass
Partial

Does not perform validation of `__post_init__` method.

Incorrectly complains on the assignment of `InitVar` in class bodies.

Partial

Does not validate `__post_init__` method.

Reports incorrect error for incompatible `__post_init__` method override.

     dataclasses_slots
Partial

Does not reject write to instance variable that is not defined in __slots__.

Pass
Partial

Does not report error when `slots=True` is used with `__slots__` definition.

Does not reject write to instance variable that is not defined in __slots__.

Does not reject access to `__slots__` from dataclass instance when `slots=False`.

Partial

Does not report error when `slots=True` is used with `__slots__` definition.

Does not reject write to instance variable that is not defined in __slots__.

Incorrectly reports error when accessing `__slots__` when `slots=True`.

     dataclasses_transform_class Pass Pass
Partial

Does not support field specifiers.

Emits "attribute not initialized" error for dataclass field.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_converter
Unsupported

Converter parameter not yet supported.

Pass
Unsupported

Converter parameter not yet supported.

Unsupported

Converter parameter not yet supported.

     dataclasses_transform_field
Partial

Does not properly handle field constructor that has default value for `kw_only` or `init` parameter.

Pass
Unsupported

Does not understand dataclass transform field specifiers.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_func
Partial

Does not handle `kw_only=False` override when `kw_only_default=True`.

Does not report error when `order=False` and comparison operators are used.

Pass
Partial

Does not understand @dataclass_transform when it is applied only to overloads of a decorator but not the definition.

Does not detect non-frozen class inheriting from frozen class.

Emits "attribute not initialized" error for dataclass field.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_meta Pass Pass
Partial

Does not understand custom field specifiers.

Incorrectly rejects frozen dataclass that inherits from non-frozen.

Emits "attribute not initialized" error for dataclass field.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_usage
Pass*

Does not detect unannotated usage of `dataclasses.field()`.

Pass
Partial

Does not report error when field with no default follows field with default.

Complains on `assert_type` when used for bound methods vs `Callable`.

Does not understand `__dataclass_fields__`.

Incorrectly raises incompatibility type errors.

Pass
+
Typed dictionaries
     typeddicts_alt_syntax
Pass*

Does not support keyword-argument form of alternative syntax (deprecated in 3.11).

Pass
Partial

Does not report when name of TypedDict doesn't match assigned identifier name.

Does not support keyword-argument form of alternative syntax (deprecated in 3.11).

Partial

Does not reject use of variable as second argument to `TypedDict` call.

Does not report when name of TypedDict doesn't match assigned identifier name.

Does not support keyword-argument form of alternative syntax (deprecated in 3.11).

     typeddicts_class_syntax Pass Pass
Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

Does not support generic TypedDict class.

Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

     typeddicts_final Pass Pass
Partial

Does not handle value with literal type as index to TypedDict object.

Pass
     typeddicts_inheritance Pass Pass PassPass
     typeddicts_operations Pass Pass Pass
Partial

Does not report type violation with TypedDict value assignment.

Does not report reference to unknown key in TypedDict.

Does not reject `clear` method on TypedDict with required keys.

Does not reject delete operation for required key in TypedDict.

     typeddicts_readonly Pass Pass PassUnsupported
     typeddicts_readonly_consistency Pass Pass PassUnsupported
     typeddicts_readonly_inheritance
Partial

Incorrectly rejects non-ReadOnly override of ReadOnly item.

Incorrectly rejects override of ReadOnly item with another ReadOnly item with narrower type.

Incorrectly rejects override of NotRequired ReadOnly item with a Required ReadOnly item.

Pass UnsupportedUnsupported
     typeddicts_readonly_kwargs Pass Pass PassUnsupported
     typeddicts_readonly_update
Partial

Incorrectly allows update of ReadOnly item.

Incorrectly rejects update involving an item with Never type.

Pass PassUnsupported
     typeddicts_required Pass Pass
Partial

Does not reject use of `Required` in function parameter annotation.

Does not reject nested use of `Required` in type annotation.

Does not support recursive TypedDict definitions.

Incorrectly complains about uninitialized attributes on TypedDict definitions.

Incorrectly generates "attribute not initialized" errors for TypedDict fields.

Partial

Does not reject use of `Required` in non-TypedDict class.

Does not reject use of `Required` in function parameter annotation.

Does not reject nested use of `Required` in type annotation.

     typeddicts_type_consistency Pass Pass
Partial

Does not reject assignment of TypedDict with missing key.

Does not return non-Optional value from `get` method for required key.

Does not properly handle nested TypedDicts.

Partial

Does not report some type violations for TypedDict type compatibility.

Incorrectly reports type violation in cases where there is none.

Does not report type incompatibility between TypedDict and `dict[str, Any]`.

     typeddicts_usage Pass Pass
Pass*

Does not report errant use of TypedDict in `isinstance` call.

Does not reject use of TypedDict as TypeVar bound.

Partial

Does not report errant use of TypedDict in `isinstance` call.

Does not reject use of TypedDict as TypeVar bound.

+
Tuples
     tuples_type_compat
Partial

Does not support tuple narrowing based on `len()` type guard (optional).

Pass
Partial

Does not support some unpacked tuple forms.

Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`.

Does not support tuple narrowing based on `len()` type guard (optional).

Does not correctly evaluate `Sequence[Never]` for `tuple[()]`.

Partial

Does not support unpacked tuple forms.

Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`.

Does not support tuple narrowing based on `len()` type guard (optional).

     tuples_type_form Pass Pass PassPass
     tuples_unpacked
Partial

"More than one unpack" error is missing a line number.

Pass Pass
Unsupported

Does not support `typing.Unpack`.

Does not support unpacked tuples within a tuple type form.

+
Named tuples
     namedtuples_define_class
Partial

Does not reject override of named tuple attribute in child class.

Pass
Partial

Does not evaluate correct type for indexed named tuple instance with integer.

Does not evaluate correct type for indexed named tuple instance with slice.

Does not report out-of-range index access with named tuple instance.

Does not reject named tuple element with no default value after one with a default.

Incorrectly rejects assignment of named tuple to a tuple with compatible type.

Does not reject attempt to use NamedTuple with multiple inheritance.

Partial

Incorrectly rejects valid index of named tuple instance when using a negative index.

Does not evaluate correct type for indexed named tuple instance with slice.

Does not reject named tuple element with no default value after one with a default.

Does not reject override of named tuple attribute in child class.

Evaluates incorrect type for named tuple entry with a generic type.

Does not reject incorrect argument type passed to specialized generic named tuple constructor.

Does not reject attempt to use NamedTuple with multiple inheritance.

     namedtuples_define_functional Pass Pass Pass
Partial

Does not handle illegal named tuple names the same as runtime.

Does not support defaults in functional form.

     namedtuples_type_compat Pass Pass PassPass
     namedtuples_usage
Partial

Does not reject attempt to delete named tuple field by name.

Pass Partial
Partial

Incorrectly rejects valid index of named tuple instance when using a negative index.

Does not report out-of-range index access with named tuple instance.

Does not reject attempt to overwrite named tuple entry by name.

Does not reject attempt to delete named tuple entry by name.

+
Enumerations
     enums_behaviors Pass Pass Pass
Partial

Does not enforce that Enum classes are implicitly final.

     enums_definition Pass Pass Pass
Pass*

Does not support some functional forms for Enum class definitions (optional).

     enums_expansion
Partial

Improperly applies narrowing to Flag subclass.

Pass Pass
Partial

Improperly applies narrowing to Flag subclass.

     enums_member_names
Pass*

Does not support special-cased handling of member name literal types in some cases (optional).

Pass
Pass*

Does not support special-cased handling of member name literal types (optional).

Pass
     enums_member_values
Partial

Does not enforce declared type of `_value_`.

Does not enforce assigned tuple types for enum members (optional).

Pass Pass
Partial

Does not enforce declared type of `_value_`.

Does not correctly enforce assigned tuple types for enum members (optional).

Does not evaluate literal types for enum member values (optional).

Does not evaluate literal types for auto values (optional).

     enums_members
Partial

Does not treat attribute with annotation and no assignment as non-member.

Does not treat callables as non-members.

Does not honor `enum.member` as method decorator.

Does not properly handle aliased enum members.

Does not support `_ignore_` mechanism (optional).

Does not treat attributes with private names as non-members.

Pass*

Does not support `_ignore_` mechanism (optional).

Partial

Does not reject use of annotation with enum member.

Does not treat callables as non-members.

Does not treat annotated attributes as non-members.

Does not honor `enum.nonmember` to define non-member attribute.

Does not honor `enum.member` as method decorator.

Does not properly handle aliased enum members.

Rejects use of `_ignore_`.

Does not support `_ignore_` mechanism (optional).

Partial

Does not reject use of annotation with enum member.

Does not support `enum.member` and `enum.nonmember`.

Does not support `_ignore_` mechanism (optional).

+
Type narrowing
     narrowing_typeguard Pass Pass Pass
Partial

Does not reject TypeGuard method with too few parameters.

     narrowing_typeis Pass Pass Pass
Partial

Does not narrow correctly on generic tuple type.

Does not reject covariant use of TypeIs.

Does not reject TypeIs where return type is not consistent with input type due to variance.

+
Type checker directives
     directives_assert_type Pass Pass Pass
Partial

Incorrectly allows assert(x, int) where x is a Literal.

     directives_cast Pass Pass Pass
Partial

Does not reject a call to "cast" with additional arguments.

     directives_deprecated Pass Pass
Unsupported

Does not support @deprecated.

Unsupported

Does not support @deprecated.

     directives_no_type_check
Partial

Does not honor `@no_type_check` class decorator (allowed).

Does not reject invalid call of `@no_type_check` function.

Pass*

Does not honor `@no_type_check` class decorator (allowed).

Pass*

Does not honor @no_type_check decorator.

Pass*

Does not honor @no_type_check decorator.

     directives_reveal_type Pass Pass Pass
Partial

Does not reject call to reveal_type with zero arguments.

Does not reject call to reveal_type with too many arguments.

     directives_type_checking Pass Pass PassPass
     directives_type_ignore
Partial

Does not honor "# type: ignore" comment if comment includes additional text.

Pass Pass
Partial

Does not honor "# type: ignore" comment if comment includes additional text.

     directives_type_ignore_file1 Pass Pass PassPass
     directives_type_ignore_file2 Pass Pass Pass
Partial

Does not ignore `# type: ignore` if it occurs after docstrings in the file.

     directives_version_platform
Pass*

Does not understand three-element form of sys.version checks.

Does not understand os.name checks.

Pass Pass
Pass*

Does not understand three-element form of sys.version checks.

Does not understand os.name checks.

+
Historical and deprecated features
     historical_positional
Partial

Does not reject positional-only parameter after non-positional-only parameter.

Treats keyword-only parameter as positional-only.

Applies legacy positional-only rules when PEP 570 syntax is used.

Pass Pass
Partial

Does not apply rules for pre-3.8 positional-only parameters in some cases.

Does not reject positional-only parameter after non-positional-only parameter.

diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 05f4485a9..48c869c4f 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -7,11 +7,6 @@ from pathlib import Path import os import re -from pytype import config as pytype_config -from pytype import io as pytype_io -from pytype import analyze as pytype_analyze -from pytype.errors import errors as pytype_errors -from pytype import load_pytd as pytype_loader import shutil from subprocess import PIPE, CalledProcessError, run import sys @@ -279,114 +274,8 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: return line_to_errors -class PytypeTypeChecker(TypeChecker): - @property - def name(self) -> str: - return "pytype" - - def install(self) -> bool: - try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "pytype", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "pytype"], - check=True, - ) - - return True - except CalledProcessError: - print("Unable to install pytype on this platform") - return False - - def get_version(self) -> str: - proc = run( - [sys.executable, "-m", "pytype", "--version"], stdout=PIPE, text=True - ) - version = proc.stdout.strip() - return f"pytype {version}" - - def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: - # Specify 3.11 for now to work around the fact that pytype - # currently doesn't support 3.12 and emits an error when - # running on 3.12. - options = pytype_config.Options.create(python_version=(3, 11), quick=True) - loader = pytype_loader.create_loader(options) - - # Add results to a dictionary keyed by the file name. - results_dict: dict[str, str] = {} - - for fi in tqdm(os.listdir(".")): - if not fi.endswith(".py"): - continue - options.tweak(input=fi) - with open(fi, "r", encoding="utf-8") as test_file: - src = test_file.read() - try: - analysis: pytype_analyze.Analysis = pytype_io.check_py( - src, options=options, loader=loader - ) - except Exception as e: - results_dict[fi] = f"{e.__class__.__name__}: {e}\n" - else: - results_dict[fi] = self.enforce_consistent_order( - analysis.context.errorlog - ) - return results_dict - - def enforce_consistent_order(self, log: pytype_errors.ErrorLog) -> str: - """Pytype does not guarantee deterministic output across runs. - It does order diagnostics by line number, but if multiple errors - occur on the same line, the ordering appears to change from one - run to the next. We require deterministic and consistent output, - so this method sorts the pytype output by line number and then - alphabetically within a line. - """ - - class ErrorSorter: - def __init__(self, err: pytype_errors.Error) -> None: - # Overwrite the details in the error because these can be - # nondeterministic (differ from run to run) in some cases. - err._details = "" - self._err = err - - def __lt__(self, other: "ErrorSorter", /) -> bool: - lineno_diff = self._err.line - other._err.line - if lineno_diff != 0: - return lineno_diff < 0 - return other._err.message < self._err.message - - def __eq__(self, other: object, /) -> bool: - return ( - isinstance(other, ErrorSorter) - and self._err.line == other._err.line - and other._err.message == self._err.message - ) - - errors: list[pytype_errors.Error] = [ - error for error in log.unique_sorted_errors() - ] - errors.sort(key=ErrorSorter) - return "\n".join(map(str, errors)) + "\n" - - def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: - # annotations_forward_refs.py:103:1: unexpected indent [python-compiler-error] - line_to_errors: dict[int, list[str]] = {} - for line in output: - match = re.search(r"^[a-zA-Z0-9_]+.pyi?:(\d+):(\d+): ", line) - if match is not None: - lineno = int(match.group(1)) - line_to_errors.setdefault(int(lineno), []).append(line) - return line_to_errors - - TYPE_CHECKERS: Sequence[TypeChecker] = ( MypyTypeChecker(), PyrightTypeChecker(), *([] if os.name == "nt" else [PyreTypeChecker()]), - PytypeTypeChecker(), )