From e929a4323b341f4a9a632c3ed7b35432705b8edd Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Sun, 5 Jul 2026 21:54:15 +1000 Subject: [PATCH 1/3] Add Basilisk to conformance results --- conformance/README.md | 2 +- conformance/pyproject.toml | 1 + .../results/basilisk/aliases_explicit.toml | 27 +++ .../results/basilisk/aliases_implicit.toml | 35 +++ .../results/basilisk/aliases_newtype.toml | 21 ++ .../results/basilisk/aliases_recursive.toml | 18 ++ .../basilisk/aliases_type_statement.toml | 32 +++ .../basilisk/aliases_typealiastype.toml | 29 +++ .../results/basilisk/aliases_variance.toml | 10 + .../basilisk/annotations_coroutines.toml | 6 + .../basilisk/annotations_forward_refs.toml | 25 +++ .../basilisk/annotations_generators.toml | 23 ++ .../results/basilisk/annotations_methods.toml | 6 + .../basilisk/annotations_typeexpr.toml | 22 ++ .../basilisk/callables_annotation.toml | 22 ++ .../results/basilisk/callables_kwargs.toml | 19 ++ .../results/basilisk/callables_protocol.toml | 25 +++ .../results/basilisk/callables_subtyping.toml | 40 ++++ .../results/basilisk/classes_classvar.toml | 29 +++ .../results/basilisk/classes_override.toml | 11 + .../basilisk/constructors_call_init.toml | 12 + .../basilisk/constructors_call_metaclass.toml | 8 + .../basilisk/constructors_call_new.toml | 8 + .../basilisk/constructors_call_type.toml | 14 ++ .../basilisk/constructors_callable.toml | 20 ++ .../basilisk/constructors_consistency.toml | 6 + .../basilisk/dataclasses_descriptors.toml | 6 + .../results/basilisk/dataclasses_final.toml | 11 + .../results/basilisk/dataclasses_frozen.toml | 10 + .../results/basilisk/dataclasses_hash.toml | 10 + .../basilisk/dataclasses_inheritance.toml | 8 + .../results/basilisk/dataclasses_kwonly.toml | 9 + .../basilisk/dataclasses_match_args.toml | 7 + .../results/basilisk/dataclasses_order.toml | 7 + .../basilisk/dataclasses_postinit.toml | 10 + .../results/basilisk/dataclasses_slots.toml | 11 + .../basilisk/dataclasses_transform_class.toml | 12 + .../dataclasses_transform_converter.toml | 15 ++ .../basilisk/dataclasses_transform_field.toml | 8 + .../basilisk/dataclasses_transform_func.toml | 12 + .../basilisk/dataclasses_transform_meta.toml | 12 + .../results/basilisk/dataclasses_usage.toml | 18 ++ .../basilisk/directives_assert_type.toml | 14 ++ .../results/basilisk/directives_cast.toml | 9 + .../basilisk/directives_deprecated.toml | 19 ++ .../basilisk/directives_disjoint_base.toml | 14 ++ .../basilisk/directives_no_type_check.toml | 10 + .../basilisk/directives_reveal_type.toml | 8 + .../basilisk/directives_type_checking.toml | 6 + .../basilisk/directives_type_ignore.toml | 6 + .../directives_type_ignore_file1.toml | 6 + .../directives_type_ignore_file2.toml | 7 + .../basilisk/directives_version_platform.toml | 9 + .../results/basilisk/enums_behaviors.toml | 9 + .../results/basilisk/enums_definition.toml | 7 + .../results/basilisk/enums_expansion.toml | 8 + .../results/basilisk/enums_member_names.toml | 6 + .../results/basilisk/enums_member_values.toml | 8 + .../results/basilisk/enums_members.toml | 13 ++ .../basilisk/exceptions_context_managers.toml | 6 + .../results/basilisk/generics_base_class.toml | 13 ++ .../results/basilisk/generics_basic.toml | 24 ++ .../results/basilisk/generics_defaults.toml | 12 + .../generics_defaults_referential.toml | 15 ++ .../generics_defaults_specialization.toml | 9 + .../basilisk/generics_paramspec_basic.toml | 14 ++ .../generics_paramspec_components.toml | 22 ++ .../generics_paramspec_semantics.toml | 16 ++ .../generics_paramspec_specialization.toml | 11 + .../results/basilisk/generics_scoping.toml | 24 ++ .../basilisk/generics_self_advanced.toml | 6 + .../basilisk/generics_self_attributes.toml | 8 + .../results/basilisk/generics_self_basic.toml | 9 + .../basilisk/generics_self_protocols.toml | 8 + .../results/basilisk/generics_self_usage.toml | 19 ++ .../generics_syntax_compatibility.toml | 8 + .../generics_syntax_declarations.toml | 17 ++ .../generics_syntax_infer_variance.toml | 24 ++ .../basilisk/generics_syntax_scoping.toml | 13 ++ .../basilisk/generics_type_erasure.toml | 13 ++ .../basilisk/generics_typevartuple_args.toml | 14 ++ .../basilisk/generics_typevartuple_basic.toml | 23 ++ .../generics_typevartuple_callable.toml | 7 + .../generics_typevartuple_concat.toml | 6 + .../generics_typevartuple_overloads.toml | 6 + .../generics_typevartuple_specialization.toml | 13 ++ .../generics_typevartuple_unpack.toml | 7 + .../basilisk/generics_upper_bound.toml | 11 + .../results/basilisk/generics_variance.toml | 19 ++ .../basilisk/generics_variance_inference.toml | 29 +++ .../basilisk/historical_positional.toml | 10 + .../basilisk/literals_interactions.toml | 10 + .../basilisk/literals_literalstring.toml | 17 ++ .../basilisk/literals_parameterizations.toml | 27 +++ .../results/basilisk/literals_semantics.toml | 12 + .../basilisk/namedtuples_define_class.toml | 21 ++ .../namedtuples_define_functional.toml | 16 ++ .../basilisk/namedtuples_type_compat.toml | 8 + .../results/basilisk/namedtuples_usage.toml | 14 ++ .../results/basilisk/narrowing_typeguard.toml | 10 + .../results/basilisk/narrowing_typeis.toml | 15 ++ .../results/basilisk/overloads_basic.toml | 7 + .../basilisk/overloads_consistency.toml | 8 + .../basilisk/overloads_definitions.toml | 18 ++ .../basilisk/overloads_definitions_stub.toml | 14 ++ .../basilisk/overloads_evaluation.toml | 10 + .../basilisk/protocols_class_objects.toml | 15 ++ .../basilisk/protocols_definition.toml | 27 +++ .../results/basilisk/protocols_explicit.toml | 13 ++ .../results/basilisk/protocols_generic.toml | 15 ++ .../results/basilisk/protocols_merging.toml | 12 + .../results/basilisk/protocols_modules.toml | 9 + .../results/basilisk/protocols_recursive.toml | 6 + .../basilisk/protocols_runtime_checkable.toml | 15 ++ .../results/basilisk/protocols_self.toml | 6 + .../results/basilisk/protocols_subtyping.toml | 13 ++ .../results/basilisk/protocols_variance.toml | 18 ++ .../basilisk/qualifiers_annotated.toml | 27 +++ .../basilisk/qualifiers_final_annotation.toml | 36 +++ .../basilisk/qualifiers_final_decorator.toml | 16 ++ .../results/basilisk/specialtypes_any.toml | 6 + .../results/basilisk/specialtypes_never.toml | 9 + .../results/basilisk/specialtypes_none.toml | 9 + .../basilisk/specialtypes_promotions.toml | 7 + .../results/basilisk/specialtypes_type.toml | 16 ++ .../results/basilisk/tuples_type_compat.toml | 30 +++ .../results/basilisk/tuples_type_form.toml | 21 ++ .../results/basilisk/tuples_unpacked.toml | 11 + .../basilisk/typeddicts_alt_syntax.toml | 10 + .../basilisk/typeddicts_class_syntax.toml | 12 + .../basilisk/typeddicts_extra_items.toml | 34 +++ .../results/basilisk/typeddicts_final.toml | 6 + .../basilisk/typeddicts_inheritance.toml | 9 + .../basilisk/typeddicts_operations.toml | 17 ++ .../results/basilisk/typeddicts_readonly.toml | 12 + .../typeddicts_readonly_consistency.toml | 13 ++ .../typeddicts_readonly_inheritance.toml | 19 ++ .../basilisk/typeddicts_readonly_kwargs.toml | 7 + .../basilisk/typeddicts_readonly_update.toml | 8 + .../results/basilisk/typeddicts_required.toml | 10 + .../basilisk/typeddicts_type_consistency.toml | 15 ++ .../results/basilisk/typeddicts_usage.toml | 11 + .../results/basilisk/typeforms_typeform.toml | 23 ++ conformance/results/basilisk/version.toml | 1 + conformance/results/results.html | 210 ++++++++++++++++-- conformance/src/type_checker.py | 129 +++++++++++ conformance/uv.lock | 14 ++ 147 files changed, 2312 insertions(+), 24 deletions(-) create mode 100644 conformance/results/basilisk/aliases_explicit.toml create mode 100644 conformance/results/basilisk/aliases_implicit.toml create mode 100644 conformance/results/basilisk/aliases_newtype.toml create mode 100644 conformance/results/basilisk/aliases_recursive.toml create mode 100644 conformance/results/basilisk/aliases_type_statement.toml create mode 100644 conformance/results/basilisk/aliases_typealiastype.toml create mode 100644 conformance/results/basilisk/aliases_variance.toml create mode 100644 conformance/results/basilisk/annotations_coroutines.toml create mode 100644 conformance/results/basilisk/annotations_forward_refs.toml create mode 100644 conformance/results/basilisk/annotations_generators.toml create mode 100644 conformance/results/basilisk/annotations_methods.toml create mode 100644 conformance/results/basilisk/annotations_typeexpr.toml create mode 100644 conformance/results/basilisk/callables_annotation.toml create mode 100644 conformance/results/basilisk/callables_kwargs.toml create mode 100644 conformance/results/basilisk/callables_protocol.toml create mode 100644 conformance/results/basilisk/callables_subtyping.toml create mode 100644 conformance/results/basilisk/classes_classvar.toml create mode 100644 conformance/results/basilisk/classes_override.toml create mode 100644 conformance/results/basilisk/constructors_call_init.toml create mode 100644 conformance/results/basilisk/constructors_call_metaclass.toml create mode 100644 conformance/results/basilisk/constructors_call_new.toml create mode 100644 conformance/results/basilisk/constructors_call_type.toml create mode 100644 conformance/results/basilisk/constructors_callable.toml create mode 100644 conformance/results/basilisk/constructors_consistency.toml create mode 100644 conformance/results/basilisk/dataclasses_descriptors.toml create mode 100644 conformance/results/basilisk/dataclasses_final.toml create mode 100644 conformance/results/basilisk/dataclasses_frozen.toml create mode 100644 conformance/results/basilisk/dataclasses_hash.toml create mode 100644 conformance/results/basilisk/dataclasses_inheritance.toml create mode 100644 conformance/results/basilisk/dataclasses_kwonly.toml create mode 100644 conformance/results/basilisk/dataclasses_match_args.toml create mode 100644 conformance/results/basilisk/dataclasses_order.toml create mode 100644 conformance/results/basilisk/dataclasses_postinit.toml create mode 100644 conformance/results/basilisk/dataclasses_slots.toml create mode 100644 conformance/results/basilisk/dataclasses_transform_class.toml create mode 100644 conformance/results/basilisk/dataclasses_transform_converter.toml create mode 100644 conformance/results/basilisk/dataclasses_transform_field.toml create mode 100644 conformance/results/basilisk/dataclasses_transform_func.toml create mode 100644 conformance/results/basilisk/dataclasses_transform_meta.toml create mode 100644 conformance/results/basilisk/dataclasses_usage.toml create mode 100644 conformance/results/basilisk/directives_assert_type.toml create mode 100644 conformance/results/basilisk/directives_cast.toml create mode 100644 conformance/results/basilisk/directives_deprecated.toml create mode 100644 conformance/results/basilisk/directives_disjoint_base.toml create mode 100644 conformance/results/basilisk/directives_no_type_check.toml create mode 100644 conformance/results/basilisk/directives_reveal_type.toml create mode 100644 conformance/results/basilisk/directives_type_checking.toml create mode 100644 conformance/results/basilisk/directives_type_ignore.toml create mode 100644 conformance/results/basilisk/directives_type_ignore_file1.toml create mode 100644 conformance/results/basilisk/directives_type_ignore_file2.toml create mode 100644 conformance/results/basilisk/directives_version_platform.toml create mode 100644 conformance/results/basilisk/enums_behaviors.toml create mode 100644 conformance/results/basilisk/enums_definition.toml create mode 100644 conformance/results/basilisk/enums_expansion.toml create mode 100644 conformance/results/basilisk/enums_member_names.toml create mode 100644 conformance/results/basilisk/enums_member_values.toml create mode 100644 conformance/results/basilisk/enums_members.toml create mode 100644 conformance/results/basilisk/exceptions_context_managers.toml create mode 100644 conformance/results/basilisk/generics_base_class.toml create mode 100644 conformance/results/basilisk/generics_basic.toml create mode 100644 conformance/results/basilisk/generics_defaults.toml create mode 100644 conformance/results/basilisk/generics_defaults_referential.toml create mode 100644 conformance/results/basilisk/generics_defaults_specialization.toml create mode 100644 conformance/results/basilisk/generics_paramspec_basic.toml create mode 100644 conformance/results/basilisk/generics_paramspec_components.toml create mode 100644 conformance/results/basilisk/generics_paramspec_semantics.toml create mode 100644 conformance/results/basilisk/generics_paramspec_specialization.toml create mode 100644 conformance/results/basilisk/generics_scoping.toml create mode 100644 conformance/results/basilisk/generics_self_advanced.toml create mode 100644 conformance/results/basilisk/generics_self_attributes.toml create mode 100644 conformance/results/basilisk/generics_self_basic.toml create mode 100644 conformance/results/basilisk/generics_self_protocols.toml create mode 100644 conformance/results/basilisk/generics_self_usage.toml create mode 100644 conformance/results/basilisk/generics_syntax_compatibility.toml create mode 100644 conformance/results/basilisk/generics_syntax_declarations.toml create mode 100644 conformance/results/basilisk/generics_syntax_infer_variance.toml create mode 100644 conformance/results/basilisk/generics_syntax_scoping.toml create mode 100644 conformance/results/basilisk/generics_type_erasure.toml create mode 100644 conformance/results/basilisk/generics_typevartuple_args.toml create mode 100644 conformance/results/basilisk/generics_typevartuple_basic.toml create mode 100644 conformance/results/basilisk/generics_typevartuple_callable.toml create mode 100644 conformance/results/basilisk/generics_typevartuple_concat.toml create mode 100644 conformance/results/basilisk/generics_typevartuple_overloads.toml create mode 100644 conformance/results/basilisk/generics_typevartuple_specialization.toml create mode 100644 conformance/results/basilisk/generics_typevartuple_unpack.toml create mode 100644 conformance/results/basilisk/generics_upper_bound.toml create mode 100644 conformance/results/basilisk/generics_variance.toml create mode 100644 conformance/results/basilisk/generics_variance_inference.toml create mode 100644 conformance/results/basilisk/historical_positional.toml create mode 100644 conformance/results/basilisk/literals_interactions.toml create mode 100644 conformance/results/basilisk/literals_literalstring.toml create mode 100644 conformance/results/basilisk/literals_parameterizations.toml create mode 100644 conformance/results/basilisk/literals_semantics.toml create mode 100644 conformance/results/basilisk/namedtuples_define_class.toml create mode 100644 conformance/results/basilisk/namedtuples_define_functional.toml create mode 100644 conformance/results/basilisk/namedtuples_type_compat.toml create mode 100644 conformance/results/basilisk/namedtuples_usage.toml create mode 100644 conformance/results/basilisk/narrowing_typeguard.toml create mode 100644 conformance/results/basilisk/narrowing_typeis.toml create mode 100644 conformance/results/basilisk/overloads_basic.toml create mode 100644 conformance/results/basilisk/overloads_consistency.toml create mode 100644 conformance/results/basilisk/overloads_definitions.toml create mode 100644 conformance/results/basilisk/overloads_definitions_stub.toml create mode 100644 conformance/results/basilisk/overloads_evaluation.toml create mode 100644 conformance/results/basilisk/protocols_class_objects.toml create mode 100644 conformance/results/basilisk/protocols_definition.toml create mode 100644 conformance/results/basilisk/protocols_explicit.toml create mode 100644 conformance/results/basilisk/protocols_generic.toml create mode 100644 conformance/results/basilisk/protocols_merging.toml create mode 100644 conformance/results/basilisk/protocols_modules.toml create mode 100644 conformance/results/basilisk/protocols_recursive.toml create mode 100644 conformance/results/basilisk/protocols_runtime_checkable.toml create mode 100644 conformance/results/basilisk/protocols_self.toml create mode 100644 conformance/results/basilisk/protocols_subtyping.toml create mode 100644 conformance/results/basilisk/protocols_variance.toml create mode 100644 conformance/results/basilisk/qualifiers_annotated.toml create mode 100644 conformance/results/basilisk/qualifiers_final_annotation.toml create mode 100644 conformance/results/basilisk/qualifiers_final_decorator.toml create mode 100644 conformance/results/basilisk/specialtypes_any.toml create mode 100644 conformance/results/basilisk/specialtypes_never.toml create mode 100644 conformance/results/basilisk/specialtypes_none.toml create mode 100644 conformance/results/basilisk/specialtypes_promotions.toml create mode 100644 conformance/results/basilisk/specialtypes_type.toml create mode 100644 conformance/results/basilisk/tuples_type_compat.toml create mode 100644 conformance/results/basilisk/tuples_type_form.toml create mode 100644 conformance/results/basilisk/tuples_unpacked.toml create mode 100644 conformance/results/basilisk/typeddicts_alt_syntax.toml create mode 100644 conformance/results/basilisk/typeddicts_class_syntax.toml create mode 100644 conformance/results/basilisk/typeddicts_extra_items.toml create mode 100644 conformance/results/basilisk/typeddicts_final.toml create mode 100644 conformance/results/basilisk/typeddicts_inheritance.toml create mode 100644 conformance/results/basilisk/typeddicts_operations.toml create mode 100644 conformance/results/basilisk/typeddicts_readonly.toml create mode 100644 conformance/results/basilisk/typeddicts_readonly_consistency.toml create mode 100644 conformance/results/basilisk/typeddicts_readonly_inheritance.toml create mode 100644 conformance/results/basilisk/typeddicts_readonly_kwargs.toml create mode 100644 conformance/results/basilisk/typeddicts_readonly_update.toml create mode 100644 conformance/results/basilisk/typeddicts_required.toml create mode 100644 conformance/results/basilisk/typeddicts_type_consistency.toml create mode 100644 conformance/results/basilisk/typeddicts_usage.toml create mode 100644 conformance/results/basilisk/typeforms_typeform.toml create mode 100644 conformance/results/basilisk/version.toml diff --git a/conformance/README.md b/conformance/README.md index 0b60a9490..ce1be0c9a 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -81,7 +81,7 @@ Note that some type checkers may not run on some platforms. If a type checker fa 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](https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html) are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyrefly, pyright, zuban, ty, and pycroscope. It is the goal and desire to add additional type checkers over time. +[Conformance results](https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html) are reported and summarized for each supported type checker. Currently, results are reported for basilisk, mypy, pyrefly, pyright, zuban, ty, and pycroscope. It is the goal and desire to add additional type checkers over time. ## Adding a New Test Case diff --git a/conformance/pyproject.toml b/conformance/pyproject.toml index 17c4adfd2..f72a1fba3 100644 --- a/conformance/pyproject.toml +++ b/conformance/pyproject.toml @@ -3,6 +3,7 @@ name = "typing-conformance" version = "0.1.0" requires-python = "==3.12.*" dependencies = [ + "basilisk-python", "jinja2", "markdown", "mypy", diff --git a/conformance/results/basilisk/aliases_explicit.toml b/conformance/results/basilisk/aliases_explicit.toml new file mode 100644 index 000000000..2f08c6237 --- /dev/null +++ b/conformance/results/basilisk/aliases_explicit.toml @@ -0,0 +1,27 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +aliases_explicit.py:67:9: error: Type alias `GoodTypeAlias2` is not generic and cannot be parameterized [aliases_implicit] +aliases_explicit.py:68:9: error: Type alias `GoodTypeAlias3` is not generic and cannot be parameterized [aliases_implicit] +aliases_explicit.py:69:9: error: Too many type arguments for `GoodTypeAlias4`: expected 1, got 2 [aliases_implicit] +aliases_explicit.py:70:9: error: Too many type arguments for `GoodTypeAlias8`: expected 1, got 2 [aliases_implicit] +aliases_explicit.py:71:9: error: Invalid type argument for `ParamSpec` parameter in `GoodTypeAlias9` [aliases_implicit] +aliases_explicit.py:79:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias1` [aliases_implicit] +aliases_explicit.py:80:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias2` [aliases_implicit] +aliases_explicit.py:81:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias3` [aliases_implicit] +aliases_explicit.py:82:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias4` [aliases_implicit] +aliases_explicit.py:83:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias5` [aliases_implicit] +aliases_explicit.py:84:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias6` [aliases_implicit] +aliases_explicit.py:85:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias7` [aliases_implicit] +aliases_explicit.py:86:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias8` [aliases_implicit] +aliases_explicit.py:87:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias9` [aliases_implicit] +aliases_explicit.py:88:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias10` [aliases_implicit] +aliases_explicit.py:89:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias11` [aliases_implicit] +aliases_explicit.py:90:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias12` [aliases_implicit] +aliases_explicit.py:91:1: error: Invalid type expression as right-hand side of `TypeAlias` for `BadTypeAlias13` [aliases_implicit] +aliases_explicit.py:100:5: error: Type alias `ListAlias` is not generic and cannot be parameterized [aliases_implicit] +aliases_explicit.py:101:6: error: Cannot instantiate union type alias `ListOrSetAlias` [aliases_implicit] +aliases_explicit.py:102:5: error: Type alias `ListOrSetAlias` is not generic and cannot be parameterized [aliases_implicit] +""" diff --git a/conformance/results/basilisk/aliases_implicit.toml b/conformance/results/basilisk/aliases_implicit.toml new file mode 100644 index 000000000..c723e4532 --- /dev/null +++ b/conformance/results/basilisk/aliases_implicit.toml @@ -0,0 +1,35 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +aliases_implicit.py:76:9: error: Type alias `GoodTypeAlias2` is not generic and cannot be parameterized [aliases_implicit] +aliases_implicit.py:77:9: error: Type alias `GoodTypeAlias3` is not generic and cannot be parameterized [aliases_implicit] +aliases_implicit.py:77:9: error: `GoodTypeAlias3` cannot be subscripted; it has no free type parameters [generics_defaults_specialization] +aliases_implicit.py:78:9: error: Too many type arguments for `GoodTypeAlias4`: expected 1, got 2 [aliases_implicit] +aliases_implicit.py:78:9: error: Too many type arguments for `GoodTypeAlias4`; expected at most 1, got 2 [generics_defaults_specialization] +aliases_implicit.py:79:9: error: Too many type arguments for `GoodTypeAlias8`: expected 1, got 2 [aliases_implicit] +aliases_implicit.py:79:9: error: Too many type arguments for `GoodTypeAlias8`; expected at most 1, got 2 [generics_defaults_specialization] +aliases_implicit.py:80:9: error: Invalid type argument for `ParamSpec` parameter in `GoodTypeAlias9` [aliases_implicit] +aliases_implicit.py:81:9: error: Type argument `str` does not satisfy bound `float` of TypeVar `TFloat` in `GoodTypeAlias12` [aliases_implicit] +aliases_implicit.py:106:9: error: Variable `BadTypeAlias1` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:107:9: error: Variable `BadTypeAlias2` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:108:9: error: Variable `BadTypeAlias3` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:109:9: error: Variable `BadTypeAlias4` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:110:9: error: Variable `BadTypeAlias5` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:111:9: error: Variable `BadTypeAlias6` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:112:9: error: Variable `BadTypeAlias7` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:113:9: error: Variable `BadTypeAlias8` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:114:9: error: Variable `BadTypeAlias9` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:115:5: error: Invalid type expression in annotation for parameter `p10` [annotations_forward_refs] +aliases_implicit.py:115:10: error: Variable `BadTypeAlias10` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:116:5: error: Invalid type expression in annotation for parameter `p11` [annotations_forward_refs] +aliases_implicit.py:116:10: error: Variable `BadTypeAlias11` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:117:10: error: Variable `BadTypeAlias12` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:118:5: error: Invalid type expression in annotation for parameter `p13` [annotations_forward_refs] +aliases_implicit.py:118:10: error: Variable `BadTypeAlias13` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:119:5: error: Invalid type expression in annotation for parameter `p14` [annotations_forward_refs] +aliases_implicit.py:119:10: error: Variable `BadTypeAlias14` is not a valid type and cannot be used as an annotation [aliases_implicit] +aliases_implicit.py:133:6: error: Cannot instantiate union type alias `ListOrSetAlias` [aliases_implicit] +aliases_implicit.py:135:5: error: Type alias `ListOrSetAlias` is not generic and cannot be parameterized [aliases_implicit] +""" diff --git a/conformance/results/basilisk/aliases_newtype.toml b/conformance/results/basilisk/aliases_newtype.toml new file mode 100644 index 000000000..300529408 --- /dev/null +++ b/conformance/results/basilisk/aliases_newtype.toml @@ -0,0 +1,21 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +aliases_newtype.py:11:1: error: Argument to `UserId` ("user") is not compatible with its base type `int` [aliases_newtype] +aliases_newtype.py:12:1: error: Cannot assign a literal value directly to `UserId`; use `UserId(value)` to create a `UserId` instance [aliases_newtype] +aliases_newtype.py:12:1: error: Type mismatch: `u1` is annotated `UserId` (userid) but assigned int [assignment_compatibility] +aliases_newtype.py:18:1: error: `UserId` is a `NewType`, not an instance of `type`; `NewType()` does not return a class object [aliases_newtype] +aliases_newtype.py:23:1: error: `UserId` is a `NewType` and cannot be used as the second argument to `isinstance`; `NewType` types are not runtime classes [aliases_newtype] +aliases_newtype.py:26:1: error: Class `UserIdDerived` cannot subclass `UserId` which is a `NewType` [aliases_newtype] +aliases_newtype.py:35:12: error: `NewType` name `BadName` does not match the variable name `GoodName` [aliases_newtype] +aliases_newtype.py:41:1: error: Variable `nt1`: `NewType` cannot be used as a generic type [aliases_newtype] +aliases_newtype.py:47:15: error: Invalid base type for `NewType` `BadNewType1`: cannot use a union type as a `NewType` base [aliases_newtype] +aliases_newtype.py:50:15: error: Invalid base type for `NewType` `BadNewType2`: cannot use a TypeVar-parameterized generic as a `NewType` base [aliases_newtype] +aliases_newtype.py:52:15: error: Invalid base type for `NewType` `BadNewType3`: cannot use a Protocol class as a `NewType` base [aliases_newtype] +aliases_newtype.py:54:15: error: Invalid base type for `NewType` `BadNewType4`: cannot use `Literal` as a `NewType` base [aliases_newtype] +aliases_newtype.py:61:15: error: Invalid base type for `NewType` `BadNewType5`: cannot use a `TypedDict` class as a `NewType` base [aliases_newtype] +aliases_newtype.py:63:15: error: `NewType` takes exactly 2 arguments (3 given) for `BadNewType6` [aliases_newtype] +aliases_newtype.py:65:15: error: Invalid base type for `NewType` `BadNewType7`: cannot use `Any` as a `NewType` base [aliases_newtype] +""" diff --git a/conformance/results/basilisk/aliases_recursive.toml b/conformance/results/basilisk/aliases_recursive.toml new file mode 100644 index 000000000..6e740de8e --- /dev/null +++ b/conformance/results/basilisk/aliases_recursive.toml @@ -0,0 +1,18 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +aliases_recursive.py:19:1: error: Type mismatch: `j4` is annotated `Json` (json) but assigned dict[str, int | Unknown] [assignment_compatibility] +aliases_recursive.py:20:1: error: Type mismatch: `j5` is annotated `Json` (json) but assigned list[int | Unknown] [assignment_compatibility] +aliases_recursive.py:38:1: error: Type mismatch: `t6` is annotated `RecursiveTuple` (recursivetuple) but assigned tuple[int, tuple[str, int], tuple[int, tuple[int, list[int]]]] [assignment_compatibility] +aliases_recursive.py:39:1: error: Type mismatch: `t7` is annotated `RecursiveTuple` (recursivetuple) but assigned tuple[int, list[int]] [assignment_compatibility] +aliases_recursive.py:50:1: error: Type mismatch: `m7` is annotated `RecursiveMapping` (recursivemapping) but assigned dict[str, list[int]] [assignment_compatibility] +aliases_recursive.py:51:1: error: Type mismatch: `m8` is annotated `RecursiveMapping` (recursivemapping) but assigned dict[str, str | int | list[int]] [assignment_compatibility] +aliases_recursive.py:52:1: error: Type mismatch: `m9` is annotated `RecursiveMapping` (recursivemapping) but assigned dict[str, str | int | dict[str, str | int | list[int]]] [assignment_compatibility] +aliases_recursive.py:63:1: error: Type mismatch: `g3` is annotated `GenericTypeAlias1[str]` (generictypealias1[str]) but assigned list[str | list[float]] [assignment_compatibility] +aliases_recursive.py:69:1: error: Type mismatch: `g6` is annotated `GenericTypeAlias2[str, int]` (generictypealias2[str, int]) but assigned list[list[int | list[str | int | list[float]]] | str] [assignment_compatibility] +aliases_recursive.py:72:1: error: Type alias `RecursiveUnion` creates a cyclical reference [aliases_recursive] +aliases_recursive.py:75:1: error: Type alias `MutualReference1` creates a cyclical reference [aliases_recursive] +aliases_recursive.py:75:63: error: Type alias `MutualReference2` creates a cyclical reference [aliases_recursive] +""" diff --git a/conformance/results/basilisk/aliases_type_statement.toml b/conformance/results/basilisk/aliases_type_statement.toml new file mode 100644 index 000000000..ceb4f8a15 --- /dev/null +++ b/conformance/results/basilisk/aliases_type_statement.toml @@ -0,0 +1,32 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +aliases_type_statement.py:17:1: error: Cannot access attribute `bit_count` on type alias `GoodAlias1` [generics_syntax_scoping] +aliases_type_statement.py:19:1: error: Cannot call type alias `GoodAlias1`: type aliases are not callable [generics_syntax_scoping] +aliases_type_statement.py:23:7: error: Cannot access attribute `other_attrib` on type alias `GoodAlias1` [generics_syntax_scoping] +aliases_type_statement.py:26:7: error: Cannot use type alias `GoodAlias1` as a base class [generics_syntax_scoping] +aliases_type_statement.py:31:22: error: Cannot use type alias `GoodAlias1` in `isinstance` [generics_syntax_scoping] +aliases_type_statement.py:37:6: error: Invalid type expression in `type BadTypeAlias1` alias [aliases_type_statement] +aliases_type_statement.py:38:6: error: Invalid type expression in `type BadTypeAlias2` alias [aliases_type_statement] +aliases_type_statement.py:39:6: error: Invalid type expression in `type BadTypeAlias3` alias [aliases_type_statement] +aliases_type_statement.py:40:6: error: Invalid type expression in `type BadTypeAlias4` alias [aliases_type_statement] +aliases_type_statement.py:41:6: error: Invalid type expression in `type BadTypeAlias5` alias [aliases_type_statement] +aliases_type_statement.py:42:6: error: Invalid type expression in `type BadTypeAlias6` alias [aliases_type_statement] +aliases_type_statement.py:43:6: error: Invalid type expression in `type BadTypeAlias7` alias [aliases_type_statement] +aliases_type_statement.py:44:6: error: Invalid type expression in `type BadTypeAlias8` alias [aliases_type_statement] +aliases_type_statement.py:45:6: error: Invalid type expression in `type BadTypeAlias9` alias [aliases_type_statement] +aliases_type_statement.py:46:6: error: Invalid type expression in `type BadTypeAlias10` alias [aliases_type_statement] +aliases_type_statement.py:47:6: error: Invalid type expression in `type BadTypeAlias11` alias [aliases_type_statement] +aliases_type_statement.py:48:6: error: Invalid type expression in `type BadTypeAlias12` alias [aliases_type_statement] +aliases_type_statement.py:49:6: error: Invalid type expression in `type BadTypeAlias13` alias [aliases_type_statement] +aliases_type_statement.py:53:6: error: PEP 695 `type` statement uses old-style TypeVar `V` [generics_syntax_scoping] +aliases_type_statement.py:58:6: error: PEP 695 `type` statement uses old-style TypeVar `T1` [generics_syntax_scoping] +aliases_type_statement.py:68:1: error: Type argument `str` is not compatible with type parameter `S` bound `int` in type alias `RecursiveTypeAlias2` [generics_syntax_scoping] +aliases_type_statement.py:70:1: error: Type argument `int` is not compatible with type parameter `T` bound `str` in type alias `RecursiveTypeAlias2` [generics_syntax_scoping] +aliases_type_statement.py:73:6: error: Circular type alias definition: `RecursiveTypeAlias3` references itself [generics_syntax_scoping] +aliases_type_statement.py:75:6: error: Circular type alias definition: `RecursiveTypeAlias4` references itself with different type arguments [generics_syntax_scoping] +aliases_type_statement.py:79:6: error: Circular type alias definition: `RecursiveTypeAlias6` is part of a circular alias chain [generics_syntax_scoping] +aliases_type_statement.py:80:6: error: Circular type alias definition: `RecursiveTypeAlias7` is part of a circular alias chain [generics_syntax_scoping] +""" diff --git a/conformance/results/basilisk/aliases_typealiastype.toml b/conformance/results/basilisk/aliases_typealiastype.toml new file mode 100644 index 000000000..070798156 --- /dev/null +++ b/conformance/results/basilisk/aliases_typealiastype.toml @@ -0,0 +1,29 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +aliases_typealiastype.py:32:7: error: `TypeAliasType` object `GoodAlias1` has no attribute `other_attrib` [aliases_typealiastype] +aliases_typealiastype.py:40:5: error: Incorrect type arguments for `GoodAlias5`: expected 4, got 3 [aliases_typealiastype] +aliases_typealiastype.py:43:13: error: Type variable `S` used in `BadAlias1` is not declared in `type_params` [aliases_typealiastype] +aliases_typealiastype.py:44:13: error: Type variable `S` used in `BadAlias2` is not declared in `type_params` [aliases_typealiastype] +aliases_typealiastype.py:45:57: error: `type_params` for `BadAlias3` must be a literal tuple expression [aliases_typealiastype] +aliases_typealiastype.py:46:13: error: Type alias `BadAlias4` references itself, creating a circular dependency [aliases_typealiastype] +aliases_typealiastype.py:47:13: error: Type alias `BadAlias5` references itself, creating a circular dependency [aliases_typealiastype] +aliases_typealiastype.py:48:13: error: Type alias `BadAlias6` references itself, creating a circular dependency [aliases_typealiastype] +aliases_typealiastype.py:49:13: error: Type alias `BadAlias7` references itself, creating a circular dependency [aliases_typealiastype] +aliases_typealiastype.py:52:40: error: Invalid type expression in `TypeAliasType` for `BadAlias8` [aliases_typealiastype] +aliases_typealiastype.py:53:40: error: Invalid type expression in `TypeAliasType` for `BadAlias9` [aliases_typealiastype] +aliases_typealiastype.py:54:42: error: Invalid type expression in `TypeAliasType` for `BadAlias10` [aliases_typealiastype] +aliases_typealiastype.py:55:42: error: Invalid type expression in `TypeAliasType` for `BadAlias11` [aliases_typealiastype] +aliases_typealiastype.py:56:42: error: Invalid type expression in `TypeAliasType` for `BadAlias12` [aliases_typealiastype] +aliases_typealiastype.py:57:42: error: Invalid type expression in `TypeAliasType` for `BadAlias13` [aliases_typealiastype] +aliases_typealiastype.py:58:42: error: Invalid type expression in `TypeAliasType` for `BadAlias14` [aliases_typealiastype] +aliases_typealiastype.py:59:42: error: Invalid type expression in `TypeAliasType` for `BadAlias15` [aliases_typealiastype] +aliases_typealiastype.py:60:42: error: Invalid type expression in `TypeAliasType` for `BadAlias16` [aliases_typealiastype] +aliases_typealiastype.py:61:42: error: Invalid type expression in `TypeAliasType` for `BadAlias17` [aliases_typealiastype] +aliases_typealiastype.py:62:42: error: Invalid type expression in `TypeAliasType` for `BadAlias18` [aliases_typealiastype] +aliases_typealiastype.py:63:42: error: Invalid type expression in `TypeAliasType` for `BadAlias19` [aliases_typealiastype] +aliases_typealiastype.py:64:42: error: Invalid type expression in `TypeAliasType` for `BadAlias20` [aliases_typealiastype] +aliases_typealiastype.py:66:14: error: Type alias `BadAlias21` references itself, creating a circular dependency [aliases_typealiastype] +""" diff --git a/conformance/results/basilisk/aliases_variance.toml b/conformance/results/basilisk/aliases_variance.toml new file mode 100644 index 000000000..19ef4ea2f --- /dev/null +++ b/conformance/results/basilisk/aliases_variance.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +aliases_variance.py:24:16: error: Variance incompatibility in base class `ClassA`: `T_co` is covariant but the corresponding type parameter is invariant [generics_variance] +aliases_variance.py:28:16: error: Variance incompatibility in base class `A_Alias_1`: `T_co` is covariant but the corresponding type parameter is invariant [generics_variance] +aliases_variance.py:32:16: error: Variance incompatibility in base class `A_Alias_2`: `T_co` is covariant but the corresponding type parameter is invariant [generics_variance] +aliases_variance.py:44:16: error: Variance incompatibility in base class `B_Alias_1`: `T_contra` is contravariant but the corresponding type parameter is invariant [generics_variance] +""" diff --git a/conformance/results/basilisk/annotations_coroutines.toml b/conformance/results/basilisk/annotations_coroutines.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/annotations_coroutines.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/annotations_forward_refs.toml b/conformance/results/basilisk/annotations_forward_refs.toml new file mode 100644 index 000000000..aa704ef86 --- /dev/null +++ b/conformance/results/basilisk/annotations_forward_refs.toml @@ -0,0 +1,25 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +annotations_forward_refs.py:24:1: error: Invalid type expression in annotation for `bad3` [annotations_forward_refs] +annotations_forward_refs.py:25:1: error: Invalid type expression in annotation for `bad4` [annotations_forward_refs] +annotations_forward_refs.py:41:5: error: Invalid type expression in annotation for parameter `p1` [annotations_forward_refs] +annotations_forward_refs.py:42:5: error: Invalid type expression in annotation for parameter `p2` [annotations_forward_refs] +annotations_forward_refs.py:43:5: error: Invalid type expression in annotation for parameter `p3` [annotations_forward_refs] +annotations_forward_refs.py:44:5: error: Invalid type expression in annotation for parameter `p4` [annotations_forward_refs] +annotations_forward_refs.py:45:5: error: Invalid type expression in annotation for parameter `p5` [annotations_forward_refs] +annotations_forward_refs.py:46:5: error: Invalid type expression in annotation for parameter `p6` [annotations_forward_refs] +annotations_forward_refs.py:47:5: error: Invalid type expression in annotation for parameter `p7` [annotations_forward_refs] +annotations_forward_refs.py:48:5: error: Invalid type expression in annotation for parameter `p8` [annotations_forward_refs] +annotations_forward_refs.py:49:5: error: Invalid type expression in annotation for parameter `p9` [annotations_forward_refs] +annotations_forward_refs.py:50:5: error: Invalid type expression in annotation for parameter `p10` [annotations_forward_refs] +annotations_forward_refs.py:51:5: error: Invalid type expression in annotation for parameter `p11` [annotations_forward_refs] +annotations_forward_refs.py:52:5: error: Invalid type expression in annotation for parameter `p12` [annotations_forward_refs] +annotations_forward_refs.py:53:5: error: Invalid type expression in annotation for parameter `p13` [annotations_forward_refs] +annotations_forward_refs.py:54:5: error: Invalid type expression in annotation for parameter `p14` [annotations_forward_refs] +annotations_forward_refs.py:55:5: error: Invalid type expression in annotation for parameter `p15` [annotations_forward_refs] +annotations_forward_refs.py:80:5: error: Invalid type expression in annotation for attribute `ClassF` [annotations_forward_refs] +annotations_forward_refs.py:89:5: error: Invalid type expression in annotation for attribute `y` [annotations_forward_refs] +""" diff --git a/conformance/results/basilisk/annotations_generators.toml b/conformance/results/basilisk/annotations_generators.toml new file mode 100644 index 000000000..fad409909 --- /dev/null +++ b/conformance/results/basilisk/annotations_generators.toml @@ -0,0 +1,23 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +annotations_generators.py:51:1: error: Generator function `generator2` is missing a return statement; declared return type is `c` [annotations_generators] +annotations_generators.py:51:1: error: Generator `generator2` is annotated to return `C` but has no valid return path [annotations_generators_2] +annotations_generators.py:54:9: error: Incompatible return type in generator `generator2`: `bool` is not assignable to `c` [annotations_generators] +annotations_generators.py:57:9: error: Incompatible yield type in `generator2`: `int` is not assignable to `a` [annotations_generators] +annotations_generators.py:57:9: error: Incompatible yield type in `generator2`: expected `A`, got `3` [annotations_generators_2] +annotations_generators.py:66:9: error: Incompatible yield type in `generator3`: `int` is not assignable to `a` [annotations_generators] +annotations_generators.py:66:9: error: Incompatible yield type in `generator3`: expected `A`, got `3` [annotations_generators_2] +annotations_generators.py:75:5: error: Incompatible yield type in `generator5`: `b` is not assignable to `a` [annotations_generators] +annotations_generators.py:75:5: error: Incompatible yield type in `generator5`: expected `A`, got `B()` [annotations_generators_2] +annotations_generators.py:86:21: error: Generator function `generator8` has incompatible return type `int` [annotations_generators] +annotations_generators.py:91:27: error: Generator function `generator9` has incompatible return type `int` [annotations_generators] +annotations_generators.py:118:5: error: Incompatible `yield from` in `generator18`: sub-generator yields `a` but `b` is expected [annotations_generators] +annotations_generators.py:118:5: error: Incompatible `yield from` in `generator18`: `generator17` yields `A` but `B` expected [annotations_generators_2] +annotations_generators.py:119:5: error: Incompatible `yield from` in `generator18`: list element type `int` is not assignable to yield type `b` [annotations_generators] +annotations_generators.py:119:5: error: Incompatible `yield from` in `generator18`: list elements are `int` but `B` expected [annotations_generators_2] +annotations_generators.py:135:5: error: Incompatible `yield from` send type in `generator22`: outer sends `str` but sub-generator accepts `int` [annotations_generators] +annotations_generators.py:135:5: error: Incompatible send type in `yield from` in `generator22`: `generator21` expects send type `int` but outer generator sends `str` [annotations_generators_2] +""" diff --git a/conformance/results/basilisk/annotations_methods.toml b/conformance/results/basilisk/annotations_methods.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/annotations_methods.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/annotations_typeexpr.toml b/conformance/results/basilisk/annotations_typeexpr.toml new file mode 100644 index 000000000..f4c9ebe2c --- /dev/null +++ b/conformance/results/basilisk/annotations_typeexpr.toml @@ -0,0 +1,22 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +annotations_typeexpr.py:88:5: error: Invalid type expression in annotation for parameter `p1` [annotations_forward_refs] +annotations_typeexpr.py:89:5: error: Invalid type expression in annotation for parameter `p2` [annotations_forward_refs] +annotations_typeexpr.py:90:5: error: Invalid type expression in annotation for parameter `p3` [annotations_forward_refs] +annotations_typeexpr.py:91:5: error: Invalid type expression in annotation for parameter `p4` [annotations_forward_refs] +annotations_typeexpr.py:92:5: error: Invalid type expression in annotation for parameter `p5` [annotations_forward_refs] +annotations_typeexpr.py:93:5: error: Invalid type expression in annotation for parameter `p6` [annotations_forward_refs] +annotations_typeexpr.py:94:5: error: Invalid type expression in annotation for parameter `p7` [annotations_forward_refs] +annotations_typeexpr.py:95:5: error: Invalid type expression in annotation for parameter `p8` [annotations_forward_refs] +annotations_typeexpr.py:96:5: error: Invalid type expression in annotation for parameter `p9` [annotations_forward_refs] +annotations_typeexpr.py:96:9: error: Variable `var1` is not a valid type and cannot be used as an annotation [aliases_implicit] +annotations_typeexpr.py:97:5: error: Invalid type annotation on `p10` — numeric literals are not valid types [annotations_typeexpr] +annotations_typeexpr.py:98:5: error: Invalid type annotation on `p11` — numeric literals are not valid types [annotations_typeexpr] +annotations_typeexpr.py:99:5: error: Invalid type expression in annotation for parameter `p12` [annotations_forward_refs] +annotations_typeexpr.py:100:5: error: Invalid type expression in annotation for parameter `p13` [annotations_forward_refs] +annotations_typeexpr.py:101:5: error: Invalid type expression in annotation for parameter `p14` [annotations_forward_refs] +annotations_typeexpr.py:102:5: error: Invalid type expression in annotation for parameter `p15` [annotations_forward_refs] +""" diff --git a/conformance/results/basilisk/callables_annotation.toml b/conformance/results/basilisk/callables_annotation.toml new file mode 100644 index 000000000..4c7319930 --- /dev/null +++ b/conformance/results/basilisk/callables_annotation.toml @@ -0,0 +1,22 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +callables_annotation.py:25:5: error: Too few arguments for `cb`: expected 2 but got 1 [callables_protocol] +callables_annotation.py:26:11: error: Argument 2 to `cb` has incompatible type `int`; expected `str` [callables_protocol] +callables_annotation.py:27:5: error: Too many arguments for `cb`: expected 2 but got 3 [callables_protocol] +callables_annotation.py:29:5: error: `Callable` parameter `cb` does not accept keyword arguments [callables_protocol] +callables_annotation.py:35:5: error: Too many arguments for `cb`: expected 0 but got 1 [callables_protocol] +callables_annotation.py:55:1: error: Invalid type argument count in annotation `Callable[int]` on `v1`: `callable` takes 2 type arguments but 1 was provided [callables_annotation] +callables_annotation.py:56:1: error: Invalid `Callable` annotation on `v2`: first argument `int` is not a valid parameter specification; expected `[arg_types]`, `...`, a `ParamSpec`, or `Concatenate[...]` [callables_annotation] +callables_annotation.py:57:1: error: Invalid `Callable` annotation on `v3`: return type `[int]` is a list literal; use a plain type instead [callables_annotation] +callables_annotation.py:58:1: error: Invalid type argument count in annotation `Callable[int, int, int]` on `v4`: `callable` takes 2 type arguments but 3 were provided [callables_annotation] +callables_annotation.py:59:1: error: Invalid `Callable` annotation on `v5`: `[...]` is not valid; use bare `...` for an arbitrary parameter list [callables_annotation] +callables_annotation.py:91:1: error: Function `test_cb2` incompatible with `Callable[Concatenate[int, ...], str]`: needs at least 1 positional param(s) but has 0 [callables_protocol_2] +callables_annotation.py:93:1: error: Function `test_cb4` incompatible with `Callable[Concatenate[int, ...], str]`: Concatenate requires positional params [callables_protocol_2] +callables_annotation.py:159:5: error: Type mismatch: `err1` is annotated `Proto5[Any]` (proto5[any]) but assigned proto8 [assignment_compatibility] +callables_annotation.py:172:5: error: Type mismatch: `f2` is annotated `Callback2[...]` (callback2[...]) but assigned Callable[[], str] [assignment_compatibility] +callables_annotation.py:187:5: error: Type mismatch: `f2` is annotated `Callable[Concatenate[str, ...], str]` (Callable[[concatenate[str, ...]], str]) but assigned Callable[[int, str], str] [assignment_compatibility] +callables_annotation.py:189:5: error: Type mismatch: `f4` is annotated `CallbackWithStr[...]` (callbackwithstr[...]) but assigned Callable[[int, str], str] [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/callables_kwargs.toml b/conformance/results/basilisk/callables_kwargs.toml new file mode 100644 index 000000000..73fbb3367 --- /dev/null +++ b/conformance/results/basilisk/callables_kwargs.toml @@ -0,0 +1,19 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +callables_kwargs.py:46:5: error: Call to `func1` missing required keyword arguments from `TD2` [callables_kwargs] +callables_kwargs.py:51:5: error: Keyword `v4` in call to `func1` is not a key of TypedDict `TD2` [callables_kwargs] +callables_kwargs.py:52:5: error: Cannot pass positional arguments to `func1` for Unpack[TD2] kwargs [callables_kwargs] +callables_kwargs.py:58:5: error: Cannot spread `my_dict: dict[str, str]` into `func1` with Unpack[TD2] kwargs [callables_kwargs] +callables_kwargs.py:63:5: error: Keyword `v1` in call to `func1` conflicts with `**td2` [callables_kwargs] +callables_kwargs.py:64:11: error: Argument `v3` of `func2` expects `str` but received an `int` literal [calls_argument_type] +callables_kwargs.py:65:5: error: Keyword `v1` in call to `func2` conflicts with `**td2` [callables_kwargs] +callables_kwargs.py:101:1: error: Function `func1` incompatible with `TDProtocol3`: keyword param `v2` type `str` vs `int` [callables_protocol_2] +callables_kwargs.py:102:1: error: Function `func1` incompatible with `TDProtocol4`: requires keyword `v3` not in protocol [callables_protocol_2] +callables_kwargs.py:103:1: error: Function `func1` incompatible with `TDProtocol5`: missing required params [callables_protocol_2] +callables_kwargs.py:111:1: error: Parameter `v1` overlaps with TypedDict `TD2` key `v1` [callables_kwargs] +callables_kwargs.py:122:1: error: Invalid `**kwargs: Unpack[T]`: `T` is a TypeVar, not a TypedDict [callables_kwargs] +callables_kwargs.py:134:1: error: Function `func7` incompatible with `TDProtocol6`: missing `**kwargs` [callables_protocol_2] +""" diff --git a/conformance/results/basilisk/callables_protocol.toml b/conformance/results/basilisk/callables_protocol.toml new file mode 100644 index 000000000..09950285d --- /dev/null +++ b/conformance/results/basilisk/callables_protocol.toml @@ -0,0 +1,25 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +callables_protocol.py:35:1: error: Function `cb1_bad1` incompatible with `Proto1`: missing keyword param `max_len` [callables_protocol_2] +callables_protocol.py:35:1: error: Function `cb1_bad1` incompatible with `Proto1`: requires keyword `max_items` not in protocol [callables_protocol_2] +callables_protocol.py:36:1: error: Function `cb1_bad2` incompatible with `Proto1`: missing keyword param `max_len` [callables_protocol_2] +callables_protocol.py:37:1: error: Function `cb1_bad3` incompatible with `Proto1`: keyword param `max_len` needs default [callables_protocol_2] +callables_protocol.py:37:1: error: Function `cb1_bad3` incompatible with `Proto1`: keyword param `max_len` type `str | None` vs `int | None` [callables_protocol_2] +callables_protocol.py:67:1: error: Function `cb2_bad1` incompatible with `Proto2`: missing `**kwargs` [callables_protocol_2] +callables_protocol.py:68:1: error: Function `cb2_bad2` incompatible with `Proto2`: *args type `str` vs `bytes` [callables_protocol_2] +callables_protocol.py:69:1: error: Function `cb2_bad3` incompatible with `Proto2`: **kwargs type `bytes` vs `str` [callables_protocol_2] +callables_protocol.py:70:1: error: Function `cb2_bad4` incompatible with `Proto2`: missing `*args` [callables_protocol_2] +callables_protocol.py:97:1: error: Function `cb4_bad1` cannot satisfy protocol `Proto4`: protocol has extra attributes [callables_protocol_2] +callables_protocol.py:121:1: error: Cannot assign function `cb6_bad1` to non-protocol type `NotProto6` [callables_protocol_2] +callables_protocol.py:169:1: error: Function `cb8_bad1` incompatible with `Proto8`: overload param `x` type `str` not accepted by `int` [callables_protocol_2] +callables_protocol.py:186:5: error: Cannot assign `str` to `Proto9.other_attribute` of type `int` [callables_protocol_2] +callables_protocol.py:187:5: error: Protocol `Proto9` has no attribute `xxx` [callables_protocol_2] +callables_protocol.py:197:7: error: Protocol `Proto9` has no attribute `other_attribute2` [callables_protocol_2] +callables_protocol.py:238:1: error: Function `cb11_bad1` incompatible with `Proto11`: param `y` is pos-only but must accept keyword [callables_protocol_2] +callables_protocol.py:260:1: error: Function `cb12_bad1` incompatible with `Proto12`: missing keyword param `kwarg1` [callables_protocol_2] +callables_protocol.py:284:1: error: Function `cb13_no_default` incompatible with `Proto13_Default`: param `path` needs default [callables_protocol_2] +callables_protocol.py:311:1: error: Function `cb14_no_default` incompatible with `Proto14_Default`: keyword param `path` needs default [callables_protocol_2] +""" diff --git a/conformance/results/basilisk/callables_subtyping.toml b/conformance/results/basilisk/callables_subtyping.toml new file mode 100644 index 000000000..60ae16397 --- /dev/null +++ b/conformance/results/basilisk/callables_subtyping.toml @@ -0,0 +1,40 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +callables_subtyping.py:26:5: error: Type mismatch: `f6` is annotated `Callable[[float], float]` (Callable[[float], float]) but assigned Callable[[int], int] [assignment_compatibility] +callables_subtyping.py:26:5: error: Callable subtyping violation: parameter type(s) of `cb3` are not supertypes of `Callable[[float], float]` parameter types (parameters must be contravariant) [callables_subtyping] +callables_subtyping.py:29:5: error: Type mismatch: `f8` is annotated `Callable[[int], int]` (Callable[[int], int]) but assigned Callable[[float], float] [assignment_compatibility] +callables_subtyping.py:29:5: error: Callable subtyping violation: return type `float` is not a subtype of `int` (return types must be covariant) [callables_subtyping] +callables_subtyping.py:51:5: error: Type mismatch: `f1` is annotated `Standard2` (standard2) but assigned posonly2 [assignment_compatibility] +callables_subtyping.py:52:5: error: Type mismatch: `f2` is annotated `Standard2` (standard2) but assigned kwonly2 [assignment_compatibility] +callables_subtyping.py:55:5: error: Type mismatch: `f4` is annotated `PosOnly2` (posonly2) but assigned kwonly2 [assignment_compatibility] +callables_subtyping.py:58:5: error: Type mismatch: `f6` is annotated `KwOnly2` (kwonly2) but assigned posonly2 [assignment_compatibility] +callables_subtyping.py:82:5: error: Type mismatch: `f3` is annotated `IntArgs3` (intargs3) but assigned noargs3 [assignment_compatibility] +callables_subtyping.py:85:5: error: Type mismatch: `f5` is annotated `FloatArgs3` (floatargs3) but assigned noargs3 [assignment_compatibility] +callables_subtyping.py:86:5: error: Type mismatch: `f6` is annotated `FloatArgs3` (floatargs3) but assigned intargs3 [assignment_compatibility] +callables_subtyping.py:116:5: error: Type mismatch: `f1` is annotated `PosOnly4` (posonly4) but assigned intargs4 [assignment_compatibility] +callables_subtyping.py:119:5: error: Type mismatch: `f4` is annotated `IntStrArgs4` (intstrargs4) but assigned strargs4 [assignment_compatibility] +callables_subtyping.py:120:5: error: Type mismatch: `f5` is annotated `IntStrArgs4` (intstrargs4) but assigned intargs4 [assignment_compatibility] +callables_subtyping.py:122:5: error: Type mismatch: `f7` is annotated `StrArgs4` (strargs4) but assigned intargs4 [assignment_compatibility] +callables_subtyping.py:124:5: error: Type mismatch: `f9` is annotated `IntArgs4` (intargs4) but assigned strargs4 [assignment_compatibility] +callables_subtyping.py:125:5: error: Type mismatch: `f10` is annotated `Standard4` (standard4) but assigned intstrargs4 [assignment_compatibility] +callables_subtyping.py:126:5: error: Type mismatch: `f11` is annotated `Standard4` (standard4) but assigned strargs4 [assignment_compatibility] +callables_subtyping.py:151:5: error: Type mismatch: `f3` is annotated `IntKwargs5` (intkwargs5) but assigned nokwargs5 [assignment_compatibility] +callables_subtyping.py:154:5: error: Type mismatch: `f5` is annotated `FloatKwargs5` (floatkwargs5) but assigned nokwargs5 [assignment_compatibility] +callables_subtyping.py:155:5: error: Type mismatch: `f6` is annotated `FloatKwargs5` (floatkwargs5) but assigned intkwargs5 [assignment_compatibility] +callables_subtyping.py:187:5: error: Type mismatch: `f1` is annotated `KwOnly6` (kwonly6) but assigned intkwargs6 [assignment_compatibility] +callables_subtyping.py:190:5: error: Type mismatch: `f4` is annotated `IntStrKwargs6` (intstrkwargs6) but assigned strkwargs6 [assignment_compatibility] +callables_subtyping.py:191:5: error: Type mismatch: `f5` is annotated `IntStrKwargs6` (intstrkwargs6) but assigned intkwargs6 [assignment_compatibility] +callables_subtyping.py:193:5: error: Type mismatch: `f7` is annotated `StrKwargs6` (strkwargs6) but assigned intkwargs6 [assignment_compatibility] +callables_subtyping.py:195:5: error: Type mismatch: `f9` is annotated `IntKwargs6` (intkwargs6) but assigned strkwargs6 [assignment_compatibility] +callables_subtyping.py:196:5: error: Type mismatch: `f10` is annotated `Standard6` (standard6) but assigned intstrkwargs6 [assignment_compatibility] +callables_subtyping.py:197:5: error: Type mismatch: `f11` is annotated `Standard6` (standard6) but assigned strkwargs6 [assignment_compatibility] +callables_subtyping.py:236:5: error: Type mismatch: `f1` is annotated `DefaultArg8` (defaultarg8) but assigned nodefaultarg8 [assignment_compatibility] +callables_subtyping.py:237:5: error: Type mismatch: `f2` is annotated `DefaultArg8` (defaultarg8) but assigned nox8 [assignment_compatibility] +callables_subtyping.py:240:5: error: Type mismatch: `f4` is annotated `NoDefaultArg8` (nodefaultarg8) but assigned nox8 [assignment_compatibility] +callables_subtyping.py:243:5: error: Type mismatch: `f6` is annotated `NoX8` (nox8) but assigned nodefaultarg8 [assignment_compatibility] +callables_subtyping.py:273:5: error: Type mismatch: `f3` is annotated `FloatArg9` (floatarg9) but assigned overloaded9 [assignment_compatibility] +callables_subtyping.py:297:5: error: Type mismatch: `f2` is annotated `Overloaded10` (overloaded10) but assigned strarg10 [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/classes_classvar.toml b/conformance/results/basilisk/classes_classvar.toml new file mode 100644 index 000000000..c35593eac --- /dev/null +++ b/conformance/results/basilisk/classes_classvar.toml @@ -0,0 +1,29 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +classes_classvar.py:38:5: error: `ClassVar` accepts at most one type argument, but `bad1` has 2 [classes_classvar] +classes_classvar.py:39:5: error: Invalid `ClassVar` argument for `bad2`: `3` is not a valid type [classes_classvar] +classes_classvar.py:40:5: error: Invalid `ClassVar` argument for `bad3`: `var` is a runtime variable, not a type [classes_classvar] +classes_classvar.py:45:5: error: `ClassVar` parameter for `bad4` cannot contain TypeVar [classes_classvar] +classes_classvar.py:46:5: error: `ClassVar` parameter for `bad5` cannot contain TypeVar [classes_classvar] +classes_classvar.py:47:5: error: `ClassVar` parameter for `bad6` cannot contain ParamSpec [classes_classvar] +classes_classvar.py:52:5: error: Type mismatch in `ClassVar` attribute `bad8`: annotated as `list[str]` but initialized with a dict literal [classes_classvar] +classes_classvar.py:54:5: error: `ClassVar` cannot be nested inside another type in attribute `bad9` [classes_classvar] +classes_classvar.py:54:5: error: `ClassVar` cannot be used inside `Final` for attribute `bad9` [qualifiers_final_annotation] +classes_classvar.py:55:5: error: `ClassVar` cannot be nested inside another type in attribute `bad10` [classes_classvar] +classes_classvar.py:69:23: error: `ClassVar` is not allowed in parameter annotation for `a` [classes_classvar] +classes_classvar.py:70:9: error: Type mismatch: `x` is annotated `ClassVar[str]` (classvar[str]) but assigned str [assignment_compatibility] +classes_classvar.py:70:9: error: `ClassVar` is not allowed in local variable annotation for `x` [classes_classvar] +classes_classvar.py:71:9: error: `ClassVar` is not allowed in self-attribute annotation for `xx` [classes_classvar] +classes_classvar.py:73:9: error: `ClassVar` is not allowed in the return annotation of `method2` [classes_classvar] +classes_classvar.py:77:1: error: Type mismatch: `bad11` is annotated `ClassVar[int]` (classvar[int]) but assigned int [assignment_compatibility] +classes_classvar.py:77:1: error: `ClassVar` is not allowed in module-level annotation for `bad11` [classes_classvar] +classes_classvar.py:78:1: error: `ClassVar` is not allowed in right-hand side of module-level assignment for `bad12` [classes_classvar] +classes_classvar.py:111:1: error: Cannot assign to `ClassVar` attribute `stats` through an instance of `Starship` [classes_classvar] +classes_classvar.py:140:1: error: Class `ProtoAImpl` is not compatible with protocol `ProtoA`: attribute `x` is required to be a class variable (`ClassVar`) but is declared as an instance variable [classes_classvar] +classes_classvar.py:140:1: error: Class `ProtoAImpl` is not compatible with protocol `ProtoA`: attribute `y` is required to be a class variable (`ClassVar`) but is not defined at class level [classes_classvar] +classes_classvar.py:140:1: error: Class `ProtoAImpl` is not compatible with protocol `ProtoA`: attribute `z` is required to be a class variable (`ClassVar`) but is not defined at class level [classes_classvar] +classes_classvar.py:140:1: error: Class `ProtoAImpl` is incompatible with protocol `ProtoA`: missing instance variable `z` [protocols_definition_2] +""" diff --git a/conformance/results/basilisk/classes_override.toml b/conformance/results/basilisk/classes_override.toml new file mode 100644 index 000000000..d7897143a --- /dev/null +++ b/conformance/results/basilisk/classes_override.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +classes_override.py:53:9: error: Method `method3` in `ChildA` is decorated with `@override` but no matching method exists in any base class [classes_override_3] +classes_override.py:65:9: error: Method `method4` in `ChildA` is decorated with `@override` but no matching method exists in any base class [classes_override_3] +classes_override.py:79:9: error: Method `static_method1` in `ChildA` is decorated with `@override` but no matching method exists in any base class [classes_override_3] +classes_override.py:84:9: error: Method `class_method1` in `ChildA` is decorated with `@override` but no matching method exists in any base class [classes_override_3] +classes_override.py:89:9: error: Method `property1` in `ChildA` is decorated with `@override` but no matching method exists in any base class [classes_override_3] +""" diff --git a/conformance/results/basilisk/constructors_call_init.toml b/conformance/results/basilisk/constructors_call_init.toml new file mode 100644 index 000000000..ad3f4129e --- /dev/null +++ b/conformance/results/basilisk/constructors_call_init.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +constructors_call_init.py:21:1: error: Class1[int].__init__ parameter `x` expects `int` but received a `float` literal [generics_defaults_referential_2] +constructors_call_init.py:21:13: error: Argument type `float` is incompatible with parameter `x` of type `int` in `Class1.__init__` [constructors_call_init] +constructors_call_init.py:42:1: error: `Class2` instance is not compatible with `Self` type of `Class3` in `__init__` [constructors_call_init] +constructors_call_init.py:56:1: error: `Class4[str]()` is incompatible: `__init__` expects `self: Class4[int]` but received `Class4[str]` [constructors_call_init] +constructors_call_init.py:107:5: error: Class-scoped type variables should not be used in the `self` annotation of `__init__` in class `Class8` [constructors_call_init] +constructors_call_init.py:130:1: error: Class `Class11` does not define `__init__` or `__new__` and inherits only from `object`; constructor does not accept arguments [constructors_call_init] +""" diff --git a/conformance/results/basilisk/constructors_call_metaclass.toml b/conformance/results/basilisk/constructors_call_metaclass.toml new file mode 100644 index 000000000..020ad8a5f --- /dev/null +++ b/conformance/results/basilisk/constructors_call_metaclass.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +constructors_call_metaclass.py:54:1: error: Call to `Class3()` is missing 1 required argument for `__new__` (expected 1, got 0) [calls_argument_count] +constructors_call_metaclass.py:68:1: error: Call to `Class4()` is missing 1 required argument for `__new__` (expected 1, got 0) [calls_argument_count] +""" diff --git a/conformance/results/basilisk/constructors_call_new.toml b/conformance/results/basilisk/constructors_call_new.toml new file mode 100644 index 000000000..39fbf567d --- /dev/null +++ b/conformance/results/basilisk/constructors_call_new.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +constructors_call_new.py:21:13: error: Argument type `float` is incompatible with parameter `x` of type `int` in `Class1.__new__` [constructors_call_new] +constructors_call_new.py:148:1: error: `Class11[str]()` is incompatible: `__new__` expects `cls: type[Class11[int]]` but received `type[Class11[str]]` [constructors_call_new] +""" diff --git a/conformance/results/basilisk/constructors_call_type.toml b/conformance/results/basilisk/constructors_call_type.toml new file mode 100644 index 000000000..56a59f0b5 --- /dev/null +++ b/conformance/results/basilisk/constructors_call_type.toml @@ -0,0 +1,14 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +constructors_call_type.py:30:5: error: `Class1` constructor requires at least 2 argument(s) but 0 were provided via `type[Class1]` [constructors_call_type] +constructors_call_type.py:40:5: error: `Class2` constructor requires at least 2 argument(s) but 0 were provided via `type[Class2]` [constructors_call_type] +constructors_call_type.py:50:5: error: `Class3` constructor requires at least 2 argument(s) but 0 were provided via `type[Class3]` [constructors_call_type] +constructors_call_type.py:59:5: error: `Class4` constructor takes no arguments but 1 argument(s) were provided via `type[Class4]` [constructors_call_type] +constructors_call_type.py:64:5: error: Cannot pass arguments to constructor of unbound type variable `T`; its constructor signature is unknown [constructors_call_type] +constructors_call_type.py:72:5: error: `Class1` constructor requires at least 2 argument(s) but 0 were provided via `type[Class1]` [constructors_call_type] +constructors_call_type.py:81:5: error: `Class2` constructor requires at least 2 argument(s) but 1 were provided via `type[Class2]` [constructors_call_type] +constructors_call_type.py:82:12: error: Argument 2 has type `int` but parameter `y` of `Class2` constructor expects `str` [constructors_call_type] +""" diff --git a/conformance/results/basilisk/constructors_callable.toml b/conformance/results/basilisk/constructors_callable.toml new file mode 100644 index 000000000..4a09f2734 --- /dev/null +++ b/conformance/results/basilisk/constructors_callable.toml @@ -0,0 +1,20 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +constructors_callable.py:38:1: error: Call to the constructor-derived callable for `Class1` is missing required argument `x` (expected 1, got 0) [constructors_callable] +constructors_callable.py:39:1: error: Unexpected keyword argument `y` in call to the constructor-derived callable for `Class1` [constructors_callable] +constructors_callable.py:51:1: error: Call to the constructor-derived callable for `Class2` has 1 too many positional argument (expected at most 0, got 1) [constructors_callable] +constructors_callable.py:66:1: error: Call to the constructor-derived callable for `Class3` is missing required argument `x` (expected 1, got 0) [constructors_callable] +constructors_callable.py:67:1: error: Unexpected keyword argument `y` in call to the constructor-derived callable for `Class3` [constructors_callable] +constructors_callable.py:68:1: error: Call to the constructor-derived callable for `Class3` has 1 too many positional argument (expected at most 1, got 2) [constructors_callable] +constructors_callable.py:81:1: error: Call to the constructor-derived callable for `Class4` is missing required argument `x` (expected 1, got 0) [constructors_callable] +constructors_callable.py:82:1: error: Unexpected keyword argument `y` in call to the constructor-derived callable for `Class4` [constructors_callable] +constructors_callable.py:129:1: error: Call to the constructor-derived callable for `Class6` has 1 too many positional argument (expected at most 0, got 1) [constructors_callable] +constructors_callable.py:146:1: error: Call to the constructor-derived callable for `Class6Any` has 1 too many positional argument (expected at most 0, got 1) [constructors_callable] +constructors_callable.py:185:10: error: Argument for the `list[T]` parameter of the constructor-derived callable for `Class8` is a `str` literal — no assignment of type variable `T` makes it valid [constructors_callable] +constructors_callable.py:187:1: error: Inconsistent binding for type variable `T` in call to the constructor-derived callable for `Class8`: `list[int]` vs `list[str]` [constructors_callable] +constructors_callable.py:197:10: error: Argument for the `list[T]` parameter of the constructor-derived callable for `Class9` is a `str` literal — no assignment of type variable `T` makes it valid [constructors_callable] +constructors_callable.py:199:1: error: Inconsistent binding for type variable `T` in call to the constructor-derived callable for `Class9`: `list[int]` vs `list[str]` [constructors_callable] +""" diff --git a/conformance/results/basilisk/constructors_consistency.toml b/conformance/results/basilisk/constructors_consistency.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/constructors_consistency.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/dataclasses_descriptors.toml b/conformance/results/basilisk/dataclasses_descriptors.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/dataclasses_descriptors.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/dataclasses_final.toml b/conformance/results/basilisk/dataclasses_final.toml new file mode 100644 index 000000000..27f88ef50 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_final.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_final.py:27:1: error: Cannot assign to `D.final_classvar` — it is declared `Final` in `D` [qualifiers_final_annotation_2] +dataclasses_final.py:35:1: error: Cannot assign to `d.final_no_default` — it is declared `Final` in `d` [qualifiers_final_annotation_2] +dataclasses_final.py:36:1: error: Cannot assign to `d.final_with_default` — it is declared `Final` in `d` [qualifiers_final_annotation_2] +dataclasses_final.py:37:1: error: Cannot assign to `D.final_no_default` — it is declared `Final` in `D` [qualifiers_final_annotation_2] +dataclasses_final.py:38:1: error: Cannot assign to `D.final_with_default` — it is declared `Final` in `D` [qualifiers_final_annotation_2] +""" diff --git a/conformance/results/basilisk/dataclasses_frozen.toml b/conformance/results/basilisk/dataclasses_frozen.toml new file mode 100644 index 000000000..4097251e6 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_frozen.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_frozen.py:16:1: error: Cannot assign to attribute `a` of frozen dataclass `DC1` instance `dc1` [dataclasses_frozen] +dataclasses_frozen.py:17:1: error: Cannot assign to attribute `b` of frozen dataclass `DC1` instance `dc1` [dataclasses_frozen] +dataclasses_frozen.py:22:1: error: Non-frozen dataclass `DC2` cannot inherit from frozen dataclass `DC1` [dataclasses_frozen] +dataclasses_frozen.py:32:1: error: Frozen dataclass `DC4` cannot inherit from non-frozen dataclass `DC3` [dataclasses_frozen] +""" diff --git a/conformance/results/basilisk/dataclasses_hash.toml b/conformance/results/basilisk/dataclasses_hash.toml new file mode 100644 index 000000000..e958053e1 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_hash.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_hash.py:17:1: error: Cannot call `.__hash__()` on `DC1` instance: `DC1.__hash__` is `None` [dataclasses_hash] +dataclasses_hash.py:18:1: error: Cannot assign `DC1` instance to `Hashable`-annotated variable `v1`: `DC1` is not hashable [dataclasses_hash] +dataclasses_hash.py:39:1: error: Cannot call `.__hash__()` on `DC3` instance: `DC3.__hash__` is `None` [dataclasses_hash] +dataclasses_hash.py:40:1: error: Cannot assign `DC3` instance to `Hashable`-annotated variable `v3`: `DC3` is not hashable [dataclasses_hash] +""" diff --git a/conformance/results/basilisk/dataclasses_inheritance.toml b/conformance/results/basilisk/dataclasses_inheritance.toml new file mode 100644 index 000000000..58c442b1f --- /dev/null +++ b/conformance/results/basilisk/dataclasses_inheritance.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_inheritance.py:62:5: error: Attribute `x` in `DC7` has type `ClassVar[int]` but base class `DC6` declares it as `int` [classes_override_2] +dataclasses_inheritance.py:66:5: error: Attribute `y` in `DC7` has type `int` but base class `DC6` declares it as `ClassVar[int]` [classes_override_2] +""" diff --git a/conformance/results/basilisk/dataclasses_kwonly.toml b/conformance/results/basilisk/dataclasses_kwonly.toml new file mode 100644 index 000000000..fd01639e2 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_kwonly.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_kwonly.py:23:11: error: Too many positional arguments to `DC1`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +dataclasses_kwonly.py:38:11: error: Too many positional arguments to `DC2`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +dataclasses_kwonly.py:53:11: error: Too many positional arguments to `DC3`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +""" diff --git a/conformance/results/basilisk/dataclasses_match_args.toml b/conformance/results/basilisk/dataclasses_match_args.toml new file mode 100644 index 000000000..5793cef05 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_match_args.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_match_args.py:42:1: error: `DC4.__match_args__` does not exist: `@dataclass(match_args=False)` suppresses `__match_args__` generation [dataclasses_match_args] +""" diff --git a/conformance/results/basilisk/dataclasses_order.toml b/conformance/results/basilisk/dataclasses_order.toml new file mode 100644 index 000000000..681193b84 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_order.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_order.py:50:4: error: Cannot compare `DC1` and `DC2` with ordering operator: `@dataclass(order=True)` comparison methods only accept the same type [dataclasses_order] +""" diff --git a/conformance/results/basilisk/dataclasses_postinit.toml b/conformance/results/basilisk/dataclasses_postinit.toml new file mode 100644 index 000000000..72a599249 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_postinit.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_postinit.py:19:37: error: `__post_init__` parameter `y` has type `int` but `InitVar` field `y` declares inner type `str` [dataclasses_postinit] +dataclasses_postinit.py:28:7: error: Cannot access `InitVar` field `x` on `dc1`: `InitVar` fields are not stored as instance attributes [dataclasses_postinit] +dataclasses_postinit.py:29:7: error: Cannot access `InitVar` field `y` on `dc1`: `InitVar` fields are not stored as instance attributes [dataclasses_postinit] +dataclasses_postinit.py:36:9: error: `__post_init__` in `DC2` has 1 parameter after `self`, but 2 `InitVar` fields declared [dataclasses_postinit] +""" diff --git a/conformance/results/basilisk/dataclasses_slots.toml b/conformance/results/basilisk/dataclasses_slots.toml new file mode 100644 index 000000000..60397ea01 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_slots.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_slots.py:11:7: error: `__slots__` is already defined in `DC1`: cannot also use `@dataclass(slots=True)` [dataclasses_slots] +dataclasses_slots.py:25:9: error: Cannot assign to attribute `y` on `DC2`: `y` is not defined in `__slots__` [dataclasses_slots] +dataclasses_slots.py:38:9: error: Cannot assign to attribute `y` on `DC3`: `y` is not defined in `__slots__` [dataclasses_slots] +dataclasses_slots.py:66:1: error: Cannot access `__slots__` on `DC6`: class does not define `__slots__` [dataclasses_slots] +dataclasses_slots.py:69:1: error: Cannot access `__slots__` on `DC6` instance: class does not define `__slots__` [dataclasses_slots] +""" diff --git a/conformance/results/basilisk/dataclasses_transform_class.toml b/conformance/results/basilisk/dataclasses_transform_class.toml new file mode 100644 index 000000000..381a4f0de --- /dev/null +++ b/conformance/results/basilisk/dataclasses_transform_class.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_transform_class.py:51:7: error: Non-frozen class `Customer1Subclass` cannot inherit from frozen dataclass-transform class `Customer1` [dataclasses_transform_class] +dataclasses_transform_class.py:63:1: error: Cannot assign to attribute `id` of frozen dataclass-transform class `Customer1` instance `c1_1` [dataclasses_transform_class] +dataclasses_transform_class.py:66:8: error: Constructor of `Customer1` only accepts keyword arguments (kw_only=True) [dataclasses_transform_class] +dataclasses_transform_class.py:72:1: error: Comparison operator not supported: `Customer1` does not synthesise ordering methods (order=False by default) [dataclasses_transform_class] +dataclasses_transform_class.py:82:8: error: Constructor of `Customer2` only accepts keyword arguments (kw_only=True) [dataclasses_transform_class] +dataclasses_transform_class.py:122:1: error: Cannot assign to attribute `id` of frozen dataclass-transform class `Customer3` instance `c3_1` [dataclasses_transform_class] +""" diff --git a/conformance/results/basilisk/dataclasses_transform_converter.toml b/conformance/results/basilisk/dataclasses_transform_converter.toml new file mode 100644 index 000000000..f2547ddbf --- /dev/null +++ b/conformance/results/basilisk/dataclasses_transform_converter.toml @@ -0,0 +1,15 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_transform_converter.py:48:31: error: Converter `bad_converter1` must accept at least one positional argument [dataclasses_transform_class] +dataclasses_transform_converter.py:49:31: error: Converter `bad_converter2` must accept at least one positional argument [dataclasses_transform_class] +dataclasses_transform_converter.py:107:5: error: Argument for field `field0` of `DC2` has type `int`, but its converter accepts `str` [dataclasses_transform_class] +dataclasses_transform_converter.py:108:23: error: Argument for field `field3` of `DC2` has type `int`, but its converter accepts `str | bytes` [dataclasses_transform_class] +dataclasses_transform_converter.py:109:29: error: Argument for field `field4` of `DC2` has type `complex`, but its converter accepts `str | list[str]` [dataclasses_transform_class] +dataclasses_transform_converter.py:118:1: error: Cannot assign `int` to field `field0` of `DC2`: its converter accepts `str` [dataclasses_transform_class] +dataclasses_transform_converter.py:119:1: error: Cannot assign `int` to field `field3` of `DC2`: its converter accepts `str | bytes` [dataclasses_transform_class] +dataclasses_transform_converter.py:130:59: error: `default` of type `int` is not assignable to the converter's input type `str` [dataclasses_transform_class] +dataclasses_transform_converter.py:133:59: error: `default_factory` of type `int` is not assignable to the converter's input type `str` [dataclasses_transform_class] +""" diff --git a/conformance/results/basilisk/dataclasses_transform_field.toml b/conformance/results/basilisk/dataclasses_transform_field.toml new file mode 100644 index 000000000..1a77ac4b4 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_transform_field.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_transform_field.py:64:1: error: Unexpected keyword argument `id` for `CustomerModel1`: field `id` is not included in `__init__` [dataclasses_kwonly] +dataclasses_transform_field.py:75:16: error: Too many positional arguments to `CustomerModel2`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +""" diff --git a/conformance/results/basilisk/dataclasses_transform_func.toml b/conformance/results/basilisk/dataclasses_transform_func.toml new file mode 100644 index 000000000..d52b4c6f9 --- /dev/null +++ b/conformance/results/basilisk/dataclasses_transform_func.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_transform_func.py:56:1: error: Type mismatch: `c1_2.name` is typed `str` but assigned an `int` literal [assignment_compatibility] +dataclasses_transform_func.py:60:1: error: Cannot use ordering operator on `Customer1`: comparison methods are not synthesized (order is not enabled) [dataclasses_order] +dataclasses_transform_func.py:64:36: error: Unknown field `salary` in constructor of dataclass `Customer1` [constructors_call_init] +dataclasses_transform_func.py:70:18: error: Too many positional arguments to `Customer2`: 2 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +dataclasses_transform_func.py:88:1: error: Non-frozen dataclass `Customer3Subclass` cannot inherit from frozen dataclass `Customer3` [dataclasses_frozen] +dataclasses_transform_func.py:96:1: error: Cannot assign to attribute `id` of frozen dataclass `Customer3` instance `c3_1` [dataclasses_frozen] +""" diff --git a/conformance/results/basilisk/dataclasses_transform_meta.toml b/conformance/results/basilisk/dataclasses_transform_meta.toml new file mode 100644 index 000000000..c944a486e --- /dev/null +++ b/conformance/results/basilisk/dataclasses_transform_meta.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_transform_meta.py:51:1: error: Non-frozen class `Customer1Subclass` cannot inherit from frozen dataclass_transform class `Customer1` [dataclasses_transform_meta] +dataclasses_transform_meta.py:63:1: error: Cannot assign to attribute `id` of frozen dataclass_transform class `Customer1` instance `c1_1` [dataclasses_transform_meta] +dataclasses_transform_meta.py:66:8: error: Positional argument(s) passed to `Customer1` whose constructor is keyword-only (dataclass_transform `kw_only_default=True`) [dataclasses_transform_meta] +dataclasses_transform_meta.py:73:6: error: Ordering comparison on `c1_1` instance: class `Customer1` does not synthesize comparison methods (missing `order=True`) [dataclasses_transform_meta] +dataclasses_transform_meta.py:83:8: error: Positional argument(s) passed to `Customer2` whose constructor is keyword-only (dataclass_transform `kw_only_default=True`) [dataclasses_transform_meta] +dataclasses_transform_meta.py:103:1: error: Cannot assign to attribute `id` of frozen dataclass_transform class `Customer3` instance `c3_1` [dataclasses_transform_meta] +""" diff --git a/conformance/results/basilisk/dataclasses_usage.toml b/conformance/results/basilisk/dataclasses_usage.toml new file mode 100644 index 000000000..c3e5f0deb --- /dev/null +++ b/conformance/results/basilisk/dataclasses_usage.toml @@ -0,0 +1,18 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +dataclasses_usage.py:51:6: error: Call to `InventoryItem()` is missing 1 required field argument (expected at least 2, got 1) [calls_argument_count] +dataclasses_usage.py:52:28: error: Argument 2 to `InventoryItem()` has type `str` but field `unit_price` expects `float` [calls_argument_count] +dataclasses_usage.py:53:36: error: Too many positional arguments to `InventoryItem`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +dataclasses_usage.py:62:5: error: Dataclass field `b` without a default cannot follow a field with a default in `DC1` [dataclasses_inheritance] +dataclasses_usage.py:68:5: error: Dataclass field `b` without a default cannot follow a field with a default in `DC2` [dataclasses_inheritance] +dataclasses_usage.py:74:5: error: Dataclass field `b` without a default cannot follow a field with a default in `DC3` [dataclasses_inheritance] +dataclasses_usage.py:84:13: error: Too many positional arguments to `DC4`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +dataclasses_usage.py:89:5: error: Field `a` is annotated as `int` but `default_factory=str` produces `str` values [dataclasses_usage] +dataclasses_usage.py:128:8: error: Too many positional arguments to `DC7`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +dataclasses_usage.py:131:1: error: Call to `DC8()` is missing 1 required argument for `__init__` (expected 2, got 1) [calls_argument_count] +dataclasses_usage.py:180:1: error: Cannot pass arguments to `DC13()`: `@dataclass(init=False)` is set with no explicit `__init__` method defined [calls_argument_count] +dataclasses_usage.py:246:12: error: Too many positional arguments to `DC19`: 1 argument(s) must be passed as keyword arguments [dataclasses_kwonly] +""" diff --git a/conformance/results/basilisk/directives_assert_type.toml b/conformance/results/basilisk/directives_assert_type.toml new file mode 100644 index 000000000..d664115f5 --- /dev/null +++ b/conformance/results/basilisk/directives_assert_type.toml @@ -0,0 +1,14 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_assert_type.py:27:5: error: Type mismatch in `assert_type()`: expression has type `int | str` but expected `int` [directives_assert_type_2] +directives_assert_type.py:28:5: error: Type mismatch in `assert_type()`: expression has type `int | str` but expected `Any` [directives_assert_type_2] +directives_assert_type.py:29:5: error: Type mismatch in `assert_type()`: expression has type `Any` but expected `int` [directives_assert_type_2] +directives_assert_type.py:30:5: error: Type mismatch in `assert_type()`: expression has type `Literal[4]` but expected `int` [directives_assert_type_2] +directives_assert_type.py:32:5: error: `assert_type()` requires exactly 2 arguments (value, type), got 0 [directives_assert_type] +directives_assert_type.py:33:5: error: Type mismatch in `assert_type()`: expression has type `str` but expected `int` [directives_assert_type_2] +directives_assert_type.py:34:5: error: `assert_type()` requires exactly 2 arguments (value, type), got 3 [directives_assert_type] +directives_assert_type.py:41:5: error: Type mismatch in `assert_type()`: expression has type `str` but expected `str | Literal["spam"]` [directives_assert_type_2] +""" diff --git a/conformance/results/basilisk/directives_cast.toml b/conformance/results/basilisk/directives_cast.toml new file mode 100644 index 000000000..da50c394b --- /dev/null +++ b/conformance/results/basilisk/directives_cast.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_cast.py:15:8: error: `cast()` requires exactly 2 arguments (type, value), got 0 [directives_cast] +directives_cast.py:16:13: error: First argument of `cast()` must be a type, not a value literal [directives_cast] +directives_cast.py:17:8: error: `cast()` requires exactly 2 arguments (type, value), got 3 [directives_cast] +""" diff --git a/conformance/results/basilisk/directives_deprecated.toml b/conformance/results/basilisk/directives_deprecated.toml new file mode 100644 index 000000000..edc6584bd --- /dev/null +++ b/conformance/results/basilisk/directives_deprecated.toml @@ -0,0 +1,19 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_deprecated.py:18:1: error: Use of deprecated class `Ham` [directives_deprecated] +directives_deprecated.py:24:1: error: Use of deprecated function `norwegian_blue` [directives_deprecated] +directives_deprecated.py:25:5: error: Use of deprecated function `norwegian_blue` [directives_deprecated] +directives_deprecated.py:30:1: error: Use of deprecated overload `foo` [directives_deprecated] +directives_deprecated.py:34:7: error: Use of deprecated class `Ham` [directives_deprecated] +directives_deprecated.py:41:5: error: Use of deprecated method `Spam.__add__` [directives_deprecated] +directives_deprecated.py:42:1: error: Use of deprecated method `Spam.__add__` [directives_deprecated] +directives_deprecated.py:44:1: error: Use of deprecated property `Spam.greasy` [directives_deprecated] +directives_deprecated.py:47:1: error: Use of deprecated property setter `Spam.shape` [directives_deprecated] +directives_deprecated.py:48:1: error: Use of deprecated property setter `Spam.shape` [directives_deprecated] +directives_deprecated.py:58:1: error: Use of deprecated method `Invocable.__call__` [directives_deprecated] +directives_deprecated.py:69:1: error: Use of deprecated function `lorem` [directives_deprecated] +directives_deprecated.py:98:5: error: Use of deprecated method `foo` [directives_deprecated] +""" diff --git a/conformance/results/basilisk/directives_disjoint_base.toml b/conformance/results/basilisk/directives_disjoint_base.toml new file mode 100644 index 000000000..d4975e800 --- /dev/null +++ b/conformance/results/basilisk/directives_disjoint_base.toml @@ -0,0 +1,14 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_disjoint_base.py:69:7: error: Class has incompatible disjoint bases (Left, Right): no single base is a subclass of all the others [directives_disjoint_base] +directives_disjoint_base.py:73:7: error: Class has incompatible disjoint bases (LeftChild, Right): no single base is a subclass of all the others [directives_disjoint_base] +directives_disjoint_base.py:77:7: error: Class has incompatible disjoint bases (Left, Right): no single base is a subclass of all the others [directives_disjoint_base] +directives_disjoint_base.py:81:7: error: Class has incompatible disjoint bases (Left, Record): no single base is a subclass of all the others [directives_disjoint_base] +directives_disjoint_base.py:105:7: error: Class has incompatible disjoint bases (SlotBase1, SlotBase2): no single base is a subclass of all the others [directives_disjoint_base] +directives_disjoint_base.py:113:2: error: `@disjoint_base` cannot be applied to a function [directives_disjoint_base] +directives_disjoint_base.py:118:2: error: `@disjoint_base` cannot be applied to a TypedDict [directives_disjoint_base] +directives_disjoint_base.py:123:2: error: `@disjoint_base` cannot be applied to a Protocol [directives_disjoint_base] +""" diff --git a/conformance/results/basilisk/directives_no_type_check.toml b/conformance/results/basilisk/directives_no_type_check.toml new file mode 100644 index 000000000..9c5403adf --- /dev/null +++ b/conformance/results/basilisk/directives_no_type_check.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_no_type_check.py:26:5: error: Function `func1` is annotated `-> None` but has a `return` statement with a value [returns_compatibility_2] +directives_no_type_check.py:29:7: error: Argument `a` of `func1` expects `int` but received a `bytes` literal [calls_argument_type] +directives_no_type_check.py:29:19: error: Argument `b` of `func1` expects `str` but received a `bytes` literal [calls_argument_type] +directives_no_type_check.py:32:1: error: Call to `func1` is missing 2 required arguments (expected 2, got 0) [calls_argument_count] +""" diff --git a/conformance/results/basilisk/directives_reveal_type.toml b/conformance/results/basilisk/directives_reveal_type.toml new file mode 100644 index 000000000..462a74842 --- /dev/null +++ b/conformance/results/basilisk/directives_reveal_type.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_reveal_type.py:19:5: error: `reveal_type()` requires exactly 1 argument, got 0 [directives_reveal_type] +directives_reveal_type.py:20:5: error: `reveal_type()` requires exactly 1 argument, got 2 [directives_reveal_type] +""" diff --git a/conformance/results/basilisk/directives_type_checking.toml b/conformance/results/basilisk/directives_type_checking.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/directives_type_checking.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/directives_type_ignore.toml b/conformance/results/basilisk/directives_type_ignore.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/directives_type_ignore.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/directives_type_ignore_file1.toml b/conformance/results/basilisk/directives_type_ignore_file1.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/directives_type_ignore_file1.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/directives_type_ignore_file2.toml b/conformance/results/basilisk/directives_type_ignore_file2.toml new file mode 100644 index 000000000..1cdfbe772 --- /dev/null +++ b/conformance/results/basilisk/directives_type_ignore_file2.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_type_ignore_file2.py:14:1: error: Type mismatch: `x` is annotated `int` (int) but assigned str [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/directives_version_platform.toml b/conformance/results/basilisk/directives_version_platform.toml new file mode 100644 index 000000000..3a6d5df8e --- /dev/null +++ b/conformance/results/basilisk/directives_version_platform.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +directives_version_platform.py:33:19: error: Variable `val3` is only defined in a dead version/platform branch [directives_version_platform] +directives_version_platform.py:50:19: error: Variable `val6` is only defined in a dead version/platform branch [directives_version_platform] +directives_version_platform.py:59:19: error: Variable `val9` is only defined in a dead version/platform branch [directives_version_platform] +""" diff --git a/conformance/results/basilisk/enums_behaviors.toml b/conformance/results/basilisk/enums_behaviors.toml new file mode 100644 index 000000000..99159562b --- /dev/null +++ b/conformance/results/basilisk/enums_behaviors.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +enums_behaviors.py:28:1: error: Redundant `assert_type` with `Literal[Color.RED]` on enum-typed parameter [enums_expansion] +enums_behaviors.py:32:1: error: Redundant `assert_type` with `Literal[Color.BLUE]` on enum-typed parameter [enums_expansion] +enums_behaviors.py:44:7: error: Cannot subclass `Shape` because it has members and is implicitly final [enums_behaviors] +""" diff --git a/conformance/results/basilisk/enums_definition.toml b/conformance/results/basilisk/enums_definition.toml new file mode 100644 index 000000000..f8a2201b1 --- /dev/null +++ b/conformance/results/basilisk/enums_definition.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +enums_definition.py:92:1: error: Enum `Color12` has no member `BLUE` for the target Python version — it is defined only under a version guard that is not satisfied [enums_definition] +""" diff --git a/conformance/results/basilisk/enums_expansion.toml b/conformance/results/basilisk/enums_expansion.toml new file mode 100644 index 000000000..8895a74ec --- /dev/null +++ b/conformance/results/basilisk/enums_expansion.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +enums_expansion.py:25:9: error: Redundant `assert_type` with `Literal[Color.GREEN]` on enum-typed parameter [enums_expansion] +enums_expansion.py:53:9: error: Redundant `assert_type` with `Literal[CustomFlags.FLAG3]` on enum-typed parameter [enums_expansion] +""" diff --git a/conformance/results/basilisk/enums_member_names.toml b/conformance/results/basilisk/enums_member_names.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/enums_member_names.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/enums_member_values.toml b/conformance/results/basilisk/enums_member_values.toml new file mode 100644 index 000000000..a3c22f7e0 --- /dev/null +++ b/conformance/results/basilisk/enums_member_values.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +enums_member_values.py:78:13: error: Enum member value has type `str` but `_value_` is declared as `int` in `Color3` [enums_member_values] +enums_member_values.py:85:9: error: `self._value_` is assigned from a parameter of type `int` but `_value_` is declared as `str` in `Planet2` [enums_member_values] +""" diff --git a/conformance/results/basilisk/enums_members.toml b/conformance/results/basilisk/enums_members.toml new file mode 100644 index 000000000..e5cd20d45 --- /dev/null +++ b/conformance/results/basilisk/enums_members.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +enums_members.py:54:5: error: Enum member `DOG` in `Pet3` should not have an explicit type annotation [enums_members] +enums_members.py:86:12: error: `Pet4.converter` is not an enum member and cannot be used in `Literal[Pet4.converter]` [enums_members_2] +enums_members.py:87:12: error: `Pet4.transform` is not an enum member and cannot be used in `Literal[Pet4.transform]` [enums_members_2] +enums_members.py:88:10: error: `Pet4.species` is not an enum member and cannot be used in `Literal[Pet4.species]` [enums_members_2] +enums_members.py:89:8: error: `Pet4.speak` is not an enum member and cannot be used in `Literal[Pet4.speak]` [enums_members_2] +enums_members.py:120:1: error: `Example.b` is not an enum member and cannot be used in `Literal[Example.b]` [enums_members_2] +enums_members.py:133:9: error: `Example2.__B` is not an enum member and cannot be used in `Literal[Example2.__B]` [enums_members_2] +""" diff --git a/conformance/results/basilisk/exceptions_context_managers.toml b/conformance/results/basilisk/exceptions_context_managers.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/exceptions_context_managers.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/generics_base_class.toml b/conformance/results/basilisk/generics_base_class.toml new file mode 100644 index 000000000..7b9638250 --- /dev/null +++ b/conformance/results/basilisk/generics_base_class.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_base_class.py:26:5: error: Argument `x` of `takes_dict_incorrect` expects `dict[str, list[object]]` but received `SymbolTable` (subclass of `dict[str, list[Node]]`) -- ` list[Node]` is not assignable to ` list[object]` because `list` is invariant [generics_base_class_3] +generics_base_class.py:29:11: error: Invalid type expression in annotation for parameter `y` [annotations_forward_refs] +generics_base_class.py:30:5: error: Invalid type expression in annotation for local variable `x` [annotations_forward_refs] +generics_base_class.py:49:22: error: Too many type arguments for `LinkedList`; expected at most 1, got 2 [generics_defaults_specialization] +generics_base_class.py:61:18: error: Too many type arguments for `MyDict`; expected at most 1, got 2 [generics_defaults_specialization] +generics_base_class.py:68:28: error: TypeVar `T` appears more than once in `Generic[...]` for `BadClass1` [generics_base_class] +generics_base_class.py:98:7: error: Inconsistent TypeVar ordering for `Grandparent` in base classes of `BadChild` [generics_base_class_2] +""" diff --git a/conformance/results/basilisk/generics_basic.toml b/conformance/results/basilisk/generics_basic.toml new file mode 100644 index 000000000..73a4cf67a --- /dev/null +++ b/conformance/results/basilisk/generics_basic.toml @@ -0,0 +1,24 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_basic.py:40:5: error: Constraint mismatch for TypeVar `AnyStr` in call to `concat`: argument types belong to different constraint groups [generics_basic_3] +generics_basic.py:41:5: error: Constraint mismatch for TypeVar `AnyStr` in call to `concat`: argument types belong to different constraint groups [generics_basic_3] +generics_basic.py:49:18: error: `BadConstraint1` has a single constraint; TypeVar requires 0 or 2+ constraints [generics_basic] +generics_basic.py:55:22: error: `BadConstraint2` has a constraint that is parameterized by a type variable [generics_basic] +generics_basic.py:69:5: error: Constraint mismatch for TypeVar `AnyStr` in call to `concat`: argument types belong to different constraint groups [generics_basic_3] +generics_basic.py:121:24: error: TypeVar `T` appears more than once in `Generic[...]` for `Pair2` [generics_base_class] +generics_basic.py:157:5: error: Invalid subscript key type `int` for `m1` which expects key type `str` [generics_basic_3] +generics_basic.py:158:5: error: Invalid subscript key type `int` for `m2` which expects key type `str` [generics_basic_3] +generics_basic.py:162:20: error: Non-TypeVar argument in `Generic[...]` or `Protocol[...]` for `Bad1` [generics_basic_2] +generics_basic.py:163:21: error: Non-TypeVar argument in `Generic[...]` or `Protocol[...]` for `Bad2` [generics_basic_2] +generics_basic.py:171:7: error: Type parameter`T_co` used in a base class of `Bad3` but not listed in `Generic[...]` or `Protocol[...]` [generics_basic_2] +generics_basic.py:172:7: error: Type parameter`T_co` used in a base class of `Bad4` but not listed in `Generic[...]` or `Protocol[...]` [generics_basic_2] +generics_basic.py:208:1: error: Class `GenericMetaInstance` uses a parameterized generic type as its metaclass [generics_basic_3] +generics_basic.py:223:22: error: Argument `y` of `takes_two_lists` expects `list[T]` but received a scalar literal where `list[T]` is required — no type-variable assignment makes it valid [calls_argument_type] +generics_basic.py:232:5: error: TypeVar `T` is not bound in this scope [generics_variance_inference] +generics_basic.py:240:26: error: Argument `y` of `takes_two_int_lists` expects `list[T_int]` but received a scalar literal where `list[T_int]` is required — no type-variable assignment makes it valid [calls_argument_type] +generics_basic.py:241:26: error: Argument `y` of `takes_two_int_lists` expects `list[T_int]` but received `list[str]` where `list[T_int]` is required — `str` does not satisfy type variable `T_int` [calls_argument_type] +generics_basic.py:251:5: error: TypeVar `T` is not bound in this scope [generics_variance_inference] +""" diff --git a/conformance/results/basilisk/generics_defaults.toml b/conformance/results/basilisk/generics_defaults.toml new file mode 100644 index 000000000..65fad56a4 --- /dev/null +++ b/conformance/results/basilisk/generics_defaults.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_defaults.py:24:53: error: Non-default `TypeVar` `T` follows a default `TypeVar` in `Generic[...]` for `NonDefaultFollowsDefault` [generics_defaults] +generics_defaults.py:66:8: error: Too few type arguments for `AllTheDefaults`; expected at least 2, got 1 [generics_defaults_specialization] +generics_defaults.py:152:12: error: `TypeVar` `Invalid1` has `default=int` which is not a subtype of `bound=str` [generics_defaults_2] +generics_defaults.py:159:12: error: `TypeVar` `Invalid2` has `default=int` which is not one of the constraints (`float`, `str`) [generics_defaults_2] +generics_defaults.py:177:1: error: Type mismatch in `assert_type()`: expression has type `int` but expected `Any` [directives_assert_type_2] +generics_defaults.py:188:25: error: `TypeVar` `T5` with `default=` cannot follow a `TypeVarTuple` in `Generic[...]` for `Foo5` [generics_defaults] +""" diff --git a/conformance/results/basilisk/generics_defaults_referential.toml b/conformance/results/basilisk/generics_defaults_referential.toml new file mode 100644 index 000000000..5322a56eb --- /dev/null +++ b/conformance/results/basilisk/generics_defaults_referential.toml @@ -0,0 +1,15 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_defaults_referential.py:37:5: error: Argument `s` of type `str` is not compatible with parameter `b: int` in `Foo.__init__` (`TypeVar` default propagation) [generics_variance_inference] +generics_defaults_referential.py:38:5: error: Argument `s` of type `str` is not compatible with parameter `a: int` in `Foo.__init__` (`TypeVar` default propagation) [generics_variance_inference] +generics_defaults_referential.py:54:7: error: TypeVar `Start2T` has default `StopT` which is not properly ordered in `Generic[...]` for `slice2` [generics_defaults_referential_2] +generics_defaults_referential.py:61:1: error: TypeVar `S2` has default `S1` which references an outer-scope TypeVar [generics_defaults_referential_2] +generics_defaults_referential.py:69:12: error: `TypeVar` `Invalid1` has `default=X1` but `X1`'s bound `int` is not a subtype of `Invalid1`'s bound `str` [generics_defaults_referential] +generics_defaults_referential.py:69:12: error: TypeVar `Invalid1` has default `X1` with bound `int` which is not a subtype of `Invalid1`'s bound `str` [generics_defaults_referential_2] +generics_defaults_referential.py:75:12: error: TypeVar `Invalid2` has default `Y1` with upper bound `int` which is incompatible with constraints `float, str` [generics_defaults_referential_2] +generics_defaults_referential.py:79:16: error: `TypeVar` `AlsoInvalid2` has `default=Y2` but `Y2`'s constraints {`int`, `str`} are not a subset of `AlsoInvalid2`'s constraints {`bool`, `complex`} [generics_defaults_referential] +generics_defaults_referential.py:79:16: error: TypeVar `AlsoInvalid2`'s constraints `{bool, complex}` are not a superset of default TypeVar `Y2`'s constraints `{int, str}` [generics_defaults_referential_2] +""" diff --git a/conformance/results/basilisk/generics_defaults_specialization.toml b/conformance/results/basilisk/generics_defaults_specialization.toml new file mode 100644 index 000000000..4574e8570 --- /dev/null +++ b/conformance/results/basilisk/generics_defaults_specialization.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_defaults_specialization.py:30:1: error: Too many type arguments for `MyAlias`; expected at most 1, got 2 [generics_defaults_specialization] +generics_defaults_specialization.py:46:1: error: Type mismatch: `x2` is annotated `type[Bar[int]]` but assigned bare `Bar`, whose type parameter `DefaultStrT` defaults to `str` [assignment_compatibility] +generics_defaults_specialization.py:56:1: error: `Foo` cannot be subscripted; it has no free type parameters [generics_defaults_specialization] +""" diff --git a/conformance/results/basilisk/generics_paramspec_basic.toml b/conformance/results/basilisk/generics_paramspec_basic.toml new file mode 100644 index 000000000..14e41e8b7 --- /dev/null +++ b/conformance/results/basilisk/generics_paramspec_basic.toml @@ -0,0 +1,14 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_paramspec_basic.py:10:13: error: Variable name `WrongName` does not match the name string `NotIt` passed to `ParamSpec` [generics_basic] +generics_paramspec_basic.py:15:1: error: `TypeAlias` `TA1` has a `ParamSpec` as its type, which is invalid; `ParamSpec` can only be used in `Callable[P, ReturnType]` [annotations_forward_refs] +generics_paramspec_basic.py:23:11: error: Invalid type expression in annotation for parameter `x` [annotations_forward_refs] +generics_paramspec_basic.py:27:11: error: Invalid type expression in annotation for parameter `x` [annotations_forward_refs] +generics_paramspec_basic.py:31:11: error: Invalid type expression in annotation for parameter `x` [annotations_forward_refs] +generics_paramspec_basic.py:35:11: error: Invalid type expression in annotation for parameter `x` [annotations_forward_refs] +generics_paramspec_basic.py:39:12: error: Invalid type expression in annotation for parameter `args` [annotations_forward_refs] +generics_paramspec_basic.py:39:23: error: Invalid type expression in annotation for parameter `kwargs` [annotations_forward_refs] +""" diff --git a/conformance/results/basilisk/generics_paramspec_components.toml b/conformance/results/basilisk/generics_paramspec_components.toml new file mode 100644 index 000000000..132fab868 --- /dev/null +++ b/conformance/results/basilisk/generics_paramspec_components.toml @@ -0,0 +1,22 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_paramspec_components.py:17:17: error: Invalid ParamSpec usage: `*args` must be annotated `P.args` and `**kwargs` must be annotated `P.kwargs` [callables_protocol] +generics_paramspec_components.py:20:20: error: Invalid ParamSpec usage: ParamSpec components are only valid on `*args` and `**kwargs` [callables_protocol] +generics_paramspec_components.py:23:20: error: Invalid ParamSpec usage: `*args` must be annotated `P.args` and `**kwargs` must be annotated `P.kwargs` [callables_protocol] +generics_paramspec_components.py:26:20: error: Invalid ParamSpec usage: `*args: P.args` requires a matching `**kwargs: P.kwargs` [callables_protocol] +generics_paramspec_components.py:30:17: error: Invalid ParamSpec usage: ParamSpec components used out of scope: no enclosing binding of the ParamSpec through a `Callable` parameter [callables_protocol] +generics_paramspec_components.py:35:5: error: Invalid ParamSpec usage: ParamSpec components are only valid as `*args: P.args` and `**kwargs: P.kwargs` annotations [callables_protocol] +generics_paramspec_components.py:36:5: error: Invalid ParamSpec usage: ParamSpec components are only valid as `*args: P.args` and `**kwargs: P.kwargs` annotations [callables_protocol] +generics_paramspec_components.py:38:18: error: Invalid ParamSpec usage: `*args: P.args` requires a matching `**kwargs: P.kwargs` [callables_protocol] +generics_paramspec_components.py:41:20: error: Invalid ParamSpec usage: `**kwargs: P.kwargs` requires a matching `*args: P.args` [callables_protocol] +generics_paramspec_components.py:49:9: error: Invalid ParamSpec usage: `*` must forward the `P.args` parameter, not `P.kwargs` [callables_protocol] +generics_paramspec_components.py:51:9: error: Invalid ParamSpec usage: expected 0 positional prefix arguments before the forwarded `*args`, found 1 [callables_protocol] +generics_paramspec_components.py:60:12: error: Invalid ParamSpec usage: no keyword-only parameters may appear between `*args: P.args` and `**kwargs: P.kwargs` [callables_protocol] +generics_paramspec_components.py:70:9: error: Invalid ParamSpec usage: expected 1 positional prefix argument before the forwarded `*args`, found 0 [callables_protocol] +generics_paramspec_components.py:72:9: error: Invalid ParamSpec usage: expected 1 positional prefix argument before the forwarded `*args`, found 0 [callables_protocol] +generics_paramspec_components.py:83:9: error: Invalid ParamSpec usage: prefix parameter `x` must be passed positionally before the forwarded `*args` [callables_protocol] +generics_paramspec_components.py:98:1: error: Invalid ParamSpec usage: forwarded argument 1 has type `str`, but `a_int_b_str` expects `int` [callables_protocol] +""" diff --git a/conformance/results/basilisk/generics_paramspec_semantics.toml b/conformance/results/basilisk/generics_paramspec_semantics.toml new file mode 100644 index 000000000..6dd61c21b --- /dev/null +++ b/conformance/results/basilisk/generics_paramspec_semantics.toml @@ -0,0 +1,16 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_paramspec_semantics.py:26:1: error: Invalid call to `f1`: parameter `a` is positional-only and cannot be passed by keyword [callables_protocol] +generics_paramspec_semantics.py:27:1: error: Invalid call to `f1`: argument 2 has type `str`, expected `bool` [callables_protocol] +generics_paramspec_semantics.py:46:6: error: Incompatible ParamSpec argument(s) to `func1`: arguments x_y, y_x must have identical signatures to bind `P` [callables_protocol] +generics_paramspec_semantics.py:61:1: error: Incompatible ParamSpec argument(s) to `func1`: arguments keyword_only_x, keyword_only_y must have identical signatures to bind `P` [callables_protocol] +generics_paramspec_semantics.py:98:1: error: Invalid call to `a1`: argument 1 has type `int`, expected `str` [callables_protocol] +generics_paramspec_semantics.py:108:1: error: Invalid call to `r1`: argument 1 has type `int`, expected `bool` [callables_protocol] +generics_paramspec_semantics.py:120:1: error: Invalid call to `t1`: argument 1 has type `int`, expected `str` [callables_protocol] +generics_paramspec_semantics.py:127:1: error: `one` is not compatible with the `Callable[Concatenate[...], ...]` parameter of decorator `expects_int_first`: leading parameter is `str`, but the Concatenate prefix supplies `int` [callables_protocol] +generics_paramspec_semantics.py:132:1: error: `two` is not compatible with the `Callable[Concatenate[...], ...]` parameter of decorator `expects_int_first`: expected at least 1 leading positional parameter, found 0 [callables_protocol] +generics_paramspec_semantics.py:137:1: error: `three` is not compatible with the `Callable[Concatenate[...], ...]` parameter of decorator `expects_int_first`: expected at least 1 leading positional parameter, found 0 [callables_protocol] +""" diff --git a/conformance/results/basilisk/generics_paramspec_specialization.toml b/conformance/results/basilisk/generics_paramspec_specialization.toml new file mode 100644 index 000000000..fc675cdb1 --- /dev/null +++ b/conformance/results/basilisk/generics_paramspec_specialization.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_paramspec_specialization.py:44:15: error: Type argument `int` is not valid for `ParamSpec` parameter `P1` of `ClassA` [generics_defaults_specialization] +generics_paramspec_specialization.py:54:9: error: Argument 1 to `x.f` has incompatible type `str`; expected `int` [callables_protocol] +generics_paramspec_specialization.py:55:16: error: Argument 3 to `x.f` has incompatible type `str`; expected `bool` [callables_protocol] +generics_paramspec_specialization.py:60:9: error: Argument 1 to `x.f` has incompatible type `str`; expected `int` [callables_protocol] +generics_paramspec_specialization.py:61:16: error: Argument 3 to `x.f` has incompatible type `str`; expected `bool` [callables_protocol] +""" diff --git a/conformance/results/basilisk/generics_scoping.toml b/conformance/results/basilisk/generics_scoping.toml new file mode 100644 index 000000000..222f2b8d9 --- /dev/null +++ b/conformance/results/basilisk/generics_scoping.toml @@ -0,0 +1,24 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_scoping.py:16:1: error: Type mismatch in `assert_type()`: expression has type `int` but expected `Literal[1]` [directives_assert_type_2] +generics_scoping.py:20:1: error: Type mismatch in `assert_type()`: expression has type `str` but expected `Literal["a"]` [directives_assert_type_2] +generics_scoping.py:34:1: error: Argument `'a'` of type `str` is not compatible with parameter `x: int` (TypeVar `T` is bound to `int` for instance `a: MyClass[T=int]`) [generics_variance_inference] +generics_scoping.py:50:1: error: Type mismatch in `assert_type()`: expression has type `str` but expected `Literal["abc"]` [directives_assert_type_2] +generics_scoping.py:54:1: error: Type mismatch in `assert_type()`: expression has type `bytes` but expected `Literal[b"abc"]` [directives_assert_type_2] +generics_scoping.py:61:5: error: TypeVar `S` is not bound in this scope [generics_variance_inference] +generics_scoping.py:61:8: error: Type variable `S` is not bound in function `fun_3` [generics_scoping] +generics_scoping.py:65:5: error: TypeVar `S` is not bound in this scope [generics_variance_inference] +generics_scoping.py:65:14: error: Type variable `S` is not bound in class `Bar` [generics_scoping] +generics_scoping.py:76:5: error: TypeVar `T` from outer scope cannot be used in nested class definition [generics_variance_inference] +generics_scoping.py:86:5: error: TypeVar `T` from outer scope cannot be used in nested class definition [generics_variance_inference] +generics_scoping.py:89:9: error: TypeVar `T` from outer class cannot be used in nested class body [generics_variance_inference] +generics_scoping.py:98:5: error: TypeVar `T` from enclosing class is not accessible in a TypeAlias definition [generics_variance_inference] +generics_scoping.py:98:24: error: Type variable `T` from class `Outer` cannot be used in a TypeAlias definition [generics_scoping] +generics_scoping.py:105:1: error: TypeVar `T` is not bound in this scope [generics_variance_inference] +generics_scoping.py:105:14: error: Type variable `T` is not bound in the current scope [generics_scoping] +generics_scoping.py:106:14: error: Type variable `T` is not bound in the current scope [generics_scoping] +generics_scoping.py:107:1: error: TypeVar `T` is not bound in this scope [generics_variance_inference] +""" diff --git a/conformance/results/basilisk/generics_self_advanced.toml b/conformance/results/basilisk/generics_self_advanced.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/generics_self_advanced.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/generics_self_attributes.toml b/conformance/results/basilisk/generics_self_attributes.toml new file mode 100644 index 000000000..76ff9bf5a --- /dev/null +++ b/conformance/results/basilisk/generics_self_attributes.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_self_attributes.py:26:6: error: Argument `next` is typed as `Self` in `LinkedList`, which resolves to `OrdinalLinkedList` here, but got `LinkedList` instance [generics_self_attributes] +generics_self_attributes.py:32:15: error: Cannot assign `LinkedList` to attribute `next`: `Self` resolves to `OrdinalLinkedList` here, not `LinkedList` [generics_self_attributes] +""" diff --git a/conformance/results/basilisk/generics_self_basic.toml b/conformance/results/basilisk/generics_self_basic.toml new file mode 100644 index 000000000..01aa00a8e --- /dev/null +++ b/conformance/results/basilisk/generics_self_basic.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_self_basic.py:20:9: error: Return type `Self` requires returning the current class instance, but `Shape()` is not `Self` — it would be wrong in a subclass [generics_self_basic] +generics_self_basic.py:33:9: error: Return type `Self` requires returning the current class instance, but `Shape()` is not `Self` — it would be wrong in a subclass [generics_self_basic] +generics_self_basic.py:68:26: error: `Self` is not subscriptable — it already captures the full type of the enclosing class [generics_self_basic] +""" diff --git a/conformance/results/basilisk/generics_self_protocols.toml b/conformance/results/basilisk/generics_self_protocols.toml new file mode 100644 index 000000000..9520d8eb3 --- /dev/null +++ b/conformance/results/basilisk/generics_self_protocols.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_self_protocols.py:61:19: error: Class `BadReturnType` is not compatible with protocol `ShapeProtocol`: method `set_scale` returns `int` instead of `Self` [generics_self_protocols] +generics_self_protocols.py:64:19: error: Class `ReturnDifferentClass` is not compatible with protocol `ShapeProtocol`: method `set_scale` returns `ReturnConcreteShape` instead of `Self` [generics_self_protocols] +""" diff --git a/conformance/results/basilisk/generics_self_usage.toml b/conformance/results/basilisk/generics_self_usage.toml new file mode 100644 index 000000000..44abde5ce --- /dev/null +++ b/conformance/results/basilisk/generics_self_usage.toml @@ -0,0 +1,19 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_self_usage.py:73:5: error: `Self` is not valid in a module-level function; return type of `foo` uses `Self` [generics_self_usage] +generics_self_usage.py:73:9: error: `Self` is not valid in a module-level function; parameter `bar` of `foo` uses `Self` [generics_self_usage] +generics_self_usage.py:76:1: error: `Self` is not valid outside a class body; annotation of `bar` uses `Self` [generics_self_usage] +generics_self_usage.py:82:9: error: Return type `Self` is invalid in `has_existing_self_annotation`: the `self` parameter is annotated with TypeVar `TFoo2`, so `Self` has no defined class binding [generics_self_usage] +generics_self_usage.py:87:9: error: Return type `Self` requires returning the current class instance, but `Foo3()` is not `Self` — it would be wrong in a subclass [generics_self_basic] +generics_self_usage.py:103:7: error: `Self` cannot be used as a base class or in base class type arguments for `Baz` [generics_self_usage] +generics_self_usage.py:105:7: error: `Self` cannot be used as a base class or in base class type arguments for `Baz2` [generics_self_usage] +generics_self_usage.py:108:1: error: `Self` cannot appear in a `TypeAlias` definition at module scope; `TupleSelf` uses `Self` [generics_self_usage] +generics_self_usage.py:113:9: error: `Self` is not valid in a static method; return type of `make` uses `Self` [generics_self_usage] +generics_self_usage.py:118:9: error: `Self` is not valid in a static method; return type of `return_parameter` uses `Self` [generics_self_usage] +generics_self_usage.py:118:26: error: `Self` is not valid in a static method; parameter `foo` of `return_parameter` uses `Self` [generics_self_usage] +generics_self_usage.py:123:9: error: `Self` is not valid in a metaclass method; return type of `__new__` uses `Self` [generics_self_usage] +generics_self_usage.py:127:9: error: `Self` is not valid in a metaclass method; return type of `__mul__` uses `Self` [generics_self_usage] +""" diff --git a/conformance/results/basilisk/generics_syntax_compatibility.toml b/conformance/results/basilisk/generics_syntax_compatibility.toml new file mode 100644 index 000000000..084602400 --- /dev/null +++ b/conformance/results/basilisk/generics_syntax_compatibility.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_syntax_compatibility.py:14:7: error: Class `ClassA` uses PEP 695 type parameter syntax but references traditional TypeVar `K` from outer scope [generics_syntax_compatibility] +generics_syntax_compatibility.py:26:9: error: Function `method2` uses PEP 695 type parameter syntax but references traditional TypeVar `K` from outer scope [generics_syntax_compatibility] +""" diff --git a/conformance/results/basilisk/generics_syntax_declarations.toml b/conformance/results/basilisk/generics_syntax_declarations.toml new file mode 100644 index 000000000..484b6cd4f --- /dev/null +++ b/conformance/results/basilisk/generics_syntax_declarations.toml @@ -0,0 +1,17 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_syntax_declarations.py:17:25: error: Non-TypeVar argument in `Generic[...]` or `Protocol[...]` for `ClassA` [generics_basic_2] +generics_syntax_declarations.py:25:29: error: Non-TypeVar argument in `Generic[...]` or `Protocol[...]` for `ClassC` [generics_basic_2] +generics_syntax_declarations.py:25:32: error: Non-TypeVar argument in `Generic[...]` or `Protocol[...]` for `ClassC` [generics_basic_2] +generics_syntax_declarations.py:32:9: error: Attribute `is_integer` is not defined on `str`; parameter `x` is typed as `T` (bound to `str`) [generics_syntax_declarations_2] +generics_syntax_declarations.py:44:21: error: Type parameter `T` in class `ClassD` references a type variable from an outer scope in its bound; this is not allowed [generics_syntax_declarations] +generics_syntax_declarations.py:48:17: error: Type parameter `T` in class `ClassH` has a list literal as its bound; use a tuple for constraints or a single type for an upper bound [generics_syntax_declarations] +generics_syntax_declarations.py:60:17: error: Type parameter `T` in class `ClassK` has an empty constraint tuple; constraint tuples must contain two or more types [generics_syntax_declarations] +generics_syntax_declarations.py:64:17: error: Type parameter `T` in class `ClassL` has a single-element constraint tuple; constraint tuples must contain two or more types [generics_syntax_declarations] +generics_syntax_declarations.py:71:17: error: Type parameter `T` in class `ClassM` uses a non-literal constraint; the constraint must be a literal tuple expression, not a variable [generics_syntax_declarations] +generics_syntax_declarations.py:75:18: error: Type parameter `T` in class `ClassN` has an invalid constraint element; constraint tuple elements must be types, not literal values [generics_syntax_declarations] +generics_syntax_declarations.py:79:18: error: Type parameter `T` in class `ClassO` references a type variable from an outer scope in its bound; this is not allowed [generics_syntax_declarations] +""" diff --git a/conformance/results/basilisk/generics_syntax_infer_variance.toml b/conformance/results/basilisk/generics_syntax_infer_variance.toml new file mode 100644 index 000000000..03e049d4a --- /dev/null +++ b/conformance/results/basilisk/generics_syntax_infer_variance.toml @@ -0,0 +1,24 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_syntax_infer_variance.py:15:6: error: `TypeVar` `S1` cannot use `infer_variance=True` with explicit variance flags [generics_typevartuple_basic] +generics_syntax_infer_variance.py:17:6: error: `TypeVar` `S2` cannot use `infer_variance=True` with explicit variance flags [generics_typevartuple_basic] +generics_syntax_infer_variance.py:29:1: error: Type `ShouldBeCovariant1[float]` is not assignable to `ShouldBeCovariant1[int]` (type parameter is covariant) [generics_variance_inference] +generics_syntax_infer_variance.py:47:1: error: Type `ShouldBeCovariant2[float]` is not assignable to `ShouldBeCovariant2[int]` (type parameter is covariant) [generics_variance_inference] +generics_syntax_infer_variance.py:56:1: error: Type `ShouldBeCovariant3[float]` is not assignable to `ShouldBeCovariant3[int]` (type parameter is covariant) [generics_variance_inference] +generics_syntax_infer_variance.py:85:1: error: Type `ShouldBeCovariant5[float]` is not assignable to `ShouldBeCovariant5[int]` (type parameter is covariant) [generics_variance_inference] +generics_syntax_infer_variance.py:96:1: error: Type `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]` (type parameter is covariant) [generics_variance_inference] +generics_syntax_infer_variance.py:112:1: error: Type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:113:1: error: Type `ShouldBeInvariant1[float]` is not assignable to `ShouldBeInvariant1[int]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:127:1: error: Type `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:128:1: error: Type `ShouldBeInvariant2[float]` is not assignable to `ShouldBeInvariant2[int]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:135:1: error: Type `ShouldBeInvariant3[int]` is not assignable to `ShouldBeInvariant3[float]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:136:1: error: Type `ShouldBeInvariant3[float]` is not assignable to `ShouldBeInvariant3[int]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:137:1: error: Type `ShouldBeInvariant3[int]` is not assignable to `ShouldBeInvariant3[float]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:138:1: error: Type `ShouldBeInvariant3[float]` is not assignable to `ShouldBeInvariant3[int]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:146:1: error: Type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:154:1: error: Type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float]` (type parameter is invariant) [generics_variance_inference] +generics_syntax_infer_variance.py:165:1: error: Type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float]` (type parameter is contravariant) [generics_variance_inference] +""" diff --git a/conformance/results/basilisk/generics_syntax_scoping.toml b/conformance/results/basilisk/generics_syntax_scoping.toml new file mode 100644 index 000000000..d04922a2e --- /dev/null +++ b/conformance/results/basilisk/generics_syntax_scoping.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_syntax_scoping.py:14:7: error: PEP 695 type parameter `T` bound references `S` from the same type parameter list [generics_syntax_scoping] +generics_syntax_scoping.py:18:7: error: PEP 695 type parameter `S` bound references `T` from the same type parameter list [generics_syntax_scoping] +generics_syntax_scoping.py:35:7: error: PEP 695 type parameter `T` is not defined at module scope; it is only accessible inside the generic class or function where it is declared [generics_syntax_scoping] +generics_syntax_scoping.py:44:1: error: PEP 695 type parameter `T` is not defined at this point: it belongs to the decorated definition, not the decorator call [generics_syntax_scoping] +generics_syntax_scoping.py:92:9: error: Method type parameter `T` shadows the enclosing class's type parameter of the same name [generics_syntax_scoping] +generics_syntax_scoping.py:95:9: error: Method type parameter `T` shadows the enclosing class's type parameter of the same name [generics_syntax_scoping] +generics_syntax_scoping.py:98:9: error: Method type parameter `T` shadows the enclosing class's type parameter of the same name [generics_syntax_scoping] +""" diff --git a/conformance/results/basilisk/generics_type_erasure.toml b/conformance/results/basilisk/generics_type_erasure.toml new file mode 100644 index 000000000..c5103a372 --- /dev/null +++ b/conformance/results/basilisk/generics_type_erasure.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_type_erasure.py:38:16: error: Argument type `str` is incompatible with parameter `label` of type `int | None` in `Node.__init__` [constructors_call_init] +generics_type_erasure.py:40:16: error: Argument type `int` is incompatible with parameter `label` of type `str | None` in `Node.__init__` [constructors_call_init] +generics_type_erasure.py:42:1: error: Cannot access instance attribute `label` on class object `Node` [generics_type_erasure] +generics_type_erasure.py:43:1: error: Cannot access instance attribute `label` on class object `Node` [generics_type_erasure] +generics_type_erasure.py:44:1: error: Cannot access instance attribute `label` on class object `Node` [generics_type_erasure] +generics_type_erasure.py:45:1: error: Cannot access instance attribute `label` on class object `Node` [generics_type_erasure] +generics_type_erasure.py:46:1: error: Cannot access instance attribute `label` on class object `type(n1)` [generics_type_erasure] +""" diff --git a/conformance/results/basilisk/generics_typevartuple_args.toml b/conformance/results/basilisk/generics_typevartuple_args.toml new file mode 100644 index 000000000..57cee861d --- /dev/null +++ b/conformance/results/basilisk/generics_typevartuple_args.toml @@ -0,0 +1,14 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_typevartuple_args.py:33:5: error: Invalid arguments for `*args` of `exec_le`: `str` is not assignable to `Env` [generics_typevartuple_args] +generics_typevartuple_args.py:34:5: error: Invalid arguments for `*args` of `exec_le`: `str` is not assignable to `Env` [generics_typevartuple_args] +generics_typevartuple_args.py:48:1: error: Invalid arguments for `*args` of `func1`: `str` is not assignable to `int` [generics_typevartuple_args] +generics_typevartuple_args.py:57:1: error: Invalid arguments for `*args` of `func2`: `int` is not assignable to `str` [generics_typevartuple_args] +generics_typevartuple_args.py:58:1: error: Invalid arguments for `*args` of `func2`: expected at least 2 arguments, got 1 [generics_typevartuple_args] +generics_typevartuple_args.py:59:1: error: Invalid arguments for `*args` of `func2`: expected at least 2 arguments, got 1 [generics_typevartuple_args] +generics_typevartuple_args.py:67:1: error: Invalid arguments for `*args` of `func3`: expected exactly 2 arguments, got 1 [generics_typevartuple_args] +generics_typevartuple_args.py:75:1: error: Invalid arguments for `*args` of `func4`: every argument must be a tuple of the same length, but found lengths [1, 2] [generics_typevartuple_args] +""" diff --git a/conformance/results/basilisk/generics_typevartuple_basic.toml b/conformance/results/basilisk/generics_typevartuple_basic.toml new file mode 100644 index 000000000..7768276b5 --- /dev/null +++ b/conformance/results/basilisk/generics_typevartuple_basic.toml @@ -0,0 +1,23 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_typevartuple_basic.py:42:28: error: TypeVarTuple shape mismatch: `Array` is declared with 2 type arguments, but the constructor argument is not a tuple expression [generics_typevartuple_args] +generics_typevartuple_basic.py:43:35: error: TypeVarTuple shape mismatch: `Array` is declared with 3 type arguments, but the constructor argument is a tuple of length 2 [generics_typevartuple_args] +generics_typevartuple_basic.py:44:41: error: TypeVarTuple element order mismatch: `Array` is declared `[Time, Batch, Height, Width]` but the constructor provides `[Time, Batch, Width, Height]` [generics_typevartuple_args] +generics_typevartuple_basic.py:52:22: error: `TypeVarTuple` `Shape` must be unpacked with `*` in generic parameter list [generics_typevartuple_basic_2] +generics_typevartuple_basic.py:53:24: error: `TypeVarTuple` `Shape` must be unpacked with `*` inside `tuple[...]` [generics_typevartuple_basic_2] +generics_typevartuple_basic.py:56:28: error: `TypeVarTuple` `Shape` must be unpacked with `*` inside `tuple[...]` [generics_typevartuple_basic_2] +generics_typevartuple_basic.py:59:18: error: `TypeVarTuple` `Shape` must be unpacked with `*` in annotation for `args` [generics_typevartuple_basic_2] +generics_typevartuple_basic.py:65:7: error: `TypeVarTuple` `Ts1` does not support `covariant` or `contravariant` arguments [generics_typevartuple_basic] +generics_typevartuple_basic.py:65:7: error: Invalid `TypeVarTuple` parameters: `TypeVarTuple` does not support variance specification [generics_typevartuple_basic_3] +generics_typevartuple_basic.py:66:7: error: `TypeVarTuple` `Ts2` does not accept type constraint arguments [generics_typevartuple_basic] +generics_typevartuple_basic.py:66:7: error: Invalid `TypeVarTuple` parameters: `TypeVarTuple` does not support type constraints [generics_typevartuple_basic_3] +generics_typevartuple_basic.py:67:7: error: `TypeVarTuple` `Ts3` does not support a `bound=` argument [generics_typevartuple_basic] +generics_typevartuple_basic.py:67:7: error: Invalid `TypeVarTuple` parameters: `TypeVarTuple` does not support bounds [generics_typevartuple_basic_3] +generics_typevartuple_basic.py:91:1: error: TypeVarTuple binding mismatch: arguments to `func2` must bind the shared TypeVarTuple to the same types [generics_typevartuple_args] +generics_typevartuple_basic.py:100:5: error: TypeVarTuple binding mismatch: arguments to `multiply` must bind the shared TypeVarTuple to the same types [generics_typevartuple_args] +generics_typevartuple_basic.py:101:5: error: TypeVarTuple binding mismatch: arguments to `multiply` must bind the shared TypeVarTuple to the same types [generics_typevartuple_args] +generics_typevartuple_basic.py:107:7: error: Class `Array3` has 2 `TypeVarTuple`s in its generic parameters; only one is allowed [generics_typevartuple_specialization] +""" diff --git a/conformance/results/basilisk/generics_typevartuple_callable.toml b/conformance/results/basilisk/generics_typevartuple_callable.toml new file mode 100644 index 000000000..aa120f34e --- /dev/null +++ b/conformance/results/basilisk/generics_typevartuple_callable.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_typevartuple_callable.py:26:1: error: Tuple element at index 0 has type `str` but `target` expects `int` (inferred via `TypeVarTuple`) [generics_typevartuple_callable] +""" diff --git a/conformance/results/basilisk/generics_typevartuple_concat.toml b/conformance/results/basilisk/generics_typevartuple_concat.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/generics_typevartuple_concat.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/generics_typevartuple_overloads.toml b/conformance/results/basilisk/generics_typevartuple_overloads.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/generics_typevartuple_overloads.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/generics_typevartuple_specialization.toml b/conformance/results/basilisk/generics_typevartuple_specialization.toml new file mode 100644 index 000000000..6dffa2573 --- /dev/null +++ b/conformance/results/basilisk/generics_typevartuple_specialization.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_typevartuple_specialization.py:109:1: error: Cannot use unpacked `TypeVarTuple` `*Ts` as a type argument to `IntTupleGeneric`, which has no `TypeVarTuple` parameter [generics_typevartuple_specialization_2] +generics_typevartuple_specialization.py:109:1: error: TypeVar `Ts` is not bound in this scope [generics_variance_inference] +generics_typevartuple_specialization.py:110:1: error: Cannot use unpacked tuple `*tuple[...]` as a type argument to `IntTupleGeneric`, which has no `TypeVarTuple` parameter [generics_typevartuple_specialization_2] +generics_typevartuple_specialization.py:121:1: error: Tuple type alias `TA5` has 2 unpack operators; at most one `*` unpack is allowed in a `tuple[...]` type [generics_typevartuple_specialization] +generics_typevartuple_specialization.py:122:1: error: Tuple type alias `TA6` has 2 unpack operators; at most one `*` unpack is allowed in a `tuple[...]` type [generics_typevartuple_specialization] +generics_typevartuple_specialization.py:127:5: error: `TA7` requires at least 2 plain type arguments (one per regular `TypeVar`), but 1 was provided (out of 1 total) [generics_typevartuple_specialization_2] +generics_typevartuple_specialization.py:163:8: error: `TA11` requires at least 1 plain type argument (one per regular `TypeVar`), but 0 were provided (out of 1 total) [generics_typevartuple_specialization_2] +""" diff --git a/conformance/results/basilisk/generics_typevartuple_unpack.toml b/conformance/results/basilisk/generics_typevartuple_unpack.toml new file mode 100644 index 000000000..aede487ca --- /dev/null +++ b/conformance/results/basilisk/generics_typevartuple_unpack.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_typevartuple_unpack.py:30:5: error: `Array[Batch]` has 1 type argument, but `process_batch_channels` requires at least 2 for the `TypeVarTuple` unpack pattern [generics_typevartuple_unpack] +""" diff --git a/conformance/results/basilisk/generics_upper_bound.toml b/conformance/results/basilisk/generics_upper_bound.toml new file mode 100644 index 000000000..402c012c9 --- /dev/null +++ b/conformance/results/basilisk/generics_upper_bound.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_upper_bound.py:24:14: error: `T_Bad1` has a `bound=` that is parameterized by a type variable [generics_basic] +generics_upper_bound.py:44:5: error: Type mismatch in `assert_type()`: expression has type `list[int] | set[int]` but expected `Collection[int]` [directives_assert_type_2] +generics_upper_bound.py:52:1: error: Argument of type `int` does not satisfy `TypeVar` bound `Sized` for `longer` [generics_upper_bound] +generics_upper_bound.py:57:10: error: `T_Bad2` specifies both constraints and `bound=`; these are mutually exclusive [generics_basic] +generics_upper_bound.py:57:10: error: `TypeVar` `T_Bad2` cannot have both type constraints and an upper bound [generics_typevartuple_basic] +""" diff --git a/conformance/results/basilisk/generics_variance.toml b/conformance/results/basilisk/generics_variance.toml new file mode 100644 index 000000000..d49a4175a --- /dev/null +++ b/conformance/results/basilisk/generics_variance.toml @@ -0,0 +1,19 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_variance.py:14:6: error: `TypeVar` `X1` cannot be both covariant and contravariant [generics_typevartuple_basic] +generics_variance.py:77:14: error: Variance incompatibility in base class `Inv`: `T_co` is covariant but the corresponding type parameter is invariant [generics_variance] +generics_variance.py:81:14: error: Variance incompatibility in base class `Inv`: `T_contra` is contravariant but the corresponding type parameter is invariant [generics_variance] +generics_variance.py:93:17: error: Variance incompatibility in base class `Co`: `T_contra` is contravariant but the corresponding type parameter is covariant [generics_variance] +generics_variance.py:105:21: error: Variance incompatibility in base class `Contra`: `T_co` is covariant but the corresponding type parameter is contravariant [generics_variance] +generics_variance.py:113:21: error: Variance incompatibility in base class `Contra`: `T_co` is covariant but the corresponding type parameter is contravariant [generics_variance] +generics_variance.py:126:5: error: Variance incompatibility in base class `CoContra`: `T_co` is covariant but the corresponding type parameter is contravariant [generics_variance] +generics_variance.py:132:5: error: Variance incompatibility in base class `CoContra`: `T_contra` is contravariant but the corresponding type parameter is covariant [generics_variance] +generics_variance.py:142:5: error: Variance incompatibility in base class `CoContra`: `T_co` is covariant but the corresponding type parameter is contravariant [generics_variance] +generics_variance.py:163:26: error: Variance incompatibility in base class `Contra`: `T_contra` is covariant but the corresponding type parameter is contravariant [generics_variance] +generics_variance.py:167:30: error: Variance incompatibility in base class `Contra`: `T_co` is covariant but the corresponding type parameter is contravariant [generics_variance] +generics_variance.py:191:33: error: Variance incompatibility in base class `Contra_TA`: `T_contra` is covariant but the corresponding type parameter is contravariant [generics_variance] +generics_variance.py:196:5: error: Variance incompatibility in base class `Contra_TA`: `T_co` is covariant but the corresponding type parameter is contravariant [generics_variance] +""" diff --git a/conformance/results/basilisk/generics_variance_inference.toml b/conformance/results/basilisk/generics_variance_inference.toml new file mode 100644 index 000000000..f9387d551 --- /dev/null +++ b/conformance/results/basilisk/generics_variance_inference.toml @@ -0,0 +1,29 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +generics_variance_inference.py:24:5: error: Type `ClassA[float]` is not assignable to `ClassA[int]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:25:5: error: Type `ClassA[int]` is not assignable to `ClassA[float]` (type parameter is contravariant) [generics_variance_inference] +generics_variance_inference.py:28:5: error: Type `ClassA[float]` is not assignable to `ClassA[int]` (type parameter is covariant) [generics_variance_inference] +generics_variance_inference.py:41:1: error: Type `ShouldBeCovariant1[float]` is not assignable to `ShouldBeCovariant1[int]` (type parameter is covariant) [generics_variance_inference] +generics_variance_inference.py:49:1: error: Type `ShouldBeCovariant2[float]` is not assignable to `ShouldBeCovariant2[int]` (type parameter is covariant) [generics_variance_inference] +generics_variance_inference.py:58:1: error: Type `ShouldBeCovariant3[float]` is not assignable to `ShouldBeCovariant3[int]` (type parameter is covariant) [generics_variance_inference] +generics_variance_inference.py:67:1: error: Type `ShouldBeCovariant4[float]` is not assignable to `ShouldBeCovariant4[int]` (type parameter is covariant) [generics_variance_inference] +generics_variance_inference.py:80:1: error: Type `ShouldBeCovariant5[float]` is not assignable to `ShouldBeCovariant5[int]` (type parameter is covariant) [generics_variance_inference] +generics_variance_inference.py:96:1: error: Type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:97:1: error: Type `ShouldBeInvariant1[float]` is not assignable to `ShouldBeInvariant1[int]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:111:1: error: Type `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:112:1: error: Type `ShouldBeInvariant2[float]` is not assignable to `ShouldBeInvariant2[int]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:119:1: error: Type `ShouldBeInvariant3[int]` is not assignable to `ShouldBeInvariant3[float]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:120:1: error: Type `ShouldBeInvariant3[float]` is not assignable to `ShouldBeInvariant3[int]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:121:1: error: Type `ShouldBeInvariant3[int]` is not assignable to `ShouldBeInvariant3[float]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:122:1: error: Type `ShouldBeInvariant3[float]` is not assignable to `ShouldBeInvariant3[int]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:130:1: error: Type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:138:1: error: Type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:149:1: error: Type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float]` (type parameter is contravariant) [generics_variance_inference] +generics_variance_inference.py:169:1: error: Type `ShouldBeInvariant6[float]` is not assignable to `ShouldBeInvariant6[int]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:170:1: error: Type `ShouldBeInvariant6[int]` is not assignable to `ShouldBeInvariant6[float]` (type parameter is invariant) [generics_variance_inference] +generics_variance_inference.py:181:1: error: Type `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]` (type parameter is covariant) [generics_variance_inference] +generics_variance_inference.py:194:1: error: Type `ShouldBeContravariant2[int]` is not assignable to `ShouldBeContravariant2[float]` (type parameter is contravariant) [generics_variance_inference] +""" diff --git a/conformance/results/basilisk/historical_positional.toml b/conformance/results/basilisk/historical_positional.toml new file mode 100644 index 000000000..abb39b237 --- /dev/null +++ b/conformance/results/basilisk/historical_positional.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +historical_positional.py:18:4: error: `__x` is a positional-only parameter and cannot be passed as a keyword argument [historical_positional] +historical_positional.py:26:16: error: Positional-only parameter `__y` appears after a positional-or-keyword parameter [historical_positional] +historical_positional.py:54:26: error: Positional-only parameter `__y` appears after a positional-or-keyword parameter [historical_positional] +historical_positional.py:59:6: error: `__x` is a positional-only parameter and cannot be passed as a keyword argument [historical_positional] +""" diff --git a/conformance/results/basilisk/literals_interactions.toml b/conformance/results/basilisk/literals_interactions.toml new file mode 100644 index 000000000..5c6a42c74 --- /dev/null +++ b/conformance/results/basilisk/literals_interactions.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +literals_interactions.py:14:5: error: Tuple index 5 is out of range for `tuple` of length 3 [tuples_index_2] +literals_interactions.py:15:5: error: Tuple index -5 is out of range for `tuple` of length 3 [tuples_index_2] +literals_interactions.py:16:5: error: Tuple index 4 is out of range for `tuple` of length 3 [tuples_index_2] +literals_interactions.py:17:5: error: Tuple index -4 is out of range for `tuple` of length 3 [tuples_index_2] +""" diff --git a/conformance/results/basilisk/literals_literalstring.toml b/conformance/results/basilisk/literals_literalstring.toml new file mode 100644 index 000000000..07926280a --- /dev/null +++ b/conformance/results/basilisk/literals_literalstring.toml @@ -0,0 +1,17 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +literals_literalstring.py:36:1: error: Invalid parameterization of `Literal` in annotation for `bad_union` [literals_parameterizations] +literals_literalstring.py:37:1: error: Invalid parameterization of `Literal` in annotation for `bad_nesting` [literals_parameterizations] +literals_literalstring.py:43:1: error: Type mismatch: `x2` is annotated `Literal[""]` but assigned parameter `b` with type `Literal["two"]` [literals_semantics_2] +literals_literalstring.py:43:5: error: Type mismatch: `x2` is annotated `Literal[""]` (Literal[""]) but assigned Literal["two"] [assignment_compatibility] +literals_literalstring.py:43:5: error: Cannot assign `Literal["two"]` to `Literal[""]` — literal values are incompatible [literals_literalstring] +literals_literalstring.py:65:5: error: Cannot assign f-string to `LiteralString` — interpolated variable `non_literal` has type `str`, which is not `LiteralString` [literals_literalstring] +literals_literalstring.py:73:5: error: Type mismatch: `x3` is annotated `LiteralString` (LiteralString) but assigned int [assignment_compatibility] +literals_literalstring.py:74:5: error: Type mismatch: `x4` is annotated `LiteralString` (LiteralString) but assigned bytes [assignment_compatibility] +literals_literalstring.py:119:22: error: Argument `s` has type `str` which is not compatible with TypeVar bound `LiteralString` [generics_upper_bound_2] +literals_literalstring.py:133:5: error: Cannot assign `Container(s)` to `Container[LiteralString]` — argument `s` has type `str`, not `LiteralString` [literals_literalstring] +literals_literalstring.py:171:5: error: Cannot assign `list[LiteralString]` to `list[str]` — `list` is invariant in its type parameter [literals_literalstring] +""" diff --git a/conformance/results/basilisk/literals_parameterizations.toml b/conformance/results/basilisk/literals_parameterizations.toml new file mode 100644 index 000000000..58a33d457 --- /dev/null +++ b/conformance/results/basilisk/literals_parameterizations.toml @@ -0,0 +1,27 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +literals_parameterizations.py:41:1: error: Invalid parameterization of `Literal` in annotation for `bad1` [literals_parameterizations] +literals_parameterizations.py:42:1: error: Invalid parameterization of `Literal` in annotation for `bad2` [literals_parameterizations] +literals_parameterizations.py:43:1: error: Invalid parameterization of `Literal` in annotation for `bad3` [literals_parameterizations] +literals_parameterizations.py:44:1: error: Invalid parameterization of `Literal` in annotation for `bad4` [literals_parameterizations] +literals_parameterizations.py:45:1: error: Invalid parameterization of `Literal` in annotation for `bad5` [literals_parameterizations] +literals_parameterizations.py:46:1: error: Invalid parameterization of `Literal` in annotation for `bad6` [literals_parameterizations] +literals_parameterizations.py:47:1: error: Invalid parameterization of `Literal` in annotation for `bad7` [literals_parameterizations] +literals_parameterizations.py:48:1: error: Invalid parameterization of `Literal` in annotation for `bad8` [literals_parameterizations] +literals_parameterizations.py:49:1: error: Invalid parameterization of `Literal` in annotation for `bad9` [literals_parameterizations] +literals_parameterizations.py:50:1: error: TypeVar `T` is not bound in this scope [generics_variance_inference] +literals_parameterizations.py:50:1: error: Invalid parameterization of `Literal` in annotation for `bad10` [literals_parameterizations] +literals_parameterizations.py:50:8: error: Type variable `T` is not bound in the current scope [generics_scoping] +literals_parameterizations.py:51:1: error: Invalid parameterization of `Literal` in annotation for `bad11` [literals_parameterizations] +literals_parameterizations.py:52:1: error: Invalid parameterization of `Literal` in annotation for `bad12` [literals_parameterizations] +literals_parameterizations.py:53:1: error: Invalid parameterization of `Literal` in annotation for `bad13` [literals_parameterizations] +literals_parameterizations.py:56:17: error: Invalid parameterization of `Literal` for parameter `x` [literals_parameterizations] +literals_parameterizations.py:60:1: error: `Literal` must be parameterized (variable `x` has no arguments) [literals_parameterizations] +literals_parameterizations.py:61:1: error: Invalid parameterization of `Literal` in annotation for `y` [literals_parameterizations] +literals_parameterizations.py:65:1: error: Type mismatch: `x1` is annotated `Literal["Color.RED"]` but assigned parameter `a` with type `Literal[Color.RED]` [literals_semantics_2] +literals_parameterizations.py:65:5: error: Type mismatch: `x1` is annotated `Literal["Color.RED"]` (Literal["color.red"]) but assigned color.red [assignment_compatibility] +literals_parameterizations.py:65:5: error: Variable `x1` is annotated as `Literal["Color.RED"]` (a string literal), but `Color.RED` is an enum member reference, not a string [literals_parameterizations_2] +""" diff --git a/conformance/results/basilisk/literals_semantics.toml b/conformance/results/basilisk/literals_semantics.toml new file mode 100644 index 000000000..2fdf23275 --- /dev/null +++ b/conformance/results/basilisk/literals_semantics.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +literals_semantics.py:10:1: error: Type mismatch: `v2` is annotated `Literal[3]` (Literal[3]) but assigned Literal[4] [assignment_compatibility] +literals_semantics.py:24:1: error: Type mismatch: `x1` is annotated `Literal[False]` but assigned parameter `a` with type `Literal[0]` [literals_semantics_2] +literals_semantics.py:24:5: error: Type mismatch: `x1` is annotated `Literal[False]` (Literal[false]) but assigned Literal[0] [assignment_compatibility] +literals_semantics.py:25:1: error: Type mismatch: `x2` is annotated `Literal[0]` but assigned parameter `b` with type `Literal[False]` [literals_semantics_2] +literals_semantics.py:25:5: error: Type mismatch: `x2` is annotated `Literal[0]` (Literal[0]) but assigned Literal[false] [assignment_compatibility] +literals_semantics.py:33:1: error: Augmented assignment `a += ...` is incompatible with declared type `L[3, 4, 5]` [literals_semantics_2] +""" diff --git a/conformance/results/basilisk/namedtuples_define_class.toml b/conformance/results/basilisk/namedtuples_define_class.toml new file mode 100644 index 000000000..da7b78846 --- /dev/null +++ b/conformance/results/basilisk/namedtuples_define_class.toml @@ -0,0 +1,21 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +namedtuples_define_class.py:33:7: error: NamedTuple index 3 out of range for `p1` with 3 field(s) (valid range: -3..2) [namedtuples_usage] +namedtuples_define_class.py:34:7: error: NamedTuple index -4 out of range for `p1` with 3 field(s) (valid range: -3..2) [namedtuples_usage] +namedtuples_define_class.py:45:6: error: `Point` requires at least 2 arguments, but 1 was given [constructors_call_init] +namedtuples_define_class.py:46:6: error: `Point` requires at least 2 arguments, but 1 was given [constructors_call_init] +namedtuples_define_class.py:47:15: error: Argument 1 to `Point()` has type `str`, expected `int` for field `y` [constructors_call_init] +namedtuples_define_class.py:48:18: error: Keyword argument `units` to `Point()` has type `int`, expected `str` [constructors_call_init] +namedtuples_define_class.py:49:6: error: `Point` accepts at most 3 positional arguments, but 4 were given [constructors_call_init] +namedtuples_define_class.py:50:7: error: `Point` has no field `other` [constructors_call_init] +namedtuples_define_class.py:70:7: error: `Point2` accepts at most 2 positional arguments, but 3 were given [constructors_call_init] +namedtuples_define_class.py:77:5: error: `NamedTuple` field name `_y` must not start with an underscore [namedtuples_define_class] +namedtuples_define_class.py:87:5: error: `NamedTuple` field `latitude` without a default value follows a field with a default value [namedtuples_define_class] +namedtuples_define_class.py:107:5: error: `NamedTuple` subclass `BadPointWithName` redefines field `x` from base class [namedtuples_define_class] +namedtuples_define_class.py:121:1: error: `ConditionalField` accepts at most 2 positional arguments, but 3 were given [constructors_call_init] +namedtuples_define_class.py:140:19: error: Argument 1 to `Property[...]()` has type `float`, expected `str` for field `value` [constructors_call_init] +namedtuples_define_class.py:147:7: error: `NamedTuple` class `Unit` cannot inherit from multiple bases: `object` [namedtuples_define_class] +""" diff --git a/conformance/results/basilisk/namedtuples_define_functional.toml b/conformance/results/basilisk/namedtuples_define_functional.toml new file mode 100644 index 000000000..7eb3470e4 --- /dev/null +++ b/conformance/results/basilisk/namedtuples_define_functional.toml @@ -0,0 +1,16 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +namedtuples_define_functional.py:16:8: error: Call to `Point1()` is missing 1 required argument (expected at least 2, got 1) [calls_argument_count] +namedtuples_define_functional.py:21:8: error: Call to `Point2()` is missing 2 required arguments (expected at least 2, got 0) [calls_argument_count] +namedtuples_define_functional.py:26:8: error: Call to `Point3()` has 1 too many positional argument (expected at most 2, got 3) [calls_argument_count] +namedtuples_define_functional.py:31:8: error: Call to `Point4()` is missing 1 required argument (expected at least 2, got 1) [calls_argument_count] +namedtuples_define_functional.py:31:8: error: Argument `z` is not a field of `Point4`; valid fields are: x, y [namedtuples_define_functional] +namedtuples_define_functional.py:36:8: error: Argument 2 to `Point5()` has type `str` but field `y` expects `int` [namedtuples_define_functional] +namedtuples_define_functional.py:37:8: error: Call to `Point5()` has 1 too many positional argument (expected at most 2, got 3) [calls_argument_count] +namedtuples_define_functional.py:42:8: error: Argument 2 to `Point6()` has type `str` but field `y` expects `int` [namedtuples_define_functional] +namedtuples_define_functional.py:43:8: error: Field `x` of `Point6` expects `int` but received a `float` literal [namedtuples_define_functional] +namedtuples_define_functional.py:69:1: error: Call to `NT7()` is missing 1 required argument (expected at least 1, got 0) [calls_argument_count] +""" diff --git a/conformance/results/basilisk/namedtuples_type_compat.toml b/conformance/results/basilisk/namedtuples_type_compat.toml new file mode 100644 index 000000000..569eedd02 --- /dev/null +++ b/conformance/results/basilisk/namedtuples_type_compat.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +namedtuples_type_compat.py:22:1: error: Incompatible tuple assignment: `p` is a `Point` with 3 field(s), but `tuple[int, int]` expects 2 element(s) [namedtuples_type_compat] +namedtuples_type_compat.py:23:1: error: Incompatible tuple element type at index 1: `Point` field type is `int`, but `tuple[int, str, str]` expects `str` [namedtuples_type_compat] +""" diff --git a/conformance/results/basilisk/namedtuples_usage.toml b/conformance/results/basilisk/namedtuples_usage.toml new file mode 100644 index 000000000..8372fcb08 --- /dev/null +++ b/conformance/results/basilisk/namedtuples_usage.toml @@ -0,0 +1,14 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +namedtuples_usage.py:34:7: error: NamedTuple index 3 out of range for `p` with 3 field(s) (valid range: -3..2) [namedtuples_usage] +namedtuples_usage.py:35:7: error: NamedTuple index -4 out of range for `p` with 3 field(s) (valid range: -3..2) [namedtuples_usage] +namedtuples_usage.py:40:1: error: Cannot assign to attribute `x` on NamedTuple instance `p`: NamedTuple fields are read-only [namedtuples_usage] +namedtuples_usage.py:41:1: error: Cannot assign to element of NamedTuple instance `p`: NamedTuple elements are read-only [namedtuples_usage] +namedtuples_usage.py:42:5: error: Cannot delete attribute `x` on NamedTuple instance `p`: NamedTuple fields are read-only [namedtuples_usage] +namedtuples_usage.py:43:5: error: Cannot delete element of NamedTuple instance `p`: NamedTuple elements are read-only [namedtuples_usage] +namedtuples_usage.py:52:1: error: NamedTuple unpack mismatch: too few values to unpack: `p` has 3 field(s) but only 2 variable(s) provided [namedtuples_usage] +namedtuples_usage.py:53:1: error: NamedTuple unpack mismatch: too many values to unpack: `p` has 3 field(s) but 4 variable(s) provided [namedtuples_usage] +""" diff --git a/conformance/results/basilisk/narrowing_typeguard.toml b/conformance/results/basilisk/narrowing_typeguard.toml new file mode 100644 index 000000000..653e9e59f --- /dev/null +++ b/conformance/results/basilisk/narrowing_typeguard.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +narrowing_typeguard.py:102:23: error: Method `tg_1` returns `TypeGuard` but has no parameter to narrow [narrowing_typeguard] +narrowing_typeguard.py:107:22: error: Method `tg_2` returns `TypeGuard` but has no parameter to narrow [narrowing_typeguard] +narrowing_typeguard.py:128:20: error: Function `simple_typeguard` returns `TypeGuard[int]` (subtype of `bool`), but `takes_callable_str` expects return type `str` [narrowing_typeis] +narrowing_typeguard.py:148:26: error: Function `simple_typeguard` returns `TypeGuard[int]` (subtype of `bool`), but `takes_callable_str_proto` expects return type `str` [narrowing_typeis] +""" diff --git a/conformance/results/basilisk/narrowing_typeis.toml b/conformance/results/basilisk/narrowing_typeis.toml new file mode 100644 index 000000000..c7fd4fd03 --- /dev/null +++ b/conformance/results/basilisk/narrowing_typeis.toml @@ -0,0 +1,15 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +narrowing_typeis.py:110:23: error: Method `tg_1` returns `TypeIs` but has no parameter to narrow [narrowing_typeguard] +narrowing_typeis.py:115:22: error: Method `tg_2` returns `TypeIs` but has no parameter to narrow [narrowing_typeguard] +narrowing_typeis.py:137:20: error: Function `simple_typeguard` returns `TypeIs[int]` (subtype of `bool`), but `takes_callable_str` expects return type `str` [narrowing_typeis] +narrowing_typeis.py:157:26: error: Function `simple_typeguard` returns `TypeIs[int]` (subtype of `bool`), but `takes_callable_str_proto` expects return type `str` [narrowing_typeis] +narrowing_typeis.py:174:17: error: Function `is_int_typeis` returns `TypeIs[int]`, but `takes_typeguard` expects `TypeGuard[int]` [narrowing_typeis] +narrowing_typeis.py:175:14: error: Function `is_int_typeguard` returns `TypeGuard[int]`, but `takes_typeis` expects `TypeIs[int]` [narrowing_typeis] +narrowing_typeis.py:196:18: error: Function `bool_typeis` returns `TypeIs[bool]`, but `takes_int_typeis` expects `TypeIs[int]` [narrowing_typeis] +narrowing_typeis.py:200:27: error: `TypeIs[str]` narrows to a type inconsistent with parameter type `int` [narrowing_typeis_2] +narrowing_typeis.py:204:45: error: `TypeIs[list[int]]` narrows to a type inconsistent with parameter type `list[object]` [narrowing_typeis_2] +""" diff --git a/conformance/results/basilisk/overloads_basic.toml b/conformance/results/basilisk/overloads_basic.toml new file mode 100644 index 000000000..3648144bb --- /dev/null +++ b/conformance/results/basilisk/overloads_basic.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +overloads_basic.py:39:1: error: No matching overload for `b[...]`: argument type `str` does not match any `@overload` signature of `Bytes.__getitem__` [overloads_basic] +""" diff --git a/conformance/results/basilisk/overloads_consistency.toml b/conformance/results/basilisk/overloads_consistency.toml new file mode 100644 index 000000000..1737c96f7 --- /dev/null +++ b/conformance/results/basilisk/overloads_consistency.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +overloads_consistency.py:25:5: error: Overload of `return_type` returns `str`, which is not assignable to the implementation's return type `int` [overloads_consistency_3] +overloads_consistency.py:41:5: error: An overload of `parameter_type` has a parameter type the implementation cannot accept [overloads_consistency_3] +""" diff --git a/conformance/results/basilisk/overloads_definitions.toml b/conformance/results/basilisk/overloads_definitions.toml new file mode 100644 index 000000000..ebd2b9b03 --- /dev/null +++ b/conformance/results/basilisk/overloads_definitions.toml @@ -0,0 +1,18 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +overloads_definitions.py:16:5: error: Function `func1` has only 1 `@overload` signature — at least two are required [overloads_definitions] +overloads_definitions.py:28:5: error: Function `func2` has 2 `@overload` signatures but no implementation [overloads_definitions] +overloads_definitions.py:59:9: error: Function `not_abstract` has 2 `@overload` signatures but no implementation [overloads_definitions] +overloads_definitions.py:81:9: error: Inconsistent `@staticmethod` across overloads of `func5`: it must be on every overload and the implementation, or none [overloads_consistency_2] +overloads_definitions.py:94:9: error: Inconsistent `@classmethod` across overloads of `func6`: it must be on every overload and the implementation, or none [overloads_consistency_2] +overloads_definitions.py:123:6: error: `@final` on an `@overload` signature of `invalid_final`: it should be applied only to the implementation [overloads_consistency_2] +overloads_definitions.py:138:6: error: `@final` on an `@overload` signature of `invalid_final_2`: it should be applied only to the implementation [overloads_consistency_2] +overloads_definitions.py:143:6: error: `@final` on an `@overload` signature of `invalid_final_2`: it should be applied only to the implementation [overloads_consistency_2] +overloads_definitions.py:186:9: error: Method `final_method` in `Child` overrides a `@final` method [qualifiers_final_decorator] +overloads_definitions.py:203:9: error: Method `bad_override` in `Child` is decorated with `@override` but no matching method exists in any base class [classes_override_3] +overloads_definitions.py:227:6: error: `@override` on an `@overload` signature of `to_override`: it should be applied only to the implementation [overloads_consistency_2] +overloads_definitions.py:231:6: error: `@override` on an `@overload` signature of `to_override`: it should be applied only to the implementation [overloads_consistency_2] +""" diff --git a/conformance/results/basilisk/overloads_definitions_stub.toml b/conformance/results/basilisk/overloads_definitions_stub.toml new file mode 100644 index 000000000..391363127 --- /dev/null +++ b/conformance/results/basilisk/overloads_definitions_stub.toml @@ -0,0 +1,14 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +overloads_definitions_stub.pyi:14:5: error: Function `func1` has only 1 `@overload` signature — at least two are required [overloads_definitions] +overloads_definitions_stub.pyi:33:9: error: Inconsistent `@staticmethod` across overloads of `func5`: it must be on every overload and the implementation, or none [overloads_consistency_2] +overloads_definitions_stub.pyi:41:9: error: Inconsistent `@classmethod` across overloads of `func6`: it must be on every overload and the implementation, or none [overloads_consistency_2] +overloads_definitions_stub.pyi:72:6: error: `@final` on a later overload of `invalid_final`: in a stub it must appear only on the first overload [overloads_consistency_2] +overloads_definitions_stub.pyi:85:6: error: `@final` on a later overload of `invalid_final_2`: in a stub it must appear only on the first overload [overloads_consistency_2] +overloads_definitions_stub.pyi:111:9: error: Method `final_method` in `Child` overrides a `@final` method [qualifiers_final_decorator] +overloads_definitions_stub.pyi:122:9: error: Method `bad_override` in `Child` is decorated with `@override` but no matching method exists in any base class [classes_override_3] +overloads_definitions_stub.pyi:146:6: error: `@override` on a later overload of `to_override`: in a stub it must appear only on the first overload [overloads_consistency_2] +""" diff --git a/conformance/results/basilisk/overloads_evaluation.toml b/conformance/results/basilisk/overloads_evaluation.toml new file mode 100644 index 000000000..95343fbd5 --- /dev/null +++ b/conformance/results/basilisk/overloads_evaluation.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +overloads_evaluation.py:38:1: error: Call to `example1_1` is missing 1 required argument (no overload matches — expected at least 1, got 0) [calls_argument_count] +overloads_evaluation.py:46:15: error: Argument `y` of `example1_1` expects `str` but received an `int` literal [calls_argument_type] +overloads_evaluation.py:51:12: error: Argument `x` of `example1_1` expects `str` but received an `int` literal [calls_argument_type] +overloads_evaluation.py:116:5: error: No overload of `example2` matches when argument is `str` [overloads_evaluation] +""" diff --git a/conformance/results/basilisk/protocols_class_objects.toml b/conformance/results/basilisk/protocols_class_objects.toml new file mode 100644 index 000000000..6c9ee8816 --- /dev/null +++ b/conformance/results/basilisk/protocols_class_objects.toml @@ -0,0 +1,15 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_class_objects.py:29:1: error: Protocol class `Proto` cannot be used where `type[Proto]` is expected; only concrete (non-protocol) subtypes are accepted [protocols_class_objects_2] +protocols_class_objects.py:29:1: error: Cannot instantiate Protocol class `Proto`; Protocols define interfaces, not concrete implementations [protocols_explicit] +protocols_class_objects.py:34:1: error: Protocol class `Proto` cannot be used where `type[Proto]` is expected; only concrete (non-protocol) subtypes are accepted [protocols_class_objects_2] +protocols_class_objects.py:58:1: error: Class `ConcreteA` cannot be used as an instance of protocol `ProtoA1`: class-level access to protocol members is incompatible [protocols_class_objects_2] +protocols_class_objects.py:74:1: error: Class `ConcreteB` cannot be used as an instance of protocol `ProtoB1`: class-level access to protocol members is incompatible [protocols_class_objects_2] +protocols_class_objects.py:104:1: error: Class `ConcreteC1` cannot be used as an instance of protocol `ProtoC1`: class-level access to protocol members is incompatible [protocols_class_objects_2] +protocols_class_objects.py:106:1: error: Class `ConcreteC2` cannot be used as an instance of protocol `ProtoC1`: class-level access to protocol members is incompatible [protocols_class_objects_2] +protocols_class_objects.py:107:1: error: Class `ConcreteC2` cannot be used as an instance of protocol `ProtoC2`: class-level access to protocol members is incompatible [protocols_class_objects_2] +protocols_class_objects.py:108:1: error: Class `ConcreteC3` cannot be used as an instance of protocol `ProtoC1`: class-level access to protocol members is incompatible [protocols_class_objects_2] +""" diff --git a/conformance/results/basilisk/protocols_definition.toml b/conformance/results/basilisk/protocols_definition.toml new file mode 100644 index 000000000..d06412b0f --- /dev/null +++ b/conformance/results/basilisk/protocols_definition.toml @@ -0,0 +1,27 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_definition.py:30:1: error: Argument is incompatible with parameter `things` of type `Iterable[SupportsClose]`: `int` does not satisfy protocol `SupportsClose` [protocols_definition_2] +protocols_definition.py:67:9: error: Protocol member `temp` is not declared in the Protocol body [protocols_definition] +protocols_definition.py:114:1: error: Class `Concrete2_Bad1` is not compatible with protocol `Template2`: attribute `val1` is required to be a class variable (`ClassVar`) but is not defined at class level [classes_classvar] +protocols_definition.py:115:1: error: Class `Concrete2_Bad2` is not compatible with protocol `Template2`: attribute `val1` is required to be a class variable (`ClassVar`) but is declared as an instance variable [classes_classvar] +protocols_definition.py:116:1: error: Class `Concrete2_Bad3` is not compatible with protocol `Template2`: attribute `val1` is required to be a class variable (`ClassVar`) but is declared as an instance variable [classes_classvar] +protocols_definition.py:117:1: error: Class `Concrete2_Bad4` is not compatible with protocol `Template2`: attribute `val1` is required to be a class variable (`ClassVar`) but is declared as an instance variable [classes_classvar] +protocols_definition.py:156:1: error: Class `Concrete3_Bad1` is incompatible with protocol `Template3`: missing instance variable `val1` [protocols_definition_2] +protocols_definition.py:157:1: error: Class `Concrete3_Bad2` is incompatible with protocol `Template3`: `val1` is required to be a writable instance variable but is declared as a class variable (`ClassVar`) [protocols_definition_2] +protocols_definition.py:158:1: error: Class `Concrete3_Bad3` is incompatible with protocol `Template3`: `val1` is required to be a writable instance variable but is a read-only property [protocols_definition_2] +protocols_definition.py:159:1: error: Class `Concrete3_Bad4` is incompatible with protocol `Template3`: `val1` has type `Sequence[float]` but the protocol requires the writable instance variable to be `Sequence[int]` [protocols_definition_2] +protocols_definition.py:160:1: error: Class `Concrete3_Bad5` is incompatible with protocol `Template3`: `val1` has type `list[int]` but the protocol requires the writable instance variable to be `Sequence[int]` [protocols_definition_2] +protocols_definition.py:218:1: error: Class `Concrete4_Bad1` is incompatible with protocol `Template4`: `val1` is a property in the protocol but a plain method in the implementation [protocols_definition_2] +protocols_definition.py:219:1: error: Class `Concrete4_Bad2` is incompatible with protocol `Template4`: missing method `val1` [protocols_definition_2] +protocols_definition.py:285:1: error: Class `Concrete5_Bad1` is incompatible with protocol `Template5`: method `method1` signature is incompatible — parameter names ["a", "c"] do not match the protocol's ["a", "b"] [protocols_definition_2] +protocols_definition.py:286:1: error: Class `Concrete5_Bad2` is incompatible with protocol `Template5`: method `method1` signature is incompatible — parameter names ["a", "c"] do not match the protocol's ["a", "b"] [protocols_definition_2] +protocols_definition.py:287:1: error: Class `Concrete5_Bad3` is incompatible with protocol `Template5`: method `method1` signature is incompatible — parameter `a` is positional in the protocol but keyword-only in the implementation [protocols_definition_2] +protocols_definition.py:288:1: error: Class `Concrete5_Bad4` is incompatible with protocol `Template5`: method `method1` signature is incompatible — parameter `a` is keyword-accessible in the protocol but positional-only in the implementation [protocols_definition_2] +protocols_definition.py:289:1: error: Class `Concrete5_Bad5` is incompatible with protocol `Template5`: method `method1` signature is incompatible — a static method with a `self` parameter cannot satisfy an instance method [protocols_definition_2] +protocols_definition.py:339:1: error: Class `Concrete6_Bad1` is incompatible with protocol `Template6`: `val1` must be writable but a read-only property cannot satisfy a writable protocol member [protocols_definition_2] +protocols_definition.py:340:1: error: Class `Concrete6_Bad2` is incompatible with protocol `Template6`: `val1` must be writable but named tuple fields are immutable [protocols_definition_2] +protocols_definition.py:341:1: error: Class `Concrete6_Bad3` is incompatible with protocol `Template6`: `val1` must be writable but frozen dataclass fields are immutable [protocols_definition_2] +""" diff --git a/conformance/results/basilisk/protocols_explicit.toml b/conformance/results/basilisk/protocols_explicit.toml new file mode 100644 index 000000000..160cda87c --- /dev/null +++ b/conformance/results/basilisk/protocols_explicit.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_explicit.py:27:9: error: Method `draw` in `BadColor` calls `super().draw()` but `PColor` declares it as abstract with no default implementation [protocols_explicit_3] +protocols_explicit.py:27:16: error: Cannot call `super().draw()`: the method is abstract with no default implementation [protocols_explicit_2] +protocols_explicit.py:56:1: error: Parameter `blue` has type `str` but element 2 of `rgb` in protocol `RGB` expects `int` [protocols_subtyping] +protocols_explicit.py:60:5: error: Cannot instantiate `Point`; it does not implement all required protocol members [protocols_explicit] +protocols_explicit.py:89:6: error: Cannot instantiate `Concrete1`; it does not implement all required protocol members [protocols_explicit] +protocols_explicit.py:134:6: error: Cannot instantiate `Concrete5`; it does not implement all required protocol members [protocols_explicit] +protocols_explicit.py:164:7: error: Cannot instantiate `Concrete7A`; it does not implement all required protocol members [protocols_explicit] +""" diff --git a/conformance/results/basilisk/protocols_generic.toml b/conformance/results/basilisk/protocols_generic.toml new file mode 100644 index 000000000..8866798dd --- /dev/null +++ b/conformance/results/basilisk/protocols_generic.toml @@ -0,0 +1,15 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_generic.py:40:1: error: Class `Concrete1` is incompatible with `Proto1[int, str]`: method `method1` return type: expected `int`, found `str` [protocols_generic] +protocols_generic.py:44:7: error: Protocol class `Proto2` combines `Protocol[T]` shorthand with explicit `Generic[T]` base [protocols_generic] +protocols_generic.py:56:5: error: Type `Box[float]` is not assignable to `Box[int]` (type parameter is covariant) [generics_variance_inference] +protocols_generic.py:66:5: error: Type `Sender[int]` is not assignable to `Sender[float]` (type parameter is contravariant) [generics_variance_inference] +protocols_generic.py:74:5: error: Type `AttrProto[int]` is not assignable to `AttrProto[float]` (type parameter is invariant) [generics_variance_inference] +protocols_generic.py:75:5: error: Type `AttrProto[float]` is not assignable to `AttrProto[int]` (type parameter is invariant) [generics_variance_inference] +protocols_generic.py:145:1: error: Class `ConcreteHasProperty2` is incompatible with protocol `HasPropertyProto`: method `m` uses concrete type `int` for TypeVar `T` which is bound to `Self` via protocol's `self: T` annotation [protocols_generic] +protocols_generic.py:146:1: error: Class `ConcreteHasProperty3` is incompatible with protocol `HasPropertyProto`: method `f` must return a self-typed value (TypeVar `T` or `Self`), but returns `int` [protocols_generic] +protocols_generic.py:147:1: error: Class `ConcreteHasProperty4` is incompatible with protocol `HasPropertyProto`: method `m` uses concrete type `str` for TypeVar `T` which is bound to `Self` via protocol's `self: T` annotation [protocols_generic] +""" diff --git a/conformance/results/basilisk/protocols_merging.toml b/conformance/results/basilisk/protocols_merging.toml new file mode 100644 index 000000000..faca560a3 --- /dev/null +++ b/conformance/results/basilisk/protocols_merging.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_merging.py:52:1: error: Class `SCConcrete2` is incompatible with protocol `SizedAndClosable1`: missing method `__len__` [protocols_definition_2] +protocols_merging.py:53:1: error: Class `SCConcrete2` is incompatible with protocol `SizedAndClosable2`: missing method `__len__` [protocols_definition_2] +protocols_merging.py:54:1: error: Cannot assign `SCConcrete2()` to type `SizedAndClosable3`: `SizedAndClosable3` is not a protocol and does not support structural subtyping [protocols_definition_2] +protocols_merging.py:67:1: error: Non-protocol class `SizedAndClosable3` cannot be a base of protocol `BadProto` [protocols_merging] +protocols_merging.py:82:5: error: Cannot instantiate `SizedAndClosable4`; it does not implement all required protocol members [protocols_explicit] +protocols_merging.py:83:1: error: Cannot assign `SCConcrete1()` to type `SizedAndClosable4`: `SizedAndClosable4` is not a protocol and does not support structural subtyping [protocols_definition_2] +""" diff --git a/conformance/results/basilisk/protocols_modules.toml b/conformance/results/basilisk/protocols_modules.toml new file mode 100644 index 000000000..5de06b240 --- /dev/null +++ b/conformance/results/basilisk/protocols_modules.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_modules.py:26:1: error: Module `_protocols_modules1` is not compatible with protocol `Options2`: attribute `timeout` has type `int` but protocol expects `str` [protocols_modules] +protocols_modules.py:48:1: error: Module `_protocols_modules2` is not compatible with protocol `Reporter2`: method `on_error` returns `None` but protocol expects `int` [protocols_modules] +protocols_modules.py:49:1: error: Module `_protocols_modules2` is not compatible with protocol `Reporter3`: missing method `not_implemented` required by protocol [protocols_modules] +""" diff --git a/conformance/results/basilisk/protocols_recursive.toml b/conformance/results/basilisk/protocols_recursive.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/protocols_recursive.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/protocols_runtime_checkable.toml b/conformance/results/basilisk/protocols_runtime_checkable.toml new file mode 100644 index 000000000..941c0d194 --- /dev/null +++ b/conformance/results/basilisk/protocols_runtime_checkable.toml @@ -0,0 +1,15 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_runtime_checkable.py:23:8: error: Protocol `Proto1` cannot be used with `isinstance()` because it is not decorated with `@runtime_checkable` [protocols_runtime_checkable] +protocols_runtime_checkable.py:23:22: error: Protocol `Proto1` cannot be used with `isinstance()` because it is not decorated with `@runtime_checkable` [protocols_runtime_checkable_2] +protocols_runtime_checkable.py:55:8: error: `issubclass()` cannot be used with data protocol `DataProtocol` [protocols_runtime_checkable] +protocols_runtime_checkable.py:55:22: error: `issubclass()` cannot be used with data protocol `DataProtocol` [protocols_runtime_checkable_2] +protocols_runtime_checkable.py:61:8: error: `issubclass()` cannot be used with data protocol `DataProtocol` [protocols_runtime_checkable] +protocols_runtime_checkable.py:61:22: error: `issubclass()` cannot be used with data protocol `DataProtocol` [protocols_runtime_checkable_2] +protocols_runtime_checkable.py:88:33: error: Unsafe overlap: `Concrete3A` has members incompatible with protocol `Proto3` in `isinstance()` call [protocols_runtime_checkable_2] +protocols_runtime_checkable.py:91:33: error: Unsafe overlap: `Concrete3B` has members incompatible with protocol `Proto3` in `isinstance()` call [protocols_runtime_checkable_2] +protocols_runtime_checkable.py:94:31: error: Unsafe overlap: `Concrete3A` has members incompatible with protocol `Proto3` in `issubclass()` call [protocols_runtime_checkable_2] +""" diff --git a/conformance/results/basilisk/protocols_self.toml b/conformance/results/basilisk/protocols_self.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/protocols_self.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/protocols_subtyping.toml b/conformance/results/basilisk/protocols_subtyping.toml new file mode 100644 index 000000000..b0178ee58 --- /dev/null +++ b/conformance/results/basilisk/protocols_subtyping.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_subtyping.py:16:6: error: Cannot instantiate Protocol class `Proto1`; Protocols define interfaces, not concrete implementations [protocols_explicit] +protocols_subtyping.py:38:5: error: Type mismatch: `v2` is annotated `Concrete2` (concrete2) but assigned proto2 [assignment_compatibility] +protocols_subtyping.py:55:5: error: Type mismatch: `v2` is annotated `Proto3` (proto3) but assigned proto2 [assignment_compatibility] +protocols_subtyping.py:79:5: error: Type mismatch: `v3` is annotated `Proto4[int, float]` (proto4[int, float]) but assigned proto5[int] [assignment_compatibility] +protocols_subtyping.py:80:5: error: Type mismatch: `v4` is annotated `Proto5[float]` (proto5[float]) but assigned proto4[int, int] [assignment_compatibility] +protocols_subtyping.py:102:5: error: Type mismatch: `v4` is annotated `Proto7[int, float]` (proto7[int, float]) but assigned proto6[float, float] [assignment_compatibility] +protocols_subtyping.py:103:5: error: Type mismatch: `v5` is annotated `Proto7[float, object]` (proto7[float, object]) but assigned proto6[float, float] [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/protocols_variance.toml b/conformance/results/basilisk/protocols_variance.toml new file mode 100644 index 000000000..4e5012d84 --- /dev/null +++ b/conformance/results/basilisk/protocols_variance.toml @@ -0,0 +1,18 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +protocols_variance.py:21:1: error: TypeVar `T1` in protocol `AnotherBox` is only used in output positions and should be covariant [protocols_variance] +protocols_variance.py:21:7: error: TypeVar `T1` in protocol `AnotherBox` should be covariant [protocols_variance_2] +protocols_variance.py:40:1: error: TypeVar `T3` in protocol `Protocol2` is only used in input positions and should be contravariant [protocols_variance] +protocols_variance.py:40:7: error: TypeVar `T3` in protocol `Protocol2` should be contravariant [protocols_variance_2] +protocols_variance.py:56:1: error: TypeVar `T1` in protocol `Protocol4` is only used in input positions and should be contravariant [protocols_variance] +protocols_variance.py:56:7: error: TypeVar `T1` in protocol `Protocol4` should be contravariant [protocols_variance_2] +protocols_variance.py:61:1: error: Covariant TypeVar `T1_co` is used in input position in protocol `Protocol5` [protocols_variance] +protocols_variance.py:66:1: error: TypeVar `T1` in protocol `Protocol6` is only used in output positions and should be covariant [protocols_variance] +protocols_variance.py:66:7: error: TypeVar `T1` in protocol `Protocol6` should be covariant [protocols_variance_2] +protocols_variance.py:71:1: error: Contravariant TypeVar `T1_contra` is used in output position in protocol `Protocol7` [protocols_variance] +protocols_variance.py:104:1: error: TypeVar `T1` in protocol `Protocol12` is only used in output positions and should be covariant [protocols_variance] +protocols_variance.py:104:7: error: TypeVar `T1` in protocol `Protocol12` should be covariant [protocols_variance_2] +""" diff --git a/conformance/results/basilisk/qualifiers_annotated.toml b/conformance/results/basilisk/qualifiers_annotated.toml new file mode 100644 index 000000000..80557eb03 --- /dev/null +++ b/conformance/results/basilisk/qualifiers_annotated.toml @@ -0,0 +1,27 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +qualifiers_annotated.py:38:1: error: Invalid type expression as first argument to `Annotated` for `Bad1` [qualifiers_annotated] +qualifiers_annotated.py:39:1: error: Invalid type expression as first argument to `Annotated` for `Bad2` [qualifiers_annotated] +qualifiers_annotated.py:40:1: error: Invalid type expression as first argument to `Annotated` for `Bad3` [qualifiers_annotated] +qualifiers_annotated.py:41:1: error: Invalid type expression as first argument to `Annotated` for `Bad4` [qualifiers_annotated] +qualifiers_annotated.py:42:1: error: Invalid type expression as first argument to `Annotated` for `Bad5` [qualifiers_annotated] +qualifiers_annotated.py:43:1: error: Invalid type expression as first argument to `Annotated` for `Bad6` [qualifiers_annotated] +qualifiers_annotated.py:44:1: error: Invalid type expression as first argument to `Annotated` for `Bad7` [qualifiers_annotated] +qualifiers_annotated.py:45:1: error: Invalid type expression as first argument to `Annotated` for `Bad8` [qualifiers_annotated] +qualifiers_annotated.py:46:1: error: Invalid type expression as first argument to `Annotated` for `Bad9` [qualifiers_annotated] +qualifiers_annotated.py:47:1: error: Invalid type expression as first argument to `Annotated` for `Bad10` [qualifiers_annotated] +qualifiers_annotated.py:48:1: error: Invalid type expression as first argument to `Annotated` for `Bad11` [qualifiers_annotated] +qualifiers_annotated.py:49:1: error: Invalid type expression as first argument to `Annotated` for `Bad12` [qualifiers_annotated] +qualifiers_annotated.py:59:1: error: `Annotated` requires at least two arguments for `Bad13` [qualifiers_annotated] +qualifiers_annotated.py:59:1: error: `Annotated` requires at least two arguments: a type and metadata [qualifiers_annotated_2] +qualifiers_annotated.py:71:1: error: `Annotated[...]` is not compatible with `type[...]` for `not_type1` [qualifiers_annotated] +qualifiers_annotated.py:72:1: error: Type alias `SmallInt` (an `Annotated[...]` alias) is not compatible with `type[...]` for `not_type2` [qualifiers_annotated] +qualifiers_annotated.py:79:1: error: `Annotated[...]` is not compatible with `type[T]` — `Annotated[str, ""]` cannot be used where a type constructor is expected [qualifiers_annotated] +qualifiers_annotated.py:80:1: error: Type alias `SmallInt` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +qualifiers_annotated.py:86:1: error: `Annotated` is not callable — `Annotated()` must not be called as a function [qualifiers_annotated] +qualifiers_annotated.py:87:1: error: `Annotated` is not callable — `Annotated[int, ""]()` must not be called as a function [qualifiers_annotated] +qualifiers_annotated.py:88:1: error: `SmallInt` is a type alias and cannot be called as a function [qualifiers_annotated] +""" diff --git a/conformance/results/basilisk/qualifiers_final_annotation.toml b/conformance/results/basilisk/qualifiers_final_annotation.toml new file mode 100644 index 000000000..4e1aedbee --- /dev/null +++ b/conformance/results/basilisk/qualifiers_final_annotation.toml @@ -0,0 +1,36 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +qualifiers_final_annotation.py:16:1: error: Bare `Final` annotation for `BAD1` requires an explicit type argument or initializer [qualifiers_final_annotation] +qualifiers_final_annotation.py:18:1: error: Type mismatch: `BAD2` is annotated `Final[str, int]` (str, int) but assigned str [assignment_compatibility] +qualifiers_final_annotation.py:18:1: error: `Final` accepts at most one type argument for `BAD2` [qualifiers_final_annotation] +qualifiers_final_annotation.py:34:5: error: `ID2` is annotated `Final` in the class body but has no initializer and is not unconditionally assigned in `__init__` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:38:5: error: `ID3` is annotated `Final` in the class body but has no initializer and is not unconditionally assigned in `__init__` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:54:9: error: Cannot assign to `self.ID5` — it is already initialized as `Final` in the class body [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:62:9: error: `self.id3: Final` annotation is only allowed inside `__init__` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:63:9: error: `self.id4: Final` annotation is only allowed inside `__init__` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:65:9: error: Cannot assign to `self.ID7` — it is declared `Final` in the class body [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:67:9: error: Cannot assign to `self.ID7` — it is declared `Final` in the class body [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:71:1: error: Cannot assign to global `RATE` — it is declared `Final` at module level [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:71:1: error: Cannot re-assign `RATE` — it is declared `Final` at module level [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:81:1: error: Cannot assign to `ClassB.DEFAULT_ID` — it is declared `Final` in `ClassB` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:94:5: error: Cannot override `BORDER_WIDTH` — it is declared `Final` in a base class [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:107:5: error: `Final` cannot be used inside `ClassVar` for attribute `VALUE2` [qualifiers_final_annotation] +qualifiers_final_annotation.py:108:5: error: `ClassVar` cannot be used inside `Final` for attribute `VALUE3` [qualifiers_final_annotation] +qualifiers_final_annotation.py:118:1: error: `Final` cannot be nested inside another type constructor for `x` [qualifiers_final_annotation] +qualifiers_final_annotation.py:121:11: error: `Final` is not allowed in parameter annotation for `x` [qualifiers_final_annotation] +qualifiers_final_annotation.py:134:1: error: Call to `N()` is missing 2 required arguments (expected at least 2, got 0) [calls_argument_count] +qualifiers_final_annotation.py:134:1: error: Argument `a` is not a field of `N`; valid fields are: x, y [namedtuples_define_functional] +qualifiers_final_annotation.py:135:1: error: Field `x` of `N` expects `int` but received a `str` literal [namedtuples_define_functional] +qualifiers_final_annotation.py:135:1: error: Field `y` of `N` expects `int` but received a `str` literal [namedtuples_define_functional] +qualifiers_final_annotation.py:141:5: error: Cannot assign to global `ID1` — it is declared `Final` at module level [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:145:5: error: Cannot modify `x` — it is declared `Final` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:147:10: error: Cannot modify `x` — it is declared `Final` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:149:9: error: Cannot modify `x` — it is declared `Final` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:152:30: error: Cannot modify `x` — it is declared `Final` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:155:9: error: Cannot modify `x` — it is declared `Final` [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:166:1: error: Cannot re-assign `TEN` — it is declared `Final` in an imported module [qualifiers_final_annotation_2] +qualifiers_final_annotation.py:170:1: error: Cannot re-assign `PI` — it is declared `Final` in an imported module [qualifiers_final_annotation_2] +""" diff --git a/conformance/results/basilisk/qualifiers_final_decorator.toml b/conformance/results/basilisk/qualifiers_final_decorator.toml new file mode 100644 index 000000000..f0473c3a9 --- /dev/null +++ b/conformance/results/basilisk/qualifiers_final_decorator.toml @@ -0,0 +1,16 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +qualifiers_final_decorator.py:21:7: error: Cannot inherit from final class `Base1` [qualifiers_final_decorator] +qualifiers_final_decorator.py:56:9: error: Method `method1` in `Derived2` overrides a `@final` method [qualifiers_final_decorator] +qualifiers_final_decorator.py:60:9: error: Method `method2` in `Derived2` overrides a `@final` method [qualifiers_final_decorator] +qualifiers_final_decorator.py:64:9: error: Method `method3` in `Derived2` overrides a `@final` method [qualifiers_final_decorator] +qualifiers_final_decorator.py:75:9: error: Method `method4` in `Derived2` overrides a `@final` method [qualifiers_final_decorator] +qualifiers_final_decorator.py:85:6: error: `@final` on an `@overload` signature of `method`: it should be applied only to the implementation [overloads_consistency_2] +qualifiers_final_decorator.py:89:9: error: Method `method` in `Derived3` overrides a `@final` method [qualifiers_final_decorator] +qualifiers_final_decorator.py:102:9: error: Method `method` in `Derived4` overrides a `@final` method [qualifiers_final_decorator] +qualifiers_final_decorator.py:118:9: error: Method `method` in `Derived5` overrides a `@final` method [qualifiers_final_decorator] +qualifiers_final_decorator.py:126:5: error: `@final` is not allowed on non-method function `func1` [qualifiers_final_decorator] +""" diff --git a/conformance/results/basilisk/specialtypes_any.toml b/conformance/results/basilisk/specialtypes_any.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/specialtypes_any.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/specialtypes_never.toml b/conformance/results/basilisk/specialtypes_never.toml new file mode 100644 index 000000000..862192ce7 --- /dev/null +++ b/conformance/results/basilisk/specialtypes_never.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +specialtypes_never.py:19:5: error: Function `func1` is declared `-> NoReturn` / `-> Never` but may return implicitly [specialtypes_never] +specialtypes_never.py:85:5: error: Cannot assign `list[Never]` to `v3` annotated `list[int]`: `Never` is only compatible with `Never` and `Any` in invariant contexts [specialtypes_never_2] +specialtypes_never.py:104:5: error: Cannot return `ClassC[Never]` from `func10` annotated `-> ClassC[U]`: `Never` is only compatible with `Never` and `Any` in invariant contexts [specialtypes_never_2] +""" diff --git a/conformance/results/basilisk/specialtypes_none.toml b/conformance/results/basilisk/specialtypes_none.toml new file mode 100644 index 000000000..2d42111a1 --- /dev/null +++ b/conformance/results/basilisk/specialtypes_none.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +specialtypes_none.py:21:7: error: Argument `val1` of `func1` expects `None` but received `type(None)` (a class object, not the value `None`) [calls_argument_type] +specialtypes_none.py:27:1: error: Type mismatch: `none2` is annotated `Iterable` (iterable) but assigned None [assignment_compatibility] +specialtypes_none.py:41:7: error: Argument `val1` of `func2` expects `type[None]` but received `None` (a value, not a class object — use `type(None)` or `NoneType`) [calls_argument_type] +""" diff --git a/conformance/results/basilisk/specialtypes_promotions.toml b/conformance/results/basilisk/specialtypes_promotions.toml new file mode 100644 index 000000000..c072e68e2 --- /dev/null +++ b/conformance/results/basilisk/specialtypes_promotions.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +specialtypes_promotions.py:13:5: error: Attribute `numerator` is not defined on `float`; parameter `f` is typed as `float`, not `int` [specialtypes_promotions] +""" diff --git a/conformance/results/basilisk/specialtypes_type.toml b/conformance/results/basilisk/specialtypes_type.toml new file mode 100644 index 000000000..ea759d6f7 --- /dev/null +++ b/conformance/results/basilisk/specialtypes_type.toml @@ -0,0 +1,16 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +specialtypes_type.py:56:7: error: Argument `TeamUser` is not assignable to `type[BasicUser | ProUser]`; `TeamUser` is not one of `BasicUser | ProUser` [specialtypes_type] +specialtypes_type.py:70:7: error: Argument `Callable` is a special typing form, not a class object; `type[T]` requires a real class [specialtypes_type] +specialtypes_type.py:76:1: error: Invalid type argument count in annotation `type[int, str]` on `bad_type1`: `type` takes 1 type argument but 2 were provided [callables_annotation] +specialtypes_type.py:76:12: error: `type` accepts exactly 1 type argument, but 2 were provided [generics_defaults_specialization] +specialtypes_type.py:117:5: error: Attribute `unknown` is not defined on `type[object]`; `type[object]` only exposes attributes of its type argument [specialtypes_type] +specialtypes_type.py:120:5: error: Attribute `unknown` is not defined on `Type[object]`; `Type[object]` only exposes attributes of its type argument [specialtypes_type] +specialtypes_type.py:143:1: error: Attribute `unknown` is not defined on `TA1` (a `TypeAlias` of `type`/`Type`) [specialtypes_type] +specialtypes_type.py:144:1: error: Attribute `unknown` is not defined on `TA2` (a `TypeAlias` of `type`/`Type`) [specialtypes_type] +specialtypes_type.py:145:1: error: Attribute `unknown` is not defined on `TA3` (a `TypeAlias` of `type`/`Type`) [specialtypes_type] +specialtypes_type.py:146:1: error: Attribute `unknown` is not defined on `TA4` (a `TypeAlias` of `type`/`Type`) [specialtypes_type] +""" diff --git a/conformance/results/basilisk/tuples_type_compat.toml b/conformance/results/basilisk/tuples_type_compat.toml new file mode 100644 index 000000000..de23284d0 --- /dev/null +++ b/conformance/results/basilisk/tuples_type_compat.toml @@ -0,0 +1,30 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +tuples_type_compat.py:15:5: error: Type mismatch: `v2` is annotated `tuple[int, int]` (tuple[int, int]) but assigned tuple[float, float] [assignment_compatibility] +tuples_type_compat.py:29:1: error: Tuple type compatibility violation: homogeneous unbounded tuple is not assignable to mixed starred-unpack form [tuples_type_compat] +tuples_type_compat.py:32:1: error: Tuple type compatibility violation: source tuple type may have more elements than the fixed-length target allows [tuples_type_compat] +tuples_type_compat.py:33:1: error: Tuple type compatibility violation: source tuple type may have more elements than the fixed-length target allows [tuples_type_compat] +tuples_type_compat.py:43:5: error: Type mismatch: `v3` is annotated `tuple[int]` (tuple[int]) but assigned tuple[int, ...] [assignment_compatibility] +tuples_type_compat.py:62:5: error: Type mismatch: `d` is annotated `tuple[int, int]` (tuple[int, int]) but assigned tuple[int, ...] [assignment_compatibility] +tuples_type_compat.py:76:9: error: Type alias `Func5Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:81:9: error: Type alias `Func5Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:86:9: error: Type alias `Func5Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:102:13: error: Type alias `Func6Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:107:13: error: Type alias `Func6Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:112:13: error: Type alias `Func6Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:127:13: error: Type alias `Func7Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:130:13: error: Type alias `Func7Input` (an `Annotated[...]` alias) is not compatible with `type[T]` [qualifiers_annotated] +tuples_type_compat.py:157:1: error: Tuple type compatibility violation: tuple literal length does not match fixed starred-unpack annotation [tuples_type_compat] +tuples_type_compat.py:162:1: error: Tuple type compatibility violation: tuple literal middle element type incompatible with starred-unpack annotation [tuples_type_compat] +tuples_type_compat.py:163:1: error: Tuple type compatibility violation: tuple literal middle element type incompatible with starred-unpack annotation [tuples_type_compat] +tuples_type_compat.py:169:1: error: Tuple type compatibility violation: tuple literal element type incompatible with annotation suffix [tuples_type_compat] +tuples_type_compat.py:170:1: error: Tuple type compatibility violation: tuple literal element type incompatible with annotation suffix [tuples_type_compat] +tuples_type_compat.py:175:1: error: Tuple type compatibility violation: tuple literal middle element type incompatible with starred-unpack annotation [tuples_type_compat] +tuples_type_compat.py:176:1: error: Tuple type compatibility violation: tuple literal element type incompatible with annotation suffix [tuples_type_compat] +tuples_type_compat.py:181:5: error: Type mismatch: `t2` is annotated `tuple[str, str, *tuple[int]]` (tuple[str, str, *tuple[int]]) but assigned tuple[str, str] [assignment_compatibility] +tuples_type_compat.py:184:5: error: Type mismatch: `t5` is annotated `tuple[str, str, str, *tuple[str, ...]]` (tuple[str, str, str, *tuple[str, ...]]) but assigned tuple[str, str] [assignment_compatibility] +tuples_type_compat.py:188:5: error: Type mismatch: `t9` is annotated `tuple[*tuple[str, ...], str, str, str]` (tuple[*tuple[str, ...], str, str, str]) but assigned tuple[str, str] [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/tuples_type_form.toml b/conformance/results/basilisk/tuples_type_form.toml new file mode 100644 index 000000000..27da7adfc --- /dev/null +++ b/conformance/results/basilisk/tuples_type_form.toml @@ -0,0 +1,21 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +tuples_type_form.py:12:1: error: Type mismatch: `t1` is annotated `tuple[int]` but assigned a 2-element tuple (expected 1 element(s)) [assignment_compatibility] +tuples_type_form.py:14:1: error: Type mismatch: `t2` is annotated `tuple[int, int]` but assigned a 1-element tuple (expected 2 element(s)) [assignment_compatibility] +tuples_type_form.py:15:1: error: Type mismatch: `t2` is annotated `tuple[int, int]` but assigned a tuple with element 1 `""` (expected type `int`) [assignment_compatibility] +tuples_type_form.py:25:1: error: Type mismatch: `t10` is annotated `tuple[()]` but assigned a tuple with 1 element(s) (expected empty tuple) [assignment_compatibility] +tuples_type_form.py:36:1: error: Type mismatch: `t20` is annotated `tuple[int, ...]` but assigned a tuple containing `""` (incompatible with `int`) [assignment_compatibility] +tuples_type_form.py:40:6: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_type_form.py:40:6: error: Invalid tuple type syntax: tuple[T, U, ...] is invalid — can only have one type before the ellipsis [tuples_type_form_2] +tuples_type_form.py:41:6: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_type_form.py:41:6: error: Invalid tuple type syntax: tuple[...] is invalid — must specify a type before the ellipsis [tuples_type_form_2] +tuples_type_form.py:42:6: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_type_form.py:42:6: error: Invalid tuple type syntax: ellipsis (...) must appear at the end of the tuple type [tuples_type_form_2] +tuples_type_form.py:43:6: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_type_form.py:43:6: error: Invalid tuple type syntax: ellipsis (...) must appear at the end of the tuple type [tuples_type_form_2] +tuples_type_form.py:44:6: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_type_form.py:45:6: error: tuple type contains more than one unbounded component [tuples_type_form] +""" diff --git a/conformance/results/basilisk/tuples_unpacked.toml b/conformance/results/basilisk/tuples_unpacked.toml new file mode 100644 index 000000000..af98169db --- /dev/null +++ b/conformance/results/basilisk/tuples_unpacked.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +tuples_unpacked.py:40:5: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_unpacked.py:41:5: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_unpacked.py:51:9: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_unpacked.py:59:6: error: tuple type contains more than one unbounded component [tuples_type_form] +tuples_unpacked.py:60:6: error: tuple type contains more than one unbounded component [tuples_type_form] +""" diff --git a/conformance/results/basilisk/typeddicts_alt_syntax.toml b/conformance/results/basilisk/typeddicts_alt_syntax.toml new file mode 100644 index 000000000..ae239e20c --- /dev/null +++ b/conformance/results/basilisk/typeddicts_alt_syntax.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_alt_syntax.py:23:17: error: Second argument to `TypedDict("BadTypedDict1", ...)` must be a dict literal [typeddicts_alt_syntax] +typeddicts_alt_syntax.py:27:17: error: All keys in `TypedDict("BadTypedDict2", {...})` must be string literals [typeddicts_alt_syntax] +typeddicts_alt_syntax.py:31:17: error: TypedDict declared name `WrongName` does not match the variable name `BadTypedDict3` [typeddicts_alt_syntax] +typeddicts_alt_syntax.py:35:17: error: Unrecognised keyword `other=` in `TypedDict("BadTypedDict4", ...)` call [typeddicts_alt_syntax] +""" diff --git a/conformance/results/basilisk/typeddicts_class_syntax.toml b/conformance/results/basilisk/typeddicts_class_syntax.toml new file mode 100644 index 000000000..b0ace1e5e --- /dev/null +++ b/conformance/results/basilisk/typeddicts_class_syntax.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_class_syntax.py:30:9: error: Method `method1` is not allowed in TypedDict class `BadTypedDict1` [typeddicts_class_syntax] +typeddicts_class_syntax.py:35:9: error: Method `method2` is not allowed in TypedDict class `BadTypedDict1` [typeddicts_class_syntax] +typeddicts_class_syntax.py:40:9: error: Method `method3` is not allowed in TypedDict class `BadTypedDict1` [typeddicts_class_syntax] +typeddicts_class_syntax.py:45:7: error: TypedDict class `BadTypedDict2` uses unrecognised keyword `metaclass` [typeddicts_class_syntax_2] +typeddicts_class_syntax.py:50:7: error: TypedDict class `BadTypedDict3` uses unrecognised keyword `other` [typeddicts_class_syntax_2] +typeddicts_class_syntax.py:65:1: error: Unrecognized item `z` for `ConditionalField`: extra items are not allowed [typeddicts_extra_items] +""" diff --git a/conformance/results/basilisk/typeddicts_extra_items.toml b/conformance/results/basilisk/typeddicts_extra_items.toml new file mode 100644 index 000000000..b87b5e66c --- /dev/null +++ b/conformance/results/basilisk/typeddicts_extra_items.toml @@ -0,0 +1,34 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_extra_items.py:15:45: error: `int` is not assignable to extra item type `bool` of `Movie` [typeddicts_extra_items] +typeddicts_extra_items.py:22:55: error: `int` is not assignable to extra item type `bool` of `MovieFunctional` [typeddicts_extra_items] +typeddicts_extra_items.py:39:1: error: Value assigned to `TypedDict` `InheritedMovie` field `year` has the wrong type; expected `int` [typeddicts_operations] +typeddicts_extra_items.py:49:1: error: Argument to `closed` must be a literal `True` or `False` [typeddicts_extra_items] +typeddicts_extra_items.py:67:1: error: Cannot set `closed=False` on `IllegalChild1` when a superclass is `closed=True` [typeddicts_extra_items] +typeddicts_extra_items.py:73:1: error: Cannot set `closed=False` on `IllegalChild2` when a superclass sets `extra_items` [typeddicts_extra_items] +typeddicts_extra_items.py:91:1: error: `MovieC` is a closed TypedDict; extra key `age` is not allowed [typeddicts_extra_items] +typeddicts_extra_items.py:94:1: error: `MovieD` is a closed TypedDict; extra key `age` is not allowed [typeddicts_extra_items] +typeddicts_extra_items.py:109:1: error: Cannot set `closed=True` on `IllegalCloseNonReadOnly` when a superclass has non-read-only `extra_items` [typeddicts_extra_items] +typeddicts_extra_items.py:114:1: error: `extra_items` value cannot be `Required[...]` [typeddicts_extra_items] +typeddicts_extra_items.py:117:1: error: `extra_items` value cannot be `NotRequired[...]` [typeddicts_extra_items] +typeddicts_extra_items.py:128:5: error: Cannot delete a key from `TypedDict` `MovieEI` — TypedDicts have a fixed schema [typeddicts_operations] +typeddicts_extra_items.py:143:1: error: Keyword `year` in call to `unpack_no_extra` is not a key of TypedDict `MovieNoExtra` [callables_kwargs] +typeddicts_extra_items.py:174:1: error: Cannot change `extra_items` on `Child` unless it is `ReadOnly` in the superclass [typeddicts_extra_items] +typeddicts_extra_items.py:184:1: error: Required key `year` is not allowed under the inherited `extra_items` of `MovieRequiredYear` [typeddicts_extra_items] +typeddicts_extra_items.py:187:1: error: `int | None` is not consistent with `int` [typeddicts_extra_items] +typeddicts_extra_items.py:196:1: error: `str` is not assignable to `int | None` [typeddicts_extra_items] +typeddicts_extra_items.py:215:22: error: `int` is not consistent with `int | None` [typeddicts_extra_items] +typeddicts_extra_items.py:222:22: error: `year` is required in `MovieWithYear2` but is an extra item in `MovieBase2` [typeddicts_extra_items] +typeddicts_extra_items.py:242:19: error: `list[str]` is not assignable to `str | int` [typeddicts_extra_items] +typeddicts_extra_items.py:256:13: error: `str` is not assignable to extra items type `int` [typeddicts_extra_items] +typeddicts_extra_items.py:257:13: error: `int` is not assignable to extra items type `str` [typeddicts_extra_items] +typeddicts_extra_items.py:268:14: error: `object` is not assignable to extra items type `int` [typeddicts_extra_items] +typeddicts_extra_items.py:278:1: error: Unrecognized item `year` for `NonClosedMovie`: extra items are not allowed [typeddicts_extra_items] +typeddicts_extra_items.py:285:1: error: Wrong type for extra item `language`: `str` is not assignable to `int` [typeddicts_extra_items] +typeddicts_extra_items.py:293:1: error: Unrecognized item `year` for `ClosedMovie`: extra items are not allowed [typeddicts_extra_items] +typeddicts_extra_items.py:303:1: error: TypedDict `MovieExtraInt` is not assignable to `Mapping[str, int]` [typeddicts_operations] +typeddicts_extra_items.py:352:5: error: Type mismatch: `int_dict` is annotated `IntDict` (intdict) but assigned dict[str, int] [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/typeddicts_final.toml b/conformance/results/basilisk/typeddicts_final.toml new file mode 100644 index 000000000..be211bd5b --- /dev/null +++ b/conformance/results/basilisk/typeddicts_final.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/basilisk/typeddicts_inheritance.toml b/conformance/results/basilisk/typeddicts_inheritance.toml new file mode 100644 index 000000000..9ca73d439 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_inheritance.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_inheritance.py:44:7: error: TypedDict `BadTypedDict` cannot inherit from non-TypedDict class `NonTypedDict` [typeddicts_inheritance] +typeddicts_inheritance.py:55:4: error: TypedDict `Y1` illegally redeclares field `x` from `X1`: the value type is not compatible with the inherited declaration [typeddicts_inheritance] +typeddicts_inheritance.py:65:7: error: TypedDict `XYZ2` inherits incompatible declarations of field `x` from `X2` and `Y2` [typeddicts_inheritance] +""" diff --git a/conformance/results/basilisk/typeddicts_operations.toml b/conformance/results/basilisk/typeddicts_operations.toml new file mode 100644 index 000000000..1e45a26b4 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_operations.toml @@ -0,0 +1,17 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_operations.py:22:1: error: Value assigned to `TypedDict` `Movie` field `name` has the wrong type; expected `str` [typeddicts_operations] +typeddicts_operations.py:23:1: error: Value assigned to `TypedDict` `Movie` field `year` has the wrong type; expected `int` [typeddicts_operations] +typeddicts_operations.py:24:1: error: `other` is not a valid key for `TypedDict` `Movie` [typeddicts_operations] +typeddicts_operations.py:26:7: error: Key `other` is not a valid key for `TypedDict` `Movie` [typeddicts_operations] +typeddicts_operations.py:28:1: error: missing required key `year` [typeddicts_operations] +typeddicts_operations.py:29:1: error: Value assigned to `TypedDict` `Movie` field `year` has the wrong type; expected `int` [typeddicts_operations] +typeddicts_operations.py:32:1: error: invalid key `other` for `TypedDict` `Movie` [typeddicts_operations] +typeddicts_operations.py:37:5: error: Dict literal for `TypedDict` `Movie` contains a non-literal key; all keys must be string literals [typeddicts_operations] +typeddicts_operations.py:47:1: error: `TypedDict` `Movie` does not support `.clear()` — TypedDicts have a fixed schema [typeddicts_operations] +typeddicts_operations.py:49:1: error: Cannot delete a key from `TypedDict` `Movie` — TypedDicts have a fixed schema [typeddicts_operations] +typeddicts_operations.py:62:1: error: `TypedDict` `MovieOptional` does not support `.clear()` — TypedDicts have a fixed schema [typeddicts_operations] +""" diff --git a/conformance/results/basilisk/typeddicts_readonly.toml b/conformance/results/basilisk/typeddicts_readonly.toml new file mode 100644 index 000000000..f6e262846 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_readonly.toml @@ -0,0 +1,12 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_readonly.py:24:1: error: Cannot assign to read-only field `members` of `TypedDict` `b1` [typeddicts_readonly] +typeddicts_readonly.py:36:1: error: Cannot assign to read-only field `members` of `TypedDict` `b2` [typeddicts_readonly] +typeddicts_readonly.py:50:1: error: Cannot assign to read-only field `title` of `TypedDict` `m1` [typeddicts_readonly] +typeddicts_readonly.py:51:1: error: Cannot assign to read-only field `year` of `TypedDict` `m1` [typeddicts_readonly] +typeddicts_readonly.py:60:1: error: Cannot assign to read-only field `title` of `TypedDict` `m2` [typeddicts_readonly] +typeddicts_readonly.py:61:1: error: Cannot assign to read-only field `year` of `TypedDict` `m2` [typeddicts_readonly] +""" diff --git a/conformance/results/basilisk/typeddicts_readonly_consistency.toml b/conformance/results/basilisk/typeddicts_readonly_consistency.toml new file mode 100644 index 000000000..9b26d9da3 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_readonly_consistency.toml @@ -0,0 +1,13 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_readonly_consistency.py:37:5: error: Type mismatch: `v3` is annotated `B1` (b1) but assigned a1 [assignment_compatibility] +typeddicts_readonly_consistency.py:38:5: error: Type mismatch: `v4` is annotated `B1` (b1) but assigned c1 [assignment_compatibility] +typeddicts_readonly_consistency.py:40:5: error: Type mismatch: `v5` is annotated `C1` (c1) but assigned a1 [assignment_compatibility] +typeddicts_readonly_consistency.py:81:5: error: Type mismatch: `v3` is annotated `B2` (b2) but assigned a2 [assignment_compatibility] +typeddicts_readonly_consistency.py:82:5: error: Type mismatch: `v4` is annotated `B2` (b2) but assigned c2 [assignment_compatibility] +typeddicts_readonly_consistency.py:84:5: error: Type mismatch: `v5` is annotated `C2` (c2) but assigned a2 [assignment_compatibility] +typeddicts_readonly_consistency.py:85:5: error: Type mismatch: `v6` is annotated `C2` (c2) but assigned b2 [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/typeddicts_readonly_inheritance.toml b/conformance/results/basilisk/typeddicts_readonly_inheritance.toml new file mode 100644 index 000000000..3b05a8981 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_readonly_inheritance.toml @@ -0,0 +1,19 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_readonly_inheritance.py:36:1: error: Cannot assign to read-only field `name` of `TypedDict` `a2` [typeddicts_readonly] +typeddicts_readonly_inheritance.py:50:5: error: TypedDict `RecordShop` illegally redeclares field `alt` from `AlbumCollection`: the value type is not compatible with the inherited declaration [typeddicts_inheritance] +typeddicts_readonly_inheritance.py:65:1: error: missing required key `name` [typeddicts_operations] +typeddicts_readonly_inheritance.py:82:1: error: Value assigned to `TypedDict` `User` field `ident` has the wrong type; expected `str` [typeddicts_operations] +typeddicts_readonly_inheritance.py:83:1: error: Value assigned to `TypedDict` `User` field `ident` has the wrong type; expected `str` [typeddicts_operations] +typeddicts_readonly_inheritance.py:84:1: error: missing required key `ident` [typeddicts_operations] +typeddicts_readonly_inheritance.py:94:5: error: TypedDict `F3` illegally redeclares field `a` from `F1`: a writable item may not be redeclared as `ReadOnly` [typeddicts_inheritance] +typeddicts_readonly_inheritance.py:98:5: error: TypedDict `F4` illegally redeclares field `a` from `F1`: a required item may not be redeclared as not-required [typeddicts_inheritance] +typeddicts_readonly_inheritance.py:106:5: error: TypedDict `F6` illegally redeclares field `c` from `F1`: a required item may not be redeclared as not-required [typeddicts_inheritance] +typeddicts_readonly_inheritance.py:119:7: error: TypedDict `TD_A` inherits incompatible declarations of field `x` from `TD_A1` and `TD_A2` [typeddicts_inheritance] +typeddicts_readonly_inheritance.py:119:7: error: TypedDict `TD_A` inherits incompatible declarations of field `y` from `TD_A1` and `TD_A2` [typeddicts_inheritance] +typeddicts_readonly_inheritance.py:132:7: error: TypedDict `TD_B` inherits incompatible declarations of field `x` from `TD_B1` and `TD_B2` [typeddicts_inheritance] +typeddicts_readonly_inheritance.py:132:7: error: TypedDict `TD_B` inherits incompatible declarations of field `y` from `TD_B1` and `TD_B2` [typeddicts_inheritance] +""" diff --git a/conformance/results/basilisk/typeddicts_readonly_kwargs.toml b/conformance/results/basilisk/typeddicts_readonly_kwargs.toml new file mode 100644 index 000000000..f248dc4fd --- /dev/null +++ b/conformance/results/basilisk/typeddicts_readonly_kwargs.toml @@ -0,0 +1,7 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_readonly_kwargs.py:33:5: error: Cannot assign to read-only field `key1` of `TypedDict` `kwargs` [typeddicts_readonly] +""" diff --git a/conformance/results/basilisk/typeddicts_readonly_update.toml b/conformance/results/basilisk/typeddicts_readonly_update.toml new file mode 100644 index 000000000..ed32a25e6 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_readonly_update.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_readonly_update.py:23:1: error: `TypedDict` `A` does not support `.update()` — TypedDicts have a fixed schema [typeddicts_operations] +typeddicts_readonly_update.py:23:1: error: Cannot call `.update()` on `TypedDict` `a1`: it has `ReadOnly` fields [typeddicts_readonly] +""" diff --git a/conformance/results/basilisk/typeddicts_required.toml b/conformance/results/basilisk/typeddicts_required.toml new file mode 100644 index 000000000..0c004abe2 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_required.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_required.py:12:5: error: `Required`/`NotRequired` is not allowed on attribute `x` outside a `TypedDict` [typeddicts_required] +typeddicts_required.py:16:5: error: `Required`/`NotRequired` is not allowed on parameter `x` [typeddicts_required] +typeddicts_required.py:59:5: error: `Required` and `NotRequired` cannot be nested in `a` [typeddicts_required] +typeddicts_required.py:60:5: error: `Required` and `NotRequired` cannot be nested in `b` [typeddicts_required] +""" diff --git a/conformance/results/basilisk/typeddicts_type_consistency.toml b/conformance/results/basilisk/typeddicts_type_consistency.toml new file mode 100644 index 000000000..e68f19101 --- /dev/null +++ b/conformance/results/basilisk/typeddicts_type_consistency.toml @@ -0,0 +1,15 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_type_consistency.py:21:1: error: TypedDict `B1` is not assignable to `A1`: value type for key `x` is `int`, expected `int | None` [typeddicts_operations] +typeddicts_type_consistency.py:38:1: error: TypedDict `B2` is not assignable to `A2`: key `x` is required in source but non-required in target [typeddicts_operations] +typeddicts_type_consistency.py:65:1: error: TypedDict `A3` is not assignable to `B3`: missing key `y` [typeddicts_operations] +typeddicts_type_consistency.py:69:1: error: invalid key `y` for `TypedDict` `A3` [typeddicts_operations] +typeddicts_type_consistency.py:76:1: error: TypedDict `B3` is not assignable to `dict[str, int]` [typeddicts_operations] +typeddicts_type_consistency.py:77:1: error: TypedDict `B3` is not assignable to `dict[str, object]` [typeddicts_operations] +typeddicts_type_consistency.py:78:1: error: TypedDict `B3` is not assignable to `dict[Any, Any]` [typeddicts_operations] +typeddicts_type_consistency.py:82:1: error: TypedDict `B3` is not assignable to `Mapping[str, int]` [typeddicts_operations] +typeddicts_type_consistency.py:126:42: error: Value assigned to `TypedDict` `Inner1` field `inner_key` has the wrong type; expected `str` [typeddicts_operations] +""" diff --git a/conformance/results/basilisk/typeddicts_usage.toml b/conformance/results/basilisk/typeddicts_usage.toml new file mode 100644 index 000000000..01a41cfdb --- /dev/null +++ b/conformance/results/basilisk/typeddicts_usage.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeddicts_usage.py:23:1: error: `director` is not a valid key for `TypedDict` `Movie` [typeddicts_operations] +typeddicts_usage.py:24:1: error: Value assigned to `TypedDict` `Movie` field `year` has the wrong type; expected `int` [typeddicts_operations] +typeddicts_usage.py:28:1: error: invalid key `title` for `TypedDict` `Movie`; missing required key `name` [typeddicts_operations] +typeddicts_usage.py:35:4: error: TypedDict type objects cannot be used in `isinstance()` tests [typeddicts_usage] +typeddicts_usage.py:40:5: error: TypedDict type objects cannot be used in `isinstance()` tests [typeddicts_usage] +""" diff --git a/conformance/results/basilisk/typeforms_typeform.toml b/conformance/results/basilisk/typeforms_typeform.toml new file mode 100644 index 000000000..1c5d082c2 --- /dev/null +++ b/conformance/results/basilisk/typeforms_typeform.toml @@ -0,0 +1,23 @@ +conformant = "Pass" +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +typeforms_typeform.py:23:1: error: Type mismatch: `err1` is annotated `TypeForm[str | None]` (TypeForm[str | None]) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:24:1: error: Type mismatch: `err2` is annotated `TypeForm[str | None]` (TypeForm[str | None]) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:59:7: error: Argument `"not a type"` is not a valid type expression for parameter `x` of type `TypeForm` [assignment_compatibility] +typeforms_typeform.py:67:1: error: Type mismatch: `bad1` is annotated `TypeForm` (TypeForm) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:68:1: error: Type mismatch: `bad2` is annotated `TypeForm` (TypeForm) but assigned tuple[int, int] [assignment_compatibility] +typeforms_typeform.py:69:1: error: Type mismatch: `bad3` is annotated `TypeForm` (TypeForm) but assigned int [assignment_compatibility] +typeforms_typeform.py:70:1: error: Type mismatch: `bad4` is annotated `TypeForm` (TypeForm) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:71:1: error: Type mismatch: `bad5` is annotated `TypeForm` (TypeForm) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:71:1: error: `ClassVar` is not allowed in right-hand side of module-level assignment for `bad5` [classes_classvar] +typeforms_typeform.py:72:1: error: Type mismatch: `bad6` is annotated `TypeForm` (TypeForm) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:73:1: error: Type mismatch: `bad7` is annotated `TypeForm` (TypeForm) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:74:1: error: Type mismatch: `bad8` is annotated `TypeForm` (TypeForm) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:75:1: error: Type mismatch: `bad9` is annotated `TypeForm` (TypeForm) but assigned str [assignment_compatibility] +typeforms_typeform.py:86:6: error: Invalid TypeForm argument: `"type(1)"` is not a valid type expression [assignment_compatibility] +typeforms_typeform.py:88:6: error: Invalid TypeForm argument: `type(1)` is not a valid type expression [assignment_compatibility] +typeforms_typeform.py:98:1: error: Type mismatch: `t2` is annotated `TypeForm[str]` (TypeForm[str]) but assigned Unknown [assignment_compatibility] +typeforms_typeform.py:108:1: error: Type mismatch: `t4` is annotated `TypeForm[str]` (TypeForm[str]) but assigned Unknown [assignment_compatibility] +""" diff --git a/conformance/results/basilisk/version.toml b/conformance/results/basilisk/version.toml new file mode 100644 index 000000000..5995fb3b5 --- /dev/null +++ b/conformance/results/basilisk/version.toml @@ -0,0 +1 @@ +version = "basilisk 0.27.0" diff --git a/conformance/results/results.html b/conformance/results/results.html index e220e0455..aa2fa2891 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -127,7 +127,7 @@ } .col2 { - inline-size: calc(70% / 6); + inline-size: calc(70% / 7); } .conformant { @@ -258,11 +258,12 @@

Python Type System Conformance Test Results

- + + @@ -273,7 +274,7 @@

Python Type System Conformance Test Results

- @@ -285,9 +286,11 @@

Python Type System Conformance Test Results

+ + + + + + @@ -383,12 +390,13 @@

Python Type System Conformance Test Results

- + + @@ -418,7 +427,7 @@

Python Type System Conformance Test Results

- @@ -430,10 +439,12 @@

Python Type System Conformance Test Results

+ + + @@ -463,9 +475,11 @@

Python Type System Conformance Test Results

+ + + @@ -497,12 +512,13 @@

Python Type System Conformance Test Results

- + + + + + + @@ -613,6 +634,7 @@

Python Type System Conformance Test Results

+ + + + + + @@ -703,6 +730,7 @@

Python Type System Conformance Test Results

+ @@ -712,6 +740,7 @@

Python Type System Conformance Test Results

+ @@ -719,6 +748,7 @@

Python Type System Conformance Test Results

+ + @@ -744,9 +775,11 @@

Python Type System Conformance Test Results

+ + + + + + + @@ -856,6 +894,7 @@

Python Type System Conformance Test Results

+ @@ -867,9 +906,11 @@

Python Type System Conformance Test Results

+ + + + + + + @@ -941,12 +987,13 @@

Python Type System Conformance Test Results

- + + + + @@ -1007,12 +1057,13 @@

Python Type System Conformance Test Results

- + + + @@ -1049,12 +1102,13 @@

Python Type System Conformance Test Results

- + + + + + + + + @@ -1185,12 +1246,13 @@

Python Type System Conformance Test Results

- + + + + + @@ -1262,13 +1328,14 @@

Python Type System Conformance Test Results

- + + + + + + + + + @@ -1429,6 +1504,7 @@

Python Type System Conformance Test Results

+ @@ -1436,11 +1512,13 @@

Python Type System Conformance Test Results

+ + @@ -1451,12 +1529,13 @@

Python Type System Conformance Test Results

- + + + @@ -1511,9 +1592,11 @@

Python Type System Conformance Test Results

+ + @@ -1524,12 +1607,13 @@

Python Type System Conformance Test Results

- + + + + + + + @@ -1653,13 +1743,14 @@

Python Type System Conformance Test Results

- + + + + + + @@ -1748,7 +1844,7 @@

Python Type System Conformance Test Results

- @@ -1756,6 +1852,7 @@

Python Type System Conformance Test Results

+ + @@ -1778,12 +1876,13 @@

Python Type System Conformance Test Results

- + + + + + @@ -1875,6 +1978,7 @@

Python Type System Conformance Test Results

+ @@ -1884,6 +1988,7 @@

Python Type System Conformance Test Results

+ @@ -1893,6 +1998,7 @@

Python Type System Conformance Test Results

+ @@ -1902,9 +2008,11 @@

Python Type System Conformance Test Results

+ + + + + + + + + @@ -2009,12 +2124,13 @@

Python Type System Conformance Test Results

- + + + @@ -2063,6 +2181,7 @@

Python Type System Conformance Test Results

+ @@ -2072,6 +2191,7 @@

Python Type System Conformance Test Results

+ @@ -2081,6 +2201,7 @@

Python Type System Conformance Test Results

+ @@ -2090,6 +2211,7 @@

Python Type System Conformance Test Results

+ @@ -2099,9 +2221,11 @@

Python Type System Conformance Test Results

+ + + + + + + + @@ -2184,12 +2314,13 @@

Python Type System Conformance Test Results

- + + + + @@ -2238,12 +2372,13 @@

Python Type System Conformance Test Results

- + + @@ -2279,9 +2415,11 @@

Python Type System Conformance Test Results

+ + + @@ -2306,7 +2445,7 @@

Python Type System Conformance Test Results

- @@ -2318,10 +2457,12 @@

Python Type System Conformance Test Results

+ + + + + + + @@ -2417,7 +2563,7 @@

Python Type System Conformance Test Results

- @@ -2429,6 +2575,7 @@

Python Type System Conformance Test Results

+ @@ -2436,6 +2583,7 @@

Python Type System Conformance Test Results

+ + - @@ -2468,6 +2617,7 @@

Python Type System Conformance Test Results

+ @@ -2477,6 +2627,7 @@

Python Type System Conformance Test Results

+ @@ -2484,6 +2635,7 @@

Python Type System Conformance Test Results

+ + + + @@ -2550,9 +2705,11 @@

Python Type System Conformance Test Results

+ + + @@ -2582,9 +2740,11 @@

Python Type System Conformance Test Results

+ + + @@ -2610,12 +2771,13 @@

Python Type System Conformance Test Results

- + + @@ -2643,6 +2806,7 @@

Python Type System Conformance Test Results

+ diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index d72ff9dbf..f894837a6 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -510,3 +510,132 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: PycroscopeTypeChecker(), TyTypeChecker(), ) + +# Basilisk adapter for the REAL python/typing conformance harness. +# ruff: noqa: F821 +# +# This is the SAME per-checker adapter shape upstream ships for pyright, mypy, +# ty, pyrefly, zuban and pycroscope. The wheel-conformance CI/release gate +# ([CHKARCH-CONFORMANCE]) clones `python/typing@main`, appends this file to the +# suite's `conformance/src/type_checker.py`, then runs the suite's unmodified +# `src/main.py --only-run basilisk` against the pip-installed `basilisk-python` +# wheel. Every name used below (os, shutil, json, Path, Sequence, run, PIPE, +# CalledProcessError, TypeChecker) is already imported at the top of upstream's +# type_checker.py, so this file appends cleanly with no extra imports. +# +# It mirrors the release gate's fail-closed install path and sorts diagnostics so +# repeated conformance runs do not dirty committed results when Basilisk reports +# independent diagnostics in a different order. + + +class BasiliskTypeChecker(TypeChecker): + @property + def name(self) -> str: + return "basilisk" + + def _executable(self) -> str: + # Prefer the pip-installed `basilisk` console script (the wheel puts it on + # PATH — this is how the suite's `uv sync` environment resolves it). A + # BASILISK_BIN override is honoured for source builds / local dev. + override = os.environ.get("BASILISK_BIN") + if override: + return override + return shutil.which("basilisk") or "basilisk" + + def install(self) -> bool: + try: + self.get_version() + return True + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run basilisk. Install it with " + "`pip install basilisk-python` (or point BASILISK_BIN at the " + "binary). See https://www.basilisk-python.dev." + ) + return False + + def get_version(self) -> str: + proc = run( + [self._executable(), "--version"], + check=True, + stdout=PIPE, + text=True, + ) + return proc.stdout.strip() + + def run_tests(self, test_files: "Sequence[str]") -> dict[str, str]: + # Basilisk emits a machine-readable JSON array of diagnostics. Each test + # file is a self-contained module, so we check them individually and key + # the flattened text output by file name for the scoring pass. + results_dict: dict[str, str] = {} + for test_file in test_files: + proc = run( + [ + self._executable(), + "check", + test_file, + "--output", + "json", + "--color", + "never", + ], + stdout=PIPE, + stderr=PIPE, + text=True, + encoding="utf-8", + ) + if proc.returncode not in (0, 1): + raise CalledProcessError( + proc.returncode, + "basilisk check", + output=proc.stdout, + stderr=proc.stderr, + ) + if not proc.stdout.strip(): + raise ValueError(f"basilisk produced empty JSON output for {test_file}") + diagnostics = json.loads(proc.stdout) + if not isinstance(diagnostics, list): + raise TypeError(f"basilisk JSON output is not a list for {test_file}") + + def sort_key(diagnostic: dict[str, object]) -> tuple[str, int, int, str, str, str]: + return ( + Path(str(diagnostic.get("path", test_file))).name, + int(diagnostic.get("line", 0) or 0), + int(diagnostic.get("col", 0) or 0), + str(diagnostic.get("severity", "error")), + str(diagnostic.get("code", "")), + str(diagnostic.get("message", "")), + ) + + for diagnostic in sorted(diagnostics, key=sort_key): + file_name = Path(diagnostic.get("path", test_file)).name + line_number = diagnostic.get("line", 0) + col_number = diagnostic.get("col", 0) + severity = str(diagnostic.get("severity", "error")).replace("\n", " ") + message = str(diagnostic.get("message", "")).replace("\n", " ") + code = str(diagnostic.get("code", "")).replace("\n", " ") + line_text = ( + f"{file_name}:{line_number}:{col_number}: " + f"{severity}: {message} [{code}]\n" + ) + results_dict[file_name] = results_dict.get(file_name, "") + line_text + return results_dict + + def parse_errors(self, output: "Sequence[str]") -> dict[int, list[str]]: + # aliases_implicit.py:115:5: error: Invalid type expression ... [annotations_forward_refs] + line_to_errors: dict[int, list[str]] = {} + for line in output: + if not line.strip(): + continue + if line.count(":") < 3: + raise AssertionError( + f"Failed to parse Basilisk diagnostic line: {line!r}" + ) + _, lineno, _col, _rest = line.split(":", maxsplit=3) + line_to_errors.setdefault(int(lineno), []).append(line) + return line_to_errors + + +# Register Basilisk without depending on upstream's tuple contents: extend +# whatever `TYPE_CHECKERS` the suite defined. `--only-run basilisk` selects it. +TYPE_CHECKERS = tuple(TYPE_CHECKERS) + (BasiliskTypeChecker(),) diff --git a/conformance/uv.lock b/conformance/uv.lock index 2aadb047b..81f9b4138 100644 --- a/conformance/uv.lock +++ b/conformance/uv.lock @@ -26,6 +26,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/45/19/cc8bd127d28a43da249aa955cfd164cf8fd534e79e42cea96c4854d72fd0/ast_serialize-0.5.0-cp39-abi3-win_arm64.whl", hash = "sha256:92a31c9c20d25a076edaeec76b128a3535d74a24f340b9a8a7e96c9b86dc9642", size = 1081181, upload-time = "2026-05-17T17:48:28.122Z" }, ] +[[package]] +name = "basilisk-python" +version = "0.27.0" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e4/b3/f1acc0c0d3400c32aa3d0927d87f8bd4f88ea2742505a4494dd5d664c4ae/basilisk_python-0.27.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b0723eaf5bcd9a4df926486b128aef7e945cbd26e008966fef5baa83b6d14659", size = 6042835, upload-time = "2026-07-05T11:49:03.691Z" }, + { url = "https://files.pythonhosted.org/packages/0f/e5/fb3900f0c4f533a4e8f92f7aab293514ed14d82c5748c373db5b3f0b3020/basilisk_python-0.27.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae79412a9eb8f7e5cf0b4ea9bc639b8529f996103a417f6440f05ba5e6777eb1", size = 6051090, upload-time = "2026-07-05T11:49:05.877Z" }, + { url = "https://files.pythonhosted.org/packages/bc/75/ed45daa20c0981a04f2f7ee5e8591c90dc51d90d3037c1c3f494f3ec44cd/basilisk_python-0.27.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e250b028cca805a441a44ff89b135fce773d442926401d7f88a31858fcb5bf4", size = 6475075, upload-time = "2026-07-05T11:49:07.656Z" }, + { url = "https://files.pythonhosted.org/packages/e5/2b/3efab5e598502d2fcd4017c452e9aa30a7777e52133bdcc66c7d9cee5ebc/basilisk_python-0.27.0-py3-none-win_amd64.whl", hash = "sha256:2e6eb13a25863a574a2866dcf75a9101cce5c86cf8d538d86cf85b3fae80f916", size = 6404281, upload-time = "2026-07-05T11:49:09.69Z" }, + { url = "https://files.pythonhosted.org/packages/79/2e/17d798481ecd413bcf2bd5d01bc80c7d63dac8dee93cfc486cf381096e2d/basilisk_python-0.27.0-py3-none-win_arm64.whl", hash = "sha256:9b5e731933f231947e6d46845721ec399c8ce5d0f239a91b44c16d5933ac8662", size = 6009719, upload-time = "2026-07-05T11:49:11.333Z" }, +] + [[package]] name = "importlib-resources" version = "7.1.0" @@ -252,6 +264,7 @@ name = "typing-conformance" version = "0.1.0" source = { virtual = "." } dependencies = [ + { name = "basilisk-python" }, { name = "jinja2" }, { name = "markdown" }, { name = "mypy" }, @@ -266,6 +279,7 @@ dependencies = [ [package.metadata] requires-dist = [ + { name = "basilisk-python" }, { name = "jinja2" }, { name = "markdown" }, { name = "mypy" }, From ad79992ff4a14a9b8b58abefae109150793c069f Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Mon, 6 Jul 2026 07:57:05 +1000 Subject: [PATCH 2/3] Remove comment --- conformance/src/type_checker.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index f894837a6..341167bed 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -511,22 +511,6 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: TyTypeChecker(), ) -# Basilisk adapter for the REAL python/typing conformance harness. -# ruff: noqa: F821 -# -# This is the SAME per-checker adapter shape upstream ships for pyright, mypy, -# ty, pyrefly, zuban and pycroscope. The wheel-conformance CI/release gate -# ([CHKARCH-CONFORMANCE]) clones `python/typing@main`, appends this file to the -# suite's `conformance/src/type_checker.py`, then runs the suite's unmodified -# `src/main.py --only-run basilisk` against the pip-installed `basilisk-python` -# wheel. Every name used below (os, shutil, json, Path, Sequence, run, PIPE, -# CalledProcessError, TypeChecker) is already imported at the top of upstream's -# type_checker.py, so this file appends cleanly with no extra imports. -# -# It mirrors the release gate's fail-closed install path and sorts diagnostics so -# repeated conformance runs do not dirty committed results when Basilisk reports -# independent diagnostics in a different order. - class BasiliskTypeChecker(TypeChecker): @property From a73e5c45f25b61190b9d262baeaf9d461efa5a9c Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Mon, 6 Jul 2026 08:05:46 +1000 Subject: [PATCH 3/3] Further cleanup --- conformance/src/type_checker.py | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 341167bed..6fd0ed0f2 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -502,16 +502,6 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: return line_to_errors -TYPE_CHECKERS: Sequence[TypeChecker] = ( - MypyTypeChecker(), - PyrightTypeChecker(), - ZubanLSTypeChecker(), - PyreflyTypeChecker(), - PycroscopeTypeChecker(), - TyTypeChecker(), -) - - class BasiliskTypeChecker(TypeChecker): @property def name(self) -> str: @@ -547,7 +537,7 @@ def get_version(self) -> str: ) return proc.stdout.strip() - def run_tests(self, test_files: "Sequence[str]") -> dict[str, str]: + def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: # Basilisk emits a machine-readable JSON array of diagnostics. Each test # file is a self-contained module, so we check them individually and key # the flattened text output by file name for the scoring pass. @@ -605,7 +595,7 @@ def sort_key(diagnostic: dict[str, object]) -> tuple[str, int, int, str, str, st results_dict[file_name] = results_dict.get(file_name, "") + line_text return results_dict - def parse_errors(self, output: "Sequence[str]") -> dict[int, list[str]]: + def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: # aliases_implicit.py:115:5: error: Invalid type expression ... [annotations_forward_refs] line_to_errors: dict[int, list[str]] = {} for line in output: @@ -620,6 +610,12 @@ def parse_errors(self, output: "Sequence[str]") -> dict[int, list[str]]: return line_to_errors -# Register Basilisk without depending on upstream's tuple contents: extend -# whatever `TYPE_CHECKERS` the suite defined. `--only-run basilisk` selects it. -TYPE_CHECKERS = tuple(TYPE_CHECKERS) + (BasiliskTypeChecker(),) +TYPE_CHECKERS: Sequence[TypeChecker] = ( + MypyTypeChecker(), + PyrightTypeChecker(), + ZubanLSTypeChecker(), + PyreflyTypeChecker(), + PycroscopeTypeChecker(), + TyTypeChecker(), + BasiliskTypeChecker(), +)
basilisk 0.27.0 mypy 2.1.0 pycroscope 0.4.0 pyrefly 1.1.0
+ Type annotations
Pass Pass PassPass
annotations_forward_refsPass Partial
    @@ -326,6 +329,7 @@

    Python Type System Conformance Test Results

annotations_generatorsPass Partial
    @@ -340,6 +344,7 @@

    Python Type System Conformance Test Results

annotations_methodsPass Pass
    @@ -360,6 +365,7 @@

    Python Type System Conformance Test Results

annotations_typeexpr PassPass Partial
    @@ -373,6 +379,7 @@

    Python Type System Conformance Test Results

5 / 5 • 100.0% 4 / 5 • 80.0% 4 / 5 • 80.0% 4.5 / 5 • 90.0%
+ Type forms
typeforms_typeformPass Partial
    @@ -408,6 +416,7 @@

    Python Type System Conformance Test Results

1 / 1 • 100.0% 0.5 / 1 • 50.0% 0.5 / 1 • 50.0% 1 / 1 • 100.0%
+ Special types in annotations
Pass Pass PassPass
specialtypes_never PassPass Partial
    @@ -454,6 +465,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
specialtypes_promotions Pass Pass PassPass
specialtypes_typePass Partial
    @@ -487,6 +501,7 @@

    Python Type System Conformance Test Results

5 / 5 • 100.0% 4.5 / 5 • 90.0% 4.5 / 5 • 90.0% 5 / 5 • 100.0%
+ Generics
generics_base_classPass Partial
    @@ -521,6 +537,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Partial
    @@ -531,6 +548,7 @@

    Python Type System Conformance Test Results

generics_defaultsPass Partial
    @@ -557,6 +575,7 @@

    Python Type System Conformance Test Results

generics_defaults_referentialPass Partial
    @@ -576,6 +595,7 @@

    Python Type System Conformance Test Results

generics_defaults_specializationPass Partial
    @@ -606,6 +626,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
generics_paramspec_components Pass Pass PassPass Partial
    @@ -626,6 +648,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Pass
    @@ -643,11 +666,13 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
generics_scoping Pass PassPass Partial
    @@ -666,6 +691,7 @@

    Python Type System Conformance Test Results

generics_self_advancedPass Partial
    @@ -694,6 +720,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
generics_self_basic Pass Pass PassPass
generics_self_protocols Pass Pass PassPass
generics_self_usage Pass Pass PassPass Partial
    @@ -735,6 +765,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
generics_syntax_declarations Pass Pass PassPass
generics_syntax_infer_variancePass Unsupported
    @@ -761,6 +794,7 @@

    Python Type System Conformance Test Results

generics_syntax_scopingPass Partial
    @@ -780,6 +814,7 @@

    Python Type System Conformance Test Results

generics_type_erasurePass Partial
    @@ -800,6 +835,7 @@

    Python Type System Conformance Test Results

generics_typevartuple_argsPass Partial
    @@ -824,6 +860,7 @@

    Python Type System Conformance Test Results

generics_typevartuple_basicPass Partial
    @@ -847,6 +884,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Unsupported Pass
Pass Pass PassPass Unsupported Pass
Pass Pass PassPass
generics_typevartuple_specializationPass Partial
    @@ -889,11 +930,13 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Unsupported Pass
generics_upper_boundPass Partial
    @@ -908,6 +951,7 @@

    Python Type System Conformance Test Results

generics_variancePass Partial
    @@ -928,9 +972,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
30 / 30 • 100.0% 23 / 30 • 76.7% 28.5 / 30 • 95.0% 29.5 / 30 • 98.3%
+ Type qualifiers
qualifiers_annotatedPass Partial
    @@ -971,6 +1018,7 @@

    Python Type System Conformance Test Results

qualifiers_final_annotationPass Partial
    @@ -994,9 +1042,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
3 / 3 • 100.0% 2 / 3 • 66.7% 2.5 / 3 • 83.3% 3 / 3 • 100.0%
+ Class type compatibility
classes_classvarPass Partial
    @@ -1036,9 +1087,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
2 / 2 • 100.0% 1.5 / 2 • 75.0% 2 / 2 • 100.0% 2 / 2 • 100.0%
+ Type aliases
aliases_explicitPass Partial
    @@ -1075,6 +1129,7 @@

    Python Type System Conformance Test Results

aliases_implicit PassPass Partial
    @@ -1095,6 +1150,7 @@

    Python Type System Conformance Test Results

aliases_newtypePass Partial
    @@ -1113,12 +1169,14 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Unsupported Pass
aliases_type_statement PassPass Partial
    @@ -1138,6 +1196,7 @@

    Python Type System Conformance Test Results

aliases_typealiastypePass Partial
    @@ -1172,9 +1231,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
7 / 7 • 100.0% 5.5 / 7 • 78.6% 5.5 / 7 • 78.6% 7 / 7 • 100.0%
+ Literals
literals_interactionsPass Pass
    @@ -1210,6 +1272,7 @@

    Python Type System Conformance Test Results

literals_literalstringPass Unsupported
    @@ -1224,6 +1287,7 @@

    Python Type System Conformance Test Results

literals_parameterizationsPass Partial
    @@ -1249,9 +1313,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
4 / 4 • 100.0% 2.5 / 4 • 62.5% 3.5 / 4 • 87.5% 4 / 4 • 100.0%
+ Protocols
protocols_class_objects PassPass Partial
    @@ -1290,6 +1357,7 @@

    Python Type System Conformance Test Results

protocols_definitionPass Partial
    @@ -1313,6 +1381,7 @@

    Python Type System Conformance Test Results

protocols_explicitPass Pass
    @@ -1334,6 +1403,7 @@

    Python Type System Conformance Test Results

protocols_generic PassPass Partial
    @@ -1357,6 +1427,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Partial
    @@ -1371,6 +1442,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Partial
    @@ -1385,6 +1457,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass Partial
    @@ -1395,6 +1468,7 @@

    Python Type System Conformance Test Results

protocols_runtime_checkablePass Partial
    @@ -1420,6 +1494,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
protocols_subtyping Pass Pass PassPass
protocols_variance Pass Pass PassPass Unsupported Pass
11 / 11 • 100.0% 10 / 11 • 90.9% 10 / 11 • 90.9% 11 / 11 • 100.0%
+ Callables
callables_annotationPass Partial
    @@ -1482,6 +1561,7 @@

    Python Type System Conformance Test Results

callables_kwargsPass Partial
    @@ -1502,6 +1582,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
callables_subtyping Pass Pass PassPass
4 / 4 • 100.0% 3 / 4 • 75.0% 4 / 4 • 100.0% 3.5 / 4 • 87.5%
+ Constructors
constructors_call_initPass Partial
    @@ -1551,6 +1635,7 @@

    Python Type System Conformance Test Results

constructors_call_metaclassPass Unsupported
    @@ -1566,6 +1651,7 @@

    Python Type System Conformance Test Results

constructors_call_newPass Partial
    @@ -1582,6 +1668,7 @@

    Python Type System Conformance Test Results

constructors_call_typePass Partial
    @@ -1601,6 +1688,7 @@

    Python Type System Conformance Test Results

constructors_callablePass Partial
    @@ -1629,6 +1717,7 @@

    Python Type System Conformance Test Results

constructors_consistencyPass Pass
    @@ -1643,6 +1732,7 @@

    Python Type System Conformance Test Results

6 / 6 • 100.0% 3 / 6 • 50.0% 6 / 6 • 100.0% 5.5 / 6 • 91.7%
+ Overloads
overloads_basic PassPass Partial
    @@ -1679,9 +1770,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
overloads_definitionsPass Partial
    @@ -1696,6 +1789,7 @@

    Python Type System Conformance Test Results

overloads_definitions_stubPass Partial
    @@ -1715,6 +1809,7 @@

    Python Type System Conformance Test Results

overloads_evaluationPass Partial
    @@ -1738,6 +1833,7 @@

    Python Type System Conformance Test Results

5 / 5 • 100.0% 3.5 / 5 • 70.0% 3.5 / 5 • 70.0% 5 / 5 • 100.0%
+ Exceptions
exceptions_context_managers Pass PassPass Partial
    @@ -1770,6 +1867,7 @@

    Python Type System Conformance Test Results

1 / 1 • 100.0% 1 / 1 • 100.0%1 / 1 • 100.0% 0.5 / 1 • 50.0% 1 / 1 • 100.0% 0 / 1 • 0.0%
+ Dataclasses
dataclasses_descriptorsPass Partial
    @@ -1815,6 +1914,7 @@

    Python Type System Conformance Test Results

dataclasses_finalPass Partial
    @@ -1836,9 +1936,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
dataclasses_hashPass Unsupported
    @@ -1866,6 +1968,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
dataclasses_kwonly Pass Pass PassPass
dataclasses_match_args Pass Pass PassPass
dataclasses_order Pass Pass PassPass
dataclasses_postinit Pass Pass PassPass
dataclasses_slotsPass Partial
    @@ -1930,9 +2038,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
dataclasses_transform_converterPass Unsupported
    @@ -1947,6 +2057,7 @@

    Python Type System Conformance Test Results

dataclasses_transform_fieldPass Partial
    @@ -1961,6 +2072,7 @@

    Python Type System Conformance Test Results

dataclasses_transform_funcPass Partial
    @@ -1982,9 +2094,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
dataclasses_usagePass Pass
    @@ -1999,6 +2113,7 @@

    Python Type System Conformance Test Results

16 / 16 • 100.0% 11.5 / 16 • 71.9% 15.5 / 16 • 96.9% 15.5 / 16 • 96.9%
+ Typed dictionaries
typeddicts_alt_syntaxPass Pass
    @@ -2029,6 +2145,7 @@

    Python Type System Conformance Test Results

typeddicts_class_syntaxPass Partial
    @@ -2048,6 +2165,7 @@

    Python Type System Conformance Test Results

typeddicts_extra_itemsPass Unsupported Pass Pass Pass Pass PassPass
typeddicts_inheritance Pass Pass PassPass
typeddicts_operations Pass Pass PassPass
typeddicts_readonly Pass Pass PassPass
typeddicts_readonly_consistency Pass Pass PassPass
typeddicts_readonly_inheritancePass Partial
    @@ -2124,9 +2248,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
typeddicts_readonly_updatePass Partial
    @@ -2148,10 +2274,12 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
typeddicts_type_consistency PassPass Partial
    @@ -2171,9 +2299,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
14 / 14 • 100.0% 11.5 / 14 • 82.1% 13.5 / 14 • 96.4% 14 / 14 • 100.0%
+ Tuples
tuples_type_compatPass Partial
    @@ -2211,9 +2342,11 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
tuples_unpackedPass Partial
    @@ -2228,6 +2361,7 @@

    Python Type System Conformance Test Results

3 / 3 • 100.0% 2 / 3 • 66.7% 3 / 3 • 100.0% 3 / 3 • 100.0%
+ Named tuples
namedtuples_define_classPass Partial
    @@ -2270,6 +2405,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
namedtuples_type_compat Pass Pass PassPass
namedtuples_usagePass Partial
    @@ -2296,6 +2434,7 @@

    Python Type System Conformance Test Results

4 / 4 • 100.0% 3 / 4 • 75.0% 3.5 / 4 • 87.5% 4 / 4 • 100.0%
+ Enumerations
Pass Pass PassPass
enums_definition PassPass Partial
    @@ -2335,6 +2476,7 @@

    Python Type System Conformance Test Results

enums_expansionPass Partial
    @@ -2354,6 +2496,7 @@

    Python Type System Conformance Test Results

enums_member_namesPass Pass
    @@ -2368,6 +2511,7 @@

    Python Type System Conformance Test Results

enums_member_valuesPass Partial
    @@ -2383,6 +2527,7 @@

    Python Type System Conformance Test Results

enums_membersPass Partial
    @@ -2407,6 +2552,7 @@

    Python Type System Conformance Test Results

6 / 6 • 100.0% 4.5 / 6 • 75.0% 5.5 / 6 • 91.7% 6 / 6 • 100.0%
+ Type narrowing
Pass Pass PassPass
narrowing_typeis Pass Pass PassPass Partial
    @@ -2450,13 +2598,14 @@

    Python Type System Conformance Test Results

2 / 2 • 100.0% 2 / 2 • 100.0% 2 / 2 • 100.0%2 / 2 • 100.0% 1.5 / 2 • 75.0% 2 / 2 • 100.0%
+ Type checker directives
Pass Pass PassPass
directives_cast Pass Pass PassPass
directives_deprecated Pass Pass PassPass Partial
    @@ -2497,6 +2649,7 @@

    Python Type System Conformance Test Results

directives_disjoint_base PassPass Partial
    @@ -2515,6 +2668,7 @@

    Python Type System Conformance Test Results

directives_no_type_checkPass Partial
    @@ -2541,6 +2695,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
directives_type_checking Pass Pass PassPass
directives_type_ignorePass Partial
    @@ -2573,6 +2730,7 @@

    Python Type System Conformance Test Results

Pass Pass PassPass
directives_type_ignore_file2 Pass Pass PassPass
directives_version_platformPass Pass
    @@ -2600,6 +2760,7 @@

    Python Type System Conformance Test Results

11 / 11 • 100.0% 10 / 11 • 90.9% 10.5 / 11 • 95.5% 11 / 11 • 100.0%
+ Historical and deprecated features
historical_positionalPass Partial
    @@ -2632,6 +2794,7 @@

    Python Type System Conformance Test Results

1 / 1 • 100.0% 0.5 / 1 • 50.0% 1 / 1 • 100.0% 1 / 1 • 100.0%
141 / 141 • 100.0% 109 / 141 • 77.3% 130 / 141 • 92.2% 138 / 141 • 97.9%