From 997341a1b2b966ddd13a70482b2644748f0b1714 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 4 Apr 2024 08:57:32 -0400 Subject: [PATCH 01/22] Conformance tests: Minor coding improvements - Avoid quadratic string concatenation - Avoid bare except - Avoid unnecessary subshells in subprocess calls --- conformance/src/reporting.py | 30 +++++++-------- conformance/src/type_checker.py | 65 ++++++++++++++++++--------------- 2 files changed, 50 insertions(+), 45 deletions(-) diff --git a/conformance/src/reporting.py b/conformance/src/reporting.py index 266ab7f58..d448e7ea1 100644 --- a/conformance/src/reporting.py +++ b/conformance/src/reporting.py @@ -24,13 +24,13 @@ def generate_summary(root_dir: Path): f.write(summary) -def generate_summary_html(root_dir: Path): +def generate_summary_html(root_dir: Path) -> str: column_count = len(TYPE_CHECKERS) + 1 test_groups = get_test_groups(root_dir) test_cases = get_test_cases(test_groups, root_dir / "tests") - summary_html = '
' - summary_html += '' + summary_html = ['
 
'] + summary_html.append('') for type_checker in TYPE_CHECKERS: # Load the version file for the type checker. @@ -48,12 +48,12 @@ def generate_summary_html(root_dir: Path): version = existing_info["version"] or "Unknown version" test_duration = existing_info.get("test_duration") - summary_html += f"" + summary_html.append(f"
{test_duration:.1f}sec
") + summary_html.append("") - summary_html += f"" + summary_html.append("") for test_group_name, test_group in test_groups.items(): tests_in_group = [ @@ -64,16 +64,16 @@ def generate_summary_html(root_dir: Path): # Are there any test cases in this group? if len(tests_in_group) > 0: - summary_html += f'" + summary_html.append("") for test_case in tests_in_group: test_case_name = test_case.stem - summary_html += f'' + summary_html.append(f'') for type_checker in TYPE_CHECKERS: try: @@ -110,10 +110,10 @@ def generate_summary_html(root_dir: Path): if raw_notes != "": conformance_cell = f'
{conformance_cell}{notes}
' - summary_html += f'' + summary_html.append(f'') - summary_html += f"" + summary_html.append("") - summary_html += "
 
{version}
" + summary_html.append(f"
{version}
") if test_duration is not None: - summary_html += f"
{test_duration:.1f}sec
" - summary_html += f"
' - summary_html += ( + summary_html.append(f'
') + summary_html.append( f'{test_group.name}' ) - summary_html += "
     {test_case_name}
     {test_case_name}{conformance_cell}{conformance_cell}
\n" + summary_html.append("\n") - return summary_html + return "".join(summary_html) diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index f6d6e5c35..db650e3f2 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -11,8 +11,8 @@ from pytype import analyze as pytype_analyze from pytype.errors import errors as pytype_errors from pytype import load_pytd as pytype_loader -from shutil import rmtree -from subprocess import PIPE, run +import shutil +from subprocess import PIPE, CalledProcessError, run import sys from tqdm import tqdm from typing import Sequence @@ -59,25 +59,24 @@ def name(self) -> str: def install(self) -> bool: try: # Delete the cache for consistent timings. - rmtree(".mypy_cache") - except: + shutil.rmtree(".mypy_cache") + except (shutil.Error, OSError): # Ignore any errors here. pass try: run( - f"{sys.executable} -m pip install mypy --upgrade", + [sys.executable, "-m", "pip", "install", "mypy", "--upgrade"], check=True, - shell=True, ) return True - except: + except CalledProcessError: print("Unable to install mypy") return False def get_version(self) -> str: proc = run( - f"{sys.executable} -m mypy --version", stdout=PIPE, text=True, shell=True + [sys.executable, "-m", "mypy", "--version"], stdout=PIPE, text=True ) version = proc.stdout.strip() @@ -86,11 +85,20 @@ def get_version(self) -> str: return version def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: - # Mypy currently crashes when run on the "generics_defaults.py" test case, - # so we need to exclude it for now. Remove this once mypy adds support for - # this functionality. - command = f"{sys.executable} -m mypy . --exclude 'generics_defaults\.py' --disable-error-code empty-body" - proc = run(command, stdout=PIPE, text=True, shell=True) + command = [ + sys.executable, + "-m", + "mypy", + ".", + # Mypy currently crashes when run on the "generics_defaults.py" test case, + # so we need to exclude it for now. Remove this once mypy adds support for + # this functionality. + "--exclude", + r"generics_defaults\.py", + "--disable-error-code", + "empty-body", + ] + proc = run(command, stdout=PIPE, text=True) lines = proc.stdout.split("\n") # Add results to a dictionary keyed by the file name. @@ -111,28 +119,27 @@ def install(self) -> bool: try: # Install the Python wrapper if it's not installed. run( - f"{sys.executable} -m pip install pyright --upgrade", + [sys.executable, "-m", "pip", "install", "pyright", "--upgrade"], check=True, - shell=True, ) # Force the Python wrapper to install node if needed # and download the latest version of pyright. self.get_version() return True - except: + except CalledProcessError: print("Unable to install pyright") return False def get_version(self) -> str: proc = run( - f"{sys.executable} -m pyright --version", stdout=PIPE, text=True, shell=True + [sys.executable, "-m", "pyright", "--version"], stdout=PIPE, text=True ) return proc.stdout.strip() def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: - command = f"{sys.executable} -m pyright . --outputjson" - proc = run(command, stdout=PIPE, text=True, shell=True) + command = [sys.executable, "-m", "pyright", ".", "--outputjson"] + proc = run(command, stdout=PIPE, text=True) output_json = json.loads(proc.stdout) diagnostics = output_json["generalDiagnostics"] @@ -161,16 +168,15 @@ def name(self) -> str: def install(self) -> bool: try: # Delete the cache for consistent timings. - rmtree(".pyre") - except: + shutil.rmtree(".pyre") + except (shutil.Error, OSError): # Ignore any errors here. pass try: run( - f"{sys.executable} -m pip install pyre-check --upgrade", + [sys.executable, "-m", "pip", "install", "pyre-check", "--upgrade"], check=True, - shell=True, ) # Generate a default config file. @@ -179,18 +185,18 @@ def install(self) -> bool: f.write(pyre_config) return True - except: + except CalledProcessError: print("Unable to install pyre") return False def get_version(self) -> str: - proc = run("pyre --version", stdout=PIPE, text=True, shell=True) + proc = run(["pyre", "--version"], stdout=PIPE, text=True) version = proc.stdout.strip() version = version.replace("Client version:", "pyre") return version def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: - proc = run("pyre check", stdout=PIPE, text=True, shell=True) + proc = run(["pyre", "check"], stdout=PIPE, text=True) lines = proc.stdout.split("\n") # Add results to a dictionary keyed by the file name. @@ -210,18 +216,17 @@ def name(self) -> str: def install(self) -> bool: try: run( - f"{sys.executable} -m pip install pytype --upgrade", + [sys.executable, "-m", "pip", "install", "pytype", "--upgrade"], check=True, - shell=True, ) return True - except: + except CalledProcessError: print("Unable to install pytype on this platform") return False def get_version(self) -> str: proc = run( - f"{sys.executable} -m pytype --version", stdout=PIPE, text=True, shell=True + [sys.executable, "-m", "pytype", "--version"], stdout=PIPE, text=True ) version = proc.stdout.strip() return f"pytype {version}" From 12762191dd960ef63ea86a0b87f486091fed6a4d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 4 Apr 2024 09:47:25 -0400 Subject: [PATCH 02/22] Start automation --- .../results/mypy/aliases_explicit.toml | 8 ++- .../results/mypy/aliases_implicit.toml | 26 +++++++ conformance/results/mypy/aliases_newtype.toml | 17 +++++ .../results/mypy/aliases_recursive.toml | 14 ++++ .../results/mypy/aliases_type_statement.toml | 43 +++++++++++- .../results/mypy/aliases_typealiastype.toml | 25 ++++++- .../results/mypy/aliases_variance.toml | 7 ++ .../results/mypy/annotations_coroutines.toml | 3 + .../mypy/annotations_forward_refs.toml | 25 ++++++- .../results/mypy/annotations_generators.toml | 15 ++++- .../results/mypy/annotations_methods.toml | 7 +- .../results/mypy/annotations_typeexpr.toml | 18 +++++ .../results/mypy/callables_annotation.toml | 13 ++++ .../results/mypy/callables_kwargs.toml | 16 +++++ .../results/mypy/callables_protocol.toml | 20 ++++++ .../results/mypy/classes_classvar.toml | 23 ++++++- .../results/mypy/classes_override.toml | 12 +++- .../results/mypy/dataclasses_descriptors.toml | 8 ++- .../results/mypy/dataclasses_frozen.toml | 7 ++ .../results/mypy/dataclasses_hash.toml | 6 +- .../results/mypy/dataclasses_inheritance.toml | 5 ++ .../results/mypy/dataclasses_kwonly.toml | 12 +++- .../results/mypy/dataclasses_order.toml | 4 ++ .../results/mypy/dataclasses_postinit.toml | 7 ++ .../results/mypy/dataclasses_slots.toml | 9 ++- .../mypy/dataclasses_transform_class.toml | 9 +++ .../mypy/dataclasses_transform_field.toml | 9 ++- .../mypy/dataclasses_transform_func.toml | 12 +++- .../mypy/dataclasses_transform_meta.toml | 9 +++ .../results/mypy/dataclasses_usage.toml | 13 ++++ .../results/mypy/directives_assert_type.toml | 5 ++ conformance/results/mypy/directives_cast.toml | 6 ++ .../mypy/directives_no_type_check.toml | 7 +- .../results/mypy/directives_reveal_type.toml | 5 ++ .../mypy/directives_type_checking.toml | 3 + .../results/mypy/directives_type_ignore.toml | 8 ++- .../mypy/directives_type_ignore_file1.toml | 3 + .../mypy/directives_type_ignore_file2.toml | 3 + .../mypy/directives_version_platform.toml | 10 ++- .../results/mypy/generics_base_class.toml | 9 +++ conformance/results/mypy/generics_basic.toml | 12 ++++ .../results/mypy/generics_defaults.toml | 3 + .../mypy/generics_defaults_referential.toml | 11 +++ .../generics_defaults_specialization.toml | 6 ++ .../mypy/generics_paramspec_basic.toml | 12 +++- .../mypy/generics_paramspec_components.toml | 13 +++- .../mypy/generics_paramspec_semantics.toml | 12 ++++ .../generics_paramspec_specialization.toml | 8 +++ .../results/mypy/generics_scoping.toml | 15 ++++- .../results/mypy/generics_self_advanced.toml | 12 +++- .../mypy/generics_self_attributes.toml | 5 ++ .../results/mypy/generics_self_basic.toml | 10 ++- .../results/mypy/generics_self_protocols.toml | 5 ++ .../results/mypy/generics_self_usage.toml | 14 ++++ .../mypy/generics_syntax_compatibility.toml | 11 ++- .../mypy/generics_syntax_declarations.toml | 27 +++++++- .../mypy/generics_syntax_infer_variance.toml | 64 +++++++++++++++++- .../results/mypy/generics_syntax_scoping.toml | 33 ++++++++- .../results/mypy/generics_type_erasure.toml | 14 +++- .../mypy/generics_typevartuple_args.toml | 13 +++- .../mypy/generics_typevartuple_basic.toml | 20 +++++- .../mypy/generics_typevartuple_callable.toml | 4 ++ .../mypy/generics_typevartuple_concat.toml | 3 + .../mypy/generics_typevartuple_overloads.toml | 3 + .../generics_typevartuple_specialization.toml | 12 +++- .../mypy/generics_typevartuple_unpack.toml | 7 +- .../results/mypy/generics_upper_bound.toml | 7 ++ .../results/mypy/generics_variance.toml | 13 +++- .../mypy/generics_variance_inference.toml | 62 ++++++++++++++++- .../results/mypy/historical_positional.toml | 10 ++- .../results/mypy/literals_interactions.toml | 12 +++- .../results/mypy/literals_literalstring.toml | 14 +++- .../mypy/literals_parameterizations.toml | 22 +++++- .../results/mypy/literals_semantics.toml | 7 ++ .../mypy/namedtuples_define_class.toml | 17 ++++- .../mypy/namedtuples_define_functional.toml | 17 ++++- .../results/mypy/namedtuples_type_compat.toml | 5 ++ .../results/mypy/namedtuples_usage.toml | 13 +++- .../results/mypy/narrowing_typeguard.toml | 5 ++ conformance/results/mypy/overloads_basic.toml | 6 ++ .../results/mypy/protocols_class_objects.toml | 11 +++ .../results/mypy/protocols_definition.toml | 24 ++++++- .../results/mypy/protocols_explicit.toml | 13 +++- .../results/mypy/protocols_generic.toml | 15 ++++- .../results/mypy/protocols_merging.toml | 9 +++ .../results/mypy/protocols_modules.toml | 6 ++ .../results/mypy/protocols_recursive.toml | 3 + .../mypy/protocols_runtime_checkable.toml | 9 ++- conformance/results/mypy/protocols_self.toml | 3 + .../results/mypy/protocols_subtyping.toml | 10 +++ .../results/mypy/protocols_variance.toml | 12 ++++ .../results/mypy/qualifiers_annotated.toml | 28 +++++++- .../mypy/qualifiers_final_annotation.toml | 33 ++++++++- .../mypy/qualifiers_final_decorator.toml | 13 ++++ .../results/mypy/specialtypes_any.toml | 3 + .../results/mypy/specialtypes_never.toml | 6 ++ .../results/mypy/specialtypes_none.toml | 6 ++ .../results/mypy/specialtypes_promotions.toml | 4 ++ .../results/mypy/specialtypes_type.toml | 19 +++++- .../results/mypy/tuples_type_compat.toml | 28 +++++++- .../results/mypy/tuples_type_form.toml | 14 ++++ conformance/results/mypy/tuples_unpacked.toml | 7 +- .../results/mypy/typeddicts_alt_syntax.toml | 13 +++- .../results/mypy/typeddicts_class_syntax.toml | 8 +++ .../results/mypy/typeddicts_final.toml | 3 + .../results/mypy/typeddicts_inheritance.toml | 6 ++ .../results/mypy/typeddicts_operations.toml | 14 ++++ .../results/mypy/typeddicts_readonly.toml | 11 +++ .../mypy/typeddicts_readonly_consistency.toml | 13 ++++ .../mypy/typeddicts_readonly_inheritance.toml | 31 +++++++++ .../mypy/typeddicts_readonly_kwargs.toml | 5 ++ .../mypy/typeddicts_readonly_update.toml | 5 ++ .../results/mypy/typeddicts_required.toml | 12 +++- .../mypy/typeddicts_type_consistency.toml | 14 ++++ .../results/mypy/typeddicts_usage.toml | 6 ++ conformance/results/mypy/version.toml | 2 +- .../results/pyre/aliases_explicit.toml | 25 ++++++- .../results/pyre/aliases_implicit.toml | 29 +++++++- conformance/results/pyre/aliases_newtype.toml | 13 +++- .../results/pyre/aliases_recursive.toml | 20 +++++- .../results/pyre/aliases_type_statement.toml | 7 +- .../results/pyre/aliases_typealiastype.toml | 38 ++++++++++- .../results/pyre/aliases_variance.toml | 7 ++ .../results/pyre/annotations_coroutines.toml | 7 +- .../pyre/annotations_forward_refs.toml | 25 ++++++- .../results/pyre/annotations_generators.toml | 20 +++++- .../results/pyre/annotations_methods.toml | 6 +- .../results/pyre/annotations_typeexpr.toml | 20 ++++++ .../results/pyre/callables_annotation.toml | 16 ++++- .../results/pyre/callables_kwargs.toml | 12 +++- .../results/pyre/callables_protocol.toml | 22 +++++- .../results/pyre/classes_classvar.toml | 17 ++++- .../results/pyre/classes_override.toml | 21 +++++- .../results/pyre/dataclasses_descriptors.toml | 7 +- .../results/pyre/dataclasses_frozen.toml | 8 ++- .../results/pyre/dataclasses_hash.toml | 6 +- .../results/pyre/dataclasses_inheritance.toml | 6 +- .../results/pyre/dataclasses_kwonly.toml | 6 ++ .../results/pyre/dataclasses_order.toml | 6 +- .../results/pyre/dataclasses_postinit.toml | 7 +- .../results/pyre/dataclasses_slots.toml | 7 +- .../pyre/dataclasses_transform_class.toml | 21 +++++- .../pyre/dataclasses_transform_field.toml | 11 ++- .../pyre/dataclasses_transform_func.toml | 23 ++++++- .../pyre/dataclasses_transform_meta.toml | 18 ++++- .../results/pyre/dataclasses_usage.toml | 21 +++++- .../results/pyre/directives_assert_type.toml | 10 ++- conformance/results/pyre/directives_cast.toml | 6 ++ .../pyre/directives_no_type_check.toml | 11 ++- .../results/pyre/directives_reveal_type.toml | 6 +- .../pyre/directives_type_checking.toml | 3 + .../results/pyre/directives_type_ignore.toml | 3 + .../pyre/directives_type_ignore_file1.toml | 7 +- .../pyre/directives_type_ignore_file2.toml | 3 + .../pyre/directives_version_platform.toml | 10 ++- .../results/pyre/generics_base_class.toml | 11 ++- conformance/results/pyre/generics_basic.toml | 14 +++- .../results/pyre/generics_defaults.toml | 24 +++++++ .../pyre/generics_defaults_referential.toml | 12 ++++ .../generics_defaults_specialization.toml | 14 ++++ .../pyre/generics_paramspec_basic.toml | 11 ++- .../pyre/generics_paramspec_components.toml | 13 +++- .../pyre/generics_paramspec_semantics.toml | 15 ++++- .../generics_paramspec_specialization.toml | 17 ++++- .../results/pyre/generics_scoping.toml | 16 ++++- .../results/pyre/generics_self_advanced.toml | 15 ++++- .../pyre/generics_self_attributes.toml | 10 ++- .../results/pyre/generics_self_basic.toml | 15 ++++- .../results/pyre/generics_self_protocols.toml | 7 +- .../results/pyre/generics_self_usage.toml | 9 ++- .../pyre/generics_syntax_compatibility.toml | 7 +- .../pyre/generics_syntax_declarations.toml | 7 +- .../pyre/generics_syntax_infer_variance.toml | 7 +- .../results/pyre/generics_syntax_scoping.toml | 7 +- .../results/pyre/generics_type_erasure.toml | 10 ++- .../pyre/generics_typevartuple_args.toml | 16 ++++- .../pyre/generics_typevartuple_basic.toml | 30 ++++++++- .../pyre/generics_typevartuple_callable.toml | 14 +++- .../pyre/generics_typevartuple_concat.toml | 19 +++++- .../pyre/generics_typevartuple_overloads.toml | 12 +++- .../generics_typevartuple_specialization.toml | 52 +++++++++++++- .../pyre/generics_typevartuple_unpack.toml | 12 +++- .../results/pyre/generics_upper_bound.toml | 8 ++- .../results/pyre/generics_variance.toml | 12 +++- .../pyre/generics_variance_inference.toml | 7 +- .../results/pyre/historical_positional.toml | 12 +++- .../results/pyre/literals_interactions.toml | 9 ++- .../results/pyre/literals_literalstring.toml | 12 ++++ .../pyre/literals_parameterizations.toml | 23 ++++++- .../results/pyre/literals_semantics.toml | 9 ++- .../pyre/namedtuples_define_class.toml | 17 ++++- .../pyre/namedtuples_define_functional.toml | 20 +++++- .../results/pyre/namedtuples_type_compat.toml | 11 ++- .../results/pyre/namedtuples_usage.toml | 11 ++- .../results/pyre/narrowing_typeguard.toml | 8 ++- conformance/results/pyre/overloads_basic.toml | 8 ++- .../results/pyre/protocols_class_objects.toml | 9 ++- .../results/pyre/protocols_definition.toml | 19 +++++- .../results/pyre/protocols_explicit.toml | 11 ++- .../results/pyre/protocols_generic.toml | 12 +++- .../results/pyre/protocols_merging.toml | 11 ++- .../results/pyre/protocols_modules.toml | 6 +- .../results/pyre/protocols_recursive.toml | 3 + .../pyre/protocols_runtime_checkable.toml | 6 +- conformance/results/pyre/protocols_self.toml | 3 + .../results/pyre/protocols_subtyping.toml | 10 +++ .../results/pyre/protocols_variance.toml | 8 ++- .../results/pyre/qualifiers_annotated.toml | 24 ++++++- .../pyre/qualifiers_final_annotation.toml | 30 ++++++++- .../pyre/qualifiers_final_decorator.toml | 15 ++++- .../results/pyre/specialtypes_any.toml | 13 +++- .../results/pyre/specialtypes_never.toml | 15 ++++- .../results/pyre/specialtypes_none.toml | 10 ++- .../results/pyre/specialtypes_promotions.toml | 6 +- .../results/pyre/specialtypes_type.toml | 21 +++++- .../results/pyre/tuples_type_compat.toml | 48 ++++++++++++- .../results/pyre/tuples_type_form.toml | 13 +++- conformance/results/pyre/tuples_unpacked.toml | 22 +++++- .../results/pyre/typeddicts_alt_syntax.toml | 9 ++- .../results/pyre/typeddicts_class_syntax.toml | 7 +- .../results/pyre/typeddicts_final.toml | 7 +- .../results/pyre/typeddicts_inheritance.toml | 8 ++- .../results/pyre/typeddicts_operations.toml | 14 ++++ .../results/pyre/typeddicts_readonly.toml | 5 ++ .../pyre/typeddicts_readonly_consistency.toml | 15 +++++ .../pyre/typeddicts_readonly_inheritance.toml | 14 ++++ .../pyre/typeddicts_readonly_kwargs.toml | 6 ++ .../pyre/typeddicts_readonly_update.toml | 6 ++ .../results/pyre/typeddicts_required.toml | 9 ++- .../pyre/typeddicts_type_consistency.toml | 17 ++++- .../results/pyre/typeddicts_usage.toml | 7 +- conformance/results/pyre/version.toml | 2 +- .../results/pyright/aliases_explicit.toml | 16 +++++ .../results/pyright/aliases_implicit.toml | 25 +++++++ .../results/pyright/aliases_newtype.toml | 16 +++++ .../results/pyright/aliases_recursive.toml | 14 ++++ .../pyright/aliases_type_statement.toml | 30 +++++++++ .../pyright/aliases_typealiastype.toml | 24 +++++++ .../results/pyright/aliases_variance.toml | 7 ++ .../pyright/annotations_coroutines.toml | 3 + .../pyright/annotations_forward_refs.toml | 25 +++++++ .../pyright/annotations_generators.toml | 15 +++++ .../results/pyright/annotations_methods.toml | 7 +- .../results/pyright/annotations_typeexpr.toml | 18 +++++ .../results/pyright/callables_annotation.toml | 13 ++++ .../results/pyright/callables_kwargs.toml | 16 +++++ .../results/pyright/callables_protocol.toml | 20 ++++++ .../results/pyright/classes_classvar.toml | 20 ++++++ .../results/pyright/classes_override.toml | 8 +++ .../pyright/dataclasses_descriptors.toml | 3 + .../results/pyright/dataclasses_frozen.toml | 7 ++ .../results/pyright/dataclasses_hash.toml | 5 ++ .../pyright/dataclasses_inheritance.toml | 5 ++ .../results/pyright/dataclasses_kwonly.toml | 6 ++ .../results/pyright/dataclasses_order.toml | 4 ++ .../results/pyright/dataclasses_postinit.toml | 7 ++ .../results/pyright/dataclasses_slots.toml | 8 +++ .../pyright/dataclasses_transform_class.toml | 9 +++ .../pyright/dataclasses_transform_field.toml | 5 ++ .../pyright/dataclasses_transform_func.toml | 9 +++ .../pyright/dataclasses_transform_meta.toml | 9 +++ .../results/pyright/dataclasses_usage.toml | 12 ++++ .../pyright/directives_assert_type.toml | 3 + .../results/pyright/directives_cast.toml | 6 ++ .../pyright/directives_no_type_check.toml | 8 ++- .../pyright/directives_reveal_type.toml | 3 + .../pyright/directives_type_checking.toml | 3 + .../pyright/directives_type_ignore.toml | 3 + .../pyright/directives_type_ignore_file1.toml | 3 + .../pyright/directives_type_ignore_file2.toml | 3 + .../pyright/directives_version_platform.toml | 3 + .../results/pyright/generics_base_class.toml | 9 +++ .../results/pyright/generics_basic.toml | 12 ++++ .../results/pyright/generics_defaults.toml | 9 +++ .../generics_defaults_referential.toml | 10 +++ .../generics_defaults_specialization.toml | 5 ++ .../pyright/generics_paramspec_basic.toml | 10 +++ .../generics_paramspec_components.toml | 19 ++++++ .../pyright/generics_paramspec_semantics.toml | 16 ++++- .../generics_paramspec_specialization.toml | 8 +++ .../results/pyright/generics_scoping.toml | 13 ++++ .../pyright/generics_self_advanced.toml | 3 + .../pyright/generics_self_attributes.toml | 5 ++ .../results/pyright/generics_self_basic.toml | 6 ++ .../pyright/generics_self_protocols.toml | 5 ++ .../results/pyright/generics_self_usage.toml | 14 ++++ .../generics_syntax_compatibility.toml | 5 ++ .../pyright/generics_syntax_declarations.toml | 13 ++++ .../generics_syntax_infer_variance.toml | 22 ++++++ .../pyright/generics_syntax_scoping.toml | 12 ++++ .../pyright/generics_type_erasure.toml | 10 +++ .../pyright/generics_typevartuple_args.toml | 12 ++++ .../pyright/generics_typevartuple_basic.toml | 18 +++++ .../generics_typevartuple_callable.toml | 4 ++ .../pyright/generics_typevartuple_concat.toml | 3 + .../generics_typevartuple_overloads.toml | 3 + .../generics_typevartuple_specialization.toml | 9 +++ .../pyright/generics_typevartuple_unpack.toml | 4 ++ .../results/pyright/generics_upper_bound.toml | 6 ++ .../results/pyright/generics_variance.toml | 16 +++++ .../pyright/generics_variance_inference.toml | 26 +++++++ .../pyright/historical_positional.toml | 9 ++- .../pyright/literals_interactions.toml | 7 ++ .../pyright/literals_literalstring.toml | 13 ++++ .../pyright/literals_parameterizations.toml | 20 ++++++ .../results/pyright/literals_semantics.toml | 7 ++ .../pyright/namedtuples_define_class.toml | 15 +++++ .../namedtuples_define_functional.toml | 15 +++++ .../pyright/namedtuples_type_compat.toml | 5 ++ .../results/pyright/namedtuples_usage.toml | 11 +++ .../results/pyright/narrowing_typeguard.toml | 5 ++ .../results/pyright/overloads_basic.toml | 6 ++ .../pyright/protocols_class_objects.toml | 11 +++ .../results/pyright/protocols_definition.toml | 24 +++++++ .../results/pyright/protocols_explicit.toml | 10 +++ .../results/pyright/protocols_generic.toml | 11 +++ .../results/pyright/protocols_merging.toml | 9 +++ .../results/pyright/protocols_modules.toml | 6 ++ .../results/pyright/protocols_recursive.toml | 3 + .../pyright/protocols_runtime_checkable.toml | 9 +++ .../results/pyright/protocols_self.toml | 3 + .../results/pyright/protocols_subtyping.toml | 10 +++ .../results/pyright/protocols_variance.toml | 5 ++ .../results/pyright/qualifiers_annotated.toml | 23 +++++++ .../pyright/qualifiers_final_annotation.toml | 27 ++++++++ .../pyright/qualifiers_final_decorator.toml | 13 ++++ .../results/pyright/specialtypes_any.toml | 3 + .../results/pyright/specialtypes_never.toml | 6 ++ .../results/pyright/specialtypes_none.toml | 6 ++ .../pyright/specialtypes_promotions.toml | 4 ++ .../results/pyright/specialtypes_type.toml | 12 ++++ .../results/pyright/tuples_type_compat.toml | 19 ++++++ .../results/pyright/tuples_type_form.toml | 14 ++++ .../results/pyright/tuples_unpacked.toml | 8 +++ .../pyright/typeddicts_alt_syntax.toml | 8 +++ .../pyright/typeddicts_class_syntax.toml | 8 +++ .../results/pyright/typeddicts_final.toml | 3 + .../pyright/typeddicts_inheritance.toml | 6 ++ .../pyright/typeddicts_operations.toml | 14 ++++ .../results/pyright/typeddicts_readonly.toml | 9 +++ .../typeddicts_readonly_consistency.toml | 10 +++ .../typeddicts_readonly_inheritance.toml | 14 ++++ .../pyright/typeddicts_readonly_kwargs.toml | 4 ++ .../pyright/typeddicts_readonly_update.toml | 4 ++ .../results/pyright/typeddicts_required.toml | 7 ++ .../pyright/typeddicts_type_consistency.toml | 12 ++++ .../results/pyright/typeddicts_usage.toml | 6 ++ conformance/results/pyright/version.toml | 2 +- .../results/pytype/aliases_explicit.toml | 16 ++++- .../results/pytype/aliases_implicit.toml | 16 ++++- .../results/pytype/aliases_newtype.toml | 10 ++- .../results/pytype/aliases_recursive.toml | 20 +++++- .../pytype/aliases_type_statement.toml | 6 +- .../results/pytype/aliases_typealiastype.toml | 13 +++- .../results/pytype/aliases_variance.toml | 8 ++- .../pytype/annotations_coroutines.toml | 7 +- .../pytype/annotations_forward_refs.toml | 18 ++++- .../pytype/annotations_generators.toml | 17 ++++- .../results/pytype/annotations_methods.toml | 7 +- .../results/pytype/annotations_typeexpr.toml | 7 +- .../results/pytype/callables_annotation.toml | 13 ++++ .../results/pytype/callables_kwargs.toml | 20 +++++- .../results/pytype/callables_protocol.toml | 13 +++- .../results/pytype/classes_classvar.toml | 18 ++++- .../results/pytype/classes_override.toml | 13 +++- .../pytype/dataclasses_descriptors.toml | 9 ++- .../results/pytype/dataclasses_frozen.toml | 6 +- .../results/pytype/dataclasses_hash.toml | 6 +- .../pytype/dataclasses_inheritance.toml | 6 +- .../results/pytype/dataclasses_kwonly.toml | 13 +++- .../results/pytype/dataclasses_order.toml | 6 +- .../results/pytype/dataclasses_postinit.toml | 9 ++- .../results/pytype/dataclasses_slots.toml | 10 ++- .../pytype/dataclasses_transform_class.toml | 11 ++- .../pytype/dataclasses_transform_field.toml | 8 ++- .../pytype/dataclasses_transform_func.toml | 16 ++++- .../pytype/dataclasses_transform_meta.toml | 9 ++- .../results/pytype/dataclasses_usage.toml | 19 ++++++ .../pytype/directives_assert_type.toml | 4 ++ .../results/pytype/directives_cast.toml | 8 ++- .../pytype/directives_no_type_check.toml | 11 ++- .../pytype/directives_reveal_type.toml | 11 ++- .../pytype/directives_type_checking.toml | 3 + .../pytype/directives_type_ignore.toml | 7 +- .../pytype/directives_type_ignore_file1.toml | 3 + .../pytype/directives_type_ignore_file2.toml | 7 +- .../pytype/directives_version_platform.toml | 9 ++- .../results/pytype/generics_base_class.toml | 10 ++- .../results/pytype/generics_basic.toml | 18 ++++- .../results/pytype/generics_defaults.toml | 51 ++++++++++++++ .../pytype/generics_defaults_referential.toml | 36 ++++++++++ .../generics_defaults_specialization.toml | 18 +++++ .../pytype/generics_paramspec_basic.toml | 6 +- .../pytype/generics_paramspec_components.toml | 6 +- .../pytype/generics_paramspec_semantics.toml | 6 +- .../generics_paramspec_specialization.toml | 17 ++++- .../results/pytype/generics_scoping.toml | 15 +++++ .../pytype/generics_self_advanced.toml | 17 ++++- .../pytype/generics_self_attributes.toml | 7 +- .../results/pytype/generics_self_basic.toml | 12 +++- .../pytype/generics_self_protocols.toml | 6 +- .../results/pytype/generics_self_usage.toml | 16 ++++- .../pytype/generics_syntax_compatibility.toml | 6 +- .../pytype/generics_syntax_declarations.toml | 6 +- .../generics_syntax_infer_variance.toml | 6 +- .../pytype/generics_syntax_scoping.toml | 6 +- .../results/pytype/generics_type_erasure.toml | 3 + .../pytype/generics_typevartuple_args.toml | 20 +++++- .../pytype/generics_typevartuple_basic.toml | 38 ++++++++++- .../generics_typevartuple_callable.toml | 20 +++++- .../pytype/generics_typevartuple_concat.toml | 25 ++++++- .../generics_typevartuple_overloads.toml | 15 ++++- .../generics_typevartuple_specialization.toml | 67 ++++++++++++++++++- .../pytype/generics_typevartuple_unpack.toml | 15 ++++- .../results/pytype/generics_upper_bound.toml | 12 +++- .../results/pytype/generics_variance.toml | 11 ++- .../pytype/generics_variance_inference.toml | 6 +- .../results/pytype/historical_positional.toml | 9 ++- .../results/pytype/literals_interactions.toml | 15 ++++- .../pytype/literals_literalstring.toml | 15 ++++- .../pytype/literals_parameterizations.toml | 21 +++++- .../results/pytype/literals_semantics.toml | 12 +++- .../pytype/namedtuples_define_class.toml | 17 ++++- .../pytype/namedtuples_define_functional.toml | 18 ++++- .../pytype/namedtuples_type_compat.toml | 5 ++ .../results/pytype/namedtuples_usage.toml | 12 +++- .../results/pytype/narrowing_typeguard.toml | 6 +- .../results/pytype/overloads_basic.toml | 9 ++- .../pytype/protocols_class_objects.toml | 7 +- .../results/pytype/protocols_definition.toml | 14 +++- .../results/pytype/protocols_explicit.toml | 9 ++- .../results/pytype/protocols_generic.toml | 14 +++- .../results/pytype/protocols_merging.toml | 11 ++- .../results/pytype/protocols_modules.toml | 8 ++- .../results/pytype/protocols_recursive.toml | 9 ++- .../pytype/protocols_runtime_checkable.toml | 6 +- .../results/pytype/protocols_self.toml | 10 ++- .../results/pytype/protocols_subtyping.toml | 10 ++- .../results/pytype/protocols_variance.toml | 9 ++- .../results/pytype/qualifiers_annotated.toml | 17 ++++- .../pytype/qualifiers_final_annotation.toml | 20 +++++- .../pytype/qualifiers_final_decorator.toml | 16 ++++- .../results/pytype/specialtypes_any.toml | 3 + .../results/pytype/specialtypes_never.toml | 12 +++- .../results/pytype/specialtypes_none.toml | 8 ++- .../pytype/specialtypes_promotions.toml | 4 ++ .../results/pytype/specialtypes_type.toml | 19 +++++- .../results/pytype/tuples_type_compat.toml | 46 ++++++++++++- .../results/pytype/tuples_type_form.toml | 14 ++++ .../results/pytype/tuples_unpacked.toml | 23 ++++++- .../results/pytype/typeddicts_alt_syntax.toml | 8 ++- .../pytype/typeddicts_class_syntax.toml | 6 +- .../results/pytype/typeddicts_final.toml | 3 + .../pytype/typeddicts_inheritance.toml | 6 ++ .../results/pytype/typeddicts_operations.toml | 11 ++- .../results/pytype/typeddicts_readonly.toml | 4 ++ .../typeddicts_readonly_consistency.toml | 7 ++ .../typeddicts_readonly_inheritance.toml | 17 +++++ .../pytype/typeddicts_readonly_kwargs.toml | 6 ++ .../pytype/typeddicts_readonly_update.toml | 4 ++ .../results/pytype/typeddicts_required.toml | 6 +- .../pytype/typeddicts_type_consistency.toml | 10 ++- .../results/pytype/typeddicts_usage.toml | 7 +- conformance/results/pytype/version.toml | 2 +- conformance/results/results.html | 2 +- conformance/src/main.py | 60 ++++++++++++++++- conformance/src/type_checker.py | 62 +++++++++++++++++ conformance/tests/aliases_explicit.py | 42 ++++++------ conformance/tests/aliases_implicit.py | 44 ++++++------ conformance/tests/aliases_newtype.py | 26 +++---- conformance/tests/aliases_recursive.py | 8 +-- conformance/tests/aliases_type_statement.py | 26 +++---- conformance/tests/aliases_typealiastype.py | 16 ++--- conformance/tests/aliases_variance.py | 8 +-- conformance/tests/annotations_forward_refs.py | 4 +- conformance/tests/annotations_generators.py | 18 ++--- conformance/tests/callables_kwargs.py | 26 +++---- conformance/tests/callables_protocol.py | 34 +++++----- conformance/tests/classes_classvar.py | 36 +++++----- conformance/tests/dataclasses_frozen.py | 4 +- conformance/tests/dataclasses_postinit.py | 8 +-- conformance/tests/dataclasses_usage.py | 10 +-- conformance/tests/generics_defaults.py | 2 +- conformance/tests/generics_paramspec_basic.py | 2 +- .../tests/generics_paramspec_semantics.py | 4 +- .../tests/generics_syntax_compatibility.py | 2 +- .../tests/generics_syntax_declarations.py | 14 ++-- .../tests/generics_syntax_infer_variance.py | 4 +- .../tests/generics_typevartuple_basic.py | 8 +-- .../generics_typevartuple_specialization.py | 2 +- conformance/tests/generics_variance.py | 16 ++--- conformance/tests/literals_interactions.py | 8 +-- conformance/tests/overloads_basic.py | 6 +- conformance/tests/protocols_class_objects.py | 2 +- conformance/tests/protocols_definition.py | 8 +-- conformance/tests/protocols_explicit.py | 14 ++-- conformance/tests/protocols_generic.py | 2 +- conformance/tests/protocols_merging.py | 10 +-- .../tests/protocols_runtime_checkable.py | 8 +-- conformance/tests/protocols_subtyping.py | 2 +- conformance/tests/protocols_variance.py | 14 ++-- conformance/tests/qualifiers_annotated.py | 26 +++---- .../tests/qualifiers_final_annotation.py | 40 +++++------ .../tests/qualifiers_final_decorator.py | 6 +- conformance/tests/specialtypes_never.py | 16 ++--- conformance/tests/specialtypes_none.py | 4 +- conformance/tests/typeddicts_alt_syntax.py | 2 +- conformance/tests/typeddicts_operations.py | 22 +++--- conformance/tests/typeddicts_required.py | 8 +-- 509 files changed, 5462 insertions(+), 777 deletions(-) diff --git a/conformance/results/mypy/aliases_explicit.toml b/conformance/results/mypy/aliases_explicit.toml index 6ca1a371d..595684a4d 100644 --- a/conformance/results/mypy/aliases_explicit.toml +++ b/conformance/results/mypy/aliases_explicit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject specialization of type alias that has already been implicitly specialized. +notes = """Does not reject specialization of type alias that has already been implicitly specialized. """ output = """ aliases_explicit.py:67: error: Bad number of arguments for type alias, expected 0, given 1 [type-arg] @@ -26,3 +25,8 @@ aliases_explicit.py:91: error: Invalid type alias: expression is not a valid typ aliases_explicit.py:101: error: "" not callable [operator] aliases_explicit.py:102: error: Bad number of arguments for type alias, expected 0, given 1 [type-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 90: Expected 1 errors, got 2 (['aliases_explicit.py:90: error: Invalid type alias: expression is not a valid type [valid-type]', 'aliases_explicit.py:90: error: Function "list" could always be true in boolean context [truthy-function]']) +Line 100: Expected 1 errors +""" diff --git a/conformance/results/mypy/aliases_implicit.toml b/conformance/results/mypy/aliases_implicit.toml index 12d111996..31f51e1f9 100644 --- a/conformance/results/mypy/aliases_implicit.toml +++ b/conformance/results/mypy/aliases_implicit.toml @@ -38,3 +38,29 @@ aliases_implicit.py:119: note: See https://mypy.readthedocs.io/en/stable/common_ aliases_implicit.py:133: error: "" not callable [operator] aliases_implicit.py:135: error: Bad number of arguments for type alias, expected 0, given 1 [type-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 76: Unexpected errors ['aliases_implicit.py:76: error: Bad number of arguments for type alias, expected 0, given 1 [type-arg]'] +Line 77: Unexpected errors ['aliases_implicit.py:77: error: Bad number of arguments for type alias, expected 0, given 1 [type-arg]'] +Line 78: Unexpected errors ['aliases_implicit.py:78: error: Bad number of arguments for type alias, expected 1, given 2 [type-arg]'] +Line 79: Unexpected errors ['aliases_implicit.py:79: error: Bad number of arguments for type alias, expected 1, given 2 [type-arg]'] +Line 80: Unexpected errors ['aliases_implicit.py:80: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" [misc]'] +Line 81: Unexpected errors ['aliases_implicit.py:81: error: Type argument "str" of "GoodTypeAlias12" must be a subtype of "float" [type-var]'] +Line 100: Unexpected errors ['aliases_implicit.py:100: error: Function "list" could always be true in boolean context [truthy-function]'] +Line 106: Unexpected errors ['aliases_implicit.py:106: error: Variable "aliases_implicit.BadTypeAlias1" is not valid as a type [valid-type]'] +Line 107: Unexpected errors ['aliases_implicit.py:107: error: Variable "aliases_implicit.BadTypeAlias2" is not valid as a type [valid-type]'] +Line 108: Unexpected errors ['aliases_implicit.py:108: error: Variable "aliases_implicit.BadTypeAlias3" is not valid as a type [valid-type]'] +Line 109: Unexpected errors ['aliases_implicit.py:109: error: Variable "aliases_implicit.BadTypeAlias4" is not valid as a type [valid-type]'] +Line 110: Unexpected errors ['aliases_implicit.py:110: error: Variable "aliases_implicit.BadTypeAlias5" is not valid as a type [valid-type]'] +Line 111: Unexpected errors ['aliases_implicit.py:111: error: Variable "aliases_implicit.BadTypeAlias6" is not valid as a type [valid-type]'] +Line 112: Unexpected errors ['aliases_implicit.py:112: error: Variable "aliases_implicit.BadTypeAlias7" is not valid as a type [valid-type]'] +Line 113: Unexpected errors ['aliases_implicit.py:113: error: Variable "aliases_implicit.BadTypeAlias8" is not valid as a type [valid-type]'] +Line 114: Unexpected errors ['aliases_implicit.py:114: error: Variable "aliases_implicit.BadTypeAlias9" is not valid as a type [valid-type]'] +Line 115: Unexpected errors ['aliases_implicit.py:115: error: Variable "aliases_implicit.BadTypeAlias10" is not valid as a type [valid-type]'] +Line 116: Unexpected errors ['aliases_implicit.py:116: error: Variable "aliases_implicit.BadTypeAlias11" is not valid as a type [valid-type]'] +Line 117: Unexpected errors ['aliases_implicit.py:117: error: Variable "aliases_implicit.BadTypeAlias12" is not valid as a type [valid-type]'] +Line 118: Unexpected errors ['aliases_implicit.py:118: error: Variable "aliases_implicit.BadTypeAlias13" is not valid as a type [valid-type]'] +Line 119: Unexpected errors ['aliases_implicit.py:119: error: Variable "aliases_implicit.BadTypeAlias14" is not valid as a type [valid-type]'] +Line 133: Unexpected errors ['aliases_implicit.py:133: error: "" not callable [operator]'] +Line 135: Unexpected errors ['aliases_implicit.py:135: error: Bad number of arguments for type alias, expected 0, given 1 [type-arg]'] +""" diff --git a/conformance/results/mypy/aliases_newtype.toml b/conformance/results/mypy/aliases_newtype.toml index 7aa7d64bd..f899ab8c8 100644 --- a/conformance/results/mypy/aliases_newtype.toml +++ b/conformance/results/mypy/aliases_newtype.toml @@ -18,3 +18,20 @@ aliases_newtype.py:58: error: Argument 2 to NewType(...) must be subclassable (g aliases_newtype.py:60: error: NewType(...) expects exactly two positional arguments [misc] aliases_newtype.py:62: error: Argument 2 to NewType(...) must be subclassable (got "Any") [valid-newtype] """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['aliases_newtype.py:11: error: Argument 1 to "UserId" has incompatible type "str"; expected "int" [arg-type]'] +Line 12: Unexpected errors ['aliases_newtype.py:12: error: Incompatible types in assignment (expression has type "int", variable has type "UserId") [assignment]'] +Line 20: Unexpected errors ['aliases_newtype.py:20: error: Cannot use isinstance() with NewType type [misc]'] +Line 23: Unexpected errors ['aliases_newtype.py:23: error: Cannot subclass "NewType" [misc]'] +Line 32: Unexpected errors ['aliases_newtype.py:32: error: String argument 1 "BadName" to NewType(...) does not match variable name "GoodName" [misc]'] +Line 38: Unexpected errors ['aliases_newtype.py:38: error: "GoodNewType1" expects no type arguments, but 1 given [type-arg]'] +Line 41: Unexpected errors ['aliases_newtype.py:41: error: Cannot redefine "GoodNewType2" as a NewType [misc]', 'aliases_newtype.py:41: error: Name "GoodNewType2" already defined on line 36 [no-redef]'] +Line 44: Unexpected errors ['aliases_newtype.py:44: error: Argument 2 to NewType(...) must be subclassable (got "int | str") [valid-newtype]'] +Line 47: Unexpected errors ['aliases_newtype.py:47: error: Type variable "aliases_newtype.T" is unbound [valid-type]'] +Line 49: Unexpected errors ['aliases_newtype.py:49: error: NewType cannot be used with protocol classes [misc]'] +Line 51: Unexpected errors ['aliases_newtype.py:51: error: Argument 2 to NewType(...) must be subclassable (got "Literal[7]") [valid-newtype]'] +Line 58: Unexpected errors ['aliases_newtype.py:58: error: Argument 2 to NewType(...) must be subclassable (got "TD1") [valid-newtype]'] +Line 60: Unexpected errors ['aliases_newtype.py:60: error: NewType(...) expects exactly two positional arguments [misc]'] +Line 62: Unexpected errors ['aliases_newtype.py:62: error: Argument 2 to NewType(...) must be subclassable (got "Any") [valid-newtype]'] +""" diff --git a/conformance/results/mypy/aliases_recursive.toml b/conformance/results/mypy/aliases_recursive.toml index 6d8137a2c..205c9d49b 100644 --- a/conformance/results/mypy/aliases_recursive.toml +++ b/conformance/results/mypy/aliases_recursive.toml @@ -12,3 +12,17 @@ aliases_recursive.py:73: error: List item 0 has incompatible type "float"; expec aliases_recursive.py:76: error: Invalid recursive alias: a union item of itself [misc] aliases_recursive.py:81: error: Invalid recursive alias: a union item of itself [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['aliases_recursive.py:19: error: Dict entry 1 has incompatible type "str": "complex"; expected "str": "int | str | float | list[Json] | dict[str, Json] | None" [dict-item]'] +Line 20: Unexpected errors ['aliases_recursive.py:20: error: List item 1 has incompatible type "complex"; expected "int | str | float | list[Json] | dict[str, Json] | None" [list-item]'] +Line 38: Unexpected errors ['aliases_recursive.py:38: error: Incompatible types in assignment (expression has type "tuple[int, tuple[str, int], tuple[int, tuple[int, list[int]]]]", variable has type "RecursiveTuple") [assignment]'] +Line 39: Unexpected errors ['aliases_recursive.py:39: error: Name "t6" already defined on line 38 [no-redef]'] +Line 50: Unexpected errors ['aliases_recursive.py:50: error: Dict entry 0 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, RecursiveMapping]" [dict-item]'] +Line 51: Unexpected errors ['aliases_recursive.py:51: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, RecursiveMapping]" [dict-item]'] +Line 55: Unexpected errors ['aliases_recursive.py:55: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, RecursiveMapping]" [dict-item]'] +Line 67: Unexpected errors ['aliases_recursive.py:67: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias1[str] | str" [list-item]'] +Line 73: Unexpected errors ['aliases_recursive.py:73: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias2[str, int] | str | int" [list-item]'] +Line 76: Unexpected errors ['aliases_recursive.py:76: error: Invalid recursive alias: a union item of itself [misc]'] +Line 81: Unexpected errors ['aliases_recursive.py:81: error: Invalid recursive alias: a union item of itself [misc]'] +""" diff --git a/conformance/results/mypy/aliases_type_statement.toml b/conformance/results/mypy/aliases_type_statement.toml index 3774e7bf1..eb19c125d 100644 --- a/conformance/results/mypy/aliases_type_statement.toml +++ b/conformance/results/mypy/aliases_type_statement.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support `type` statement. +notes = """Does not support `type` statement. """ output = """ aliases_type_statement.py: error: Cannot assign multiple types to name "BadTypeAlias14" without an explicit "Type[...]" annotation [misc] @@ -74,3 +73,43 @@ aliases_type_statement.py:90: error: Cannot resolve name "RecursiveTypeAlias7" ( aliases_type_statement.py:90: error: Name "RecursiveTypeAlias7" is used before definition [used-before-def] aliases_type_statement.py:91: error: PEP 695 type aliases are not yet supported [valid-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['aliases_type_statement.py:8: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 9: Unexpected errors ['aliases_type_statement.py:9: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:9: error: Name "S3" is not defined [name-defined]', 'aliases_type_statement.py:9: error: Name "S1" is not defined [name-defined]', 'aliases_type_statement.py:9: error: Name "S2" is not defined [name-defined]'] +Line 10: Unexpected errors ['aliases_type_statement.py:10: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:10: error: Value of type "UnionType" is not indexable [index]'] +Line 14: Unexpected errors ['aliases_type_statement.py:14: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 21: Unexpected errors ['aliases_type_statement.py:21: error: "type[int]" has no attribute "__value__" [attr-defined]'] +Line 23: Unexpected errors ['aliases_type_statement.py:23: error: "type[int]" has no attribute "other_attrib" [attr-defined]'] +Line 37: Unexpected errors ['aliases_type_statement.py:37: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 38: Unexpected errors ['aliases_type_statement.py:38: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 39: Unexpected errors ['aliases_type_statement.py:39: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 40: Unexpected errors ['aliases_type_statement.py:40: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 41: Unexpected errors ['aliases_type_statement.py:41: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 42: Unexpected errors ['aliases_type_statement.py:42: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 43: Unexpected errors ['aliases_type_statement.py:43: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 44: Unexpected errors ['aliases_type_statement.py:44: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 45: Unexpected errors ['aliases_type_statement.py:45: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 46: Unexpected errors ['aliases_type_statement.py:46: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 47: Unexpected errors ['aliases_type_statement.py:47: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 48: Unexpected errors ['aliases_type_statement.py:48: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:48: error: Function "list" could always be true in boolean context [truthy-function]'] +Line 49: Unexpected errors ['aliases_type_statement.py:49: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 52: Unexpected errors ['aliases_type_statement.py:52: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 54: Unexpected errors ['aliases_type_statement.py:54: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 58: Unexpected errors ['aliases_type_statement.py:58: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 64: Unexpected errors ['aliases_type_statement.py:64: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:64: error: Name "K" is not defined [name-defined]'] +Line 69: Unexpected errors ['aliases_type_statement.py:69: error: PEP 695 type aliases are not yet supported [valid-type]'] +Line 72: Unexpected errors ['aliases_type_statement.py:72: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:72: error: Name "T" is not defined [name-defined]', 'aliases_type_statement.py:72: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type]'] +Line 74: Unexpected errors ['aliases_type_statement.py:74: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type]'] +Line 75: Unexpected errors ['aliases_type_statement.py:75: error: Variable "aliases_type_statement.RecursiveTypeAlias1" is not valid as a type [valid-type]'] +Line 77: Unexpected errors ['aliases_type_statement.py:77: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:77: error: Name "P" is not defined [name-defined]', 'aliases_type_statement.py:77: error: Name "T" is not defined [name-defined]', 'aliases_type_statement.py:77: error: Name "S" is not defined [name-defined]', 'aliases_type_statement.py:77: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] +Line 79: Unexpected errors ['aliases_type_statement.py:79: error: Unexpected "..." [misc]', 'aliases_type_statement.py:79: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] +Line 80: Unexpected errors ['aliases_type_statement.py:80: error: Unexpected "..." [misc]', 'aliases_type_statement.py:80: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] +Line 81: Unexpected errors ['aliases_type_statement.py:81: error: Unexpected "..." [misc]', 'aliases_type_statement.py:81: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] +Line 82: Unexpected errors ['aliases_type_statement.py:82: error: Bracketed expression "[...]" is not valid as a type [valid-type]', 'aliases_type_statement.py:82: error: Variable "aliases_type_statement.RecursiveTypeAlias2" is not valid as a type [valid-type]'] +Line 84: Unexpected errors ['aliases_type_statement.py:84: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:84: error: Name "RecursiveTypeAlias3" is not defined [name-defined]'] +Line 86: Unexpected errors ['aliases_type_statement.py:86: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:86: error: Name "T" is not defined [name-defined]', 'aliases_type_statement.py:86: error: Cannot determine type of "RecursiveTypeAlias4" [has-type]'] +Line 88: Unexpected errors ['aliases_type_statement.py:88: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:88: error: Name "T" is not defined [name-defined]', 'aliases_type_statement.py:88: error: Variable "aliases_type_statement.RecursiveTypeAlias5" is not valid as a type [valid-type]'] +Line 90: Unexpected errors ['aliases_type_statement.py:90: error: PEP 695 type aliases are not yet supported [valid-type]', 'aliases_type_statement.py:90: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc]', 'aliases_type_statement.py:90: error: Name "RecursiveTypeAlias7" is used before definition [used-before-def]'] +Line 91: Unexpected errors ['aliases_type_statement.py:91: error: PEP 695 type aliases are not yet supported [valid-type]'] +""" diff --git a/conformance/results/mypy/aliases_typealiastype.toml b/conformance/results/mypy/aliases_typealiastype.toml index 4ed5f7931..0ff094b4b 100644 --- a/conformance/results/mypy/aliases_typealiastype.toml +++ b/conformance/results/mypy/aliases_typealiastype.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Support for TypeAliasType is not implemented. +notes = """Support for TypeAliasType is not implemented. """ output = """ aliases_typealiastype.py:17: error: Type variable "aliases_typealiastype.T" is unbound [valid-type] @@ -55,3 +54,25 @@ aliases_typealiastype.py:54: error: Cannot determine type of "BadAlias7" [has-t aliases_typealiastype.py:54: error: Name "BadAlias7" is used before definition [used-before-def] aliases_typealiastype.py:69: error: Function "list" could always be true in boolean context [truthy-function] """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['aliases_typealiastype.py:17: error: Type variable "aliases_typealiastype.T" is unbound [valid-type]', 'aliases_typealiastype.py:17: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] +Line 18: Unexpected errors ['aliases_typealiastype.py:18: error: Type variable "aliases_typealiastype.T" is unbound [valid-type]', 'aliases_typealiastype.py:18: error: Type variable "aliases_typealiastype.S" is unbound [valid-type]', 'aliases_typealiastype.py:18: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] +Line 19: Unexpected errors ['aliases_typealiastype.py:19: error: Cannot resolve name "GoodAlias4" (possible cyclic definition) [misc]', 'aliases_typealiastype.py:19: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] +Line 22: Unexpected errors ['aliases_typealiastype.py:22: error: Type variable "aliases_typealiastype.S" is unbound [valid-type]', 'aliases_typealiastype.py:22: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]', 'aliases_typealiastype.py:22: error: TypeVarTuple "Ts" is unbound [valid-type]'] +Line 23: Unexpected errors ['aliases_typealiastype.py:23: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object, object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] +Line 32: Unexpected errors ['aliases_typealiastype.py:32: error: "TypeAliasType" has no attribute "other_attrib" [attr-defined]'] +Line 35: Unexpected errors ['aliases_typealiastype.py:35: error: Variable "aliases_typealiastype.GoodAlias4" is not valid as a type [valid-type]'] +Line 36: Unexpected errors ['aliases_typealiastype.py:36: error: Variable "aliases_typealiastype.GoodAlias4" is not valid as a type [valid-type]'] +Line 37: Unexpected errors ['aliases_typealiastype.py:37: error: Unexpected "..." [misc]', 'aliases_typealiastype.py:37: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type]'] +Line 38: Unexpected errors ['aliases_typealiastype.py:38: error: Unexpected "..." [misc]', 'aliases_typealiastype.py:38: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type]'] +Line 39: Unexpected errors ['aliases_typealiastype.py:39: error: Bracketed expression "[...]" is not valid as a type [valid-type]', 'aliases_typealiastype.py:39: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type]', 'aliases_typealiastype.py:39: error: Unpack is only valid in a variadic position [valid-type]'] +Line 40: Unexpected errors ['aliases_typealiastype.py:40: error: Unexpected "..." [misc]', 'aliases_typealiastype.py:40: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type]'] +Line 44: Unexpected errors ['aliases_typealiastype.py:44: error: Type variable "aliases_typealiastype.S" is unbound [valid-type]', 'aliases_typealiastype.py:44: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] +Line 46: Unexpected errors ['aliases_typealiastype.py:46: error: Type variable "aliases_typealiastype.S" is unbound [valid-type]'] +Line 48: Unexpected errors ['aliases_typealiastype.py:48: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] +Line 50: Unexpected errors ['aliases_typealiastype.py:50: error: Cannot determine type of "BadAlias4" [has-type]'] +Line 52: Unexpected errors ['aliases_typealiastype.py:52: error: Cannot determine type of "BadAlias5" [has-type]', 'aliases_typealiastype.py:52: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] +Line 54: Unexpected errors ['aliases_typealiastype.py:54: error: Cannot determine type of "BadAlias7" [has-type]', 'aliases_typealiastype.py:54: error: Name "BadAlias7" is used before definition [used-before-def]'] +Line 69: Unexpected errors ['aliases_typealiastype.py:69: error: Function "list" could always be true in boolean context [truthy-function]'] +""" diff --git a/conformance/results/mypy/aliases_variance.toml b/conformance/results/mypy/aliases_variance.toml index f20fc53d6..76bd06bd8 100644 --- a/conformance/results/mypy/aliases_variance.toml +++ b/conformance/results/mypy/aliases_variance.toml @@ -5,3 +5,10 @@ aliases_variance.py:28: error: Variance of TypeVar "T_co" incompatible with vari aliases_variance.py:32: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var] aliases_variance.py:44: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var] """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['aliases_variance.py:24: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var]'] +Line 28: Unexpected errors ['aliases_variance.py:28: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var]'] +Line 32: Unexpected errors ['aliases_variance.py:32: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var]'] +Line 44: Unexpected errors ['aliases_variance.py:44: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var]'] +""" diff --git a/conformance/results/mypy/annotations_coroutines.toml b/conformance/results/mypy/annotations_coroutines.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/annotations_coroutines.toml +++ b/conformance/results/mypy/annotations_coroutines.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/annotations_forward_refs.toml b/conformance/results/mypy/annotations_forward_refs.toml index 34a604c35..15654dea8 100644 --- a/conformance/results/mypy/annotations_forward_refs.toml +++ b/conformance/results/mypy/annotations_forward_refs.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report error for a forward reference that is not enclosed in quotes. +notes = """Does not report error for a forward reference that is not enclosed in quotes. Does not report error for use of quoted type with "|" operator (runtime error). Incorrectly generates error for quoted type defined in class scope. """ @@ -29,3 +28,25 @@ annotations_forward_refs.py:89: error: Function "annotations_forward_refs.ClassD annotations_forward_refs.py:89: note: Perhaps you need "Callable[...]" or a callback protocol? annotations_forward_refs.py:93: error: Expression is of type int?, not "int" [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 41: Unexpected errors ['annotations_forward_refs.py:41: error: Invalid type comment or annotation [valid-type]'] +Line 42: Unexpected errors ['annotations_forward_refs.py:42: error: Invalid type comment or annotation [valid-type]'] +Line 43: Unexpected errors ['annotations_forward_refs.py:43: error: Invalid type comment or annotation [valid-type]'] +Line 44: Unexpected errors ['annotations_forward_refs.py:44: error: Invalid type comment or annotation [valid-type]'] +Line 45: Unexpected errors ['annotations_forward_refs.py:45: error: Invalid type comment or annotation [valid-type]'] +Line 46: Unexpected errors ['annotations_forward_refs.py:46: error: Invalid type comment or annotation [valid-type]'] +Line 47: Unexpected errors ['annotations_forward_refs.py:47: error: Invalid type comment or annotation [valid-type]'] +Line 48: Unexpected errors ['annotations_forward_refs.py:48: error: Invalid type comment or annotation [valid-type]'] +Line 49: Unexpected errors ['annotations_forward_refs.py:49: error: Variable "annotations_forward_refs.var1" is not valid as a type [valid-type]'] +Line 50: Unexpected errors ['annotations_forward_refs.py:50: error: Invalid type comment or annotation [valid-type]'] +Line 51: Unexpected errors ['annotations_forward_refs.py:51: error: Invalid type comment or annotation [valid-type]'] +Line 52: Unexpected errors ['annotations_forward_refs.py:52: error: Invalid type comment or annotation [valid-type]'] +Line 53: Unexpected errors ['annotations_forward_refs.py:53: error: Invalid type comment or annotation [valid-type]'] +Line 54: Unexpected errors ['annotations_forward_refs.py:54: error: Invalid type comment or annotation [valid-type]'] +Line 55: Unexpected errors ['annotations_forward_refs.py:55: error: Module "types" is not valid as a type [valid-type]'] +Line 80: Unexpected errors ['annotations_forward_refs.py:80: error: Name "ClassF" is not defined [name-defined]'] +Line 87: Unexpected errors ['annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]'] +Line 89: Unexpected errors ['annotations_forward_refs.py:89: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type]'] +Line 93: Unexpected errors ['annotations_forward_refs.py:93: error: Expression is of type int?, not "int" [assert-type]'] +""" diff --git a/conformance/results/mypy/annotations_generators.toml b/conformance/results/mypy/annotations_generators.toml index fbeeb9cdf..386223bfc 100644 --- a/conformance/results/mypy/annotations_generators.toml +++ b/conformance/results/mypy/annotations_generators.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report incompatible Generator type in `yield from` statement. +notes = """Does not report incompatible Generator type in `yield from` statement. """ output = """ annotations_generators.py:51: error: Missing return statement [return] @@ -13,3 +12,15 @@ annotations_generators.py:91: error: The return type of an async generator funct annotations_generators.py:118: error: Incompatible types in "yield from" (actual type "A", expected type "B") [misc] annotations_generators.py:119: error: Incompatible types in "yield from" (actual type "int", expected type "B") [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 51: Unexpected errors ['annotations_generators.py:51: error: Missing return statement [return]'] +Line 54: Unexpected errors ['annotations_generators.py:54: error: Incompatible return value type (got "bool", expected "C") [return-value]'] +Line 57: Unexpected errors ['annotations_generators.py:57: error: Incompatible types in "yield" (actual type "int", expected type "A") [misc]'] +Line 66: Unexpected errors ['annotations_generators.py:66: error: Incompatible types in "yield" (actual type "int", expected type "A") [misc]'] +Line 75: Unexpected errors ['annotations_generators.py:75: error: Incompatible types in "yield" (actual type "B", expected type "A") [misc]'] +Line 86: Unexpected errors ['annotations_generators.py:86: error: The return type of a generator function should be "Generator" or one of its supertypes [misc]'] +Line 91: Unexpected errors ['annotations_generators.py:91: error: The return type of an async generator function should be "AsyncGenerator" or one of its supertypes [misc]'] +Line 118: Unexpected errors ['annotations_generators.py:118: error: Incompatible types in "yield from" (actual type "A", expected type "B") [misc]'] +Line 119: Unexpected errors ['annotations_generators.py:119: error: Incompatible types in "yield from" (actual type "int", expected type "B") [misc]'] +""" diff --git a/conformance/results/mypy/annotations_methods.toml b/conformance/results/mypy/annotations_methods.toml index cbbdd307c..0d6843e31 100644 --- a/conformance/results/mypy/annotations_methods.toml +++ b/conformance/results/mypy/annotations_methods.toml @@ -1,7 +1,10 @@ conformant = "Pass" -notes = """ -Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. +notes = """Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. """ output = """ annotations_methods.py:42: error: Expression is of type "B", not "A" [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 42: Unexpected errors ['annotations_methods.py:42: error: Expression is of type "B", not "A" [assert-type]'] +""" diff --git a/conformance/results/mypy/annotations_typeexpr.toml b/conformance/results/mypy/annotations_typeexpr.toml index 501db9cb4..c39e75529 100644 --- a/conformance/results/mypy/annotations_typeexpr.toml +++ b/conformance/results/mypy/annotations_typeexpr.toml @@ -20,3 +20,21 @@ annotations_typeexpr.py:101: error: Invalid type comment or annotation [valid-t annotations_typeexpr.py:102: error: Module "types" is not valid as a type [valid-type] annotations_typeexpr.py:102: note: Perhaps you meant to use a protocol matching the module structure? """ +conformance_automated = "Fail" +errors_diff = """ +Line 88: Unexpected errors ['annotations_typeexpr.py:88: error: Invalid type comment or annotation [valid-type]'] +Line 89: Unexpected errors ['annotations_typeexpr.py:89: error: Bracketed expression "[...]" is not valid as a type [valid-type]'] +Line 90: Unexpected errors ['annotations_typeexpr.py:90: error: Syntax error in type annotation [syntax]'] +Line 91: Unexpected errors ['annotations_typeexpr.py:91: error: Invalid type comment or annotation [valid-type]'] +Line 92: Unexpected errors ['annotations_typeexpr.py:92: error: Invalid type comment or annotation [valid-type]'] +Line 93: Unexpected errors ['annotations_typeexpr.py:93: error: Invalid type comment or annotation [valid-type]'] +Line 94: Unexpected errors ['annotations_typeexpr.py:94: error: Invalid type comment or annotation [valid-type]'] +Line 95: Unexpected errors ['annotations_typeexpr.py:95: error: Invalid type comment or annotation [valid-type]'] +Line 96: Unexpected errors ['annotations_typeexpr.py:96: error: Variable "annotations_typeexpr.var1" is not valid as a type [valid-type]'] +Line 97: Unexpected errors ['annotations_typeexpr.py:97: error: Invalid type: try using Literal[True] instead? [valid-type]'] +Line 98: Unexpected errors ['annotations_typeexpr.py:98: error: Invalid type: try using Literal[1] instead? [valid-type]'] +Line 99: Unexpected errors ['annotations_typeexpr.py:99: error: Invalid type: try using Literal[-1] instead? [valid-type]'] +Line 100: Unexpected errors ['annotations_typeexpr.py:100: error: Invalid type comment or annotation [valid-type]'] +Line 101: Unexpected errors ['annotations_typeexpr.py:101: error: Invalid type comment or annotation [valid-type]'] +Line 102: Unexpected errors ['annotations_typeexpr.py:102: error: Module "types" is not valid as a type [valid-type]'] +""" diff --git a/conformance/results/mypy/callables_annotation.toml b/conformance/results/mypy/callables_annotation.toml index a333e0fab..3b60effa2 100644 --- a/conformance/results/mypy/callables_annotation.toml +++ b/conformance/results/mypy/callables_annotation.toml @@ -14,3 +14,16 @@ callables_annotation.py:41: note: Did you mean "List[...]"? callables_annotation.py:42: error: Please use "Callable[[], ]" or "Callable" [misc] callables_annotation.py:43: error: Unexpected "..." [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['callables_annotation.py:13: error: Too few arguments [call-arg]'] +Line 14: Unexpected errors ['callables_annotation.py:14: error: Argument 2 has incompatible type "int"; expected "str" [arg-type]'] +Line 15: Unexpected errors ['callables_annotation.py:15: error: Too many arguments [call-arg]'] +Line 16: Unexpected errors ['callables_annotation.py:16: error: Unexpected keyword argument "a" [call-arg]', 'callables_annotation.py:16: error: Unexpected keyword argument "b" [call-arg]'] +Line 22: Unexpected errors ['callables_annotation.py:22: error: Too many arguments [call-arg]'] +Line 39: Unexpected errors ['callables_annotation.py:39: error: Please use "Callable[[], ]" or "Callable" [misc]'] +Line 40: Unexpected errors ['callables_annotation.py:40: error: The first argument to Callable must be a list of types, parameter specification, or "..." [valid-type]'] +Line 41: Unexpected errors ['callables_annotation.py:41: error: Bracketed expression "[...]" is not valid as a type [valid-type]'] +Line 42: Unexpected errors ['callables_annotation.py:42: error: Please use "Callable[[], ]" or "Callable" [misc]'] +Line 43: Unexpected errors ['callables_annotation.py:43: error: Unexpected "..." [misc]'] +""" diff --git a/conformance/results/mypy/callables_kwargs.toml b/conformance/results/mypy/callables_kwargs.toml index 2e22ca6fe..75131dadb 100644 --- a/conformance/results/mypy/callables_kwargs.toml +++ b/conformance/results/mypy/callables_kwargs.toml @@ -21,3 +21,19 @@ callables_kwargs.py:100: note: "TDProtocol5.__call__" has type "Callable[[Arg(in callables_kwargs.py:109: error: Overlap between argument names and ** TypedDict items: "v1" [misc] callables_kwargs.py:121: error: Unpack item in ** argument must be a TypedDict [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 43: Unexpected errors ['callables_kwargs.py:43: error: Missing named argument "v1" for "func1" [call-arg]', 'callables_kwargs.py:43: error: Missing named argument "v3" for "func1" [call-arg]'] +Line 48: Unexpected errors ['callables_kwargs.py:48: error: Unexpected keyword argument "v4" for "func1" [call-arg]'] +Line 49: Unexpected errors ['callables_kwargs.py:49: error: Too many positional arguments for "func1" [misc]'] +Line 55: Unexpected errors ['callables_kwargs.py:55: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" [arg-type]'] +Line 58: Unexpected errors ['callables_kwargs.py:58: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "int" [arg-type]', 'callables_kwargs.py:58: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "str" [arg-type]'] +Line 60: Unexpected errors ['callables_kwargs.py:60: error: "func1" gets multiple values for keyword argument "v1" [misc]'] +Line 61: Unexpected errors ['callables_kwargs.py:61: error: "func2" gets multiple values for keyword argument "v3" [misc]', 'callables_kwargs.py:61: error: Argument 1 to "func2" has incompatible type "int"; expected "str" [arg-type]'] +Line 62: Unexpected errors ['callables_kwargs.py:62: error: "func2" gets multiple values for keyword argument "v1" [misc]'] +Line 98: Unexpected errors ['callables_kwargs.py:98: error: Incompatible types in assignment (expression has type "Callable[[KwArg(TD2)], None]", variable has type "TDProtocol3") [assignment]'] +Line 99: Unexpected errors ['callables_kwargs.py:99: error: Incompatible types in assignment (expression has type "Callable[[KwArg(TD2)], None]", variable has type "TDProtocol4") [assignment]'] +Line 100: Unexpected errors ['callables_kwargs.py:100: error: Incompatible types in assignment (expression has type "Callable[[KwArg(TD2)], None]", variable has type "TDProtocol5") [assignment]'] +Line 109: Unexpected errors ['callables_kwargs.py:109: error: Overlap between argument names and ** TypedDict items: "v1" [misc]'] +Line 121: Unexpected errors ['callables_kwargs.py:121: error: Unpack item in ** argument must be a TypedDict [misc]'] +""" diff --git a/conformance/results/mypy/callables_protocol.toml b/conformance/results/mypy/callables_protocol.toml index fdffbe3bf..423839412 100644 --- a/conformance/results/mypy/callables_protocol.toml +++ b/conformance/results/mypy/callables_protocol.toml @@ -32,3 +32,23 @@ callables_protocol.py:284: note: "Proto13_Default.__call__" has type "Callable[[ callables_protocol.py:311: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(str, 'path')], str]", variable has type "Proto14_Default") [assignment] callables_protocol.py:311: note: "Proto14_Default.__call__" has type "Callable[[DefaultNamedArg(str, 'path')], str]" """ +conformance_automated = "Fail" +errors_diff = """ +Line 35: Unexpected errors ['callables_protocol.py:35: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes), NamedArg(int | None, \\'max_items\\')], list[bytes]]", variable has type "Proto1") [assignment]'] +Line 36: Unexpected errors ['callables_protocol.py:36: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes)], list[bytes]]", variable has type "Proto1") [assignment]'] +Line 37: Unexpected errors ['callables_protocol.py:37: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes), NamedArg(str | None, \\'max_len\\')], list[bytes]]", variable has type "Proto1") [assignment]'] +Line 67: Unexpected errors ['callables_protocol.py:67: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes)], Any]", variable has type "Proto2") [assignment]'] +Line 68: Unexpected errors ['callables_protocol.py:68: error: Incompatible types in assignment (expression has type "Callable[[VarArg(str), KwArg(str)], Any]", variable has type "Proto2") [assignment]'] +Line 69: Unexpected errors ['callables_protocol.py:69: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes), KwArg(bytes)], Any]", variable has type "Proto2") [assignment]'] +Line 70: Unexpected errors ['callables_protocol.py:70: error: Incompatible types in assignment (expression has type "Callable[[KwArg(str)], Any]", variable has type "Proto2") [assignment]'] +Line 97: Unexpected errors ['callables_protocol.py:97: error: Incompatible types in assignment (expression has type "Callable[[int], None]", variable has type "Proto4") [assignment]'] +Line 121: Unexpected errors ['callables_protocol.py:121: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes), DefaultNamedArg(int | None, \\'max_len\\')], list[bytes]]", variable has type "NotProto6") [assignment]'] +Line 169: Unexpected errors ['callables_protocol.py:169: error: Incompatible types in assignment (expression has type "Callable[[int], Any]", variable has type "Proto8") [assignment]'] +Line 186: Unexpected errors ['callables_protocol.py:186: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +Line 187: Unexpected errors ['callables_protocol.py:187: error: "Proto9[P, R]" has no attribute "xxx" [attr-defined]'] +Line 197: Unexpected errors ['callables_protocol.py:197: error: "Proto9[[int], str]" has no attribute "other_attribute2"; maybe "other_attribute"? [attr-defined]'] +Line 238: Unexpected errors ['callables_protocol.py:238: error: Incompatible types in assignment (expression has type "Callable[[int, str], Any]", variable has type "Proto11") [assignment]'] +Line 260: Unexpected errors ['callables_protocol.py:260: error: Incompatible types in assignment (expression has type "Callable[[VarArg(Any), NamedArg(Any, \\'kwarg0\\')], None]", variable has type "Proto12") [assignment]'] +Line 284: Unexpected errors ['callables_protocol.py:284: error: Incompatible types in assignment (expression has type "Callable[[str], str]", variable has type "Proto13_Default") [assignment]'] +Line 311: Unexpected errors ['callables_protocol.py:311: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(str, \\'path\\')], str]", variable has type "Proto14_Default") [assignment]'] +""" diff --git a/conformance/results/mypy/classes_classvar.toml b/conformance/results/mypy/classes_classvar.toml index ddb1a097d..689042aca 100644 --- a/conformance/results/mypy/classes_classvar.toml +++ b/conformance/results/mypy/classes_classvar.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Internal error if TypeVarTuple is used in ClassVar. +notes = """Internal error if TypeVarTuple is used in ClassVar. Does not reject use of ParamSpec in ClassVar. Rejects ClassVar nested in Annotated. Does not reject use of ClassVar in TypeAlias definition. @@ -29,3 +28,23 @@ classes_classvar.py:129: note: z classes_classvar.py:129: note: Protocol member ProtoA.x expected class variable, got instance variable classes_classvar.py:129: note: Protocol member ProtoA.y expected class variable, got instance variable """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['classes_classvar.py:36: error: ClassVar[...] must have at most one type argument [valid-type]'] +Line 37: Unexpected errors ['classes_classvar.py:37: error: Invalid type: try using Literal[3] instead? [valid-type]'] +Line 38: Unexpected errors ['classes_classvar.py:38: error: Name "var" is not defined [name-defined]'] +Line 43: Unexpected errors ['classes_classvar.py:43: error: ClassVar cannot contain type variables [misc]'] +Line 44: Unexpected errors ['classes_classvar.py:44: error: ClassVar cannot contain type variables [misc]'] +Line 50: Unexpected errors ['classes_classvar.py:50: error: Incompatible types in assignment (expression has type "dict[Never, Never]", variable has type "list[str]") [assignment]'] +Line 52: Unexpected errors ['classes_classvar.py:52: error: Name "Final" is not defined [name-defined]'] +Line 53: Unexpected errors ['classes_classvar.py:53: error: Invalid type: ClassVar nested inside other type [valid-type]'] +Line 59: Unexpected errors ['classes_classvar.py:59: error: Invalid type: ClassVar nested inside other type [valid-type]'] +Line 61: Unexpected errors ['classes_classvar.py:61: error: ClassVar can only be used for assignments in class body [misc]'] +Line 62: Unexpected errors ['classes_classvar.py:62: error: ClassVar can only be used for assignments in class body [misc]'] +Line 63: Unexpected errors ['classes_classvar.py:63: error: ClassVar can only be used for assignments in class body [misc]'] +Line 65: Unexpected errors ['classes_classvar.py:65: error: ClassVar can only be used for assignments in class body [misc]'] +Line 69: Unexpected errors ['classes_classvar.py:69: error: ClassVar can only be used for assignments in class body [misc]'] +Line 76: Unexpected errors ['classes_classvar.py:76: error: Expression is of type "Any", not "float" [assert-type]'] +Line 100: Unexpected errors ['classes_classvar.py:100: error: Cannot assign to class variable "stats" via instance [misc]'] +Line 129: Unexpected errors ['classes_classvar.py:129: error: Incompatible types in assignment (expression has type "ProtoAImpl", variable has type "ProtoA") [assignment]'] +""" diff --git a/conformance/results/mypy/classes_override.toml b/conformance/results/mypy/classes_override.toml index ca0ea7847..cab836939 100644 --- a/conformance/results/mypy/classes_override.toml +++ b/conformance/results/mypy/classes_override.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not handle case where parent class derives from Any. +notes = """Does not handle case where parent class derives from Any. """ output = """ classes_override.py:53: error: Method "method3" is marked as an override, but no base method was found with this name [misc] @@ -10,3 +9,12 @@ classes_override.py:84: error: Method "class_method1" is marked as an override, classes_override.py:91: error: Method "property1" is marked as an override, but no base method was found with this name [misc] classes_override.py:103: error: Method "method1" is marked as an override, but no base method was found with this name [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 53: Unexpected errors ['classes_override.py:53: error: Method "method3" is marked as an override, but no base method was found with this name [misc]'] +Line 56: Unexpected errors ['classes_override.py:56: error: Method "method4" is marked as an override, but no base method was found with this name [misc]'] +Line 79: Unexpected errors ['classes_override.py:79: error: Method "static_method1" is marked as an override, but no base method was found with this name [misc]'] +Line 84: Unexpected errors ['classes_override.py:84: error: Method "class_method1" is marked as an override, but no base method was found with this name [misc]'] +Line 91: Unexpected errors ['classes_override.py:91: error: Method "property1" is marked as an override, but no base method was found with this name [misc]'] +Line 103: Unexpected errors ['classes_override.py:103: error: Method "method1" is marked as an override, but no base method was found with this name [misc]'] +""" diff --git a/conformance/results/mypy/dataclasses_descriptors.toml b/conformance/results/mypy/dataclasses_descriptors.toml index b3ba809c1..2e078d75f 100644 --- a/conformance/results/mypy/dataclasses_descriptors.toml +++ b/conformance/results/mypy/dataclasses_descriptors.toml @@ -1,8 +1,12 @@ conformant = "Partial" -notes = """ -Does not correctly evaluate type of descriptor access. +notes = """Does not correctly evaluate type of descriptor access. """ output = """ dataclasses_descriptors.py:66: error: Expression is of type "Desc2[int]", not "int" [assert-type] dataclasses_descriptors.py:67: error: Expression is of type "Desc2[str]", not "str" [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 66: Unexpected errors ['dataclasses_descriptors.py:66: error: Expression is of type "Desc2[int]", not "int" [assert-type]'] +Line 67: Unexpected errors ['dataclasses_descriptors.py:67: error: Expression is of type "Desc2[str]", not "str" [assert-type]'] +""" diff --git a/conformance/results/mypy/dataclasses_frozen.toml b/conformance/results/mypy/dataclasses_frozen.toml index a4d73884c..82ccb8cb5 100644 --- a/conformance/results/mypy/dataclasses_frozen.toml +++ b/conformance/results/mypy/dataclasses_frozen.toml @@ -5,3 +5,10 @@ dataclasses_frozen.py:17: error: Property "b" defined in "DC1" is read-only [mi dataclasses_frozen.py:23: error: Cannot inherit non-frozen dataclass from a frozen one [misc] dataclasses_frozen.py:33: error: Cannot inherit frozen dataclass from a non-frozen one [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['dataclasses_frozen.py:16: error: Property "a" defined in "DC1" is read-only [misc]'] +Line 17: Unexpected errors ['dataclasses_frozen.py:17: error: Property "b" defined in "DC1" is read-only [misc]'] +Line 23: Unexpected errors ['dataclasses_frozen.py:23: error: Cannot inherit non-frozen dataclass from a frozen one [misc]'] +Line 33: Unexpected errors ['dataclasses_frozen.py:33: error: Cannot inherit frozen dataclass from a non-frozen one [misc]'] +""" diff --git a/conformance/results/mypy/dataclasses_hash.toml b/conformance/results/mypy/dataclasses_hash.toml index a71f51ca0..93dda1a73 100644 --- a/conformance/results/mypy/dataclasses_hash.toml +++ b/conformance/results/mypy/dataclasses_hash.toml @@ -1,6 +1,8 @@ conformant = "Partial" -notes = """ -Does not report when dataclass is not compatible with Hashable protocol. +notes = """Does not report when dataclass is not compatible with Hashable protocol. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/dataclasses_inheritance.toml b/conformance/results/mypy/dataclasses_inheritance.toml index 72c6b22f9..d0963554b 100644 --- a/conformance/results/mypy/dataclasses_inheritance.toml +++ b/conformance/results/mypy/dataclasses_inheritance.toml @@ -3,3 +3,8 @@ output = """ dataclasses_inheritance.py:60: error: Cannot override instance variable (previously declared on base class "DC6") with class variable [misc] dataclasses_inheritance.py:64: error: Cannot override class variable (previously declared on base class "DC6") with instance variable [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 60: Unexpected errors ['dataclasses_inheritance.py:60: error: Cannot override instance variable (previously declared on base class "DC6") with class variable [misc]'] +Line 64: Unexpected errors ['dataclasses_inheritance.py:64: error: Cannot override class variable (previously declared on base class "DC6") with instance variable [misc]'] +""" diff --git a/conformance/results/mypy/dataclasses_kwonly.toml b/conformance/results/mypy/dataclasses_kwonly.toml index d693c57fe..b9a744740 100644 --- a/conformance/results/mypy/dataclasses_kwonly.toml +++ b/conformance/results/mypy/dataclasses_kwonly.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly rejects kw_only field with default before positional field. +notes = """Incorrectly rejects kw_only field with default before positional field. """ output = """ dataclasses_kwonly.py:23: error: Too many positional arguments for "DC1" [misc] @@ -16,3 +15,12 @@ dataclasses_kwonly.py:38: error: Argument 1 to "DC2" has incompatible type "str" dataclasses_kwonly.py:38: error: Argument 2 to "DC2" has incompatible type "int"; expected "str" [arg-type] dataclasses_kwonly.py:53: error: Too many positional arguments for "DC3" [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['dataclasses_kwonly.py:23: error: Too many positional arguments for "DC1" [misc]'] +Line 29: Unexpected errors ['dataclasses_kwonly.py:29: error: Attributes without a default cannot follow attributes with one [misc]'] +Line 32: Unexpected errors ['dataclasses_kwonly.py:32: error: Too many positional arguments for "DC2" [misc]', 'dataclasses_kwonly.py:32: error: Too few arguments for "DC2" [call-arg]', 'dataclasses_kwonly.py:32: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]'] +Line 35: Unexpected errors ['dataclasses_kwonly.py:35: error: "DC2" gets multiple values for keyword argument "b" [misc]', 'dataclasses_kwonly.py:35: error: Too few arguments for "DC2" [call-arg]', 'dataclasses_kwonly.py:35: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]'] +Line 38: Unexpected errors ['dataclasses_kwonly.py:38: error: Too many positional arguments for "DC2" [misc]', 'dataclasses_kwonly.py:38: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_kwonly.py:38: error: Argument 2 to "DC2" has incompatible type "int"; expected "str" [arg-type]'] +Line 53: Unexpected errors ['dataclasses_kwonly.py:53: error: Too many positional arguments for "DC3" [misc]'] +""" diff --git a/conformance/results/mypy/dataclasses_order.toml b/conformance/results/mypy/dataclasses_order.toml index f42a06aab..6177bc8a7 100644 --- a/conformance/results/mypy/dataclasses_order.toml +++ b/conformance/results/mypy/dataclasses_order.toml @@ -2,3 +2,7 @@ conformant = "Pass" output = """ dataclasses_order.py:50: error: Unsupported operand types for < ("DC1" and "DC2") [operator] """ +conformance_automated = "Fail" +errors_diff = """ +Line 50: Unexpected errors ['dataclasses_order.py:50: error: Unsupported operand types for < ("DC1" and "DC2") [operator]'] +""" diff --git a/conformance/results/mypy/dataclasses_postinit.toml b/conformance/results/mypy/dataclasses_postinit.toml index a94485d91..b26b6d80f 100644 --- a/conformance/results/mypy/dataclasses_postinit.toml +++ b/conformance/results/mypy/dataclasses_postinit.toml @@ -9,3 +9,10 @@ dataclasses_postinit.py:36: note: def __post_init__(self: DC2, x: int, dataclasses_postinit.py:36: note: Subclass: dataclasses_postinit.py:36: note: def __post_init__(self: DC2, x: int) -> None """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['dataclasses_postinit.py:19: error: Argument 3 of "__post_init__" is incompatible with supertype "dataclass"; supertype defines the argument type as "str" [override]'] +Line 28: Unexpected errors ['dataclasses_postinit.py:28: error: "DC1" has no attribute "x" [attr-defined]'] +Line 29: Unexpected errors ['dataclasses_postinit.py:29: error: "DC1" has no attribute "y" [attr-defined]'] +Line 36: Unexpected errors ['dataclasses_postinit.py:36: error: Signature of "__post_init__" incompatible with supertype "dataclass" [override]'] +""" diff --git a/conformance/results/mypy/dataclasses_slots.toml b/conformance/results/mypy/dataclasses_slots.toml index 8c06b49e4..d3436faaa 100644 --- a/conformance/results/mypy/dataclasses_slots.toml +++ b/conformance/results/mypy/dataclasses_slots.toml @@ -1,9 +1,14 @@ conformant = "Partial" -notes = """ -Does not reject write to instance variable that is not defined in __slots__. +notes = """Does not reject write to instance variable that is not defined in __slots__. """ output = """ dataclasses_slots.py:12: error: "DC1" both defines "__slots__" and is used with "slots=True" [misc] dataclasses_slots.py:67: error: "type[DC6]" has no attribute "__slots__" [attr-defined] dataclasses_slots.py:70: error: "DC6" has no attribute "__slots__" [attr-defined] """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['dataclasses_slots.py:12: error: "DC1" both defines "__slots__" and is used with "slots=True" [misc]'] +Line 67: Unexpected errors ['dataclasses_slots.py:67: error: "type[DC6]" has no attribute "__slots__" [attr-defined]'] +Line 70: Unexpected errors ['dataclasses_slots.py:70: error: "DC6" has no attribute "__slots__" [attr-defined]'] +""" diff --git a/conformance/results/mypy/dataclasses_transform_class.toml b/conformance/results/mypy/dataclasses_transform_class.toml index e3b63d2a1..544c0df49 100644 --- a/conformance/results/mypy/dataclasses_transform_class.toml +++ b/conformance/results/mypy/dataclasses_transform_class.toml @@ -7,3 +7,12 @@ dataclasses_transform_class.py:69: error: Unsupported left operand type for < (" dataclasses_transform_class.py:79: error: Too many positional arguments for "Customer2" [misc] dataclasses_transform_class.py:119: error: Property "id" defined in "Customer3" is read-only [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 48: Unexpected errors ['dataclasses_transform_class.py:48: error: Cannot inherit non-frozen dataclass from a frozen one [misc]'] +Line 60: Unexpected errors ['dataclasses_transform_class.py:60: error: Property "id" defined in "Customer1" is read-only [misc]'] +Line 63: Unexpected errors ['dataclasses_transform_class.py:63: error: Too many positional arguments for "Customer1" [misc]'] +Line 69: Unexpected errors ['dataclasses_transform_class.py:69: error: Unsupported left operand type for < ("Customer1") [operator]'] +Line 79: Unexpected errors ['dataclasses_transform_class.py:79: error: Too many positional arguments for "Customer2" [misc]'] +Line 119: Unexpected errors ['dataclasses_transform_class.py:119: error: Property "id" defined in "Customer3" is read-only [misc]'] +""" diff --git a/conformance/results/mypy/dataclasses_transform_field.toml b/conformance/results/mypy/dataclasses_transform_field.toml index 83d454d45..ec2897bc1 100644 --- a/conformance/results/mypy/dataclasses_transform_field.toml +++ b/conformance/results/mypy/dataclasses_transform_field.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not properly handle field constructor that has default value for `kw_only` or `init` parameter. +notes = """Does not properly handle field constructor that has default value for `kw_only` or `init` parameter. """ output = """ dataclasses_transform_field.py:64: error: Unexpected keyword argument "id" for "CustomerModel1" [call-arg] @@ -8,3 +7,9 @@ dataclasses_transform_field.py:75: error: Too many positional arguments for "Cus dataclasses_transform_field.py:75: error: Missing named argument "name" for "CustomerModel2" [call-arg] dataclasses_transform_field.py:77: error: Missing named argument "id" for "CustomerModel2" [call-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 64: Unexpected errors ['dataclasses_transform_field.py:64: error: Unexpected keyword argument "id" for "CustomerModel1" [call-arg]'] +Line 75: Unexpected errors ['dataclasses_transform_field.py:75: error: Too many positional arguments for "CustomerModel2" [misc]', 'dataclasses_transform_field.py:75: error: Missing named argument "name" for "CustomerModel2" [call-arg]'] +Line 77: Unexpected errors ['dataclasses_transform_field.py:77: error: Missing named argument "id" for "CustomerModel2" [call-arg]'] +""" diff --git a/conformance/results/mypy/dataclasses_transform_func.toml b/conformance/results/mypy/dataclasses_transform_func.toml index fdba05f46..6f02285d5 100644 --- a/conformance/results/mypy/dataclasses_transform_func.toml +++ b/conformance/results/mypy/dataclasses_transform_func.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not handle `kw_only=False` override when `kw_only_default=True`. +notes = """Does not handle `kw_only=False` override when `kw_only_default=True`. Does not report error when `order=False` and comparison operators are used. """ output = """ @@ -11,3 +10,12 @@ dataclasses_transform_func.py:71: error: Too many positional arguments for "Cust dataclasses_transform_func.py:90: error: Cannot inherit non-frozen dataclass from a frozen one [misc] dataclasses_transform_func.py:97: error: Property "id" defined in "Customer3" is read-only [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 53: Unexpected errors ['dataclasses_transform_func.py:53: error: Too many positional arguments for "Customer1" [misc]'] +Line 57: Unexpected errors ['dataclasses_transform_func.py:57: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]'] +Line 65: Unexpected errors ['dataclasses_transform_func.py:65: error: Unexpected keyword argument "salary" for "Customer1" [call-arg]'] +Line 71: Unexpected errors ['dataclasses_transform_func.py:71: error: Too many positional arguments for "Customer2" [misc]'] +Line 90: Unexpected errors ['dataclasses_transform_func.py:90: error: Cannot inherit non-frozen dataclass from a frozen one [misc]'] +Line 97: Unexpected errors ['dataclasses_transform_func.py:97: error: Property "id" defined in "Customer3" is read-only [misc]'] +""" diff --git a/conformance/results/mypy/dataclasses_transform_meta.toml b/conformance/results/mypy/dataclasses_transform_meta.toml index ca6df8752..a21693f45 100644 --- a/conformance/results/mypy/dataclasses_transform_meta.toml +++ b/conformance/results/mypy/dataclasses_transform_meta.toml @@ -7,3 +7,12 @@ dataclasses_transform_meta.py:70: error: Unsupported left operand type for < ("C dataclasses_transform_meta.py:80: error: Too many positional arguments for "Customer2" [misc] dataclasses_transform_meta.py:100: error: Property "id" defined in "Customer3" is read-only [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 48: Unexpected errors ['dataclasses_transform_meta.py:48: error: Cannot inherit non-frozen dataclass from a frozen one [misc]'] +Line 60: Unexpected errors ['dataclasses_transform_meta.py:60: error: Property "id" defined in "Customer1" is read-only [misc]'] +Line 63: Unexpected errors ['dataclasses_transform_meta.py:63: error: Too many positional arguments for "Customer1" [misc]'] +Line 70: Unexpected errors ['dataclasses_transform_meta.py:70: error: Unsupported left operand type for < ("Customer1") [operator]'] +Line 80: Unexpected errors ['dataclasses_transform_meta.py:80: error: Too many positional arguments for "Customer2" [misc]'] +Line 100: Unexpected errors ['dataclasses_transform_meta.py:100: error: Property "id" defined in "Customer3" is read-only [misc]'] +""" diff --git a/conformance/results/mypy/dataclasses_usage.toml b/conformance/results/mypy/dataclasses_usage.toml index da8d922a8..4cb7f026d 100644 --- a/conformance/results/mypy/dataclasses_usage.toml +++ b/conformance/results/mypy/dataclasses_usage.toml @@ -14,3 +14,16 @@ dataclasses_usage.py:130: error: Missing positional argument "y" in call to "DC8 dataclasses_usage.py:179: error: Too many arguments for "DC13" [call-arg] dataclasses_usage.py:205: error: Name "v1" already defined on line 25 [no-redef] """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['dataclasses_usage.py:36: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass [misc]'] +Line 51: Unexpected errors ['dataclasses_usage.py:51: error: Missing positional argument "unit_price" in call to "InventoryItem" [call-arg]'] +Line 52: Unexpected errors ['dataclasses_usage.py:52: error: Argument 2 to "InventoryItem" has incompatible type "str"; expected "float" [arg-type]'] +Line 53: Unexpected errors ['dataclasses_usage.py:53: error: Too many arguments for "InventoryItem" [call-arg]'] +Line 84: Unexpected errors ['dataclasses_usage.py:84: error: Too many arguments for "DC4" [call-arg]'] +Line 89: Unexpected errors ['dataclasses_usage.py:89: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +Line 127: Unexpected errors ['dataclasses_usage.py:127: error: Too many arguments for "DC7" [call-arg]'] +Line 130: Unexpected errors ['dataclasses_usage.py:130: error: Missing positional argument "y" in call to "DC8" [call-arg]'] +Line 179: Unexpected errors ['dataclasses_usage.py:179: error: Too many arguments for "DC13" [call-arg]'] +Line 205: Unexpected errors ['dataclasses_usage.py:205: error: Name "v1" already defined on line 25 [no-redef]'] +""" diff --git a/conformance/results/mypy/directives_assert_type.toml b/conformance/results/mypy/directives_assert_type.toml index ed6efb743..924cb5390 100644 --- a/conformance/results/mypy/directives_assert_type.toml +++ b/conformance/results/mypy/directives_assert_type.toml @@ -9,3 +9,8 @@ directives_assert_type.py:32: error: Expression is of type "Literal['']", not "i directives_assert_type.py:33: error: "assert_type" expects 2 arguments [misc] directives_assert_type.py:33: error: Too many arguments for "assert_type" [call-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 31: Expected 1 errors, got 2 (['directives_assert_type.py:31: error: "assert_type" expects 2 arguments [misc]', 'directives_assert_type.py:31: error: Too few arguments for "assert_type" [call-arg]']) +Line 33: Expected 1 errors, got 2 (['directives_assert_type.py:33: error: "assert_type" expects 2 arguments [misc]', 'directives_assert_type.py:33: error: Too many arguments for "assert_type" [call-arg]']) +""" diff --git a/conformance/results/mypy/directives_cast.toml b/conformance/results/mypy/directives_cast.toml index c0119f44c..fdee7ee75 100644 --- a/conformance/results/mypy/directives_cast.toml +++ b/conformance/results/mypy/directives_cast.toml @@ -14,3 +14,9 @@ directives_cast.py:17: note: def [_T] cast(typ: type[_T], val: Any) -> _T directives_cast.py:17: note: def cast(typ: str, val: Any) -> Any directives_cast.py:17: note: def cast(typ: object, val: Any) -> Any """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['directives_cast.py:15: error: "cast" expects 2 arguments [misc]', 'directives_cast.py:15: error: All overload variants of "cast" require at least one argument [call-overload]'] +Line 16: Unexpected errors ['directives_cast.py:16: error: Invalid type: try using Literal[1] instead? [valid-type]'] +Line 17: Unexpected errors ['directives_cast.py:17: error: "cast" expects 2 arguments [misc]', 'directives_cast.py:17: error: No overload variant of "cast" matches argument types "Any", "str", "str" [call-overload]'] +""" diff --git a/conformance/results/mypy/directives_no_type_check.toml b/conformance/results/mypy/directives_no_type_check.toml index ca52f1382..fae912c5b 100644 --- a/conformance/results/mypy/directives_no_type_check.toml +++ b/conformance/results/mypy/directives_no_type_check.toml @@ -1,8 +1,11 @@ conformant = "Partial" -notes = """ -Does not honor `@no_type_check` class decorator. +notes = """Does not honor `@no_type_check` class decorator. Does not reject invalid call of `@no_type_check` function. """ output = """ directives_no_type_check.py:16: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['directives_no_type_check.py:16: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +""" diff --git a/conformance/results/mypy/directives_reveal_type.toml b/conformance/results/mypy/directives_reveal_type.toml index 6612496cc..0b807efe3 100644 --- a/conformance/results/mypy/directives_reveal_type.toml +++ b/conformance/results/mypy/directives_reveal_type.toml @@ -9,3 +9,8 @@ directives_reveal_type.py:19: error: Too few arguments for "reveal_type" [call- directives_reveal_type.py:20: error: "reveal_type" expects 1 argument [misc] directives_reveal_type.py:20: error: Too many arguments for "reveal_type" [call-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Expected 1 errors, got 2 (['directives_reveal_type.py:19: error: "reveal_type" expects 1 argument [misc]', 'directives_reveal_type.py:19: error: Too few arguments for "reveal_type" [call-arg]']) +Line 20: Expected 1 errors, got 2 (['directives_reveal_type.py:20: error: "reveal_type" expects 1 argument [misc]', 'directives_reveal_type.py:20: error: Too many arguments for "reveal_type" [call-arg]']) +""" diff --git a/conformance/results/mypy/directives_type_checking.toml b/conformance/results/mypy/directives_type_checking.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/directives_type_checking.toml +++ b/conformance/results/mypy/directives_type_checking.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/directives_type_ignore.toml b/conformance/results/mypy/directives_type_ignore.toml index 0657633de..c7d9609fd 100644 --- a/conformance/results/mypy/directives_type_ignore.toml +++ b/conformance/results/mypy/directives_type_ignore.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not honor "# type: ignore" comment if comment includes additional text. +notes = """Does not honor "# type: ignore" comment if comment includes additional text. """ output = """ directives_type_ignore.py:11: error: Invalid "type: ignore" comment [syntax] @@ -8,3 +7,8 @@ directives_type_ignore.py:11: error: Incompatible types in assignment (expressio directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] directives_type_ignore.py:14: note: Error code "assignment" not covered by "type: ignore" comment """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['directives_type_ignore.py:11: error: Invalid "type: ignore" comment [syntax]', 'directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +Line 14: Unexpected errors ['directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +""" diff --git a/conformance/results/mypy/directives_type_ignore_file1.toml b/conformance/results/mypy/directives_type_ignore_file1.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/directives_type_ignore_file1.toml +++ b/conformance/results/mypy/directives_type_ignore_file1.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/directives_type_ignore_file2.toml b/conformance/results/mypy/directives_type_ignore_file2.toml index b5962200b..fa2508b32 100644 --- a/conformance/results/mypy/directives_type_ignore_file2.toml +++ b/conformance/results/mypy/directives_type_ignore_file2.toml @@ -2,3 +2,6 @@ conformant = "Pass" output = """ directives_type_ignore_file2.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/directives_version_platform.toml b/conformance/results/mypy/directives_version_platform.toml index fbc4936dc..a8333e014 100644 --- a/conformance/results/mypy/directives_version_platform.toml +++ b/conformance/results/mypy/directives_version_platform.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not understand three-element form of sys.version checks. +notes = """Does not understand three-element form of sys.version checks. Does not understand os.name checks. """ output = """ @@ -9,3 +8,10 @@ directives_version_platform.py:27: error: Incompatible types in assignment (expr directives_version_platform.py:40: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] directives_version_platform.py:45: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['directives_version_platform.py:19: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +Line 27: Unexpected errors ['directives_version_platform.py:27: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +Line 40: Unexpected errors ['directives_version_platform.py:40: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +Line 45: Unexpected errors ['directives_version_platform.py:45: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +""" diff --git a/conformance/results/mypy/generics_base_class.toml b/conformance/results/mypy/generics_base_class.toml index d2245c827..619e8fc74 100644 --- a/conformance/results/mypy/generics_base_class.toml +++ b/conformance/results/mypy/generics_base_class.toml @@ -9,3 +9,12 @@ generics_base_class.py:49: error: "LinkedList" expects 1 type argument, but 2 gi generics_base_class.py:61: error: "MyDict" expects 1 type argument, but 2 given [type-arg] generics_base_class.py:68: error: Duplicate type variables in Generic[...] or Protocol[...] [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_base_class.py:26: error: Argument 1 to "takes_dict_incorrect" has incompatible type "SymbolTable"; expected "dict[str, list[object]]" [arg-type]'] +Line 29: Unexpected errors ['generics_base_class.py:29: error: Variable "typing.Generic" is not valid as a type [valid-type]'] +Line 30: Unexpected errors ['generics_base_class.py:30: error: Variable "typing.Generic" is not valid as a type [valid-type]'] +Line 49: Unexpected errors ['generics_base_class.py:49: error: "LinkedList" expects 1 type argument, but 2 given [type-arg]'] +Line 61: Unexpected errors ['generics_base_class.py:61: error: "MyDict" expects 1 type argument, but 2 given [type-arg]'] +Line 68: Unexpected errors ['generics_base_class.py:68: error: Duplicate type variables in Generic[...] or Protocol[...] [misc]'] +""" diff --git a/conformance/results/mypy/generics_basic.toml b/conformance/results/mypy/generics_basic.toml index 0b16997d2..e429d6865 100644 --- a/conformance/results/mypy/generics_basic.toml +++ b/conformance/results/mypy/generics_basic.toml @@ -15,3 +15,15 @@ generics_basic.py:167: error: Type variable "generics_basic.T" is unbound [vali generics_basic.py:167: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) generics_basic.py:167: note: (Hint: Use "T" in function signature to bind "T" inside a function) """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['generics_basic.py:36: error: Value of type variable "AnyStr" of "concat" cannot be "Sequence[object]" [type-var]'] +Line 37: Unexpected errors ['generics_basic.py:37: error: Value of type variable "AnyStr" of "concat" cannot be "Sequence[object]" [type-var]'] +Line 44: Unexpected errors ['generics_basic.py:44: error: TypeVar cannot have only a single constraint [misc]'] +Line 48: Unexpected errors ['generics_basic.py:48: error: Type variable "generics_basic.T" is unbound [valid-type]'] +Line 59: Unexpected errors ['generics_basic.py:59: error: Value of type variable "AnyStr" of "concat" cannot be "Sequence[object]" [type-var]'] +Line 107: Unexpected errors ['generics_basic.py:107: error: Duplicate type variables in Generic[...] or Protocol[...] [misc]'] +Line 140: Unexpected errors ['generics_basic.py:140: error: Invalid index type "int" for "MyMap1[str, int]"; expected type "str" [index]'] +Line 141: Unexpected errors ['generics_basic.py:141: error: Invalid index type "int" for "MyMap2[int, str]"; expected type "str" [index]'] +Line 167: Unexpected errors ['generics_basic.py:167: error: Dynamic metaclass not supported for "GenericMetaInstance" [misc]', 'generics_basic.py:167: error: Type variable "generics_basic.T" is unbound [valid-type]'] +""" diff --git a/conformance/results/mypy/generics_defaults.toml b/conformance/results/mypy/generics_defaults.toml index 8723099be..04613c955 100644 --- a/conformance/results/mypy/generics_defaults.toml +++ b/conformance/results/mypy/generics_defaults.toml @@ -1,3 +1,6 @@ conformant = "Unsupported" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/generics_defaults_referential.toml b/conformance/results/mypy/generics_defaults_referential.toml index f1da1bc95..ddfc84cb1 100644 --- a/conformance/results/mypy/generics_defaults_referential.toml +++ b/conformance/results/mypy/generics_defaults_referential.toml @@ -11,3 +11,14 @@ generics_defaults_referential.py:102: error: Expression is of type "type[Bar[Any generics_defaults_referential.py:103: error: Expression is of type "type[Bar[Any, Any]]", not "type[Bar[int, list[int]]]" [assert-type] generics_defaults_referential.py:104: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['generics_defaults_referential.py:23: error: Expression is of type "type[slice[Any, Any, Any]]", not "type[slice[int, int, int | None]]" [assert-type]'] +Line 24: Unexpected errors ['generics_defaults_referential.py:24: error: Expression is of type "slice[int, StartT?, int | None]", not "slice[int, int, int | None]" [assert-type]'] +Line 25: Unexpected errors ['generics_defaults_referential.py:25: error: Expression is of type "slice[str, StartT?, int | None]", not "slice[str, str, int | None]" [assert-type]'] +Line 40: Unexpected errors ['generics_defaults_referential.py:40: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type]'] +Line 95: Unexpected errors ['generics_defaults_referential.py:95: error: Type variable "generics_defaults_referential.Z1" is unbound [valid-type]'] +Line 102: Unexpected errors ['generics_defaults_referential.py:102: error: Expression is of type "type[Bar[Any, Any]]", not "type[Bar[Any, list[Any]]]" [assert-type]'] +Line 103: Unexpected errors ['generics_defaults_referential.py:103: error: Expression is of type "type[Bar[Any, Any]]", not "type[Bar[int, list[int]]]" [assert-type]'] +Line 104: Unexpected errors ['generics_defaults_referential.py:104: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]'] +""" diff --git a/conformance/results/mypy/generics_defaults_specialization.toml b/conformance/results/mypy/generics_defaults_specialization.toml index 7d6325ae0..1d180fd90 100644 --- a/conformance/results/mypy/generics_defaults_specialization.toml +++ b/conformance/results/mypy/generics_defaults_specialization.toml @@ -4,3 +4,9 @@ generics_defaults_specialization.py:30: error: Bad number of arguments for type generics_defaults_specialization.py:45: error: Expression is of type "type[Bar[Any]]", not "type[Bar[str]]" [assert-type] generics_defaults_specialization.py:55: error: The type "type[Foo]" is not generic and not indexable [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['generics_defaults_specialization.py:30: error: Bad number of arguments for type alias, expected between 0 and 1, given 2 [type-arg]'] +Line 45: Unexpected errors ['generics_defaults_specialization.py:45: error: Expression is of type "type[Bar[Any]]", not "type[Bar[str]]" [assert-type]'] +Line 55: Unexpected errors ['generics_defaults_specialization.py:55: error: The type "type[Foo]" is not generic and not indexable [misc]'] +""" diff --git a/conformance/results/mypy/generics_paramspec_basic.toml b/conformance/results/mypy/generics_paramspec_basic.toml index 2e3311ae5..1aeeab768 100644 --- a/conformance/results/mypy/generics_paramspec_basic.toml +++ b/conformance/results/mypy/generics_paramspec_basic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject ParamSpec when used "bare" in type alias definition. +notes = """Does not reject ParamSpec when used "bare" in type alias definition. """ output = """ generics_paramspec_basic.py:10: error: String argument 1 "NotIt" to ParamSpec(...) does not match variable name "WrongName" [misc] @@ -15,3 +14,12 @@ generics_paramspec_basic.py:35: note: You can use ParamSpec as the first argumen generics_paramspec_basic.py:39: error: Invalid location for ParamSpec "P" [valid-type] generics_paramspec_basic.py:39: note: You can use ParamSpec as the first argument to Callable, e.g., 'Callable[P, int]' """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['generics_paramspec_basic.py:10: error: String argument 1 "NotIt" to ParamSpec(...) does not match variable name "WrongName" [misc]'] +Line 23: Unexpected errors ['generics_paramspec_basic.py:23: error: Invalid location for ParamSpec "P" [valid-type]'] +Line 27: Unexpected errors ['generics_paramspec_basic.py:27: error: Invalid location for Concatenate [valid-type]'] +Line 31: Unexpected errors ['generics_paramspec_basic.py:31: error: Invalid location for ParamSpec "P" [misc]'] +Line 35: Unexpected errors ['generics_paramspec_basic.py:35: error: Invalid location for ParamSpec "P" [valid-type]'] +Line 39: Unexpected errors ['generics_paramspec_basic.py:39: error: Invalid location for ParamSpec "P" [valid-type]'] +""" diff --git a/conformance/results/mypy/generics_paramspec_components.toml b/conformance/results/mypy/generics_paramspec_components.toml index 3519e2d1f..81b003e29 100644 --- a/conformance/results/mypy/generics_paramspec_components.toml +++ b/conformance/results/mypy/generics_paramspec_components.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report illegal use of "P.args" on normal parameter. +notes = """Does not report illegal use of "P.args" on normal parameter. Does not report error when P.args is specified but P.kwargs is missing. Does not report error when P is out of scope and P.args and P.kwargs is used. Does not report error when keyword argument is specified between P.args and P.kwargs. @@ -21,3 +20,13 @@ generics_paramspec_components.py:83: error: Argument 3 to "foo" has incompatible generics_paramspec_components.py:98: error: Argument 2 to "twice" has incompatible type "str"; expected "int" [arg-type] generics_paramspec_components.py:98: error: Argument 3 to "twice" has incompatible type "int"; expected "str" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['generics_paramspec_components.py:17: error: Use "P.args" for variadic "*" parameter [valid-type]', 'generics_paramspec_components.py:17: error: Use "P.kwargs" for variadic "**" parameter [valid-type]'] +Line 23: Unexpected errors ['generics_paramspec_components.py:23: error: Use "P.kwargs" for variadic "**" parameter [valid-type]'] +Line 49: Unexpected errors ['generics_paramspec_components.py:49: error: Argument 1 has incompatible type "*P.kwargs"; expected "P.args" [arg-type]', 'generics_paramspec_components.py:49: error: Argument 2 has incompatible type "**P.args"; expected "P.kwargs" [arg-type]'] +Line 51: Unexpected errors ['generics_paramspec_components.py:51: error: Argument 1 has incompatible type "int"; expected "P.args" [arg-type]'] +Line 70: Unexpected errors ['generics_paramspec_components.py:70: error: Argument 1 has incompatible type "*P.args"; expected "int" [arg-type]', 'generics_paramspec_components.py:70: error: Argument 2 has incompatible type "int"; expected "P.args" [arg-type]'] +Line 83: Unexpected errors ['generics_paramspec_components.py:83: error: "foo" gets multiple values for keyword argument "x" [misc]', 'generics_paramspec_components.py:83: error: Argument 1 to "foo" has incompatible type "*P.args"; expected "int" [arg-type]', 'generics_paramspec_components.py:83: error: Argument 3 to "foo" has incompatible type "**P.kwargs"; expected "int" [arg-type]'] +Line 98: Unexpected errors ['generics_paramspec_components.py:98: error: Argument 2 to "twice" has incompatible type "str"; expected "int" [arg-type]', 'generics_paramspec_components.py:98: error: Argument 3 to "twice" has incompatible type "int"; expected "str" [arg-type]'] +""" diff --git a/conformance/results/mypy/generics_paramspec_semantics.toml b/conformance/results/mypy/generics_paramspec_semantics.toml index a4b903a8c..a59d052de 100644 --- a/conformance/results/mypy/generics_paramspec_semantics.toml +++ b/conformance/results/mypy/generics_paramspec_semantics.toml @@ -12,3 +12,15 @@ generics_paramspec_semantics.py:126: note: This is likely because "one" has name generics_paramspec_semantics.py:131: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[NamedArg(int, 'x')], int]"; expected "Callable[[int, NamedArg(int, 'x')], int]" [arg-type] generics_paramspec_semantics.py:136: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[KwArg(int)], int]"; expected "Callable[[int, KwArg(int)], int]" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_paramspec_semantics.py:26: error: Unexpected keyword argument "a" [call-arg]', 'generics_paramspec_semantics.py:26: error: Unexpected keyword argument "b" [call-arg]'] +Line 27: Unexpected errors ['generics_paramspec_semantics.py:27: error: Argument 2 has incompatible type "str"; expected "bool" [arg-type]'] +Line 61: Unexpected errors ['generics_paramspec_semantics.py:61: error: Argument 2 to "func1" has incompatible type "Callable[[NamedArg(int, \\'y\\')], int]"; expected "Callable[[NamedArg(int, \\'x\\')], int]" [arg-type]'] +Line 97: Unexpected errors ['generics_paramspec_semantics.py:97: error: Argument 1 has incompatible type "int"; expected "str" [arg-type]'] +Line 107: Unexpected errors ['generics_paramspec_semantics.py:107: error: Argument 1 has incompatible type "int"; expected "bool" [arg-type]'] +Line 119: Unexpected errors ['generics_paramspec_semantics.py:119: error: Argument 1 has incompatible type "int"; expected "str" [arg-type]'] +Line 126: Unexpected errors ['generics_paramspec_semantics.py:126: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[str], int]"; expected "Callable[[int], int]" [arg-type]'] +Line 131: Unexpected errors ['generics_paramspec_semantics.py:131: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[NamedArg(int, \\'x\\')], int]"; expected "Callable[[int, NamedArg(int, \\'x\\')], int]" [arg-type]'] +Line 136: Unexpected errors ['generics_paramspec_semantics.py:136: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[KwArg(int)], int]"; expected "Callable[[int, KwArg(int)], int]" [arg-type]'] +""" diff --git a/conformance/results/mypy/generics_paramspec_specialization.toml b/conformance/results/mypy/generics_paramspec_specialization.toml index fe8e5f6f3..0f2813ecb 100644 --- a/conformance/results/mypy/generics_paramspec_specialization.toml +++ b/conformance/results/mypy/generics_paramspec_specialization.toml @@ -6,3 +6,11 @@ generics_paramspec_specialization.py:56: error: Argument 3 has incompatible type generics_paramspec_specialization.py:61: error: Argument 1 has incompatible type "str"; expected "int" [arg-type] generics_paramspec_specialization.py:62: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 45: Unexpected errors ['generics_paramspec_specialization.py:45: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" [misc]'] +Line 55: Unexpected errors ['generics_paramspec_specialization.py:55: error: Argument 1 has incompatible type "str"; expected "int" [arg-type]'] +Line 56: Unexpected errors ['generics_paramspec_specialization.py:56: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type]'] +Line 61: Unexpected errors ['generics_paramspec_specialization.py:61: error: Argument 1 has incompatible type "str"; expected "int" [arg-type]'] +Line 62: Unexpected errors ['generics_paramspec_specialization.py:62: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type]'] +""" diff --git a/conformance/results/mypy/generics_scoping.toml b/conformance/results/mypy/generics_scoping.toml index ca04ba692..a5512a0d4 100644 --- a/conformance/results/mypy/generics_scoping.toml +++ b/conformance/results/mypy/generics_scoping.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -False negative on generic class nested within generic class with same type variable. +notes = """False negative on generic class nested within generic class with same type variable. """ output = """ generics_scoping.py:25: error: Argument 1 to "meth_2" of "MyClass" has incompatible type "str"; expected "int" [arg-type] @@ -25,3 +24,15 @@ generics_scoping.py:86: error: Type variable "generics_scoping.T" is unbound [v generics_scoping.py:86: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) generics_scoping.py:86: note: (Hint: Use "T" in function signature to bind "T" inside a function) """ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Unexpected errors ['generics_scoping.py:25: error: Argument 1 to "meth_2" of "MyClass" has incompatible type "str"; expected "int" [arg-type]'] +Line 46: Unexpected errors ['generics_scoping.py:46: error: Type variable "generics_scoping.S" is unbound [valid-type]'] +Line 50: Unexpected errors ['generics_scoping.py:50: error: Type variable "generics_scoping.S" is unbound [valid-type]'] +Line 61: Unexpected errors ['generics_scoping.py:61: error: Free type variable expected in Generic[...] [misc]'] +Line 74: Unexpected errors ['generics_scoping.py:74: error: Type variable "generics_scoping.T" is unbound [valid-type]'] +Line 80: Unexpected errors ['generics_scoping.py:80: error: Can\\'t use bound type variable "T" to define generic alias [valid-type]'] +Line 84: Unexpected errors ['generics_scoping.py:84: error: Type variable "generics_scoping.T" is unbound [valid-type]'] +Line 85: Unexpected errors ['generics_scoping.py:85: error: Type variable "generics_scoping.T" is unbound [valid-type]'] +Line 86: Unexpected errors ['generics_scoping.py:86: error: Type variable "generics_scoping.T" is unbound [valid-type]'] +""" diff --git a/conformance/results/mypy/generics_self_advanced.toml b/conformance/results/mypy/generics_self_advanced.toml index bfee9ad9e..ace463613 100644 --- a/conformance/results/mypy/generics_self_advanced.toml +++ b/conformance/results/mypy/generics_self_advanced.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not infer the type of an unannotated `self` parameter to be type `Self`. +notes = """Does not infer the type of an unannotated `self` parameter to be type `Self`. Does not retain `Self` when calling method that returns `Self`. Does not infer the type of an unannotated `cls` parameter to be type `type[Self]`. Does not retain `Self` when accessing attribute through `type[Self]`. @@ -13,3 +12,12 @@ generics_self_advanced.py:43: error: Expression is of type "list[ChildB]", not " generics_self_advanced.py:44: error: Expression is of type "ChildB", not "Self" [assert-type] generics_self_advanced.py:45: error: Expression is of type "ChildB", not "Self" [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 35: Unexpected errors ['generics_self_advanced.py:35: error: Expression is of type "ChildB", not "Self" [assert-type]'] +Line 38: Unexpected errors ['generics_self_advanced.py:38: error: Expression is of type "ChildB", not "Self" [assert-type]'] +Line 42: Unexpected errors ['generics_self_advanced.py:42: error: Expression is of type "type[ChildB]", not "type[Self]" [assert-type]'] +Line 43: Unexpected errors ['generics_self_advanced.py:43: error: Expression is of type "list[ChildB]", not "list[Self]" [assert-type]'] +Line 44: Unexpected errors ['generics_self_advanced.py:44: error: Expression is of type "ChildB", not "Self" [assert-type]'] +Line 45: Unexpected errors ['generics_self_advanced.py:45: error: Expression is of type "ChildB", not "Self" [assert-type]'] +""" diff --git a/conformance/results/mypy/generics_self_attributes.toml b/conformance/results/mypy/generics_self_attributes.toml index ccd57fe29..dc68e164b 100644 --- a/conformance/results/mypy/generics_self_attributes.toml +++ b/conformance/results/mypy/generics_self_attributes.toml @@ -3,3 +3,8 @@ output = """ generics_self_attributes.py:26: error: Argument "next" to "OrdinalLinkedList" has incompatible type "LinkedList[int]"; expected "OrdinalLinkedList | None" [arg-type] generics_self_attributes.py:32: error: Incompatible types in assignment (expression has type "LinkedList[int]", variable has type "OrdinalLinkedList | None") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_self_attributes.py:26: error: Argument "next" to "OrdinalLinkedList" has incompatible type "LinkedList[int]"; expected "OrdinalLinkedList | None" [arg-type]'] +Line 32: Unexpected errors ['generics_self_attributes.py:32: error: Incompatible types in assignment (expression has type "LinkedList[int]", variable has type "OrdinalLinkedList | None") [assignment]'] +""" diff --git a/conformance/results/mypy/generics_self_basic.toml b/conformance/results/mypy/generics_self_basic.toml index 317f9ac13..5958ad373 100644 --- a/conformance/results/mypy/generics_self_basic.toml +++ b/conformance/results/mypy/generics_self_basic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not properly handle constructor call through `cls` parameter. +notes = """Does not properly handle constructor call through `cls` parameter. """ output = """ generics_self_basic.py:19: error: Incompatible return value type (got "Shape", expected "Self") [return-value] @@ -8,3 +7,10 @@ generics_self_basic.py:27: error: Too many arguments for "Shape" [call-arg] generics_self_basic.py:32: error: Incompatible return value type (got "Shape", expected "Self") [return-value] generics_self_basic.py:64: error: Self type cannot have type arguments [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['generics_self_basic.py:19: error: Incompatible return value type (got "Shape", expected "Self") [return-value]'] +Line 27: Unexpected errors ['generics_self_basic.py:27: error: Too many arguments for "Shape" [call-arg]'] +Line 32: Unexpected errors ['generics_self_basic.py:32: error: Incompatible return value type (got "Shape", expected "Self") [return-value]'] +Line 64: Unexpected errors ['generics_self_basic.py:64: error: Self type cannot have type arguments [misc]'] +""" diff --git a/conformance/results/mypy/generics_self_protocols.toml b/conformance/results/mypy/generics_self_protocols.toml index d3ef4c71b..60dd9d489 100644 --- a/conformance/results/mypy/generics_self_protocols.toml +++ b/conformance/results/mypy/generics_self_protocols.toml @@ -13,3 +13,8 @@ generics_self_protocols.py:64: note: def set_scale(self, scale: float) - generics_self_protocols.py:64: note: Got: generics_self_protocols.py:64: note: def set_scale(self, scale: float) -> ReturnConcreteShape """ +conformance_automated = "Fail" +errors_diff = """ +Line 61: Unexpected errors ['generics_self_protocols.py:61: error: Argument 1 to "accepts_shape" has incompatible type "BadReturnType"; expected "ShapeProtocol" [arg-type]'] +Line 64: Unexpected errors ['generics_self_protocols.py:64: error: Argument 1 to "accepts_shape" has incompatible type "ReturnDifferentClass"; expected "ShapeProtocol" [arg-type]'] +""" diff --git a/conformance/results/mypy/generics_self_usage.toml b/conformance/results/mypy/generics_self_usage.toml index 4bff8bf4f..4c1c23f1c 100644 --- a/conformance/results/mypy/generics_self_usage.toml +++ b/conformance/results/mypy/generics_self_usage.toml @@ -17,3 +17,17 @@ generics_self_usage.py:116: error: Static methods cannot use Self type [misc] generics_self_usage.py:121: error: Self type cannot be used in a metaclass [misc] generics_self_usage.py:125: error: Self type cannot be used in a metaclass [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 73: Unexpected errors ['generics_self_usage.py:73: error: Self type is only allowed in annotations within class definition [misc]'] +Line 76: Unexpected errors ['generics_self_usage.py:76: error: Self type is only allowed in annotations within class definition [misc]'] +Line 82: Unexpected errors ['generics_self_usage.py:82: error: Method cannot have explicit self annotation and Self type [misc]', 'generics_self_usage.py:82: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]'] +Line 86: Unexpected errors ['generics_self_usage.py:86: error: Incompatible return value type (got "Foo3", expected "Self") [return-value]'] +Line 101: Unexpected errors ['generics_self_usage.py:101: error: Self type is only allowed in annotations within class definition [misc]'] +Line 103: Unexpected errors ['generics_self_usage.py:103: error: Self type is only allowed in annotations within class definition [misc]'] +Line 106: Unexpected errors ['generics_self_usage.py:106: error: Self type is only allowed in annotations within class definition [misc]', 'generics_self_usage.py:106: error: Self type cannot be used in type alias target [misc]'] +Line 111: Unexpected errors ['generics_self_usage.py:111: error: Static methods cannot use Self type [misc]', 'generics_self_usage.py:111: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]'] +Line 116: Unexpected errors ['generics_self_usage.py:116: error: Static methods cannot use Self type [misc]'] +Line 121: Unexpected errors ['generics_self_usage.py:121: error: Self type cannot be used in a metaclass [misc]'] +Line 125: Unexpected errors ['generics_self_usage.py:125: error: Self type cannot be used in a metaclass [misc]'] +""" diff --git a/conformance/results/mypy/generics_syntax_compatibility.toml b/conformance/results/mypy/generics_syntax_compatibility.toml index e22025fa1..55132deca 100644 --- a/conformance/results/mypy/generics_syntax_compatibility.toml +++ b/conformance/results/mypy/generics_syntax_compatibility.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_compatibility.py:14: error: PEP 695 generics are not yet supported [valid-type] @@ -12,3 +11,11 @@ generics_syntax_compatibility.py:23: error: Name "V" is not defined [name-defin generics_syntax_compatibility.py:26: error: PEP 695 generics are not yet supported [valid-type] generics_syntax_compatibility.py:26: error: Name "M" is not defined [name-defined] """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_syntax_compatibility.py:14: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_compatibility.py:14: error: Name "V" is not defined [name-defined]'] +Line 18: Unexpected errors ['generics_syntax_compatibility.py:18: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_compatibility.py:18: error: Name "V" is not defined [name-defined]'] +Line 22: Unexpected errors ['generics_syntax_compatibility.py:22: error: PEP 695 generics are not yet supported [valid-type]'] +Line 23: Unexpected errors ['generics_syntax_compatibility.py:23: error: Name "V" is not defined [name-defined]'] +Line 26: Unexpected errors ['generics_syntax_compatibility.py:26: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_compatibility.py:26: error: Name "M" is not defined [name-defined]'] +""" diff --git a/conformance/results/mypy/generics_syntax_declarations.toml b/conformance/results/mypy/generics_syntax_declarations.toml index fa042041b..7696a39c5 100644 --- a/conformance/results/mypy/generics_syntax_declarations.toml +++ b/conformance/results/mypy/generics_syntax_declarations.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_declarations.py:13: error: PEP 695 generics are not yet supported [valid-type] @@ -33,3 +32,27 @@ generics_syntax_declarations.py:73: error: PEP 695 generics are not yet supporte generics_syntax_declarations.py:77: error: PEP 695 generics are not yet supported [valid-type] generics_syntax_declarations.py:81: error: PEP 695 generics are not yet supported [valid-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['generics_syntax_declarations.py:13: error: PEP 695 generics are not yet supported [valid-type]'] +Line 14: Unexpected errors ['generics_syntax_declarations.py:14: error: Expression is of type "Any", not "TypeVar" [assert-type]', 'generics_syntax_declarations.py:14: error: Name "T" is not defined [name-defined]'] +Line 15: Unexpected errors ['generics_syntax_declarations.py:15: error: Expression is of type "Any", not "TypeVarTuple" [assert-type]', 'generics_syntax_declarations.py:15: error: Name "Ts" is not defined [name-defined]'] +Line 16: Unexpected errors ['generics_syntax_declarations.py:16: error: Expression is of type "Any", not "ParamSpec" [assert-type]', 'generics_syntax_declarations.py:16: error: Name "P" is not defined [name-defined]'] +Line 19: Unexpected errors ['generics_syntax_declarations.py:19: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_declarations.py:19: error: Free type variable expected in Generic[...] [misc]', 'generics_syntax_declarations.py:19: error: Name "T" is not defined [name-defined]'] +Line 23: Unexpected errors ['generics_syntax_declarations.py:23: error: PEP 695 generics are not yet supported [valid-type]'] +Line 27: Unexpected errors ['generics_syntax_declarations.py:27: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_declarations.py:27: error: Free type variable expected in Protocol[...] [misc]', 'generics_syntax_declarations.py:27: error: Name "S" is not defined [name-defined]', 'generics_syntax_declarations.py:27: error: Name "T" is not defined [name-defined]'] +Line 31: Unexpected errors ['generics_syntax_declarations.py:31: error: PEP 695 generics are not yet supported [valid-type]'] +Line 32: Unexpected errors ['generics_syntax_declarations.py:32: error: Name "T" is not defined [name-defined]'] +Line 37: Unexpected errors ['generics_syntax_declarations.py:37: error: PEP 695 generics are not yet supported [valid-type]'] +Line 41: Unexpected errors ['generics_syntax_declarations.py:41: error: PEP 695 generics are not yet supported [valid-type]'] +Line 45: Unexpected errors ['generics_syntax_declarations.py:45: error: PEP 695 generics are not yet supported [valid-type]'] +Line 46: Unexpected errors ['generics_syntax_declarations.py:46: error: PEP 695 generics are not yet supported [valid-type]'] +Line 50: Unexpected errors ['generics_syntax_declarations.py:50: error: PEP 695 generics are not yet supported [valid-type]'] +Line 54: Unexpected errors ['generics_syntax_declarations.py:54: error: PEP 695 generics are not yet supported [valid-type]'] +Line 58: Unexpected errors ['generics_syntax_declarations.py:58: error: PEP 695 generics are not yet supported [valid-type]'] +Line 62: Unexpected errors ['generics_syntax_declarations.py:62: error: PEP 695 generics are not yet supported [valid-type]'] +Line 66: Unexpected errors ['generics_syntax_declarations.py:66: error: PEP 695 generics are not yet supported [valid-type]'] +Line 73: Unexpected errors ['generics_syntax_declarations.py:73: error: PEP 695 generics are not yet supported [valid-type]'] +Line 77: Unexpected errors ['generics_syntax_declarations.py:77: error: PEP 695 generics are not yet supported [valid-type]'] +Line 81: Unexpected errors ['generics_syntax_declarations.py:81: error: PEP 695 generics are not yet supported [valid-type]'] +""" diff --git a/conformance/results/mypy/generics_syntax_infer_variance.toml b/conformance/results/mypy/generics_syntax_infer_variance.toml index fe39ac038..104775686 100644 --- a/conformance/results/mypy/generics_syntax_infer_variance.toml +++ b/conformance/results/mypy/generics_syntax_infer_variance.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_infer_variance.py:11: error: Unexpected argument to "TypeVar()": "infer_variance" [misc] @@ -107,3 +106,64 @@ generics_syntax_infer_variance.py:152: error: The type "type[ShouldBeContravaria generics_syntax_infer_variance.py:153: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg] generics_syntax_infer_variance.py:153: error: The type "type[ShouldBeContravariant1]" is not generic and not indexable [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['generics_syntax_infer_variance.py:11: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] +Line 12: Unexpected errors ['generics_syntax_infer_variance.py:12: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] +Line 13: Unexpected errors ['generics_syntax_infer_variance.py:13: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] +Line 15: Unexpected errors ['generics_syntax_infer_variance.py:15: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] +Line 19: Unexpected errors ['generics_syntax_infer_variance.py:19: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] +Line 24: Unexpected errors ['generics_syntax_infer_variance.py:24: error: Free type variable expected in Generic[...] [misc]'] +Line 25: Unexpected errors ['generics_syntax_infer_variance.py:25: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 28: Unexpected errors ['generics_syntax_infer_variance.py:28: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 32: Unexpected errors ['generics_syntax_infer_variance.py:32: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:32: error: The type "type[ShouldBeCovariant1]" is not generic and not indexable [misc]'] +Line 33: Unexpected errors ['generics_syntax_infer_variance.py:33: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:33: error: The type "type[ShouldBeCovariant1]" is not generic and not indexable [misc]'] +Line 36: Unexpected errors ['generics_syntax_infer_variance.py:36: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 40: Unexpected errors ['generics_syntax_infer_variance.py:40: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:40: error: The type "type[ShouldBeCovariant2]" is not generic and not indexable [misc]'] +Line 41: Unexpected errors ['generics_syntax_infer_variance.py:41: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:41: error: The type "type[ShouldBeCovariant2]" is not generic and not indexable [misc]'] +Line 44: Unexpected errors ['generics_syntax_infer_variance.py:44: error: Free type variable expected in Generic[...] [misc]'] +Line 45: Unexpected errors ['generics_syntax_infer_variance.py:45: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]', 'generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg]'] +Line 49: Unexpected errors ['generics_syntax_infer_variance.py:49: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:49: error: The type "type[ShouldBeCovariant3]" is not generic and not indexable [misc]'] +Line 50: Unexpected errors ['generics_syntax_infer_variance.py:50: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:50: error: The type "type[ShouldBeCovariant3]" is not generic and not indexable [misc]'] +Line 54: Unexpected errors ['generics_syntax_infer_variance.py:54: error: Free type variable expected in Generic[...] [misc]'] +Line 55: Unexpected errors ['generics_syntax_infer_variance.py:55: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 58: Unexpected errors ['generics_syntax_infer_variance.py:58: error: "ShouldBeCovariant4" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:58: error: The type "type[ShouldBeCovariant4]" is not generic and not indexable [misc]'] +Line 59: Unexpected errors ['generics_syntax_infer_variance.py:59: error: "ShouldBeCovariant4" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:59: error: The type "type[ShouldBeCovariant4]" is not generic and not indexable [misc]'] +Line 62: Unexpected errors ['generics_syntax_infer_variance.py:62: error: Free type variable expected in Generic[...] [misc]'] +Line 63: Unexpected errors ['generics_syntax_infer_variance.py:63: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 67: Unexpected errors ['generics_syntax_infer_variance.py:67: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 71: Unexpected errors ['generics_syntax_infer_variance.py:71: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:71: error: The type "type[ShouldBeCovariant5]" is not generic and not indexable [misc]'] +Line 72: Unexpected errors ['generics_syntax_infer_variance.py:72: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:72: error: The type "type[ShouldBeCovariant5]" is not generic and not indexable [misc]'] +Line 75: Unexpected errors ['generics_syntax_infer_variance.py:75: error: Free type variable expected in Generic[...] [misc]'] +Line 76: Unexpected errors ['generics_syntax_infer_variance.py:76: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 78: Unexpected errors ['generics_syntax_infer_variance.py:78: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 82: Unexpected errors ['generics_syntax_infer_variance.py:82: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:82: error: The type "type[ShouldBeCovariant6]" is not generic and not indexable [misc]'] +Line 83: Unexpected errors ['generics_syntax_infer_variance.py:83: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:83: error: The type "type[ShouldBeCovariant6]" is not generic and not indexable [misc]'] +Line 86: Unexpected errors ['generics_syntax_infer_variance.py:86: error: Free type variable expected in Generic[...] [misc]'] +Line 87: Unexpected errors ['generics_syntax_infer_variance.py:87: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 95: Unexpected errors ['generics_syntax_infer_variance.py:95: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 99: Unexpected errors ['generics_syntax_infer_variance.py:99: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:99: error: The type "type[ShouldBeInvariant1]" is not generic and not indexable [misc]'] +Line 100: Unexpected errors ['generics_syntax_infer_variance.py:100: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:100: error: The type "type[ShouldBeInvariant1]" is not generic and not indexable [misc]'] +Line 103: Unexpected errors ['generics_syntax_infer_variance.py:103: error: Free type variable expected in Generic[...] [misc]'] +Line 104: Unexpected errors ['generics_syntax_infer_variance.py:104: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 107: Unexpected errors ['generics_syntax_infer_variance.py:107: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 110: Unexpected errors ['generics_syntax_infer_variance.py:110: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 114: Unexpected errors ['generics_syntax_infer_variance.py:114: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:114: error: The type "type[ShouldBeInvariant2]" is not generic and not indexable [misc]'] +Line 115: Unexpected errors ['generics_syntax_infer_variance.py:115: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:115: error: The type "type[ShouldBeInvariant2]" is not generic and not indexable [misc]'] +Line 118: Unexpected errors ['generics_syntax_infer_variance.py:118: error: Variable "generics_syntax_infer_variance.K" is not valid as a type [valid-type]', 'generics_syntax_infer_variance.py:118: error: Variable "generics_syntax_infer_variance.V" is not valid as a type [valid-type]'] +Line 122: Unexpected errors ['generics_syntax_infer_variance.py:122: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_syntax_infer_variance.py:122: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 123: Unexpected errors ['generics_syntax_infer_variance.py:123: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_syntax_infer_variance.py:123: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 124: Unexpected errors ['generics_syntax_infer_variance.py:124: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_syntax_infer_variance.py:124: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 125: Unexpected errors ['generics_syntax_infer_variance.py:125: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_syntax_infer_variance.py:125: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 129: Unexpected errors ['generics_syntax_infer_variance.py:129: error: PEP 695 generics are not yet supported [valid-type]'] +Line 130: Unexpected errors ['generics_syntax_infer_variance.py:130: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 133: Unexpected errors ['generics_syntax_infer_variance.py:133: error: "ShouldBeInvariant4" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:133: error: The type "type[ShouldBeInvariant4]" is not generic and not indexable [misc]'] +Line 136: Unexpected errors ['generics_syntax_infer_variance.py:136: error: PEP 695 generics are not yet supported [valid-type]'] +Line 137: Unexpected errors ['generics_syntax_infer_variance.py:137: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 141: Unexpected errors ['generics_syntax_infer_variance.py:141: error: "ShouldBeInvariant5" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:141: error: The type "type[ShouldBeInvariant5]" is not generic and not indexable [misc]'] +Line 144: Unexpected errors ['generics_syntax_infer_variance.py:144: error: Free type variable expected in Generic[...] [misc]'] +Line 145: Unexpected errors ['generics_syntax_infer_variance.py:145: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 148: Unexpected errors ['generics_syntax_infer_variance.py:148: error: Variable "generics_syntax_infer_variance.T" is not valid as a type [valid-type]'] +Line 152: Unexpected errors ['generics_syntax_infer_variance.py:152: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:152: error: The type "type[ShouldBeContravariant1]" is not generic and not indexable [misc]'] +Line 153: Unexpected errors ['generics_syntax_infer_variance.py:153: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:153: error: The type "type[ShouldBeContravariant1]" is not generic and not indexable [misc]'] +""" diff --git a/conformance/results/mypy/generics_syntax_scoping.toml b/conformance/results/mypy/generics_syntax_scoping.toml index d22757db5..50a8b1608 100644 --- a/conformance/results/mypy/generics_syntax_scoping.toml +++ b/conformance/results/mypy/generics_syntax_scoping.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_scoping.py:14: error: PEP 695 generics are not yet supported [valid-type] @@ -68,3 +67,33 @@ generics_syntax_scoping.py:121: note: "assert_type" expects everything to be "An generics_syntax_scoping.py:124: error: Expression is of type "Any", not "complex" [assert-type] generics_syntax_scoping.py:124: note: "assert_type" expects everything to be "Any" in unchecked functions """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_syntax_scoping.py:14: error: PEP 695 generics are not yet supported [valid-type]'] +Line 18: Unexpected errors ['generics_syntax_scoping.py:18: error: PEP 695 generics are not yet supported [valid-type]'] +Line 22: Unexpected errors ['generics_syntax_scoping.py:22: error: PEP 695 generics are not yet supported [valid-type]'] +Line 26: Unexpected errors ['generics_syntax_scoping.py:26: error: PEP 695 generics are not yet supported [valid-type]'] +Line 27: Unexpected errors ['generics_syntax_scoping.py:27: error: "Foo" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_scoping.py:27: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type]'] +Line 31: Unexpected errors ['generics_syntax_scoping.py:31: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_scoping.py:31: error: "BaseClassC" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_scoping.py:31: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type]', 'generics_syntax_scoping.py:31: error: The type "type[Foo]" is not generic and not indexable [misc]', 'generics_syntax_scoping.py:31: error: Cannot determine type of "T" [has-type]'] +Line 35: Unexpected errors ['generics_syntax_scoping.py:35: error: Cannot determine type of "T" [has-type]', 'generics_syntax_scoping.py:35: error: Name "T" is used before definition [used-before-def]'] +Line 39: Unexpected errors ['generics_syntax_scoping.py:39: error: PEP 695 generics are not yet supported [valid-type]'] +Line 40: Unexpected errors ['generics_syntax_scoping.py:40: error: "Foo" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_scoping.py:40: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type]', 'generics_syntax_scoping.py:40: error: The first argument to Callable must be a list of types, parameter specification, or "..." [valid-type]', 'generics_syntax_scoping.py:40: error: Name "P" is not defined [name-defined]', 'generics_syntax_scoping.py:40: error: Name "R" is not defined [name-defined]'] +Line 44: Unexpected errors ['generics_syntax_scoping.py:44: error: The type "type[Foo]" is not generic and not indexable [misc]', 'generics_syntax_scoping.py:44: error: Cannot determine type of "T" [has-type]'] +Line 45: Unexpected errors ['generics_syntax_scoping.py:45: error: PEP 695 generics are not yet supported [valid-type]'] +Line 49: Unexpected errors ['generics_syntax_scoping.py:49: error: PEP 695 type aliases are not yet supported [valid-type]', 'generics_syntax_scoping.py:49: error: Name "K" is not defined [name-defined]', 'generics_syntax_scoping.py:49: error: Name "V" is not defined [name-defined]'] +Line 55: Unexpected errors ['generics_syntax_scoping.py:55: error: PEP 695 generics are not yet supported [valid-type]'] +Line 59: Unexpected errors ['generics_syntax_scoping.py:59: error: PEP 695 generics are not yet supported [valid-type]'] +Line 62: Unexpected errors ['generics_syntax_scoping.py:62: error: Expression is of type "Any", not "str" [assert-type]'] +Line 67: Unexpected errors ['generics_syntax_scoping.py:67: error: Expression is of type "Any", not "int" [assert-type]'] +Line 74: Unexpected errors ['generics_syntax_scoping.py:74: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_scoping.py:74: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type]'] +Line 77: Unexpected errors ['generics_syntax_scoping.py:77: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_scoping.py:77: error: "Inner" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_scoping.py:77: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type]'] +Line 81: Unexpected errors ['generics_syntax_scoping.py:81: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_scoping.py:81: error: The first argument to Callable must be a list of types, parameter specification, or "..." [valid-type]', 'generics_syntax_scoping.py:81: error: Name "P" is not defined [name-defined]', 'generics_syntax_scoping.py:81: error: Name "R" is not defined [name-defined]'] +Line 89: Unexpected errors ['generics_syntax_scoping.py:89: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_scoping.py:89: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type]'] +Line 92: Unexpected errors ['generics_syntax_scoping.py:92: error: PEP 695 generics are not yet supported [valid-type]'] +Line 95: Unexpected errors ['generics_syntax_scoping.py:95: error: PEP 695 generics are not yet supported [valid-type]'] +Line 98: Unexpected errors ['generics_syntax_scoping.py:98: error: PEP 695 generics are not yet supported [valid-type]', 'generics_syntax_scoping.py:98: error: Variable "generics_syntax_scoping.ClassE.T" is not valid as a type [valid-type]'] +Line 105: Unexpected errors ['generics_syntax_scoping.py:105: error: PEP 695 generics are not yet supported [valid-type]'] +Line 116: Unexpected errors ['generics_syntax_scoping.py:116: error: Expression is of type "Any", not "TypeVar" [assert-type]'] +Line 121: Unexpected errors ['generics_syntax_scoping.py:121: error: Expression is of type "Any", not "complex" [assert-type]'] +Line 124: Unexpected errors ['generics_syntax_scoping.py:124: error: Expression is of type "Any", not "complex" [assert-type]'] +""" diff --git a/conformance/results/mypy/generics_type_erasure.toml b/conformance/results/mypy/generics_type_erasure.toml index d99efc118..1809e51b5 100644 --- a/conformance/results/mypy/generics_type_erasure.toml +++ b/conformance/results/mypy/generics_type_erasure.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Infers Node[Never] instead of Node[Any] when argument is not provided. +notes = """Infers Node[Never] instead of Node[Any] when argument is not provided. False negative on instance attribute access on type(node). """ output = """ @@ -13,3 +12,14 @@ generics_type_erasure.py:41: error: Access to generic instance variables via cla generics_type_erasure.py:42: error: Access to generic instance variables via class is ambiguous [misc] generics_type_erasure.py:43: error: Access to generic instance variables via class is ambiguous [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['generics_type_erasure.py:17: error: Expression is of type "Node[Never]", not "Node[Any]" [assert-type]'] +Line 20: Unexpected errors ['generics_type_erasure.py:20: error: Expression is of type Never, not "Any" [assert-type]'] +Line 36: Unexpected errors ['generics_type_erasure.py:36: error: Argument 1 to "Node" has incompatible type "str"; expected "int | None" [arg-type]'] +Line 38: Unexpected errors ['generics_type_erasure.py:38: error: Argument 1 to "Node" has incompatible type "int"; expected "str | None" [arg-type]'] +Line 40: Unexpected errors ['generics_type_erasure.py:40: error: Access to generic instance variables via class is ambiguous [misc]'] +Line 41: Unexpected errors ['generics_type_erasure.py:41: error: Access to generic instance variables via class is ambiguous [misc]'] +Line 42: Unexpected errors ['generics_type_erasure.py:42: error: Access to generic instance variables via class is ambiguous [misc]'] +Line 43: Unexpected errors ['generics_type_erasure.py:43: error: Access to generic instance variables via class is ambiguous [misc]'] +""" diff --git a/conformance/results/mypy/generics_typevartuple_args.toml b/conformance/results/mypy/generics_typevartuple_args.toml index 61b53af76..69f6d30f8 100644 --- a/conformance/results/mypy/generics_typevartuple_args.toml +++ b/conformance/results/mypy/generics_typevartuple_args.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not enforce that tuples captured by TypeVarTuple are same type. +notes = """Does not enforce that tuples captured by TypeVarTuple are same type. """ output = """ generics_typevartuple_args.py:33: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type] @@ -12,3 +11,13 @@ generics_typevartuple_args.py:59: error: Too few arguments for "func2" [call-ar generics_typevartuple_args.py:59: error: Argument 1 to "func2" has incompatible type "str"; expected "int" [arg-type] generics_typevartuple_args.py:67: error: Too few arguments for "func3" [call-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Unexpected errors ['generics_typevartuple_args.py:33: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type]'] +Line 34: Unexpected errors ['generics_typevartuple_args.py:34: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type]'] +Line 48: Unexpected errors ['generics_typevartuple_args.py:48: error: Argument 2 to "func1" has incompatible type "str"; expected "int" [arg-type]'] +Line 57: Unexpected errors ['generics_typevartuple_args.py:57: error: Argument 2 to "func2" has incompatible type "int"; expected "*tuple[*tuple[str, ...], str]" [arg-type]'] +Line 58: Unexpected errors ['generics_typevartuple_args.py:58: error: Too few arguments for "func2" [call-arg]'] +Line 59: Unexpected errors ['generics_typevartuple_args.py:59: error: Too few arguments for "func2" [call-arg]', 'generics_typevartuple_args.py:59: error: Argument 1 to "func2" has incompatible type "str"; expected "int" [arg-type]'] +Line 67: Unexpected errors ['generics_typevartuple_args.py:67: error: Too few arguments for "func3" [call-arg]'] +""" diff --git a/conformance/results/mypy/generics_typevartuple_basic.toml b/conformance/results/mypy/generics_typevartuple_basic.toml index 39404cb12..c41089507 100644 --- a/conformance/results/mypy/generics_typevartuple_basic.toml +++ b/conformance/results/mypy/generics_typevartuple_basic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not enforce that tuples captured by TypeVarTuple are same length. +notes = """Does not enforce that tuples captured by TypeVarTuple are same length. Does not enforce that tuples captured by TypeVarTuple are same type. """ output = """ @@ -19,3 +18,20 @@ generics_typevartuple_basic.py:99: error: Cannot infer type argument 1 of "multi generics_typevartuple_basic.py:100: error: Cannot infer type argument 1 of "multiply" [misc] generics_typevartuple_basic.py:106: error: Can only use one type var tuple in a class def [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 42: Unexpected errors ['generics_typevartuple_basic.py:42: error: Argument 1 to "Array" has incompatible type "Height"; expected "tuple[Height, Width]" [arg-type]'] +Line 43: Unexpected errors ['generics_typevartuple_basic.py:43: error: Argument 1 to "Array" has incompatible type "tuple[Batch, Width]"; expected "tuple[Batch, Height, Width]" [arg-type]'] +Line 45: Unexpected errors ['generics_typevartuple_basic.py:45: error: Argument 1 to "Array" has incompatible type "tuple[Time, Batch, Width, Height]"; expected "tuple[Time, Batch, Height, Width]" [arg-type]'] +Line 52: Unexpected errors ['generics_typevartuple_basic.py:52: error: Free type variable expected in Generic[...] [misc]'] +Line 53: Unexpected errors ['generics_typevartuple_basic.py:53: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]'] +Line 56: Unexpected errors ['generics_typevartuple_basic.py:56: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]'] +Line 57: Unexpected errors ['generics_typevartuple_basic.py:57: error: Incompatible return value type (got "tuple[*Shape]", expected "tuple[Any]") [return-value]'] +Line 59: Unexpected errors ['generics_typevartuple_basic.py:59: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type]'] +Line 65: Unexpected errors ['generics_typevartuple_basic.py:65: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [misc]'] +Line 66: Unexpected errors ['generics_typevartuple_basic.py:66: error: Too many positional arguments for "TypeVarTuple" [misc]'] +Line 67: Unexpected errors ['generics_typevartuple_basic.py:67: error: Unexpected keyword argument "bound" for "TypeVarTuple" [misc]'] +Line 99: Unexpected errors ['generics_typevartuple_basic.py:99: error: Cannot infer type argument 1 of "multiply" [misc]'] +Line 100: Unexpected errors ['generics_typevartuple_basic.py:100: error: Cannot infer type argument 1 of "multiply" [misc]'] +Line 106: Unexpected errors ['generics_typevartuple_basic.py:106: error: Can only use one type var tuple in a class def [misc]'] +""" diff --git a/conformance/results/mypy/generics_typevartuple_callable.toml b/conformance/results/mypy/generics_typevartuple_callable.toml index 4561f3c4a..237b261f3 100644 --- a/conformance/results/mypy/generics_typevartuple_callable.toml +++ b/conformance/results/mypy/generics_typevartuple_callable.toml @@ -2,3 +2,7 @@ conformant = "Pass" output = """ generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type]'] +""" diff --git a/conformance/results/mypy/generics_typevartuple_concat.toml b/conformance/results/mypy/generics_typevartuple_concat.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/generics_typevartuple_concat.toml +++ b/conformance/results/mypy/generics_typevartuple_concat.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/generics_typevartuple_overloads.toml b/conformance/results/mypy/generics_typevartuple_overloads.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/generics_typevartuple_overloads.toml +++ b/conformance/results/mypy/generics_typevartuple_overloads.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/generics_typevartuple_specialization.toml b/conformance/results/mypy/generics_typevartuple_specialization.toml index 53eba2786..de90f8930 100644 --- a/conformance/results/mypy/generics_typevartuple_specialization.toml +++ b/conformance/results/mypy/generics_typevartuple_specialization.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided. +notes = """Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided. Rejects specialization of generic type alias defined as a tuple containing a TypeVar. "More than one Unpack" error message has no line number. """ @@ -15,3 +14,12 @@ generics_typevartuple_specialization.py:110: error: Unpack is only valid in a va generics_typevartuple_specialization.py:127: error: Bad number of arguments for type alias, expected at least 2, given 1 [type-arg] generics_typevartuple_specialization.py:163: error: TypeVarTuple cannot be split [type-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 85: Unexpected errors ['generics_typevartuple_specialization.py:85: error: Argument 1 to "takes_float_array_with_specific_shape" has incompatible type "Array2[float, *tuple[Any, ...]]"; expected "Array2[float, Height, Width]" [arg-type]'] +Line 108: Unexpected errors ['generics_typevartuple_specialization.py:108: error: Type application is only supported for generic classes [misc]'] +Line 109: Unexpected errors ['generics_typevartuple_specialization.py:109: error: Type application is only supported for generic classes [misc]', 'generics_typevartuple_specialization.py:109: error: Unpack is only valid in a variadic position [valid-type]'] +Line 110: Unexpected errors ['generics_typevartuple_specialization.py:110: error: Type application is only supported for generic classes [misc]', 'generics_typevartuple_specialization.py:110: error: Unpack is only valid in a variadic position [valid-type]'] +Line 127: Unexpected errors ['generics_typevartuple_specialization.py:127: error: Bad number of arguments for type alias, expected at least 2, given 1 [type-arg]'] +Line 163: Unexpected errors ['generics_typevartuple_specialization.py:163: error: TypeVarTuple cannot be split [type-arg]'] +""" diff --git a/conformance/results/mypy/generics_typevartuple_unpack.toml b/conformance/results/mypy/generics_typevartuple_unpack.toml index 8613d8034..a7e353708 100644 --- a/conformance/results/mypy/generics_typevartuple_unpack.toml +++ b/conformance/results/mypy/generics_typevartuple_unpack.toml @@ -1,7 +1,10 @@ conformant = "Partial" -notes = """ -Does not reject multiple unpack operators in a tuple. +notes = """Does not reject multiple unpack operators in a tuple. """ output = """ generics_typevartuple_unpack.py:30: error: Argument 1 to "process_batch_channels" has incompatible type "Array[Batch]"; expected "Array[Batch, *tuple[Any, ...], Channels]" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['generics_typevartuple_unpack.py:30: error: Argument 1 to "process_batch_channels" has incompatible type "Array[Batch]"; expected "Array[Batch, *tuple[Any, ...], Channels]" [arg-type]'] +""" diff --git a/conformance/results/mypy/generics_upper_bound.toml b/conformance/results/mypy/generics_upper_bound.toml index 237a3fffc..3f6edd897 100644 --- a/conformance/results/mypy/generics_upper_bound.toml +++ b/conformance/results/mypy/generics_upper_bound.toml @@ -7,3 +7,10 @@ generics_upper_bound.py:41: error: Expression is of type "Collection[int]", not generics_upper_bound.py:43: error: Value of type variable "ST" of "longer" cannot be "int" [type-var] generics_upper_bound.py:48: error: TypeVar cannot have both values and an upper bound [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['generics_upper_bound.py:22: error: Type variable "generics_upper_bound.T" is unbound [valid-type]'] +Line 41: Unexpected errors ['generics_upper_bound.py:41: error: Expression is of type "Collection[int]", not "list[int] | set[int]" [assert-type]'] +Line 43: Unexpected errors ['generics_upper_bound.py:43: error: Value of type variable "ST" of "longer" cannot be "int" [type-var]'] +Line 48: Unexpected errors ['generics_upper_bound.py:48: error: TypeVar cannot have both values and an upper bound [misc]'] +""" diff --git a/conformance/results/mypy/generics_variance.toml b/conformance/results/mypy/generics_variance.toml index b21ba9766..de1f0501b 100644 --- a/conformance/results/mypy/generics_variance.toml +++ b/conformance/results/mypy/generics_variance.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible. +notes = """Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible. """ output = """ generics_variance.py:14: error: TypeVar cannot be both covariant and contravariant [misc] @@ -11,3 +10,13 @@ generics_variance.py:105: error: Variance of TypeVar "T_co" incompatible with va generics_variance.py:125: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var] generics_variance.py:131: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var] """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_variance.py:14: error: TypeVar cannot be both covariant and contravariant [misc]'] +Line 77: Unexpected errors ['generics_variance.py:77: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var]'] +Line 81: Unexpected errors ['generics_variance.py:81: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var]'] +Line 93: Unexpected errors ['generics_variance.py:93: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var]'] +Line 105: Unexpected errors ['generics_variance.py:105: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var]'] +Line 125: Unexpected errors ['generics_variance.py:125: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var]'] +Line 131: Unexpected errors ['generics_variance.py:131: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var]'] +""" diff --git a/conformance/results/mypy/generics_variance_inference.toml b/conformance/results/mypy/generics_variance_inference.toml index 1d86d4217..241c69af9 100644 --- a/conformance/results/mypy/generics_variance_inference.toml +++ b/conformance/results/mypy/generics_variance_inference.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_variance_inference.py:15: error: PEP 695 generics are not yet supported [valid-type] @@ -89,3 +88,62 @@ generics_variance_inference.py:189: error: PEP 695 generics are not yet supporte generics_variance_inference.py:193: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[float]", variable has type "ShouldBeContravariant2[int]") [assignment] generics_variance_inference.py:194: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[int]", variable has type "ShouldBeContravariant2[float]") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['generics_variance_inference.py:15: error: PEP 695 generics are not yet supported [valid-type]', 'generics_variance_inference.py:15: error: Name "T1" is not defined [name-defined]'] +Line 16: Unexpected errors ['generics_variance_inference.py:16: error: Name "T2" is not defined [name-defined]'] +Line 19: Unexpected errors ['generics_variance_inference.py:19: error: Name "T3" is not defined [name-defined]'] +Line 23: Unexpected errors ['generics_variance_inference.py:23: error: "ClassA" expects no type arguments, but 3 given [type-arg]'] +Line 24: Unexpected errors ['generics_variance_inference.py:24: error: "ClassA" expects no type arguments, but 3 given [type-arg]'] +Line 25: Unexpected errors ['generics_variance_inference.py:25: error: "ClassA" expects no type arguments, but 3 given [type-arg]'] +Line 26: Unexpected errors ['generics_variance_inference.py:26: error: "ClassA" expects no type arguments, but 3 given [type-arg]'] +Line 28: Unexpected errors ['generics_variance_inference.py:28: error: "ClassA" expects no type arguments, but 3 given [type-arg]'] +Line 29: Unexpected errors ['generics_variance_inference.py:29: error: "ClassA" expects no type arguments, but 3 given [type-arg]'] +Line 32: Unexpected errors ['generics_variance_inference.py:32: error: PEP 695 generics are not yet supported [valid-type]'] +Line 33: Unexpected errors ['generics_variance_inference.py:33: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]'] +Line 40: Unexpected errors ['generics_variance_inference.py:40: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:40: error: The type "type[ShouldBeCovariant1]" is not generic and not indexable [misc]'] +Line 41: Unexpected errors ['generics_variance_inference.py:41: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:41: error: The type "type[ShouldBeCovariant1]" is not generic and not indexable [misc]'] +Line 44: Unexpected errors ['generics_variance_inference.py:44: error: PEP 695 generics are not yet supported [valid-type]'] +Line 48: Unexpected errors ['generics_variance_inference.py:48: error: Cannot instantiate abstract class "ShouldBeCovariant2" with abstract attributes "__getitem__" and "__len__" [abstract]', 'generics_variance_inference.py:48: error: Incompatible types in assignment (expression has type "ShouldBeCovariant2[int]", variable has type "ShouldBeCovariant2[float]") [assignment]'] +Line 49: Unexpected errors ['generics_variance_inference.py:49: error: Cannot instantiate abstract class "ShouldBeCovariant2" with abstract attributes "__getitem__" and "__len__" [abstract]', 'generics_variance_inference.py:49: error: Incompatible types in assignment (expression has type "ShouldBeCovariant2[float]", variable has type "ShouldBeCovariant2[int]") [assignment]'] +Line 52: Unexpected errors ['generics_variance_inference.py:52: error: PEP 695 generics are not yet supported [valid-type]'] +Line 57: Unexpected errors ['generics_variance_inference.py:57: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:57: error: The type "type[ShouldBeCovariant3]" is not generic and not indexable [misc]'] +Line 58: Unexpected errors ['generics_variance_inference.py:58: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:58: error: The type "type[ShouldBeCovariant3]" is not generic and not indexable [misc]'] +Line 62: Unexpected errors ['generics_variance_inference.py:62: error: PEP 695 generics are not yet supported [valid-type]'] +Line 63: Unexpected errors ['generics_variance_inference.py:63: error: Type variable "generics_variance_inference.T" is unbound [valid-type]'] +Line 66: Unexpected errors ['generics_variance_inference.py:66: error: "ShouldBeCovariant4" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:66: error: The type "type[ShouldBeCovariant4]" is not generic and not indexable [misc]'] +Line 67: Unexpected errors ['generics_variance_inference.py:67: error: "ShouldBeCovariant4" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:67: error: The type "type[ShouldBeCovariant4]" is not generic and not indexable [misc]'] +Line 70: Unexpected errors ['generics_variance_inference.py:70: error: PEP 695 generics are not yet supported [valid-type]'] +Line 75: Unexpected errors ['generics_variance_inference.py:75: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]'] +Line 79: Unexpected errors ['generics_variance_inference.py:79: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:79: error: The type "type[ShouldBeCovariant5]" is not generic and not indexable [misc]'] +Line 80: Unexpected errors ['generics_variance_inference.py:80: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:80: error: The type "type[ShouldBeCovariant5]" is not generic and not indexable [misc]'] +Line 83: Unexpected errors ['generics_variance_inference.py:83: error: PEP 695 generics are not yet supported [valid-type]'] +Line 96: Unexpected errors ['generics_variance_inference.py:96: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:96: error: The type "type[ShouldBeInvariant1]" is not generic and not indexable [misc]'] +Line 97: Unexpected errors ['generics_variance_inference.py:97: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:97: error: The type "type[ShouldBeInvariant1]" is not generic and not indexable [misc]'] +Line 100: Unexpected errors ['generics_variance_inference.py:100: error: PEP 695 generics are not yet supported [valid-type]'] +Line 104: Unexpected errors ['generics_variance_inference.py:104: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var]'] +Line 111: Unexpected errors ['generics_variance_inference.py:111: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:111: error: The type "type[ShouldBeInvariant2]" is not generic and not indexable [misc]'] +Line 112: Unexpected errors ['generics_variance_inference.py:112: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:112: error: The type "type[ShouldBeInvariant2]" is not generic and not indexable [misc]'] +Line 115: Unexpected errors ['generics_variance_inference.py:115: error: PEP 695 generics are not yet supported [valid-type]', 'generics_variance_inference.py:115: error: Name "K" is not defined [name-defined]', 'generics_variance_inference.py:115: error: Name "V" is not defined [name-defined]'] +Line 119: Unexpected errors ['generics_variance_inference.py:119: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_variance_inference.py:119: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 120: Unexpected errors ['generics_variance_inference.py:120: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_variance_inference.py:120: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 121: Unexpected errors ['generics_variance_inference.py:121: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_variance_inference.py:121: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 122: Unexpected errors ['generics_variance_inference.py:122: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg]', 'generics_variance_inference.py:122: error: The type "type[ShouldBeInvariant3]" is not generic and not indexable [misc]'] +Line 126: Unexpected errors ['generics_variance_inference.py:126: error: PEP 695 generics are not yet supported [valid-type]'] +Line 127: Unexpected errors ['generics_variance_inference.py:127: error: Type variable "generics_variance_inference.T" is unbound [valid-type]'] +Line 130: Unexpected errors ['generics_variance_inference.py:130: error: "ShouldBeInvariant4" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:130: error: The type "type[ShouldBeInvariant4]" is not generic and not indexable [misc]'] +Line 133: Unexpected errors ['generics_variance_inference.py:133: error: PEP 695 generics are not yet supported [valid-type]'] +Line 138: Unexpected errors ['generics_variance_inference.py:138: error: "ShouldBeInvariant5" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:138: error: The type "type[ShouldBeInvariant5]" is not generic and not indexable [misc]'] +Line 141: Unexpected errors ['generics_variance_inference.py:141: error: PEP 695 generics are not yet supported [valid-type]'] +Line 149: Unexpected errors ['generics_variance_inference.py:149: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:149: error: The type "type[ShouldBeContravariant1]" is not generic and not indexable [misc]'] +Line 150: Unexpected errors ['generics_variance_inference.py:150: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg]', 'generics_variance_inference.py:150: error: The type "type[ShouldBeContravariant1]" is not generic and not indexable [misc]'] +Line 165: Unexpected errors ['generics_variance_inference.py:165: error: PEP 695 generics are not yet supported [valid-type]'] +Line 169: Unexpected errors ['generics_variance_inference.py:169: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[float]", variable has type "ShouldBeInvariant6[int]") [assignment]'] +Line 170: Unexpected errors ['generics_variance_inference.py:170: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[int]", variable has type "ShouldBeInvariant6[float]") [assignment]'] +Line 177: Unexpected errors ['generics_variance_inference.py:177: error: PEP 695 generics are not yet supported [valid-type]'] +Line 181: Unexpected errors ['generics_variance_inference.py:181: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[float]", variable has type "ShouldBeCovariant6[int]") [assignment]'] +Line 182: Unexpected errors ['generics_variance_inference.py:182: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[int]", variable has type "ShouldBeCovariant6[float]") [assignment]'] +Line 189: Unexpected errors ['generics_variance_inference.py:189: error: PEP 695 generics are not yet supported [valid-type]'] +Line 193: Unexpected errors ['generics_variance_inference.py:193: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[float]", variable has type "ShouldBeContravariant2[int]") [assignment]'] +Line 194: Unexpected errors ['generics_variance_inference.py:194: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[int]", variable has type "ShouldBeContravariant2[float]") [assignment]'] +""" diff --git a/conformance/results/mypy/historical_positional.toml b/conformance/results/mypy/historical_positional.toml index cc2be855d..eb69df753 100644 --- a/conformance/results/mypy/historical_positional.toml +++ b/conformance/results/mypy/historical_positional.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject positional-only parameter after non-positional-only parameter. +notes = """Does not reject positional-only parameter after non-positional-only parameter. Treats keyword-only parameter as positional-only. Applies legacy positional-only rules when PEP 570 syntax is used. """ @@ -14,3 +13,10 @@ historical_positional.py:43: error: Unexpected keyword argument "__x" for "m1" o historical_positional.py:50: note: "f4" defined here historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4" [call-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 18: Unexpected errors ['historical_positional.py:18: error: Unexpected keyword argument "__x" for "f1" [call-arg]'] +Line 32: Unexpected errors ['historical_positional.py:32: error: Unexpected keyword argument "__y" for "f3" [call-arg]'] +Line 43: Unexpected errors ['historical_positional.py:43: error: Unexpected keyword argument "__x" for "m1" of "A" [call-arg]'] +Line 53: Unexpected errors ['historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4" [call-arg]'] +""" diff --git a/conformance/results/mypy/literals_interactions.toml b/conformance/results/mypy/literals_interactions.toml index b2b4ddbd0..a76edb6c8 100644 --- a/conformance/results/mypy/literals_interactions.toml +++ b/conformance/results/mypy/literals_interactions.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not narrow type of `x` with `x in Literal` type guard pattern. +notes = """Does not narrow type of `x` with `x in Literal` type guard pattern. """ output = """ literals_interactions.py:15: error: Tuple index out of range [misc] @@ -10,3 +9,12 @@ literals_interactions.py:18: error: Tuple index out of range [misc] literals_interactions.py:106: error: Argument 1 to "expects_bad_status" has incompatible type "str"; expected "Literal['MALFORMED', 'ABORTED']" [arg-type] literals_interactions.py:109: error: Argument 1 to "expects_pending_status" has incompatible type "str"; expected "Literal['PENDING']" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['literals_interactions.py:15: error: Tuple index out of range [misc]'] +Line 16: Unexpected errors ['literals_interactions.py:16: error: Tuple index out of range [misc]'] +Line 17: Unexpected errors ['literals_interactions.py:17: error: Tuple index out of range [misc]'] +Line 18: Unexpected errors ['literals_interactions.py:18: error: Tuple index out of range [misc]'] +Line 106: Unexpected errors ['literals_interactions.py:106: error: Argument 1 to "expects_bad_status" has incompatible type "str"; expected "Literal[\\'MALFORMED\\', \\'ABORTED\\']" [arg-type]'] +Line 109: Unexpected errors ['literals_interactions.py:109: error: Argument 1 to "expects_pending_status" has incompatible type "str"; expected "Literal[\\'PENDING\\']" [arg-type]'] +""" diff --git a/conformance/results/mypy/literals_literalstring.toml b/conformance/results/mypy/literals_literalstring.toml index 0f3409329..b4f9ba2ed 100644 --- a/conformance/results/mypy/literals_literalstring.toml +++ b/conformance/results/mypy/literals_literalstring.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Support for `LiteralString` is not implemented. +notes = """Support for `LiteralString` is not implemented. """ output = """ literals_literalstring.py:36: error: Parameter 2 of Literal[...] is invalid [valid-type] @@ -13,3 +12,14 @@ literals_literalstring.py:142: error: Overloaded function signatures 1 and 3 ove literals_literalstring.py:152: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [misc] literals_literalstring.py:162: error: Expression is of type "bool", not "str" [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['literals_literalstring.py:36: error: Parameter 2 of Literal[...] is invalid [valid-type]'] +Line 37: Unexpected errors ['literals_literalstring.py:37: error: Parameter 1 of Literal[...] is invalid [valid-type]'] +Line 43: Unexpected errors ['literals_literalstring.py:43: error: Incompatible types in assignment (expression has type "Literal[\\'two\\']", variable has type "Literal[\\'\\']") [assignment]'] +Line 74: Unexpected errors ['literals_literalstring.py:74: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]'] +Line 75: Unexpected errors ['literals_literalstring.py:75: error: Incompatible types in assignment (expression has type "bytes", variable has type "str") [assignment]'] +Line 142: Unexpected errors ['literals_literalstring.py:142: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [overload-overlap]', 'literals_literalstring.py:142: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [overload-overlap]'] +Line 152: Unexpected errors ["literals_literalstring.py:152: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [misc]"] +Line 162: Unexpected errors ['literals_literalstring.py:162: error: Expression is of type "bool", not "str" [assert-type]'] +""" diff --git a/conformance/results/mypy/literals_parameterizations.toml b/conformance/results/mypy/literals_parameterizations.toml index e5904e82b..4053a21d3 100644 --- a/conformance/results/mypy/literals_parameterizations.toml +++ b/conformance/results/mypy/literals_parameterizations.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject tuple within Literal. +notes = """Does not reject tuple within Literal. """ output = """ literals_parameterizations.py:41: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] @@ -20,3 +19,22 @@ literals_parameterizations.py:60: error: Literal[...] must have at least one par literals_parameterizations.py:61: error: Parameter 1 of Literal[...] is invalid [valid-type] literals_parameterizations.py:65: error: Incompatible types in assignment (expression has type "Literal[Color.RED]", variable has type "Literal['Color.RED']") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 41: Unexpected errors ['literals_parameterizations.py:41: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type]'] +Line 42: Unexpected errors ['literals_parameterizations.py:42: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type]'] +Line 43: Unexpected errors ['literals_parameterizations.py:43: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type]'] +Line 44: Unexpected errors ['literals_parameterizations.py:44: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type]'] +Line 45: Unexpected errors ['literals_parameterizations.py:45: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type]'] +Line 47: Unexpected errors ['literals_parameterizations.py:47: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type]'] +Line 48: Unexpected errors ['literals_parameterizations.py:48: error: Parameter 1 of Literal[...] is invalid [valid-type]'] +Line 49: Unexpected errors ['literals_parameterizations.py:49: error: Parameter 1 of Literal[...] is invalid [valid-type]'] +Line 50: Unexpected errors ['literals_parameterizations.py:50: error: Parameter 1 of Literal[...] is invalid [valid-type]'] +Line 51: Unexpected errors ['literals_parameterizations.py:51: error: Parameter 1 of Literal[...] cannot be of type "float" [valid-type]'] +Line 52: Unexpected errors ['literals_parameterizations.py:52: error: Parameter 1 of Literal[...] cannot be of type "Any" [valid-type]'] +Line 53: Unexpected errors ['literals_parameterizations.py:53: error: Parameter 1 of Literal[...] is invalid [valid-type]'] +Line 56: Unexpected errors ['literals_parameterizations.py:56: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type]'] +Line 60: Unexpected errors ['literals_parameterizations.py:60: error: Literal[...] must have at least one parameter [valid-type]'] +Line 61: Unexpected errors ['literals_parameterizations.py:61: error: Parameter 1 of Literal[...] is invalid [valid-type]'] +Line 65: Unexpected errors ['literals_parameterizations.py:65: error: Incompatible types in assignment (expression has type "Literal[Color.RED]", variable has type "Literal[\\'Color.RED\\']") [assignment]'] +""" diff --git a/conformance/results/mypy/literals_semantics.toml b/conformance/results/mypy/literals_semantics.toml index 589c39314..b49509878 100644 --- a/conformance/results/mypy/literals_semantics.toml +++ b/conformance/results/mypy/literals_semantics.toml @@ -5,3 +5,10 @@ literals_semantics.py:24: error: Incompatible types in assignment (expression ha literals_semantics.py:25: error: Incompatible types in assignment (expression has type "Literal[False]", variable has type "Literal[0]") [assignment] literals_semantics.py:33: error: Incompatible types in assignment (expression has type "int", variable has type "Literal[3, 4, 5]") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['literals_semantics.py:10: error: Incompatible types in assignment (expression has type "Literal[4]", variable has type "Literal[3]") [assignment]'] +Line 24: Unexpected errors ['literals_semantics.py:24: error: Incompatible types in assignment (expression has type "Literal[0]", variable has type "Literal[False]") [assignment]'] +Line 25: Unexpected errors ['literals_semantics.py:25: error: Incompatible types in assignment (expression has type "Literal[False]", variable has type "Literal[0]") [assignment]'] +Line 33: Unexpected errors ['literals_semantics.py:33: error: Incompatible types in assignment (expression has type "int", variable has type "Literal[3, 4, 5]") [assignment]'] +""" diff --git a/conformance/results/mypy/namedtuples_define_class.toml b/conformance/results/mypy/namedtuples_define_class.toml index 5400b1a5f..5b7e48d4b 100644 --- a/conformance/results/mypy/namedtuples_define_class.toml +++ b/conformance/results/mypy/namedtuples_define_class.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject override of named tuple attribute in child class. +notes = """Does not reject override of named tuple attribute in child class. """ output = """ namedtuples_define_class.py:32: error: Tuple index out of range [misc] @@ -15,3 +14,17 @@ namedtuples_define_class.py:59: error: Non-default NamedTuple fields cannot foll namedtuples_define_class.py:98: error: Argument 2 to "Property" has incompatible type "float"; expected "str" [arg-type] namedtuples_define_class.py:105: error: NamedTuple should be a single base [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 32: Unexpected errors ['namedtuples_define_class.py:32: error: Tuple index out of range [misc]'] +Line 33: Unexpected errors ['namedtuples_define_class.py:33: error: Tuple index out of range [misc]'] +Line 44: Unexpected errors ['namedtuples_define_class.py:44: error: Missing positional argument "y" in call to "Point" [call-arg]'] +Line 45: Unexpected errors ['namedtuples_define_class.py:45: error: Missing positional argument "y" in call to "Point" [call-arg]'] +Line 46: Unexpected errors ['namedtuples_define_class.py:46: error: Argument 2 to "Point" has incompatible type "str"; expected "int" [arg-type]'] +Line 47: Unexpected errors ['namedtuples_define_class.py:47: error: Argument "units" to "Point" has incompatible type "int"; expected "str" [arg-type]'] +Line 48: Unexpected errors ['namedtuples_define_class.py:48: error: Too many arguments for "Point" [call-arg]'] +Line 49: Unexpected errors ['namedtuples_define_class.py:49: error: Unexpected keyword argument "other" for "Point" [call-arg]'] +Line 59: Unexpected errors ['namedtuples_define_class.py:59: error: Non-default NamedTuple fields cannot follow default fields [misc]'] +Line 98: Unexpected errors ['namedtuples_define_class.py:98: error: Argument 2 to "Property" has incompatible type "float"; expected "str" [arg-type]'] +Line 105: Unexpected errors ['namedtuples_define_class.py:105: error: NamedTuple should be a single base [misc]'] +""" diff --git a/conformance/results/mypy/namedtuples_define_functional.toml b/conformance/results/mypy/namedtuples_define_functional.toml index dd95872b8..077ae8231 100644 --- a/conformance/results/mypy/namedtuples_define_functional.toml +++ b/conformance/results/mypy/namedtuples_define_functional.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not handle illegal named tuple names the same as runtime. +notes = """Does not handle illegal named tuple names the same as runtime. """ output = """ namedtuples_define_functional.py:16: error: Missing positional argument "y" in call to "Point1" [call-arg] @@ -15,3 +14,17 @@ namedtuples_define_functional.py:52: error: Name "a" already defined (possibly b namedtuples_define_functional.py:57: error: Unexpected keyword argument "_1" for "NT4" [call-arg] namedtuples_define_functional.py:66: error: Missing positional argument "a" in call to "NT5" [call-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['namedtuples_define_functional.py:16: error: Missing positional argument "y" in call to "Point1" [call-arg]'] +Line 21: Unexpected errors ['namedtuples_define_functional.py:21: error: Missing positional arguments "x", "y" in call to "Point2" [call-arg]'] +Line 26: Unexpected errors ['namedtuples_define_functional.py:26: error: Too many arguments for "Point3" [call-arg]'] +Line 31: Unexpected errors ['namedtuples_define_functional.py:31: error: Unexpected keyword argument "z" for "Point4" [call-arg]'] +Line 36: Unexpected errors ['namedtuples_define_functional.py:36: error: Argument 2 to "Point5" has incompatible type "str"; expected "int" [arg-type]'] +Line 37: Unexpected errors ['namedtuples_define_functional.py:37: error: Too many arguments for "Point5" [call-arg]'] +Line 42: Unexpected errors ['namedtuples_define_functional.py:42: error: Argument 2 to "Point6" has incompatible type "str"; expected "int" [arg-type]'] +Line 43: Unexpected errors ['namedtuples_define_functional.py:43: error: Argument "x" to "Point6" has incompatible type "float"; expected "int" [arg-type]'] +Line 52: Unexpected errors ['namedtuples_define_functional.py:52: error: Name "a" already defined (possibly by an import) [no-redef]'] +Line 57: Unexpected errors ['namedtuples_define_functional.py:57: error: Unexpected keyword argument "_1" for "NT4" [call-arg]'] +Line 66: Unexpected errors ['namedtuples_define_functional.py:66: error: Missing positional argument "a" in call to "NT5" [call-arg]'] +""" diff --git a/conformance/results/mypy/namedtuples_type_compat.toml b/conformance/results/mypy/namedtuples_type_compat.toml index 9553aed98..6f720be0d 100644 --- a/conformance/results/mypy/namedtuples_type_compat.toml +++ b/conformance/results/mypy/namedtuples_type_compat.toml @@ -3,3 +3,8 @@ output = """ namedtuples_type_compat.py:22: error: Incompatible types in assignment (expression has type "Point", variable has type "tuple[int, int]") [assignment] namedtuples_type_compat.py:23: error: Incompatible types in assignment (expression has type "Point", variable has type "tuple[int, str, str]") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['namedtuples_type_compat.py:22: error: Incompatible types in assignment (expression has type "Point", variable has type "tuple[int, int]") [assignment]'] +Line 23: Unexpected errors ['namedtuples_type_compat.py:23: error: Incompatible types in assignment (expression has type "Point", variable has type "tuple[int, str, str]") [assignment]'] +""" diff --git a/conformance/results/mypy/namedtuples_usage.toml b/conformance/results/mypy/namedtuples_usage.toml index 8fbff7d15..7c09b0597 100644 --- a/conformance/results/mypy/namedtuples_usage.toml +++ b/conformance/results/mypy/namedtuples_usage.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject attempt to delete named tuple field by name. +notes = """Does not reject attempt to delete named tuple field by name. """ output = """ namedtuples_usage.py:34: error: Tuple index out of range [misc] @@ -11,3 +10,13 @@ namedtuples_usage.py:43: error: "Point" has no attribute "__delitem__" [attr-de namedtuples_usage.py:52: error: Too many values to unpack (2 expected, 3 provided) [misc] namedtuples_usage.py:53: error: Need more than 3 values to unpack (4 expected) [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 34: Unexpected errors ['namedtuples_usage.py:34: error: Tuple index out of range [misc]'] +Line 35: Unexpected errors ['namedtuples_usage.py:35: error: Tuple index out of range [misc]'] +Line 40: Unexpected errors ['namedtuples_usage.py:40: error: Property "x" defined in "Point" is read-only [misc]'] +Line 41: Unexpected errors ['namedtuples_usage.py:41: error: Unsupported target for indexed assignment ("Point") [index]'] +Line 43: Unexpected errors ['namedtuples_usage.py:43: error: "Point" has no attribute "__delitem__" [attr-defined]'] +Line 52: Unexpected errors ['namedtuples_usage.py:52: error: Too many values to unpack (2 expected, 3 provided) [misc]'] +Line 53: Unexpected errors ['namedtuples_usage.py:53: error: Need more than 3 values to unpack (4 expected) [misc]'] +""" diff --git a/conformance/results/mypy/narrowing_typeguard.toml b/conformance/results/mypy/narrowing_typeguard.toml index df66386c4..58b9193c1 100644 --- a/conformance/results/mypy/narrowing_typeguard.toml +++ b/conformance/results/mypy/narrowing_typeguard.toml @@ -5,3 +5,8 @@ narrowing_typeguard.py:107: error: TypeGuard functions must have a positional ar narrowing_typeguard.py:128: error: Argument 1 to "takes_callable_str" has incompatible type "Callable[[object], TypeGuard[int]]"; expected "Callable[[object], str]" [arg-type] narrowing_typeguard.py:148: error: Argument 1 to "takes_callable_str_proto" has incompatible type "Callable[[object], TypeGuard[int]]"; expected "CallableStrProto" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 102: Unexpected errors ['narrowing_typeguard.py:102: error: TypeGuard functions must have a positional argument [valid-type]'] +Line 107: Unexpected errors ['narrowing_typeguard.py:107: error: TypeGuard functions must have a positional argument [valid-type]'] +""" diff --git a/conformance/results/mypy/overloads_basic.toml b/conformance/results/mypy/overloads_basic.toml index 09a06cf60..e92e4cef2 100644 --- a/conformance/results/mypy/overloads_basic.toml +++ b/conformance/results/mypy/overloads_basic.toml @@ -7,3 +7,9 @@ overloads_basic.py:37: note: def __getitem__(self, slice, /) -> bytes overloads_basic.py:62: error: Single overload definition, multiple required [misc] overloads_basic.py:74: error: An overloaded function outside a stub file must have an implementation [no-overload-impl] """ +conformance_automated = "Fail" +errors_diff = """ +Line 37: Unexpected errors ['overloads_basic.py:37: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload]'] +Line 62: Unexpected errors ['overloads_basic.py:62: error: Single overload definition, multiple required [misc]'] +Line 74: Unexpected errors ['overloads_basic.py:74: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]'] +""" diff --git a/conformance/results/mypy/protocols_class_objects.toml b/conformance/results/mypy/protocols_class_objects.toml index 897c0bb25..d7aee5771 100644 --- a/conformance/results/mypy/protocols_class_objects.toml +++ b/conformance/results/mypy/protocols_class_objects.toml @@ -21,3 +21,14 @@ protocols_class_objects.py:104: error: Incompatible types in assignment (express protocols_class_objects.py:104: note: Only class variables allowed for class object access on protocols, attr1 is an instance variable of "ConcreteC2" protocols_class_objects.py:105: error: Incompatible types in assignment (expression has type "type[ConcreteC3]", variable has type "ProtoC1") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Unexpected errors ['protocols_class_objects.py:29: error: Only concrete class can be given where "type[Proto]" is expected [type-abstract]'] +Line 34: Unexpected errors ['protocols_class_objects.py:34: error: Can only assign concrete classes to a variable of type "type[Proto]" [type-abstract]'] +Line 58: Unexpected errors ['protocols_class_objects.py:58: error: Incompatible types in assignment (expression has type "type[ConcreteA]", variable has type "ProtoA1") [assignment]'] +Line 74: Unexpected errors ['protocols_class_objects.py:74: error: Incompatible types in assignment (expression has type "type[ConcreteB]", variable has type "ProtoB1") [assignment]'] +Line 101: Unexpected errors ['protocols_class_objects.py:101: error: Incompatible types in assignment (expression has type "type[ConcreteC1]", variable has type "ProtoC1") [assignment]'] +Line 103: Unexpected errors ['protocols_class_objects.py:103: error: Incompatible types in assignment (expression has type "type[ConcreteC2]", variable has type "ProtoC1") [assignment]'] +Line 104: Unexpected errors ['protocols_class_objects.py:104: error: Incompatible types in assignment (expression has type "type[ConcreteC2]", variable has type "ProtoC2") [assignment]'] +Line 105: Unexpected errors ['protocols_class_objects.py:105: error: Incompatible types in assignment (expression has type "type[ConcreteC3]", variable has type "ProtoC1") [assignment]'] +""" diff --git a/conformance/results/mypy/protocols_definition.toml b/conformance/results/mypy/protocols_definition.toml index 36816554e..47d7e5c1b 100644 --- a/conformance/results/mypy/protocols_definition.toml +++ b/conformance/results/mypy/protocols_definition.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not detect protocol mismatch if concrete method is missing annotations. +notes = """Does not detect protocol mismatch if concrete method is missing annotations. Does not detect protocol mismatch if concrete method's parameters are position-only. """ output = """ @@ -52,3 +51,24 @@ protocols_definition.py:340: note: Protocol member Template6.val1 expected setta protocols_definition.py:341: error: Incompatible types in assignment (expression has type "Concrete6_Bad3", variable has type "Template6") [assignment] protocols_definition.py:341: note: Protocol member Template6.val1 expected settable variable, got read-only attribute """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['protocols_definition.py:30: error: List item 0 has incompatible type "int"; expected "SupportsClose" [list-item]'] +Line 67: Unexpected errors ['protocols_definition.py:67: error: Protocol members cannot be defined via assignment to self [misc]', 'protocols_definition.py:67: error: "Template" has no attribute "temp" [attr-defined]'] +Line 114: Unexpected errors ['protocols_definition.py:114: error: Incompatible types in assignment (expression has type "Concrete2_Bad1", variable has type "Template2") [assignment]'] +Line 115: Unexpected errors ['protocols_definition.py:115: error: Incompatible types in assignment (expression has type "Concrete2_Bad2", variable has type "Template2") [assignment]'] +Line 116: Unexpected errors ['protocols_definition.py:116: error: Incompatible types in assignment (expression has type "Concrete2_Bad3", variable has type "Template2") [assignment]'] +Line 117: Unexpected errors ['protocols_definition.py:117: error: Incompatible types in assignment (expression has type "Concrete2_Bad4", variable has type "Template2") [assignment]'] +Line 156: Unexpected errors ['protocols_definition.py:156: error: Incompatible types in assignment (expression has type "Concrete3_Bad1", variable has type "Template3") [assignment]'] +Line 157: Unexpected errors ['protocols_definition.py:157: error: Incompatible types in assignment (expression has type "Concrete3_Bad2", variable has type "Template3") [assignment]'] +Line 158: Unexpected errors ['protocols_definition.py:158: error: Incompatible types in assignment (expression has type "Concrete3_Bad3", variable has type "Template3") [assignment]'] +Line 159: Unexpected errors ['protocols_definition.py:159: error: Incompatible types in assignment (expression has type "Concrete3_Bad4", variable has type "Template3") [assignment]'] +Line 160: Unexpected errors ['protocols_definition.py:160: error: Incompatible types in assignment (expression has type "Concrete3_Bad5", variable has type "Template3") [assignment]'] +Line 218: Unexpected errors ['protocols_definition.py:218: error: Incompatible types in assignment (expression has type "Concrete4_Bad1", variable has type "Template4") [assignment]'] +Line 219: Unexpected errors ['protocols_definition.py:219: error: Incompatible types in assignment (expression has type "Concrete4_Bad2", variable has type "Template4") [assignment]'] +Line 287: Unexpected errors ['protocols_definition.py:287: error: Incompatible types in assignment (expression has type "Concrete5_Bad3", variable has type "Template5") [assignment]'] +Line 289: Unexpected errors ['protocols_definition.py:289: error: Incompatible types in assignment (expression has type "Concrete5_Bad5", variable has type "Template5") [assignment]'] +Line 339: Unexpected errors ['protocols_definition.py:339: error: Incompatible types in assignment (expression has type "Concrete6_Bad1", variable has type "Template6") [assignment]'] +Line 340: Unexpected errors ['protocols_definition.py:340: error: Incompatible types in assignment (expression has type "Concrete6_Bad2", variable has type "Template6") [assignment]'] +Line 341: Unexpected errors ['protocols_definition.py:341: error: Incompatible types in assignment (expression has type "Concrete6_Bad3", variable has type "Template6") [assignment]'] +""" diff --git a/conformance/results/mypy/protocols_explicit.toml b/conformance/results/mypy/protocols_explicit.toml index bc10278ed..a9202b710 100644 --- a/conformance/results/mypy/protocols_explicit.toml +++ b/conformance/results/mypy/protocols_explicit.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not report unimplemented attributes for class that explicitly derives from protocol until it is instantiated. +notes = """Does not report unimplemented attributes for class that explicitly derives from protocol until it is instantiated. """ output = """ protocols_explicit.py:27: error: Call to abstract method "draw" of "PColor" with trivial body via super() is unsafe [safe-super] @@ -11,3 +10,13 @@ protocols_explicit.py:104: error: Cannot instantiate abstract class "Concrete3" protocols_explicit.py:129: error: Cannot instantiate abstract class "Concrete5" with abstract attribute "method1" [abstract] protocols_explicit.py:159: error: Cannot instantiate abstract class "Concrete7A" with abstract attribute "method1" [abstract] """ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Unexpected errors ['protocols_explicit.py:27: error: Call to abstract method "draw" of "PColor" with trivial body via super() is unsafe [safe-super]'] +Line 56: Unexpected errors ['protocols_explicit.py:56: error: Incompatible types in assignment (expression has type "tuple[int, int, str]", base class "RGB" defined the type as "tuple[int, int, int]") [assignment]'] +Line 59: Unexpected errors ['protocols_explicit.py:59: error: Cannot instantiate abstract class "Point" with abstract attributes "intensity", "other" and "transparency" [abstract]'] +Line 86: Unexpected errors ['protocols_explicit.py:86: error: Cannot instantiate abstract class "Concrete1" with abstract attributes "cm1" and "im1" [abstract]'] +Line 104: Unexpected errors ['protocols_explicit.py:104: error: Cannot instantiate abstract class "Concrete3" with abstract attributes "cm10", "cm11" and "im1" [abstract]'] +Line 129: Unexpected errors ['protocols_explicit.py:129: error: Cannot instantiate abstract class "Concrete5" with abstract attribute "method1" [abstract]'] +Line 159: Unexpected errors ['protocols_explicit.py:159: error: Cannot instantiate abstract class "Concrete7A" with abstract attribute "method1" [abstract]'] +""" diff --git a/conformance/results/mypy/protocols_generic.toml b/conformance/results/mypy/protocols_generic.toml index 586b695fe..897848493 100644 --- a/conformance/results/mypy/protocols_generic.toml +++ b/conformance/results/mypy/protocols_generic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Fails protocol matching when method-scoped TypeVar is used in protocol. +notes = """Fails protocol matching when method-scoped TypeVar is used in protocol. """ output = """ protocols_generic.py:40: error: Incompatible types in assignment (expression has type "Concrete1", variable has type "Proto1[int, str]") [assignment] @@ -39,3 +38,15 @@ protocols_generic.py:147: note: def [T] m(self, item: T, callback: Calla protocols_generic.py:147: note: Got: protocols_generic.py:147: note: def m(self, item: str, callback: Callable[[int], str]) -> str """ +conformance_automated = "Fail" +errors_diff = """ +Line 40: Unexpected errors ['protocols_generic.py:40: error: Incompatible types in assignment (expression has type "Concrete1", variable has type "Proto1[int, str]") [assignment]'] +Line 44: Unexpected errors ['protocols_generic.py:44: error: Only single Generic[...] or Protocol[...] can be in bases [misc]', 'protocols_generic.py:44: error: Duplicate type variables in Generic[...] or Protocol[...] [misc]'] +Line 56: Unexpected errors ['protocols_generic.py:56: error: Incompatible types in assignment (expression has type "Box[float]", variable has type "Box[int]") [assignment]'] +Line 66: Unexpected errors ['protocols_generic.py:66: error: Incompatible types in assignment (expression has type "Sender[int]", variable has type "Sender[float]") [assignment]'] +Line 74: Unexpected errors ['protocols_generic.py:74: error: Incompatible types in assignment (expression has type "AttrProto[int]", variable has type "AttrProto[float]") [assignment]'] +Line 75: Unexpected errors ['protocols_generic.py:75: error: Incompatible types in assignment (expression has type "AttrProto[float]", variable has type "AttrProto[int]") [assignment]'] +Line 145: Unexpected errors ['protocols_generic.py:145: error: Incompatible types in assignment (expression has type "ConcreteHasProperty2", variable has type "HasPropertyProto") [assignment]'] +Line 146: Unexpected errors ['protocols_generic.py:146: error: Incompatible types in assignment (expression has type "ConcreteHasProperty3", variable has type "HasPropertyProto") [assignment]'] +Line 147: Unexpected errors ['protocols_generic.py:147: error: Incompatible types in assignment (expression has type "ConcreteHasProperty4", variable has type "HasPropertyProto") [assignment]'] +""" diff --git a/conformance/results/mypy/protocols_merging.toml b/conformance/results/mypy/protocols_merging.toml index 5433425a6..3526c5b62 100644 --- a/conformance/results/mypy/protocols_merging.toml +++ b/conformance/results/mypy/protocols_merging.toml @@ -11,3 +11,12 @@ protocols_merging.py:68: error: All bases of a protocol must be protocols [misc protocols_merging.py:83: error: Cannot instantiate abstract class "SizedAndClosable4" with abstract attribute "close" [abstract] protocols_merging.py:84: error: Incompatible types in assignment (expression has type "SCConcrete1", variable has type "SizedAndClosable4") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 52: Unexpected errors ['protocols_merging.py:52: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable1") [assignment]'] +Line 53: Unexpected errors ['protocols_merging.py:53: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable2") [assignment]'] +Line 54: Unexpected errors ['protocols_merging.py:54: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable3") [assignment]'] +Line 68: Unexpected errors ['protocols_merging.py:68: error: All bases of a protocol must be protocols [misc]'] +Line 83: Unexpected errors ['protocols_merging.py:83: error: Cannot instantiate abstract class "SizedAndClosable4" with abstract attribute "close" [abstract]'] +Line 84: Unexpected errors ['protocols_merging.py:84: error: Incompatible types in assignment (expression has type "SCConcrete1", variable has type "SizedAndClosable4") [assignment]'] +""" diff --git a/conformance/results/mypy/protocols_modules.toml b/conformance/results/mypy/protocols_modules.toml index def330375..a162f2e12 100644 --- a/conformance/results/mypy/protocols_modules.toml +++ b/conformance/results/mypy/protocols_modules.toml @@ -11,3 +11,9 @@ protocols_modules.py:48: note: Got: protocols_modules.py:48: note: def on_error(x: int) -> None protocols_modules.py:49: error: Incompatible types in assignment (expression has type Module, variable has type "Reporter3") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['protocols_modules.py:26: error: Incompatible types in assignment (expression has type Module, variable has type "Options2") [assignment]'] +Line 48: Unexpected errors ['protocols_modules.py:48: error: Incompatible types in assignment (expression has type Module, variable has type "Reporter2") [assignment]'] +Line 49: Unexpected errors ['protocols_modules.py:49: error: Incompatible types in assignment (expression has type Module, variable has type "Reporter3") [assignment]'] +""" diff --git a/conformance/results/mypy/protocols_recursive.toml b/conformance/results/mypy/protocols_recursive.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/protocols_recursive.toml +++ b/conformance/results/mypy/protocols_recursive.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/protocols_runtime_checkable.toml b/conformance/results/mypy/protocols_runtime_checkable.toml index dfcfd7c4b..15907d23a 100644 --- a/conformance/results/mypy/protocols_runtime_checkable.toml +++ b/conformance/results/mypy/protocols_runtime_checkable.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report unsafe overlap for runtime_checkable protocol. +notes = """Does not report unsafe overlap for runtime_checkable protocol. """ output = """ protocols_runtime_checkable.py:23: error: Only @runtime_checkable protocols can be used with instance and class checks [misc] @@ -9,3 +8,9 @@ protocols_runtime_checkable.py:55: note: Protocol "DataProtocol" has non-method protocols_runtime_checkable.py:61: error: Only protocols that don't have non-method members can be used with issubclass() [misc] protocols_runtime_checkable.py:61: note: Protocol "DataProtocol" has non-method member(s): name """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['protocols_runtime_checkable.py:23: error: Only @runtime_checkable protocols can be used with instance and class checks [misc]'] +Line 55: Unexpected errors ["protocols_runtime_checkable.py:55: error: Only protocols that don't have non-method members can be used with issubclass() [misc]"] +Line 61: Unexpected errors ["protocols_runtime_checkable.py:61: error: Only protocols that don't have non-method members can be used with issubclass() [misc]"] +""" diff --git a/conformance/results/mypy/protocols_self.toml b/conformance/results/mypy/protocols_self.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/protocols_self.toml +++ b/conformance/results/mypy/protocols_self.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/protocols_subtyping.toml b/conformance/results/mypy/protocols_subtyping.toml index 926a57c52..40f37c3bb 100644 --- a/conformance/results/mypy/protocols_subtyping.toml +++ b/conformance/results/mypy/protocols_subtyping.toml @@ -10,3 +10,13 @@ protocols_subtyping.py:80: error: Incompatible types in assignment (expression h protocols_subtyping.py:102: error: Incompatible types in assignment (expression has type "Proto6[float, float]", variable has type "Proto7[int, float]") [assignment] protocols_subtyping.py:103: error: Incompatible types in assignment (expression has type "Proto6[float, float]", variable has type "Proto7[float, object]") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['protocols_subtyping.py:16: error: Cannot instantiate protocol class "Proto1" [misc]'] +Line 38: Unexpected errors ['protocols_subtyping.py:38: error: Incompatible types in assignment (expression has type "Proto2", variable has type "Concrete2") [assignment]'] +Line 55: Unexpected errors ['protocols_subtyping.py:55: error: Incompatible types in assignment (expression has type "Proto2", variable has type "Proto3") [assignment]'] +Line 79: Unexpected errors ['protocols_subtyping.py:79: error: Incompatible types in assignment (expression has type "Proto5[int]", variable has type "Proto4[int, float]") [assignment]'] +Line 80: Unexpected errors ['protocols_subtyping.py:80: error: Incompatible types in assignment (expression has type "Proto4[int, int]", variable has type "Proto5[float]") [assignment]'] +Line 102: Unexpected errors ['protocols_subtyping.py:102: error: Incompatible types in assignment (expression has type "Proto6[float, float]", variable has type "Proto7[int, float]") [assignment]'] +Line 103: Unexpected errors ['protocols_subtyping.py:103: error: Incompatible types in assignment (expression has type "Proto6[float, float]", variable has type "Proto7[float, object]") [assignment]'] +""" diff --git a/conformance/results/mypy/protocols_variance.toml b/conformance/results/mypy/protocols_variance.toml index 63f5ba01b..d0c4a6122 100644 --- a/conformance/results/mypy/protocols_variance.toml +++ b/conformance/results/mypy/protocols_variance.toml @@ -10,3 +10,15 @@ protocols_variance.py:71: error: Contravariant type variable "T1_contra" used in protocols_variance.py:72: error: Cannot use a contravariant type variable as return type [misc] protocols_variance.py:104: error: Invariant type variable "T1" used in protocol where covariant one is expected [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['protocols_variance.py:21: error: Invariant type variable "T1" used in protocol where covariant one is expected [misc]'] +Line 40: Unexpected errors ['protocols_variance.py:40: error: Invariant type variable "T3" used in protocol where contravariant one is expected [misc]'] +Line 56: Unexpected errors ['protocols_variance.py:56: error: Invariant type variable "T1" used in protocol where contravariant one is expected [misc]'] +Line 61: Unexpected errors ['protocols_variance.py:61: error: Covariant type variable "T1_co" used in protocol where contravariant one is expected [misc]'] +Line 62: Unexpected errors ['protocols_variance.py:62: error: Cannot use a covariant type variable as a parameter [misc]'] +Line 66: Unexpected errors ['protocols_variance.py:66: error: Invariant type variable "T1" used in protocol where covariant one is expected [misc]'] +Line 71: Unexpected errors ['protocols_variance.py:71: error: Contravariant type variable "T1_contra" used in protocol where covariant one is expected [misc]'] +Line 72: Unexpected errors ['protocols_variance.py:72: error: Cannot use a contravariant type variable as return type [misc]'] +Line 104: Unexpected errors ['protocols_variance.py:104: error: Invariant type variable "T1" used in protocol where covariant one is expected [misc]'] +""" diff --git a/conformance/results/mypy/qualifiers_annotated.toml b/conformance/results/mypy/qualifiers_annotated.toml index 87f8d278f..1c9dd9b13 100644 --- a/conformance/results/mypy/qualifiers_annotated.toml +++ b/conformance/results/mypy/qualifiers_annotated.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not allow ClassVar to be nested within Annotated. +notes = """Does not allow ClassVar to be nested within Annotated. Does not allow Final to be nested within Annotated. Does not allow Required and NotRequired to be nested within Annotated. Does not reject type[T] compatibility for type alias defined with Annotated. @@ -32,3 +31,28 @@ qualifiers_annotated.py:112: error: NotRequired[] can be only used in a TypedDic qualifiers_annotated.py:119: error: Cannot redefine "T" as a type variable [misc] qualifiers_annotated.py:119: error: Invalid assignment target [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 43: Unexpected errors ['qualifiers_annotated.py:43: error: Bracketed expression "[...]" is not valid as a type [valid-type]'] +Line 44: Unexpected errors ['qualifiers_annotated.py:44: error: Syntax error in type annotation [syntax]'] +Line 45: Unexpected errors ['qualifiers_annotated.py:45: error: Invalid type comment or annotation [valid-type]'] +Line 46: Unexpected errors ['qualifiers_annotated.py:46: error: Invalid type comment or annotation [valid-type]'] +Line 47: Unexpected errors ['qualifiers_annotated.py:47: error: Invalid type comment or annotation [valid-type]'] +Line 48: Unexpected errors ['qualifiers_annotated.py:48: error: Invalid type comment or annotation [valid-type]'] +Line 49: Unexpected errors ['qualifiers_annotated.py:49: error: Invalid type comment or annotation [valid-type]'] +Line 50: Unexpected errors ['qualifiers_annotated.py:50: error: Name "var1" is not defined [name-defined]'] +Line 51: Unexpected errors ['qualifiers_annotated.py:51: error: Invalid type: try using Literal[True] instead? [valid-type]'] +Line 52: Unexpected errors ['qualifiers_annotated.py:52: error: Invalid type: try using Literal[1] instead? [valid-type]'] +Line 53: Unexpected errors ['qualifiers_annotated.py:53: error: Invalid type comment or annotation [valid-type]'] +Line 54: Unexpected errors ['qualifiers_annotated.py:54: error: Invalid type comment or annotation [valid-type]'] +Line 64: Unexpected errors ['qualifiers_annotated.py:64: error: Annotated[...] must have exactly one type argument and at least one annotation [valid-type]'] +Line 76: Unexpected errors ['qualifiers_annotated.py:76: error: Incompatible types in assignment (expression has type "object", variable has type "type[Any]") [assignment]'] +Line 84: Unexpected errors ['qualifiers_annotated.py:84: error: Argument 1 to "func4" has incompatible type "object"; expected "type[Never]" [arg-type]'] +Line 91: Unexpected errors ['qualifiers_annotated.py:91: error: "" not callable [operator]'] +Line 92: Unexpected errors ['qualifiers_annotated.py:92: error: "object" not callable [operator]'] +Line 98: Unexpected errors ['qualifiers_annotated.py:98: error: Invalid type: ClassVar nested inside other type [valid-type]'] +Line 100: Unexpected errors ['qualifiers_annotated.py:100: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] +Line 110: Unexpected errors ['qualifiers_annotated.py:110: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 112: Unexpected errors ['qualifiers_annotated.py:112: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 119: Unexpected errors ['qualifiers_annotated.py:119: error: Cannot redefine "T" as a type variable [misc]', 'qualifiers_annotated.py:119: error: Invalid assignment target [misc]'] +""" diff --git a/conformance/results/mypy/qualifiers_final_annotation.toml b/conformance/results/mypy/qualifiers_final_annotation.toml index f5295752e..69368d610 100644 --- a/conformance/results/mypy/qualifiers_final_annotation.toml +++ b/conformance/results/mypy/qualifiers_final_annotation.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition. +notes = """Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition. Does not allow conditional assignment of Final instance variable in __init__ method. Does not allow redefinition of private class variable that is marked Final in parent class. Does not report modification of local Final variable via "for" statement. @@ -36,3 +35,33 @@ qualifiers_final_annotation.py:147: error: Cannot assign to final name "x" [mis qualifiers_final_annotation.py:152: error: Incompatible types in assignment (expression has type "TextIOWrapper", variable has type "int") [assignment] qualifiers_final_annotation.py:155: error: Cannot assign to final name "x" [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['qualifiers_final_annotation.py:16: error: Type in Final[...] can only be omitted if there is an initializer [misc]'] +Line 18: Unexpected errors ['qualifiers_final_annotation.py:18: error: Final[...] takes at most one type argument [misc]'] +Line 34: Unexpected errors ['qualifiers_final_annotation.py:34: error: Type in Final[...] can only be omitted if there is an initializer [misc]'] +Line 38: Unexpected errors ['qualifiers_final_annotation.py:38: error: Final name must be initialized with a value [misc]'] +Line 54: Unexpected errors ['qualifiers_final_annotation.py:54: error: Cannot assign to final attribute "ID5" [misc]'] +Line 59: Unexpected errors ['qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" [misc]'] +Line 62: Unexpected errors ['qualifiers_final_annotation.py:62: error: Can only declare a final attribute in class body or __init__ [misc]'] +Line 63: Unexpected errors ['qualifiers_final_annotation.py:63: error: Can only declare a final attribute in class body or __init__ [misc]'] +Line 65: Unexpected errors ['qualifiers_final_annotation.py:65: error: Cannot assign to final attribute "ID7" [misc]'] +Line 67: Unexpected errors ['qualifiers_final_annotation.py:67: error: Cannot assign to final attribute "ID7" [misc]'] +Line 71: Unexpected errors ['qualifiers_final_annotation.py:71: error: Cannot assign to final name "RATE" [misc]'] +Line 81: Unexpected errors ['qualifiers_final_annotation.py:81: error: Cannot assign to final attribute "DEFAULT_ID" [misc]'] +Line 94: Unexpected errors ['qualifiers_final_annotation.py:94: error: Cannot assign to final name "BORDER_WIDTH" [misc]'] +Line 96: Unexpected errors ['qualifiers_final_annotation.py:96: error: Cannot assign to final name "__private" [misc]'] +Line 107: Unexpected errors ['qualifiers_final_annotation.py:107: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] +Line 108: Unexpected errors ['qualifiers_final_annotation.py:108: error: Variable should not be annotated with both ClassVar and Final [misc]'] +Line 118: Unexpected errors ['qualifiers_final_annotation.py:118: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] +Line 121: Unexpected errors ['qualifiers_final_annotation.py:121: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] +Line 131: Unexpected errors ['qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name [misc]'] +Line 133: Unexpected errors ['qualifiers_final_annotation.py:133: error: Unexpected keyword argument "x" for "N" [call-arg]', 'qualifiers_final_annotation.py:133: error: Unexpected keyword argument "y" for "N" [call-arg]'] +Line 134: Unexpected errors ['qualifiers_final_annotation.py:134: error: Unexpected keyword argument "a" for "N" [call-arg]'] +Line 135: Unexpected errors ['qualifiers_final_annotation.py:135: error: Unexpected keyword argument "x" for "N" [call-arg]', 'qualifiers_final_annotation.py:135: error: Unexpected keyword argument "y" for "N" [call-arg]'] +Line 141: Unexpected errors ['qualifiers_final_annotation.py:141: error: Cannot assign to final name "ID1" [misc]'] +Line 145: Unexpected errors ['qualifiers_final_annotation.py:145: error: Cannot assign to final name "x" [misc]'] +Line 147: Unexpected errors ['qualifiers_final_annotation.py:147: error: Cannot assign to final name "x" [misc]'] +Line 152: Unexpected errors ['qualifiers_final_annotation.py:152: error: Incompatible types in assignment (expression has type "TextIOWrapper", variable has type "int") [assignment]'] +Line 155: Unexpected errors ['qualifiers_final_annotation.py:155: error: Cannot assign to final name "x" [misc]'] +""" diff --git a/conformance/results/mypy/qualifiers_final_decorator.toml b/conformance/results/mypy/qualifiers_final_decorator.toml index 114785bd1..7fa6d163e 100644 --- a/conformance/results/mypy/qualifiers_final_decorator.toml +++ b/conformance/results/mypy/qualifiers_final_decorator.toml @@ -16,3 +16,16 @@ qualifiers_final_decorator.py:118: note: Subclass: qualifiers_final_decorator.py:118: note: def method(self) -> None qualifiers_final_decorator.py:125: error: @final cannot be used with non-method functions [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['qualifiers_final_decorator.py:21: error: Cannot inherit from final class "Base1" [misc]'] +Line 56: Unexpected errors ['qualifiers_final_decorator.py:56: error: Cannot override final attribute "method1" (previously declared in base class "Base2") [misc]'] +Line 59: Unexpected errors ['qualifiers_final_decorator.py:59: error: Cannot override final attribute "method2" (previously declared in base class "Base2") [misc]'] +Line 63: Unexpected errors ['qualifiers_final_decorator.py:63: error: Cannot override final attribute "method3" (previously declared in base class "Base2") [misc]'] +Line 67: Unexpected errors ['qualifiers_final_decorator.py:67: error: Cannot override final attribute "method4" (previously declared in base class "Base2") [misc]'] +Line 80: Unexpected errors ['qualifiers_final_decorator.py:80: error: Cannot override final attribute "method" (previously declared in base class "Base3") [misc]'] +Line 84: Unexpected errors ['qualifiers_final_decorator.py:84: error: @final should be applied only to overload implementation [misc]'] +Line 94: Unexpected errors ['qualifiers_final_decorator.py:94: error: Cannot override final attribute "method" (previously declared in base class "Base4") [misc]'] +Line 118: Unexpected errors ['qualifiers_final_decorator.py:118: error: Cannot override final attribute "method" (previously declared in base class "Base5_2") [misc]', 'qualifiers_final_decorator.py:118: error: Signature of "method" incompatible with supertype "Base5_2" [override]'] +Line 125: Unexpected errors ['qualifiers_final_decorator.py:125: error: @final cannot be used with non-method functions [misc]'] +""" diff --git a/conformance/results/mypy/specialtypes_any.toml b/conformance/results/mypy/specialtypes_any.toml index d79075e53..83fecccc9 100644 --- a/conformance/results/mypy/specialtypes_any.toml +++ b/conformance/results/mypy/specialtypes_any.toml @@ -3,3 +3,6 @@ output = """ specialtypes_any.py:37: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] specialtypes_any.py:38: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/specialtypes_never.toml b/conformance/results/mypy/specialtypes_never.toml index 69fbd42c9..70fc5420b 100644 --- a/conformance/results/mypy/specialtypes_never.toml +++ b/conformance/results/mypy/specialtypes_never.toml @@ -6,3 +6,9 @@ specialtypes_never.py:85: note: "List" is invariant -- see https://mypy.readthed specialtypes_never.py:85: note: Consider using "Sequence" instead, which is covariant specialtypes_never.py:104: error: Incompatible return value type (got "ClassC[NoReturn]", expected "ClassC[U]") [return-value] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['specialtypes_never.py:19: error: Implicit return in function which does not return [misc]'] +Line 85: Unexpected errors ['specialtypes_never.py:85: error: Incompatible types in assignment (expression has type "list[NoReturn]", variable has type "list[int]") [assignment]'] +Line 104: Unexpected errors ['specialtypes_never.py:104: error: Incompatible return value type (got "ClassC[NoReturn]", expected "ClassC[U]") [return-value]'] +""" diff --git a/conformance/results/mypy/specialtypes_none.toml b/conformance/results/mypy/specialtypes_none.toml index 3730e8547..d8f1df10a 100644 --- a/conformance/results/mypy/specialtypes_none.toml +++ b/conformance/results/mypy/specialtypes_none.toml @@ -4,3 +4,9 @@ specialtypes_none.py:21: error: Argument 1 to "func1" has incompatible type "typ specialtypes_none.py:27: error: Incompatible types in assignment (expression has type "None", variable has type "Iterable[Any]") [assignment] specialtypes_none.py:41: error: Argument 1 to "func2" has incompatible type "None"; expected "type[None]" [arg-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['specialtypes_none.py:21: error: Argument 1 to "func1" has incompatible type "type[None]"; expected "None" [arg-type]'] +Line 27: Unexpected errors ['specialtypes_none.py:27: error: Incompatible types in assignment (expression has type "None", variable has type "Iterable[Any]") [assignment]'] +Line 41: Unexpected errors ['specialtypes_none.py:41: error: Argument 1 to "func2" has incompatible type "None"; expected "type[None]" [arg-type]'] +""" diff --git a/conformance/results/mypy/specialtypes_promotions.toml b/conformance/results/mypy/specialtypes_promotions.toml index 60e34faf9..f942709ca 100644 --- a/conformance/results/mypy/specialtypes_promotions.toml +++ b/conformance/results/mypy/specialtypes_promotions.toml @@ -2,3 +2,7 @@ conformant = "Pass" output = """ specialtypes_promotions.py:13: error: "float" has no attribute "numerator" [attr-defined] """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['specialtypes_promotions.py:13: error: "float" has no attribute "numerator" [attr-defined]'] +""" diff --git a/conformance/results/mypy/specialtypes_type.toml b/conformance/results/mypy/specialtypes_type.toml index 474c3e4a4..ba6626384 100644 --- a/conformance/results/mypy/specialtypes_type.toml +++ b/conformance/results/mypy/specialtypes_type.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not treat `type` same as `type[Any]` for assert_type. +notes = """Does not treat `type` same as `type[Any]` for assert_type. Does not allow access to unknown attributes from object of type `type[Any]`. """ output = """ @@ -18,3 +17,19 @@ specialtypes_type.py:144: error: "" has no attribute "unkno specialtypes_type.py:145: error: "type[type]" has no attribute "unknown" [attr-defined] specialtypes_type.py:146: error: "" has no attribute "unknown" [attr-defined] """ +conformance_automated = "Fail" +errors_diff = """ +Line 56: Unexpected errors ['specialtypes_type.py:56: error: Argument 1 to "func4" has incompatible type "type[TeamUser]"; expected "type[BasicUser] | type[ProUser]" [arg-type]'] +Line 70: Unexpected errors ['specialtypes_type.py:70: error: Argument 1 to "func5" has incompatible type ""; expected "type[Never]" [arg-type]'] +Line 76: Unexpected errors ['specialtypes_type.py:76: error: type[...] must have exactly one type argument [valid-type]'] +Line 84: Unexpected errors ['specialtypes_type.py:84: error: Expression is of type "type", not "type[Any]" [assert-type]'] +Line 99: Unexpected errors ['specialtypes_type.py:99: error: "type" has no attribute "unknown" [attr-defined]'] +Line 100: Unexpected errors ['specialtypes_type.py:100: error: "type" has no attribute "unknown" [attr-defined]'] +Line 117: Unexpected errors ['specialtypes_type.py:117: error: "type[object]" has no attribute "unknown" [attr-defined]'] +Line 120: Unexpected errors ['specialtypes_type.py:120: error: "type[object]" has no attribute "unknown" [attr-defined]'] +Line 139: Unexpected errors ['specialtypes_type.py:139: error: Expression is of type "type", not "type[Any]" [assert-type]'] +Line 143: Unexpected errors ['specialtypes_type.py:143: error: "" has no attribute "unknown" [attr-defined]'] +Line 144: Unexpected errors ['specialtypes_type.py:144: error: "" has no attribute "unknown" [attr-defined]'] +Line 145: Unexpected errors ['specialtypes_type.py:145: error: "type[type]" has no attribute "unknown" [attr-defined]'] +Line 146: Unexpected errors ['specialtypes_type.py:146: error: "" has no attribute "unknown" [attr-defined]'] +""" diff --git a/conformance/results/mypy/tuples_type_compat.toml b/conformance/results/mypy/tuples_type_compat.toml index bf52420ea..ef64c2fe7 100644 --- a/conformance/results/mypy/tuples_type_compat.toml +++ b/conformance/results/mypy/tuples_type_compat.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not support tuple narrowing based on `len()` type guard (optional). +notes = """Does not support tuple narrowing based on `len()` type guard (optional). Incorrectly narrows tuple based on sequence patterns. """ output = """ @@ -27,3 +26,28 @@ tuples_type_compat.py:168: error: Incompatible types in assignment (expression h tuples_type_compat.py:171: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[str, str, str, *tuple[str, ...]]") [assignment] tuples_type_compat.py:175: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[*tuple[str, ...], str, str, str]") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['tuples_type_compat.py:15: error: Incompatible types in assignment (expression has type "tuple[float, complex]", variable has type "tuple[int, int]") [assignment]'] +Line 29: Unexpected errors ['tuples_type_compat.py:29: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int, *tuple[int, ...]]") [assignment]'] +Line 32: Unexpected errors ['tuples_type_compat.py:32: error: Incompatible types in assignment (expression has type "tuple[int, *tuple[int, ...]]", variable has type "tuple[int]") [assignment]'] +Line 33: Unexpected errors ['tuples_type_compat.py:33: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int]") [assignment]'] +Line 43: Unexpected errors ['tuples_type_compat.py:43: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int]") [assignment]'] +Line 62: Unexpected errors ['tuples_type_compat.py:62: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int, int]") [assignment]'] +Line 95: Unexpected errors ['tuples_type_compat.py:95: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int]" [assert-type]'] +Line 99: Unexpected errors ['tuples_type_compat.py:99: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[str, str] | tuple[int, int]" [assert-type]'] +Line 103: Unexpected errors ['tuples_type_compat.py:103: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int, str, int]" [assert-type]'] +Line 117: Unexpected errors ['tuples_type_compat.py:117: error: Expression is of type "tuple[Never, int]", not "tuple[int | str, int]" [assert-type]'] +Line 136: Unexpected errors ['tuples_type_compat.py:136: error: Expression is of type "Sequence[object]", not "Sequence[complex | list[int]]" [assert-type]'] +Line 139: Unexpected errors ['tuples_type_compat.py:139: error: Expression is of type "Sequence[object]", not "Sequence[int | str]" [assert-type]'] +Line 144: Unexpected errors ['tuples_type_compat.py:144: error: Incompatible types in assignment (expression has type "tuple[int, str, str]", variable has type "tuple[int, str]") [assignment]'] +Line 149: Unexpected errors ['tuples_type_compat.py:149: error: Incompatible types in assignment (expression has type "tuple[int, int, str]", variable has type "tuple[int, *tuple[str, ...]]") [assignment]'] +Line 150: Unexpected errors ['tuples_type_compat.py:150: error: Incompatible types in assignment (expression has type "tuple[int, str, int]", variable has type "tuple[int, *tuple[str, ...]]") [assignment]'] +Line 156: Unexpected errors ['tuples_type_compat.py:156: error: Incompatible types in assignment (expression has type "tuple[int, str, str]", variable has type "tuple[int, *tuple[str, ...], int]") [assignment]'] +Line 157: Unexpected errors ['tuples_type_compat.py:157: error: Incompatible types in assignment (expression has type "tuple[int, str, str, float]", variable has type "tuple[int, *tuple[str, ...], int]") [assignment]'] +Line 162: Unexpected errors ['tuples_type_compat.py:162: error: Incompatible types in assignment (expression has type "tuple[int, str, int]", variable has type "tuple[*tuple[str, ...], int]") [assignment]'] +Line 163: Unexpected errors ['tuples_type_compat.py:163: error: Incompatible types in assignment (expression has type "tuple[str, str, float]", variable has type "tuple[*tuple[str, ...], int]") [assignment]'] +Line 168: Unexpected errors ['tuples_type_compat.py:168: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[str, str, int]") [assignment]'] +Line 171: Unexpected errors ['tuples_type_compat.py:171: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[str, str, str, *tuple[str, ...]]") [assignment]'] +Line 175: Unexpected errors ['tuples_type_compat.py:175: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[*tuple[str, ...], str, str, str]") [assignment]'] +""" diff --git a/conformance/results/mypy/tuples_type_form.toml b/conformance/results/mypy/tuples_type_form.toml index 3d7749ade..c556eb810 100644 --- a/conformance/results/mypy/tuples_type_form.toml +++ b/conformance/results/mypy/tuples_type_form.toml @@ -12,3 +12,17 @@ tuples_type_form.py:43: error: Unexpected "..." [misc] tuples_type_form.py:44: error: Unpack is only valid in a variadic position [valid-type] tuples_type_form.py:45: error: Unpack is only valid in a variadic position [valid-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['tuples_type_form.py:12: error: Incompatible types in assignment (expression has type "tuple[int, int]", variable has type "tuple[int]") [assignment]'] +Line 14: Unexpected errors ['tuples_type_form.py:14: error: Incompatible types in assignment (expression has type "tuple[int]", variable has type "tuple[int, int]") [assignment]'] +Line 15: Unexpected errors ['tuples_type_form.py:15: error: Incompatible types in assignment (expression has type "tuple[int, str]", variable has type "tuple[int, int]") [assignment]'] +Line 25: Unexpected errors ['tuples_type_form.py:25: error: Incompatible types in assignment (expression has type "tuple[int]", variable has type "tuple[()]") [assignment]'] +Line 36: Unexpected errors ['tuples_type_form.py:36: error: Incompatible types in assignment (expression has type "tuple[int, int, int, str]", variable has type "tuple[int, ...]") [assignment]'] +Line 40: Unexpected errors ['tuples_type_form.py:40: error: Unexpected "..." [misc]'] +Line 41: Unexpected errors ['tuples_type_form.py:41: error: Unexpected "..." [misc]'] +Line 42: Unexpected errors ['tuples_type_form.py:42: error: Unexpected "..." [misc]'] +Line 43: Unexpected errors ['tuples_type_form.py:43: error: Unexpected "..." [misc]'] +Line 44: Unexpected errors ['tuples_type_form.py:44: error: Unpack is only valid in a variadic position [valid-type]'] +Line 45: Unexpected errors ['tuples_type_form.py:45: error: Unpack is only valid in a variadic position [valid-type]'] +""" diff --git a/conformance/results/mypy/tuples_unpacked.toml b/conformance/results/mypy/tuples_unpacked.toml index 7045e47c8..a5ab438d2 100644 --- a/conformance/results/mypy/tuples_unpacked.toml +++ b/conformance/results/mypy/tuples_unpacked.toml @@ -1,8 +1,11 @@ conformant = "Partial" -notes = """ -"More than one unpack" error is missing a line number. +notes = """"More than one unpack" error is missing a line number. """ output = """ tuples_unpacked.py: error: More than one Unpack in a type is not allowed [misc] tuples_unpacked.py:58: error: More than one Unpack in a type is not allowed [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 58: Unexpected errors ['tuples_unpacked.py:58: error: More than one Unpack in a type is not allowed [misc]'] +""" diff --git a/conformance/results/mypy/typeddicts_alt_syntax.toml b/conformance/results/mypy/typeddicts_alt_syntax.toml index 8d540eb0f..0e31b375a 100644 --- a/conformance/results/mypy/typeddicts_alt_syntax.toml +++ b/conformance/results/mypy/typeddicts_alt_syntax.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not support keyword-argument form of alternative syntax (deprecated in 3.11). +notes = """Does not support keyword-argument form of alternative syntax (deprecated in 3.11). """ output = """ typeddicts_alt_syntax.py:23: error: TypedDict() expects a dictionary literal as the second argument [misc] @@ -11,3 +10,13 @@ typeddicts_alt_syntax.py:41: error: Unexpected arguments to TypedDict() [misc] typeddicts_alt_syntax.py:44: error: Extra keys ("name", "year") for TypedDict "Movie2" [typeddict-unknown-key] typeddicts_alt_syntax.py:45: error: Extra keys ("name", "year") for TypedDict "Movie2" [typeddict-unknown-key] """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['typeddicts_alt_syntax.py:23: error: TypedDict() expects a dictionary literal as the second argument [misc]'] +Line 27: Unexpected errors ['typeddicts_alt_syntax.py:27: error: Invalid TypedDict() field name [misc]'] +Line 31: Unexpected errors ['typeddicts_alt_syntax.py:31: error: First argument "WrongName" to TypedDict() does not match variable name "BadTypedDict3" [name-match]'] +Line 35: Unexpected errors ['typeddicts_alt_syntax.py:35: error: Too many arguments for TypedDict() [misc]'] +Line 41: Unexpected errors ['typeddicts_alt_syntax.py:41: error: Unexpected arguments to TypedDict() [misc]'] +Line 44: Unexpected errors ['typeddicts_alt_syntax.py:44: error: Extra keys ("name", "year") for TypedDict "Movie2" [typeddict-unknown-key]'] +Line 45: Unexpected errors ['typeddicts_alt_syntax.py:45: error: Extra keys ("name", "year") for TypedDict "Movie2" [typeddict-unknown-key]'] +""" diff --git a/conformance/results/mypy/typeddicts_class_syntax.toml b/conformance/results/mypy/typeddicts_class_syntax.toml index 3b229c3dd..933a11e2d 100644 --- a/conformance/results/mypy/typeddicts_class_syntax.toml +++ b/conformance/results/mypy/typeddicts_class_syntax.toml @@ -6,3 +6,11 @@ typeddicts_class_syntax.py:38: error: Invalid statement in TypedDict definition; typeddicts_class_syntax.py:44: error: Unexpected keyword argument "metaclass" for "__init_subclass__" of "TypedDict" [call-arg] typeddicts_class_syntax.py:49: error: Unexpected keyword argument "other" for "__init_subclass__" of "TypedDict" [call-arg] """ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Unexpected errors ['typeddicts_class_syntax.py:29: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]'] +Line 33: Unexpected errors ['typeddicts_class_syntax.py:33: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]'] +Line 38: Unexpected errors ['typeddicts_class_syntax.py:38: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc]'] +Line 44: Unexpected errors ['typeddicts_class_syntax.py:44: error: Unexpected keyword argument "metaclass" for "__init_subclass__" of "TypedDict" [call-arg]'] +Line 49: Unexpected errors ['typeddicts_class_syntax.py:49: error: Unexpected keyword argument "other" for "__init_subclass__" of "TypedDict" [call-arg]'] +""" diff --git a/conformance/results/mypy/typeddicts_final.toml b/conformance/results/mypy/typeddicts_final.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/mypy/typeddicts_final.toml +++ b/conformance/results/mypy/typeddicts_final.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/mypy/typeddicts_inheritance.toml b/conformance/results/mypy/typeddicts_inheritance.toml index 231cc311e..ab863e9b7 100644 --- a/conformance/results/mypy/typeddicts_inheritance.toml +++ b/conformance/results/mypy/typeddicts_inheritance.toml @@ -4,3 +4,9 @@ typeddicts_inheritance.py:44: error: All bases of a new TypedDict must be TypedD typeddicts_inheritance.py:55: error: Overwriting TypedDict field "x" while extending [misc] typeddicts_inheritance.py:65: error: Overwriting TypedDict field "x" while merging [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 44: Unexpected errors ['typeddicts_inheritance.py:44: error: All bases of a new TypedDict must be TypedDict types [misc]'] +Line 55: Unexpected errors ['typeddicts_inheritance.py:55: error: Overwriting TypedDict field "x" while extending [misc]'] +Line 65: Unexpected errors ['typeddicts_inheritance.py:65: error: Overwriting TypedDict field "x" while merging [misc]'] +""" diff --git a/conformance/results/mypy/typeddicts_operations.toml b/conformance/results/mypy/typeddicts_operations.toml index 43718b8f1..004da4083 100644 --- a/conformance/results/mypy/typeddicts_operations.toml +++ b/conformance/results/mypy/typeddicts_operations.toml @@ -12,3 +12,17 @@ typeddicts_operations.py:47: error: "Movie" has no attribute "clear" [attr-defi typeddicts_operations.py:49: error: Key "name" of TypedDict "Movie" cannot be deleted [misc] typeddicts_operations.py:62: error: "MovieOptional" has no attribute "clear" [attr-defined] """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['typeddicts_operations.py:22: error: Value of "name" has incompatible type "int"; expected "str" [typeddict-item]'] +Line 23: Unexpected errors ['typeddicts_operations.py:23: error: Value of "year" has incompatible type "str"; expected "int" [typeddict-item]'] +Line 24: Unexpected errors ['typeddicts_operations.py:24: error: TypedDict "Movie" has no key "other" [typeddict-unknown-key]'] +Line 26: Unexpected errors ['typeddicts_operations.py:26: error: TypedDict "Movie" has no key "other" [typeddict-item]'] +Line 28: Unexpected errors ['typeddicts_operations.py:28: error: Missing key "year" for TypedDict "Movie" [typeddict-item]'] +Line 29: Unexpected errors ['typeddicts_operations.py:29: error: Incompatible types (expression has type "float", TypedDict item "year" has type "int") [typeddict-item]'] +Line 32: Unexpected errors ['typeddicts_operations.py:32: error: Extra key "other" for TypedDict "Movie" [typeddict-unknown-key]'] +Line 37: Unexpected errors ['typeddicts_operations.py:37: error: Expected TypedDict key to be string literal [misc]'] +Line 47: Unexpected errors ['typeddicts_operations.py:47: error: "Movie" has no attribute "clear" [attr-defined]'] +Line 49: Unexpected errors ['typeddicts_operations.py:49: error: Key "name" of TypedDict "Movie" cannot be deleted [misc]'] +Line 62: Unexpected errors ['typeddicts_operations.py:62: error: "MovieOptional" has no attribute "clear" [attr-defined]'] +""" diff --git a/conformance/results/mypy/typeddicts_readonly.toml b/conformance/results/mypy/typeddicts_readonly.toml index 5ee3b95b1..7de10e686 100644 --- a/conformance/results/mypy/typeddicts_readonly.toml +++ b/conformance/results/mypy/typeddicts_readonly.toml @@ -16,3 +16,14 @@ typeddicts_readonly.py:55: error: Variable "typing_extensions.ReadOnly" is not v typeddicts_readonly.py:55: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases typeddicts_readonly.py:56: error: NotRequired[] can be only used in a TypedDict definition [valid-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 18: Unexpected errors ['typeddicts_readonly.py:18: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 25: Unexpected errors ['typeddicts_readonly.py:25: error: "ReadOnly?[builtins.list[builtins.str]]" has no attribute "append" [attr-defined]'] +Line 31: Unexpected errors ['typeddicts_readonly.py:31: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 37: Unexpected errors ['typeddicts_readonly.py:37: error: "ReadOnly?[builtins.list[builtins.str]]" has no attribute "append" [attr-defined]'] +Line 45: Unexpected errors ['typeddicts_readonly.py:45: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly.py:45: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 46: Unexpected errors ['typeddicts_readonly.py:46: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly.py:46: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 55: Unexpected errors ['typeddicts_readonly.py:55: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 56: Unexpected errors ['typeddicts_readonly.py:56: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +""" diff --git a/conformance/results/mypy/typeddicts_readonly_consistency.toml b/conformance/results/mypy/typeddicts_readonly_consistency.toml index e69f302b9..c00e0cb6b 100644 --- a/conformance/results/mypy/typeddicts_readonly_consistency.toml +++ b/conformance/results/mypy/typeddicts_readonly_consistency.toml @@ -14,3 +14,16 @@ typeddicts_readonly_consistency.py:82: error: Incompatible types in assignment ( typeddicts_readonly_consistency.py:84: error: Incompatible types in assignment (expression has type "A2", variable has type "C2") [assignment] typeddicts_readonly_consistency.py:85: error: Incompatible types in assignment (expression has type "B2", variable has type "C2") [assignment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['typeddicts_readonly_consistency.py:30: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_consistency.py:30: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 37: Unexpected errors ['typeddicts_readonly_consistency.py:37: error: Incompatible types in assignment (expression has type "A1", variable has type "B1") [assignment]'] +Line 38: Unexpected errors ['typeddicts_readonly_consistency.py:38: error: Incompatible types in assignment (expression has type "C1", variable has type "B1") [assignment]'] +Line 40: Unexpected errors ['typeddicts_readonly_consistency.py:40: error: Incompatible types in assignment (expression has type "A1", variable has type "C1") [assignment]'] +Line 41: Unexpected errors ['typeddicts_readonly_consistency.py:41: error: Incompatible types in assignment (expression has type "B1", variable has type "C1") [assignment]'] +Line 66: Unexpected errors ['typeddicts_readonly_consistency.py:66: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 79: Unexpected errors ['typeddicts_readonly_consistency.py:79: error: Incompatible types in assignment (expression has type "C2", variable has type "A2") [assignment]'] +Line 82: Unexpected errors ['typeddicts_readonly_consistency.py:82: error: Incompatible types in assignment (expression has type "C2", variable has type "B2") [assignment]'] +Line 84: Unexpected errors ['typeddicts_readonly_consistency.py:84: error: Incompatible types in assignment (expression has type "A2", variable has type "C2") [assignment]'] +Line 85: Unexpected errors ['typeddicts_readonly_consistency.py:85: error: Incompatible types in assignment (expression has type "B2", variable has type "C2") [assignment]'] +""" diff --git a/conformance/results/mypy/typeddicts_readonly_inheritance.toml b/conformance/results/mypy/typeddicts_readonly_inheritance.toml index e1a8560ca..f1c03c239 100644 --- a/conformance/results/mypy/typeddicts_readonly_inheritance.toml +++ b/conformance/results/mypy/typeddicts_readonly_inheritance.toml @@ -67,3 +67,34 @@ typeddicts_readonly_inheritance.py:129: error: NotRequired[] can be only used in typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "x" while merging [misc] typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "y" while merging [misc] """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['typeddicts_readonly_inheritance.py:15: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 19: Unexpected errors ['typeddicts_readonly_inheritance.py:19: error: Overwriting TypedDict field "name" while extending [misc]'] +Line 43: Unexpected errors ['typeddicts_readonly_inheritance.py:43: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 44: Unexpected errors ['typeddicts_readonly_inheritance.py:44: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 49: Unexpected errors ['typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending [misc]', 'typeddicts_readonly_inheritance.py:49: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 50: Unexpected errors ['typeddicts_readonly_inheritance.py:50: error: Overwriting TypedDict field "alt" while extending [misc]', 'typeddicts_readonly_inheritance.py:50: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 58: Unexpected errors ['typeddicts_readonly_inheritance.py:58: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:58: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 62: Unexpected errors ['typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending [misc]', 'typeddicts_readonly_inheritance.py:62: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:62: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 65: Unexpected errors ['typeddicts_readonly_inheritance.py:65: error: Missing key "name" for TypedDict "RequiredName" [typeddict-item]'] +Line 72: Unexpected errors ['typeddicts_readonly_inheritance.py:72: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:72: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 76: Unexpected errors ['typeddicts_readonly_inheritance.py:76: error: Overwriting TypedDict field "ident" while extending [misc]'] +Line 82: Unexpected errors ['typeddicts_readonly_inheritance.py:82: error: Value of "ident" has incompatible type "int"; expected "str" [typeddict-item]'] +Line 83: Unexpected errors ['typeddicts_readonly_inheritance.py:83: error: Incompatible types (expression has type "int", TypedDict item "ident" has type "str") [typeddict-item]'] +Line 84: Unexpected errors ['typeddicts_readonly_inheritance.py:84: error: Missing key "ident" for TypedDict "User" [typeddict-item]'] +Line 89: Unexpected errors ['typeddicts_readonly_inheritance.py:89: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:89: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 90: Unexpected errors ['typeddicts_readonly_inheritance.py:90: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:90: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 94: Unexpected errors ['typeddicts_readonly_inheritance.py:94: error: Overwriting TypedDict field "a" while extending [misc]', 'typeddicts_readonly_inheritance.py:94: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 98: Unexpected errors ['typeddicts_readonly_inheritance.py:98: error: Overwriting TypedDict field "a" while extending [misc]'] +Line 102: Unexpected errors ['typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending [misc]', 'typeddicts_readonly_inheritance.py:102: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:102: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 106: Unexpected errors ['typeddicts_readonly_inheritance.py:106: error: Overwriting TypedDict field "c" while extending [misc]', 'typeddicts_readonly_inheritance.py:106: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:106: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 111: Unexpected errors ['typeddicts_readonly_inheritance.py:111: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 116: Unexpected errors ['typeddicts_readonly_inheritance.py:116: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 119: Unexpected errors ['typeddicts_readonly_inheritance.py:119: error: Overwriting TypedDict field "x" while merging [misc]', 'typeddicts_readonly_inheritance.py:119: error: Overwriting TypedDict field "y" while merging [misc]'] +Line 123: Unexpected errors ['typeddicts_readonly_inheritance.py:123: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:123: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 124: Unexpected errors ['typeddicts_readonly_inheritance.py:124: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:124: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 128: Unexpected errors ['typeddicts_readonly_inheritance.py:128: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:128: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 129: Unexpected errors ['typeddicts_readonly_inheritance.py:129: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:129: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 132: Unexpected errors ['typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "x" while merging [misc]', 'typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "y" while merging [misc]'] +""" diff --git a/conformance/results/mypy/typeddicts_readonly_kwargs.toml b/conformance/results/mypy/typeddicts_readonly_kwargs.toml index b278dfa9e..dc35f4121 100644 --- a/conformance/results/mypy/typeddicts_readonly_kwargs.toml +++ b/conformance/results/mypy/typeddicts_readonly_kwargs.toml @@ -5,3 +5,8 @@ typeddicts_readonly_kwargs.py:24: note: See https://mypy.readthedocs.io/en/stabl typeddicts_readonly_kwargs.py:25: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] typeddicts_readonly_kwargs.py:25: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['typeddicts_readonly_kwargs.py:24: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 25: Unexpected errors ['typeddicts_readonly_kwargs.py:25: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +""" diff --git a/conformance/results/mypy/typeddicts_readonly_update.toml b/conformance/results/mypy/typeddicts_readonly_update.toml index fc168c038..b13ab1b69 100644 --- a/conformance/results/mypy/typeddicts_readonly_update.toml +++ b/conformance/results/mypy/typeddicts_readonly_update.toml @@ -5,3 +5,8 @@ typeddicts_readonly_update.py:17: note: See https://mypy.readthedocs.io/en/stabl typeddicts_readonly_update.py:30: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] typeddicts_readonly_update.py:30: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['typeddicts_readonly_update.py:17: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 30: Unexpected errors ['typeddicts_readonly_update.py:30: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +""" diff --git a/conformance/results/mypy/typeddicts_required.toml b/conformance/results/mypy/typeddicts_required.toml index 4e11a4ad6..81353a69b 100644 --- a/conformance/results/mypy/typeddicts_required.toml +++ b/conformance/results/mypy/typeddicts_required.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not support nesting of `Annotated` and `Required` or `NotRequired`. +notes = """Does not support nesting of `Annotated` and `Required` or `NotRequired`. """ output = """ typeddicts_required.py:12: error: Required[] can be only used in a TypedDict definition [valid-type] @@ -10,3 +9,12 @@ typeddicts_required.py:60: error: NotRequired[] can be only used in a TypedDict typeddicts_required.py:65: error: Required[] can be only used in a TypedDict definition [valid-type] typeddicts_required.py:67: error: Required[] can be only used in a TypedDict definition [valid-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['typeddicts_required.py:12: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 16: Unexpected errors ['typeddicts_required.py:16: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 59: Unexpected errors ['typeddicts_required.py:59: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 60: Unexpected errors ['typeddicts_required.py:60: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 65: Unexpected errors ['typeddicts_required.py:65: error: Required[] can be only used in a TypedDict definition [valid-type]'] +Line 67: Unexpected errors ['typeddicts_required.py:67: error: Required[] can be only used in a TypedDict definition [valid-type]'] +""" diff --git a/conformance/results/mypy/typeddicts_type_consistency.toml b/conformance/results/mypy/typeddicts_type_consistency.toml index a9c45d463..c701736fc 100644 --- a/conformance/results/mypy/typeddicts_type_consistency.toml +++ b/conformance/results/mypy/typeddicts_type_consistency.toml @@ -12,3 +12,17 @@ typeddicts_type_consistency.py:99: error: Incompatible types in assignment (expr typeddicts_type_consistency.py:105: error: Incompatible types in assignment (expression has type "int | str", variable has type "int") [assignment] typeddicts_type_consistency.py:124: error: Incompatible types (expression has type "int", TypedDict item "inner_key" has type "str") [typeddict-item] """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['typeddicts_type_consistency.py:21: error: Incompatible types in assignment (expression has type "B1", variable has type "A1") [assignment]'] +Line 38: Unexpected errors ['typeddicts_type_consistency.py:38: error: Incompatible types in assignment (expression has type "B2", variable has type "A2") [assignment]'] +Line 65: Unexpected errors ['typeddicts_type_consistency.py:65: error: Incompatible types in assignment (expression has type "A3", variable has type "B3") [assignment]'] +Line 69: Unexpected errors ['typeddicts_type_consistency.py:69: error: Extra key "y" for TypedDict "A3" [typeddict-unknown-key]'] +Line 76: Unexpected errors ['typeddicts_type_consistency.py:76: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[str, int]") [assignment]'] +Line 77: Unexpected errors ['typeddicts_type_consistency.py:77: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[str, object]") [assignment]'] +Line 78: Unexpected errors ['typeddicts_type_consistency.py:78: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[Any, Any]") [assignment]'] +Line 82: Unexpected errors ['typeddicts_type_consistency.py:82: error: Incompatible types in assignment (expression has type "B3", variable has type "Mapping[str, int]") [assignment]'] +Line 99: Unexpected errors ['typeddicts_type_consistency.py:99: error: Incompatible types in assignment (expression has type "str | None", variable has type "str") [assignment]'] +Line 105: Unexpected errors ['typeddicts_type_consistency.py:105: error: Incompatible types in assignment (expression has type "int | str", variable has type "int") [assignment]'] +Line 124: Unexpected errors ['typeddicts_type_consistency.py:124: error: Incompatible types (expression has type "int", TypedDict item "inner_key" has type "str") [typeddict-item]'] +""" diff --git a/conformance/results/mypy/typeddicts_usage.toml b/conformance/results/mypy/typeddicts_usage.toml index d57132453..a3331859a 100644 --- a/conformance/results/mypy/typeddicts_usage.toml +++ b/conformance/results/mypy/typeddicts_usage.toml @@ -8,3 +8,9 @@ typeddicts_usage.py:35: error: Cannot use isinstance() with TypedDict type [mis typeddicts_usage.py:40: error: Variable "typing.TypedDict" is not valid as a type [valid-type] typeddicts_usage.py:40: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases """ +conformance_automated = "Fail" +errors_diff = """ +Line 28: Unexpected errors ['typeddicts_usage.py:28: error: Missing key "name" for TypedDict "Movie" [typeddict-item]', 'typeddicts_usage.py:28: error: Extra key "title" for TypedDict "Movie" [typeddict-unknown-key]'] +Line 35: Unexpected errors ['typeddicts_usage.py:35: error: Cannot use isinstance() with TypedDict type [misc]'] +Line 40: Unexpected errors ['typeddicts_usage.py:40: error: Variable "typing.TypedDict" is not valid as a type [valid-type]'] +""" diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index c8d80a45d..15e6e85c0 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ version = "mypy 1.9.0" -test_duration = 2.0 +test_duration = 1.4 diff --git a/conformance/results/pyre/aliases_explicit.toml b/conformance/results/pyre/aliases_explicit.toml index 3137647ea..139389299 100644 --- a/conformance/results/pyre/aliases_explicit.toml +++ b/conformance/results/pyre/aliases_explicit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. +notes = """Incorrectly reports error for type alias defined with ParamSpec. Incorrectly rejects some valid type aliases when used in annotations. Incorrectly evaluates generic type alias with ParamSpec with missing type argument. Does not report some illegal annotation forms as invalid type aliases. @@ -36,3 +35,25 @@ aliases_explicit.py:91:0 Incompatible variable type [9]: BadTypeAlias13 is decla aliases_explicit.py:97:16 Call error [29]: `TA` is not a function. aliases_explicit.py:101:5 Call error [29]: `TA` is not a function. """ +conformance_automated = "Fail" +errors_diff = """ +Line 67: Expected 1 errors +Line 68: Expected 1 errors +Line 69: Expected 1 errors +Line 70: Expected 1 errors +Line 71: Expected 1 errors +Line 79: Expected 1 errors +Line 100: Expected 1 errors +Line 102: Expected 1 errors +Line 23: Unexpected errors ['aliases_explicit.py:23:0 Incompatible variable type [9]: GoodTypeAlias9 is declared to have type `TA` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'aliases_explicit.py:23:30 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[object, TypeVar]`.'] +Line 26: Unexpected errors ['aliases_explicit.py:26:0 Incompatible variable type [9]: GoodTypeAlias12 is declared to have type `TA` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'aliases_explicit.py:26:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[ParamSpec, None]`.'] +Line 41: Unexpected errors ['aliases_explicit.py:41:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.'] +Line 44: Unexpected errors ['aliases_explicit.py:44:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias12` is not defined as a type.'] +Line 51: Unexpected errors ['aliases_explicit.py:51:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `UnionType`.'] +Line 53: Unexpected errors ['aliases_explicit.py:53:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], typing.Any]`.'] +Line 54: Unexpected errors ['aliases_explicit.py:54:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[int], Type[int], Type[str]]`.'] +Line 57: Unexpected errors ['aliases_explicit.py:57:29 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[List[Type[Union[int, str]]], None]`.'] +Line 60: Unexpected errors ['aliases_explicit.py:60:30 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[typing.Any, None]`.'] +Line 62: Unexpected errors ['aliases_explicit.py:62:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `UnionType`.'] +Line 97: Unexpected errors ['aliases_explicit.py:97:16 Call error [29]: `TA` is not a function.'] +""" diff --git a/conformance/results/pyre/aliases_implicit.toml b/conformance/results/pyre/aliases_implicit.toml index 8b34288a5..4df929ff7 100644 --- a/conformance/results/pyre/aliases_implicit.toml +++ b/conformance/results/pyre/aliases_implicit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. +notes = """Incorrectly reports error for type alias defined with ParamSpec. Incorrectly rejects some valid type aliases when used in annotations. Incorrectly evaluates generic type alias with ParamSpec with missing type argument. Does not report invalid specialization of generic type aliases. @@ -32,3 +31,29 @@ aliases_implicit.py:117:9 Undefined or invalid type [11]: Annotation `BadTypeAli aliases_implicit.py:118:9 Undefined or invalid type [11]: Annotation `BadTypeAlias13` is not defined as a type. aliases_implicit.py:119:9 Undefined or invalid type [11]: Annotation `BadTypeAlias14` is not defined as a type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 38: Unexpected errors ['aliases_implicit.py:38:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[object, TypeVar]`.'] +Line 42: Unexpected errors ['aliases_implicit.py:42:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[ParamSpec, None]`.'] +Line 54: Unexpected errors ['aliases_implicit.py:54:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.'] +Line 58: Unexpected errors ['aliases_implicit.py:58:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias13` is not defined as a type.'] +Line 62: Unexpected errors ['aliases_implicit.py:62:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `UnionType`.'] +Line 64: Unexpected errors ['aliases_implicit.py:64:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], typing.Any]`.'] +Line 65: Unexpected errors ['aliases_implicit.py:65:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[int], Type[int], Type[str]]`.'] +Line 68: Unexpected errors ['aliases_implicit.py:68:29 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[List[Type[Union[int, str]]], None]`.'] +Line 72: Unexpected errors ['aliases_implicit.py:72:30 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[typing.Any, None]`.'] +Line 106: Unexpected errors ['aliases_implicit.py:106:8 Undefined or invalid type [11]: Annotation `BadTypeAlias1` is not defined as a type.'] +Line 107: Unexpected errors ['aliases_implicit.py:107:8 Undefined or invalid type [11]: Annotation `BadTypeAlias2` is not defined as a type.'] +Line 108: Unexpected errors ['aliases_implicit.py:108:8 Undefined or invalid type [11]: Annotation `BadTypeAlias3` is not defined as a type.'] +Line 109: Unexpected errors ['aliases_implicit.py:109:8 Undefined or invalid type [11]: Annotation `BadTypeAlias4` is not defined as a type.'] +Line 110: Unexpected errors ['aliases_implicit.py:110:8 Undefined or invalid type [11]: Annotation `BadTypeAlias5` is not defined as a type.'] +Line 111: Unexpected errors ['aliases_implicit.py:111:8 Undefined or invalid type [11]: Annotation `BadTypeAlias6` is not defined as a type.'] +Line 112: Unexpected errors ['aliases_implicit.py:112:8 Undefined or invalid type [11]: Annotation `BadTypeAlias7` is not defined as a type.'] +Line 113: Unexpected errors ['aliases_implicit.py:113:8 Undefined or invalid type [11]: Annotation `BadTypeAlias8` is not defined as a type.'] +Line 114: Unexpected errors ['aliases_implicit.py:114:8 Undefined or invalid type [11]: Annotation `BadTypeAlias9` is not defined as a type.'] +Line 115: Unexpected errors ['aliases_implicit.py:115:9 Undefined or invalid type [11]: Annotation `BadTypeAlias10` is not defined as a type.'] +Line 116: Unexpected errors ['aliases_implicit.py:116:9 Undefined or invalid type [11]: Annotation `BadTypeAlias11` is not defined as a type.'] +Line 117: Unexpected errors ['aliases_implicit.py:117:9 Undefined or invalid type [11]: Annotation `BadTypeAlias12` is not defined as a type.'] +Line 118: Unexpected errors ['aliases_implicit.py:118:9 Undefined or invalid type [11]: Annotation `BadTypeAlias13` is not defined as a type.'] +Line 119: Unexpected errors ['aliases_implicit.py:119:9 Undefined or invalid type [11]: Annotation `BadTypeAlias14` is not defined as a type.'] +""" diff --git a/conformance/results/pyre/aliases_newtype.toml b/conformance/results/pyre/aliases_newtype.toml index 02b58eff1..50fdfbbd0 100644 --- a/conformance/results/pyre/aliases_newtype.toml +++ b/conformance/results/pyre/aliases_newtype.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject use of NewType in `isinstance` call. +notes = """Does not reject use of NewType in `isinstance` call. Does not reject use of NewType in class definition statement. Does not report inconsistency between name of NewType and assigned identifier name. Does not reject use of NewType with generic class with TypeVar. @@ -17,3 +16,13 @@ aliases_newtype.py:51:37 Invalid inheritance [39]: `typing_extensions.Literal[7] aliases_newtype.py:60:14 Too many arguments [19]: Call `NewType.__init__` expects 2 positional arguments, 3 were provided. aliases_newtype.py:62:37 Invalid inheritance [39]: `typing.Any` is not a valid parent class. """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['aliases_newtype.py:11:7 Incompatible parameter type [6]: In call `UserId.__init__`, for 1st positional argument, expected `int` but got `str`.'] +Line 12: Unexpected errors ['aliases_newtype.py:12:0 Incompatible variable type [9]: u1 is declared to have type `UserId` but is used as type `int`.'] +Line 38: Unexpected errors ['aliases_newtype.py:38:5 Invalid type parameters [24]: Non-generic type `GoodNewType1` cannot take parameters.'] +Line 44: Unexpected errors ['aliases_newtype.py:44:37 Invalid inheritance [39]: `typing.Union[int, str]` is not a valid parent class.'] +Line 51: Unexpected errors ['aliases_newtype.py:51:37 Invalid inheritance [39]: `typing_extensions.Literal[7]` is not a valid parent class.'] +Line 60: Unexpected errors ['aliases_newtype.py:60:14 Too many arguments [19]: Call `NewType.__init__` expects 2 positional arguments, 3 were provided.'] +Line 62: Unexpected errors ['aliases_newtype.py:62:37 Invalid inheritance [39]: `typing.Any` is not a valid parent class.'] +""" diff --git a/conformance/results/pyre/aliases_recursive.toml b/conformance/results/pyre/aliases_recursive.toml index b57ee1075..008f5e546 100644 --- a/conformance/results/pyre/aliases_recursive.toml +++ b/conformance/results/pyre/aliases_recursive.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not properly handle some recursive type aliases. +notes = """Does not properly handle some recursive type aliases. Does not properly handle specialization of generic recursive type aliases. """ output = """ @@ -19,3 +18,20 @@ aliases_recursive.py:76:0 Incompatible variable type [9]: RecursiveUnion is decl aliases_recursive.py:78:0 Incompatible variable type [9]: MutualReference1 is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`. aliases_recursive.py:81:0 Incompatible variable type [9]: MutualReference2 is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['aliases_recursive.py:19:0 Incompatible variable type [9]: j4 is declared to have type `aliases_recursive.Json (resolves to Union[None, Dict[str, Json], List[Json], float, int, str])` but is used as type `Dict[str, complex]`.'] +Line 20: Unexpected errors ['aliases_recursive.py:20:0 Incompatible variable type [9]: j5 is declared to have type `aliases_recursive.Json (resolves to Union[None, Dict[str, Json], List[Json], float, int, str])` but is used as type `List[complex]`.'] +Line 30: Unexpected errors ['aliases_recursive.py:30:35 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[str, typing.Any]`.'] +Line 33: Unexpected errors ['aliases_recursive.py:33:4 Undefined or invalid type [11]: Annotation `RecursiveTuple` is not defined as a type.'] +Line 42: Unexpected errors ['aliases_recursive.py:42:39 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_KT]], Type[Variable[_VT_co](covariant)]]` but got `Tuple[Type[str], str]`.'] +Line 44: Unexpected errors ['aliases_recursive.py:44:4 Undefined or invalid type [11]: Annotation `RecursiveMapping` is not defined as a type.'] +Line 62: Unexpected errors ['aliases_recursive.py:62:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `_SpecialForm`.'] +Line 65: Unexpected errors ['aliases_recursive.py:65:4 Undefined or invalid type [11]: Annotation `SpecializedTypeAlias1` is not defined as a type.'] +Line 66: Unexpected errors ['aliases_recursive.py:66:4 Undefined or invalid type [11]: Annotation `GenericTypeAlias1` is not defined as a type.'] +Line 69: Unexpected errors ['aliases_recursive.py:69:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `_SpecialForm`.'] +Line 71: Unexpected errors ['aliases_recursive.py:71:4 Undefined or invalid type [11]: Annotation `GenericTypeAlias2` is not defined as a type.'] +Line 76: Unexpected errors ['aliases_recursive.py:76:0 Incompatible variable type [9]: RecursiveUnion is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`.'] +Line 78: Unexpected errors ['aliases_recursive.py:78:0 Incompatible variable type [9]: MutualReference1 is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`.'] +Line 81: Unexpected errors ['aliases_recursive.py:81:0 Incompatible variable type [9]: MutualReference2 is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`.'] +""" diff --git a/conformance/results/pyre/aliases_type_statement.toml b/conformance/results/pyre/aliases_type_statement.toml index 7b33dcff1..2fac8d2e0 100644 --- a/conformance/results/pyre/aliases_type_statement.toml +++ b/conformance/results/pyre/aliases_type_statement.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Does not support `type` statement. +notes = """Does not support `type` statement. """ output = """ aliases_type_statement.py:8:6 Parsing failure [404]: invalid syntax """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['aliases_type_statement.py:8:6 Parsing failure [404]: invalid syntax'] +""" diff --git a/conformance/results/pyre/aliases_typealiastype.toml b/conformance/results/pyre/aliases_typealiastype.toml index 25117d5d8..b013b168a 100644 --- a/conformance/results/pyre/aliases_typealiastype.toml +++ b/conformance/results/pyre/aliases_typealiastype.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Support for TypeAliasType is not implemented. +notes = """Support for TypeAliasType is not implemented. """ output = """ aliases_typealiastype.py:5:0 Undefined import [21]: Could not find a name `TypeAliasType` defined in module `typing`. @@ -43,3 +42,38 @@ aliases_typealiastype.py:68:13 Undefined attribute [16]: Module `typing` has no aliases_typealiastype.py:69:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`. aliases_typealiastype.py:70:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 5: Unexpected errors ['aliases_typealiastype.py:5:0 Undefined import [21]: Could not find a name `TypeAliasType` defined in module `typing`.'] +Line 16: Unexpected errors ['aliases_typealiastype.py:16:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 17: Unexpected errors ['aliases_typealiastype.py:17:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.', 'aliases_typealiastype.py:17:46 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +Line 18: Unexpected errors ['aliases_typealiastype.py:18:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.', 'aliases_typealiastype.py:18:46 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.', 'aliases_typealiastype.py:18:56 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +Line 19: Unexpected errors ['aliases_typealiastype.py:19:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 20: Unexpected errors ['aliases_typealiastype.py:20:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 22: Unexpected errors ['aliases_typealiastype.py:22:13 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[ParamSpec, TypeVar]`.', 'aliases_typealiastype.py:22:29 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.', 'aliases_typealiastype.py:22:71 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[typing.Any, ...]`.'] +Line 27: Unexpected errors ['aliases_typealiastype.py:27:17 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.', 'aliases_typealiastype.py:27:50 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +Line 35: Unexpected errors ['aliases_typealiastype.py:35:4 Undefined or invalid type [11]: Annotation `GoodAlias4` is not defined as a type.'] +Line 37: Unexpected errors ['aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `GoodAlias5` is not defined as a type.'] +Line 39: Unexpected errors ['aliases_typealiastype.py:39:4 Invalid type [31]: Expression `$local_aliases_typealiastype$GoodAlias5[(int, str, [int, str], *tuple[(int, str, int)])]` is not a valid type.'] +Line 43: Unexpected errors ['aliases_typealiastype.py:43:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 44: Unexpected errors ['aliases_typealiastype.py:44:22 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +Line 46: Unexpected errors ['aliases_typealiastype.py:46:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.', 'aliases_typealiastype.py:46:44 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +Line 47: Unexpected errors ['aliases_typealiastype.py:47:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 50: Unexpected errors ['aliases_typealiastype.py:50:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 51: Unexpected errors ['aliases_typealiastype.py:51:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 54: Unexpected errors ['aliases_typealiastype.py:54:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 55: Unexpected errors ['aliases_typealiastype.py:55:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 58: Unexpected errors ['aliases_typealiastype.py:58:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 59: Unexpected errors ['aliases_typealiastype.py:59:12 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 60: Unexpected errors ['aliases_typealiastype.py:60:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 61: Unexpected errors ['aliases_typealiastype.py:61:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 62: Unexpected errors ['aliases_typealiastype.py:62:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 63: Unexpected errors ['aliases_typealiastype.py:63:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 64: Unexpected errors ['aliases_typealiastype.py:64:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 65: Unexpected errors ['aliases_typealiastype.py:65:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 66: Unexpected errors ['aliases_typealiastype.py:66:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 67: Unexpected errors ['aliases_typealiastype.py:67:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 68: Unexpected errors ['aliases_typealiastype.py:68:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 69: Unexpected errors ['aliases_typealiastype.py:69:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +Line 70: Unexpected errors ['aliases_typealiastype.py:70:13 Undefined attribute [16]: Module `typing` has no attribute `TypeAliasType`.'] +""" diff --git a/conformance/results/pyre/aliases_variance.toml b/conformance/results/pyre/aliases_variance.toml index 029de6d60..97ebc7f07 100644 --- a/conformance/results/pyre/aliases_variance.toml +++ b/conformance/results/pyre/aliases_variance.toml @@ -5,3 +5,10 @@ aliases_variance.py:28:0 Invalid type variance [46]: The type variable `Variable aliases_variance.py:32:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses. aliases_variance.py:44:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses. """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['aliases_variance.py:24:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 28: Unexpected errors ['aliases_variance.py:28:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 32: Unexpected errors ['aliases_variance.py:32:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 44: Unexpected errors ['aliases_variance.py:44:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.'] +""" diff --git a/conformance/results/pyre/annotations_coroutines.toml b/conformance/results/pyre/annotations_coroutines.toml index b04dee644..7484cb4ce 100644 --- a/conformance/results/pyre/annotations_coroutines.toml +++ b/conformance/results/pyre/annotations_coroutines.toml @@ -1,7 +1,10 @@ conformant = "Partial" -notes = """ -Does not evaluate correct type for async function. +notes = """Does not evaluate correct type for async function. """ output = """ annotations_coroutines.py:19:45 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_T_co](covariant)], Type[Variable[_T_contra](contravariant)], Type[Variable[_V_co](covariant)]]` but got `Tuple[object, object, Type[str]]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['annotations_coroutines.py:19:45 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_T_co](covariant)], Type[Variable[_T_contra](contravariant)], Type[Variable[_V_co](covariant)]]` but got `Tuple[object, object, Type[str]]`.'] +""" diff --git a/conformance/results/pyre/annotations_forward_refs.toml b/conformance/results/pyre/annotations_forward_refs.toml index c4e707c3c..e66b77b39 100644 --- a/conformance/results/pyre/annotations_forward_refs.toml +++ b/conformance/results/pyre/annotations_forward_refs.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report error for a forward reference that is not enclosed in quotes. +notes = """Does not report error for a forward reference that is not enclosed in quotes. Does not report error for use of quoted type with "|" operator (runtime error). Does not reject f-string in quoted type annotation. Incorrectly generates error for quoted type defined in class scope. @@ -28,3 +27,25 @@ annotations_forward_refs.py:80:12 Undefined or invalid type [11]: Annotation `Cl annotations_forward_refs.py:87:7 Undefined or invalid type [11]: Annotation `ClassD.int` is not defined as a type. annotations_forward_refs.py:100:7 Undefined or invalid type [11]: Annotation ` """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['annotations_forward_refs.py:19:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `UnionType`.'] +Line 41: Unexpected errors ['annotations_forward_refs.py:41:8 Undefined or invalid type [11]: Annotation `eval(.join(map(chr, [105, 110, 116])))` is not defined as a type.'] +Line 42: Unexpected errors ['annotations_forward_refs.py:42:8 Invalid type [31]: Expression `"[int, str]"` is not a valid type.'] +Line 43: Unexpected errors ['annotations_forward_refs.py:43:8 Invalid type [31]: Expression `"(int, str)"` is not a valid type.'] +Line 44: Unexpected errors ['annotations_forward_refs.py:44:8 Undefined or invalid type [11]: Annotation `comprehension(int for generators(generator($target$i in range(1) if )))` is not defined as a type.'] +Line 45: Unexpected errors ['annotations_forward_refs.py:45:8 Invalid type [31]: Expression `"{ }"` is not a valid type.'] +Line 46: Unexpected errors ['annotations_forward_refs.py:46:8 Undefined or invalid type [11]: Annotation `lambda () (int)()` is not defined as a type.'] +Line 47: Unexpected errors ['annotations_forward_refs.py:47:8 Invalid type [31]: Expression `[int][0]` is not a valid type.'] +Line 48: Unexpected errors ['annotations_forward_refs.py:48:8 Invalid type [31]: Expression `"int if 1 < 3 else str"` is not a valid type.'] +Line 49: Unexpected errors ['annotations_forward_refs.py:49:8 Undefined or invalid type [11]: Annotation `var1` is not defined as a type.'] +Line 50: Unexpected errors ['annotations_forward_refs.py:50:9 Invalid type [31]: Expression `"True"` is not a valid type.'] +Line 51: Unexpected errors ['annotations_forward_refs.py:51:9 Invalid type [31]: Expression `"1"` is not a valid type.'] +Line 52: Unexpected errors ['annotations_forward_refs.py:52:9 Invalid type [31]: Expression `"-1"` is not a valid type.'] +Line 53: Unexpected errors ['annotations_forward_refs.py:53:9 Invalid type [31]: Expression `"int or str"` is not a valid type.'] +Line 55: Unexpected errors ['annotations_forward_refs.py:55:9 Undefined or invalid type [11]: Annotation `types` is not defined as a type.'] +Line 77: Unexpected errors ['annotations_forward_refs.py:77:0 Uninitialized attribute [13]: Attribute `ClassC` is declared in class `ClassD` to have type `ClassC` but is never initialized.'] +Line 80: Unexpected errors ['annotations_forward_refs.py:80:12 Undefined or invalid type [11]: Annotation `ClassF` is not defined as a type.'] +Line 87: Unexpected errors ['annotations_forward_refs.py:87:7 Undefined or invalid type [11]: Annotation `ClassD.int` is not defined as a type.'] +Line 100: Unexpected errors ['annotations_forward_refs.py:100:7 Undefined or invalid type [11]: Annotation `'] +""" diff --git a/conformance/results/pyre/annotations_generators.toml b/conformance/results/pyre/annotations_generators.toml index 48bda1ea9..96b6cd5fc 100644 --- a/conformance/results/pyre/annotations_generators.toml +++ b/conformance/results/pyre/annotations_generators.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report invalid return type for generator when function implicitly returns None. +notes = """Does not report invalid return type for generator when function implicitly returns None. Incorrectly evaluates type of call to async generator. """ output = """ @@ -20,3 +19,20 @@ annotations_generators.py:174:35 Incompatible parameter type [6]: In call `typin annotations_generators.py:182:48 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_T_co](covariant)], Type[Variable[_T_contra](contravariant)], Type[Variable[_V_co](covariant)]]` but got `Tuple[object, object, typing.Any]`. annotations_generators.py:182:58 Undefined attribute [16]: `AsyncIterator` has no attribute `__getitem__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 54: Unexpected errors ['annotations_generators.py:54:8 Incompatible return type [7]: Expected `Generator[A, B, C]` but got `Generator[typing.Any, typing.Any, bool]`.'] +Line 57: Unexpected errors ['annotations_generators.py:57:8 Incompatible return type [7]: Expected `Generator[A, B, C]` but got `Generator[int, typing.Any, typing.Any]`.'] +Line 66: Unexpected errors ['annotations_generators.py:66:8 Incompatible return type [7]: Expected `Generator[A, int, typing.Any]` but got `Generator[int, typing.Any, typing.Any]`.'] +Line 75: Unexpected errors ['annotations_generators.py:75:4 Incompatible return type [7]: Expected `Iterator[A]` but got `Generator[B, typing.Any, typing.Any]`.'] +Line 87: Unexpected errors ['annotations_generators.py:87:4 Incompatible return type [7]: Expected `int` but got `Generator[None, typing.Any, typing.Any]`.'] +Line 88: Unexpected errors ['annotations_generators.py:88:4 Incompatible return type [7]: Expected `int` but got `Generator[typing.Any, typing.Any, int]`.'] +Line 91: Unexpected errors ['annotations_generators.py:91:0 Incompatible async generator return type [57]: Expected return annotation to be AsyncGenerator or a superclass but got `int`.'] +Line 92: Unexpected errors ['annotations_generators.py:92:4 Incompatible return type [7]: Expected `int` but got `AsyncGenerator[None, typing.Any]`.'] +Line 118: Unexpected errors ['annotations_generators.py:118:4 Incompatible return type [7]: Expected `Iterator[B]` but got `Generator[A, None, typing.Any]`.'] +Line 119: Unexpected errors ['annotations_generators.py:119:4 Incompatible return type [7]: Expected `Iterator[B]` but got `Generator[int, None, typing.Any]`.'] +Line 135: Unexpected errors ['annotations_generators.py:135:4 Incompatible return type [7]: Expected `Generator[None, str, None]` but got `Generator[None, int, typing.Any]`.'] +Line 167: Unexpected errors ['annotations_generators.py:167:35 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_T_co](covariant)], Type[Variable[_T_contra](contravariant)]]` but got `Tuple[Type[str], None]`.'] +Line 174: Unexpected errors ['annotations_generators.py:174:35 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_T_co](covariant)], Type[Variable[_T_contra](contravariant)]]` but got `Tuple[Type[str], None]`.'] +Line 182: Unexpected errors ['annotations_generators.py:182:48 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_T_co](covariant)], Type[Variable[_T_contra](contravariant)], Type[Variable[_V_co](covariant)]]` but got `Tuple[object, object, typing.Any]`.', 'annotations_generators.py:182:58 Undefined attribute [16]: `AsyncIterator` has no attribute `__getitem__`.'] +""" diff --git a/conformance/results/pyre/annotations_methods.toml b/conformance/results/pyre/annotations_methods.toml index d93e17525..ed12407a5 100644 --- a/conformance/results/pyre/annotations_methods.toml +++ b/conformance/results/pyre/annotations_methods.toml @@ -1,6 +1,8 @@ conformant = "Pass" -notes = """ -Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. +notes = """Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/annotations_typeexpr.toml b/conformance/results/pyre/annotations_typeexpr.toml index c1cb1b406..ebf9ff758 100644 --- a/conformance/results/pyre/annotations_typeexpr.toml +++ b/conformance/results/pyre/annotations_typeexpr.toml @@ -18,3 +18,23 @@ annotations_typeexpr.py:100:9 Invalid type [31]: Expression `int or str` is not annotations_typeexpr.py:101:9 Invalid type [31]: Expression `"int"` is not a valid type. annotations_typeexpr.py:102:9 Undefined or invalid type [11]: Annotation `types` is not defined as a type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 75: Unexpected errors ['annotations_typeexpr.py:75:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `object`.'] +Line 77: Unexpected errors ['annotations_typeexpr.py:77:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[object, typing.Any]`.'] +Line 88: Unexpected errors ['annotations_typeexpr.py:88:8 Invalid type [31]: Expression `eval("".join(map(chr, [105, 110, 116])))` is not a valid type.'] +Line 89: Unexpected errors ['annotations_typeexpr.py:89:8 Invalid type [31]: Expression `[int, str]` is not a valid type.'] +Line 90: Unexpected errors ['annotations_typeexpr.py:90:8 Invalid type [31]: Expression `(int, str)` is not a valid type.'] +Line 91: Unexpected errors ['annotations_typeexpr.py:91:8 Invalid type [31]: Expression `comprehension(int for generators(generator($target$i in range(1) if )))` is not a valid type.'] +Line 92: Unexpected errors ['annotations_typeexpr.py:92:8 Invalid type [31]: Expression `{ }` is not a valid type.'] +Line 93: Unexpected errors ['annotations_typeexpr.py:93:8 Invalid type [31]: Expression `lambda () (int)()` is not a valid type.'] +Line 94: Unexpected errors ['annotations_typeexpr.py:94:8 Invalid type [31]: Expression `[int][0]` is not a valid type.'] +Line 95: Unexpected errors ['annotations_typeexpr.py:95:8 Invalid type [31]: Expression `int if 1 < 3 else str` is not a valid type.'] +Line 96: Unexpected errors ['annotations_typeexpr.py:96:8 Undefined or invalid type [11]: Annotation `var1` is not defined as a type.'] +Line 97: Unexpected errors ['annotations_typeexpr.py:97:9 Invalid type [31]: Expression `True` is not a valid type.'] +Line 98: Unexpected errors ['annotations_typeexpr.py:98:9 Invalid type [31]: Expression `1` is not a valid type.'] +Line 99: Unexpected errors ['annotations_typeexpr.py:99:9 Invalid type [31]: Expression `-1` is not a valid type.'] +Line 100: Unexpected errors ['annotations_typeexpr.py:100:9 Invalid type [31]: Expression `int or str` is not a valid type.'] +Line 101: Unexpected errors ['annotations_typeexpr.py:101:9 Invalid type [31]: Expression `"int"` is not a valid type.'] +Line 102: Unexpected errors ['annotations_typeexpr.py:102:9 Undefined or invalid type [11]: Annotation `types` is not defined as a type.'] +""" diff --git a/conformance/results/pyre/callables_annotation.toml b/conformance/results/pyre/callables_annotation.toml index b7967a987..e7cf33204 100644 --- a/conformance/results/pyre/callables_annotation.toml +++ b/conformance/results/pyre/callables_annotation.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not evaluate correct type for `*args: int` parameter. +notes = """Does not evaluate correct type for `*args: int` parameter. Does not reject illegal form `Callable[[...], int]`. """ output = """ @@ -15,3 +14,16 @@ callables_annotation.py:40:4 Invalid type [31]: Expression `typing.Callable[(int callables_annotation.py:41:4 Invalid type [31]: Expression `typing.Callable[([], [int])]` is not a valid type. callables_annotation.py:42:4 Invalid type [31]: Expression `typing.Callable[(int, int, int)]` is not a valid type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['callables_annotation.py:13:4 Missing argument [20]: PositionalOnly call expects argument in position 1.'] +Line 14: Unexpected errors ['callables_annotation.py:14:10 Incompatible parameter type [6]: In anonymous call, for 2nd positional argument, expected `str` but got `int`.'] +Line 15: Unexpected errors ['callables_annotation.py:15:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.'] +Line 16: Unexpected errors ['callables_annotation.py:16:4 Unexpected keyword [28]: Unexpected keyword argument `a` to anonymous call.'] +Line 22: Unexpected errors ['callables_annotation.py:22:4 Too many arguments [19]: PositionalOnly call expects 0 positional arguments, 1 was provided.'] +Line 35: Unexpected errors ['callables_annotation.py:35:28 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`.'] +Line 39: Unexpected errors ['callables_annotation.py:39:4 Invalid type [31]: Expression `typing.Callable[int]` is not a valid type.'] +Line 40: Unexpected errors ['callables_annotation.py:40:4 Invalid type [31]: Expression `typing.Callable[(int, int)]` is not a valid type.'] +Line 41: Unexpected errors ['callables_annotation.py:41:4 Invalid type [31]: Expression `typing.Callable[([], [int])]` is not a valid type.'] +Line 42: Unexpected errors ['callables_annotation.py:42:4 Invalid type [31]: Expression `typing.Callable[(int, int, int)]` is not a valid type.'] +""" diff --git a/conformance/results/pyre/callables_kwargs.toml b/conformance/results/pyre/callables_kwargs.toml index 013f9786a..d95975240 100644 --- a/conformance/results/pyre/callables_kwargs.toml +++ b/conformance/results/pyre/callables_kwargs.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand Unpack in the context of **kwargs annotation. +notes = """Does not understand Unpack in the context of **kwargs annotation. """ output = """ callables_kwargs.py:22:20 Undefined or invalid type [11]: Annotation `Unpack` is not defined as a type. @@ -10,3 +9,12 @@ callables_kwargs.py:61:10 Incompatible parameter type [6]: In call `func2`, for callables_kwargs.py:62:18 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `str` but got `object`. callables_kwargs.py:121:20 Invalid type variable [34]: The type variable `Variable[T (bound to callables_kwargs.TD2)]` isn't present in the function's parameters. """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['callables_kwargs.py:22:20 Undefined or invalid type [11]: Annotation `Unpack` is not defined as a type.'] +Line 49: Unexpected errors ['callables_kwargs.py:49:4 Too many arguments [19]: Call `func1` expects 1 positional argument, 4 were provided.'] +Line 59: Unexpected errors ['callables_kwargs.py:59:12 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `str` but got `object`.'] +Line 61: Unexpected errors ['callables_kwargs.py:61:10 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `str` but got `int`.'] +Line 62: Unexpected errors ['callables_kwargs.py:62:18 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `str` but got `object`.'] +Line 121: Unexpected errors ["callables_kwargs.py:121:20 Invalid type variable [34]: The type variable `Variable[T (bound to callables_kwargs.TD2)]` isn't present in the function's parameters."] +""" diff --git a/conformance/results/pyre/callables_protocol.toml b/conformance/results/pyre/callables_protocol.toml index e48969c9b..f6a04b2db 100644 --- a/conformance/results/pyre/callables_protocol.toml +++ b/conformance/results/pyre/callables_protocol.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not correctly handle callback protocol that declares attributes in all functions. +notes = """Does not correctly handle callback protocol that declares attributes in all functions. Does not report type incompatibility for callback protocol with positional-only parameters. Incorrectly reports type compatibility error with callback that has *args and **kwargs. Does not report type incompatibility for callback missing a default argument for positional parameter. @@ -24,3 +23,22 @@ callables_protocol.py:216:0 Incompatible variable type [9]: cb10 is declared to callables_protocol.py:259:0 Incompatible variable type [9]: cb12 is declared to have type `Proto12` but is used as type `typing.Callable(cb12_good2)[[Variable(typing.Any), Keywords(typing.Any)], None]`. callables_protocol.py:260:0 Incompatible variable type [9]: cb12 is declared to have type `Proto12` but is used as type `typing.Callable(cb12_bad1)[[Variable(typing.Any), KeywordOnly(kwarg0, typing.Any)], None]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 35: Unexpected errors ['callables_protocol.py:35:0 Incompatible variable type [9]: cb1 is declared to have type `Proto1` but is used as type `typing.Callable(cb1_bad1)[[Variable(bytes), KeywordOnly(max_items, Optional[int])], List[bytes]]`.'] +Line 36: Unexpected errors ['callables_protocol.py:36:0 Incompatible variable type [9]: cb1 is declared to have type `Proto1` but is used as type `typing.Callable(cb1_bad2)[[Variable(bytes)], List[bytes]]`.'] +Line 37: Unexpected errors ['callables_protocol.py:37:0 Incompatible variable type [9]: cb1 is declared to have type `Proto1` but is used as type `typing.Callable(cb1_bad3)[[Variable(bytes), KeywordOnly(max_len, Optional[str])], List[bytes]]`.'] +Line 67: Unexpected errors ['callables_protocol.py:67:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad1)[[Variable(bytes)], typing.Any]`.'] +Line 68: Unexpected errors ['callables_protocol.py:68:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad2)[[Variable(str), Keywords(str)], typing.Any]`.'] +Line 69: Unexpected errors ['callables_protocol.py:69:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad3)[[Variable(bytes), Keywords(bytes)], typing.Any]`.'] +Line 70: Unexpected errors ['callables_protocol.py:70:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad4)[[Keywords(str)], typing.Any]`.'] +Line 97: Unexpected errors ['callables_protocol.py:97:0 Incompatible variable type [9]: var4 is declared to have type `Proto4` but is used as type `typing.Callable(cb4_bad1)[[Named(x, int)], None]`.'] +Line 121: Unexpected errors ['callables_protocol.py:121:0 Incompatible variable type [9]: cb6 is declared to have type `NotProto6` but is used as type `typing.Callable(cb6_bad1)[[Variable(bytes), KeywordOnly(max_len, Optional[int], default)], List[bytes]]`.'] +Line 169: Unexpected errors ['callables_protocol.py:169:0 Incompatible variable type [9]: cb8 is declared to have type `Proto8` but is used as type `typing.Callable(cb8_bad1)[[Named(x, int)], typing.Any]`.'] +Line 186: Unexpected errors ['callables_protocol.py:186:4 Incompatible attribute type [8]: Attribute `other_attribute` declared in class `Proto9` has type `int` but is used as type `str`.'] +Line 187: Unexpected errors ['callables_protocol.py:187:4 Undefined attribute [16]: `Proto9` has no attribute `xxx`.'] +Line 197: Unexpected errors ['callables_protocol.py:197:6 Undefined attribute [16]: `Proto9` has no attribute `other_attribute2`.'] +Line 216: Unexpected errors ['callables_protocol.py:216:0 Incompatible variable type [9]: cb10 is declared to have type `Proto10` but is used as type `typing.Callable(cb10_good)[[], None]`.'] +Line 259: Unexpected errors ['callables_protocol.py:259:0 Incompatible variable type [9]: cb12 is declared to have type `Proto12` but is used as type `typing.Callable(cb12_good2)[[Variable(typing.Any), Keywords(typing.Any)], None]`.'] +Line 260: Unexpected errors ['callables_protocol.py:260:0 Incompatible variable type [9]: cb12 is declared to have type `Proto12` but is used as type `typing.Callable(cb12_bad1)[[Variable(typing.Any), KeywordOnly(kwarg0, typing.Any)], None]`.'] +""" diff --git a/conformance/results/pyre/classes_classvar.toml b/conformance/results/pyre/classes_classvar.toml index af8bcfde2..62a4a63ba 100644 --- a/conformance/results/pyre/classes_classvar.toml +++ b/conformance/results/pyre/classes_classvar.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject use of TypeVar in ClassVar. +notes = """Does not reject use of TypeVar in ClassVar. Does not reject use of ParamSpec in ClassVar. Does not reject use of ClassVar as a generic type argument. Does not reject use of ClassVar in parameter type annotation. @@ -25,3 +24,17 @@ classes_classvar.py:79:0 Uninitialized attribute [13]: Attribute `damage` is dec classes_classvar.py:100:0 Invalid assignment [41]: Assigning to class variable through instance, did you mean to assign to `Starship.stats` instead? classes_classvar.py:129:0 Incompatible variable type [9]: a is declared to have type `ProtoA` but is used as type `ProtoAImpl`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Unexpected errors ['classes_classvar.py:33:0 Uninitialized attribute [13]: Attribute `bad1` is declared in class `ClassA` to have type `typing.Any` but is never initialized.', 'classes_classvar.py:33:0 Uninitialized attribute [13]: Attribute `bad4` is declared in class `ClassA` to have type `Variable[T]` but is never initialized.', 'classes_classvar.py:33:0 Uninitialized attribute [13]: Attribute `bad5` is declared in class `ClassA` to have type `typing.List[Variable[T]]` but is never initialized.', 'classes_classvar.py:33:0 Uninitialized attribute [13]: Attribute `bad6` is declared in class `ClassA` to have type `typing.Callable[classes_classvar.P, typing.Any]` but is never initialized.'] +Line 36: Unexpected errors ['classes_classvar.py:36:10 Invalid type parameters [24]: Generic type `CV` expects 1 type parameter, received 2.'] +Line 37: Unexpected errors ['classes_classvar.py:37:10 Invalid type [31]: Expression `typing.ClassVar[3]` is not a valid type.'] +Line 38: Unexpected errors ['classes_classvar.py:38:13 Unbound name [10]: Name `var` is used but not defined in the current scope.'] +Line 50: Unexpected errors ['classes_classvar.py:50:4 Incompatible attribute type [8]: Attribute `bad8` declared in class `ClassA` has type `List[str]` but is used as type `Dict[Variable[_KT], Variable[_VT]]`.'] +Line 52: Unexpected errors ['classes_classvar.py:52:10 Unbound name [10]: Name `Final` is used but not defined in the current scope.'] +Line 63: Unexpected errors ['classes_classvar.py:63:8 Undefined attribute [16]: `ClassA` has no attribute `xx`.'] +Line 66: Unexpected errors ['classes_classvar.py:66:8 Incompatible return type [7]: Expected `CV[int]` but got `int`.'] +Line 79: Unexpected errors ['classes_classvar.py:79:0 Uninitialized attribute [13]: Attribute `damage` is declared in class `BasicStarship` to have type `int` but is never initialized.'] +Line 100: Unexpected errors ['classes_classvar.py:100:0 Invalid assignment [41]: Assigning to class variable through instance, did you mean to assign to `Starship.stats` instead?'] +Line 129: Unexpected errors ['classes_classvar.py:129:0 Incompatible variable type [9]: a is declared to have type `ProtoA` but is used as type `ProtoAImpl`.'] +""" diff --git a/conformance/results/pyre/classes_override.toml b/conformance/results/pyre/classes_override.toml index 0ba1e9365..35d2aef54 100644 --- a/conformance/results/pyre/classes_override.toml +++ b/conformance/results/pyre/classes_override.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not yet support the @override decorator. +notes = """Does not yet support the @override decorator. """ output = """ classes_override.py:7:0 Undefined import [21]: Could not find a name `override` defined in module `typing`. @@ -20,3 +19,21 @@ classes_override.py:97:14 Invalid inheritance [39]: `typing.Any` is not a valid classes_override.py:102:5 Undefined attribute [16]: Module `typing` has no attribute `override`. classes_override.py:103:4 Invalid override [40]: `classes_override.ChildB.method1` is decorated with @override, but no method of the same name exists in superclasses of `ChildB`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['classes_override.py:7:0 Undefined import [21]: Could not find a name `override` defined in module `typing`.'] +Line 37: Unexpected errors ['classes_override.py:37:5 Undefined attribute [16]: Module `typing` has no attribute `override`.'] +Line 52: Unexpected errors ['classes_override.py:52:5 Undefined attribute [16]: Module `typing` has no attribute `override`.'] +Line 53: Unexpected errors ['classes_override.py:53:4 Invalid override [40]: `classes_override.ChildA.method3` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`.'] +Line 64: Unexpected errors ['classes_override.py:64:5 Undefined attribute [16]: Module `typing` has no attribute `override`.'] +Line 65: Unexpected errors ['classes_override.py:65:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).', 'classes_override.py:65:4 Invalid override [40]: `classes_override.ChildA.method4` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`.'] +Line 78: Unexpected errors ['classes_override.py:78:5 Undefined attribute [16]: Module `typing` has no attribute `override`.'] +Line 79: Unexpected errors ['classes_override.py:79:4 Invalid override [40]: `classes_override.ChildA.static_method1` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`.'] +Line 83: Unexpected errors ['classes_override.py:83:5 Undefined attribute [16]: Module `typing` has no attribute `override`.'] +Line 84: Unexpected errors ['classes_override.py:84:4 Invalid override [40]: `classes_override.ChildA.class_method1` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`.'] +Line 90: Unexpected errors ['classes_override.py:90:5 Undefined attribute [16]: Module `typing` has no attribute `override`.'] +Line 91: Unexpected errors ['classes_override.py:91:4 Invalid override [40]: `classes_override.ChildA.property1` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`.'] +Line 97: Unexpected errors ['classes_override.py:97:14 Invalid inheritance [39]: `typing.Any` is not a valid parent class.'] +Line 102: Unexpected errors ['classes_override.py:102:5 Undefined attribute [16]: Module `typing` has no attribute `override`.'] +Line 103: Unexpected errors ['classes_override.py:103:4 Invalid override [40]: `classes_override.ChildB.method1` is decorated with @override, but no method of the same name exists in superclasses of `ChildB`.'] +""" diff --git a/conformance/results/pyre/dataclasses_descriptors.toml b/conformance/results/pyre/dataclasses_descriptors.toml index 1d031cd07..c57c07284 100644 --- a/conformance/results/pyre/dataclasses_descriptors.toml +++ b/conformance/results/pyre/dataclasses_descriptors.toml @@ -1,7 +1,10 @@ conformant = "Partial" -notes = """ -Incorrectly generates error when calling constructor of dataclass with descriptor. +notes = """Incorrectly generates error when calling constructor of dataclass with descriptor. """ output = """ dataclasses_descriptors.py:35:10 Incompatible parameter type [6]: In call `DC1.__init__`, for 1st positional argument, expected `Desc1` but got `int`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 35: Unexpected errors ['dataclasses_descriptors.py:35:10 Incompatible parameter type [6]: In call `DC1.__init__`, for 1st positional argument, expected `Desc1` but got `int`.'] +""" diff --git a/conformance/results/pyre/dataclasses_frozen.toml b/conformance/results/pyre/dataclasses_frozen.toml index 152ccfc50..98afcd7c3 100644 --- a/conformance/results/pyre/dataclasses_frozen.toml +++ b/conformance/results/pyre/dataclasses_frozen.toml @@ -1,9 +1,13 @@ conformant = "Partial" -notes = """ -Does not reject frozen dataclass inherited from non-frozen dataclass. +notes = """Does not reject frozen dataclass inherited from non-frozen dataclass. Does not reject non-frozen dataclass inherited from frozen dataclass. """ output = """ dataclasses_frozen.py:16:0 Invalid assignment [41]: Cannot reassign final attribute `dc1.a`. dataclasses_frozen.py:17:0 Invalid assignment [41]: Cannot reassign final attribute `dc1.b`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['dataclasses_frozen.py:16:0 Invalid assignment [41]: Cannot reassign final attribute `dc1.a`.'] +Line 17: Unexpected errors ['dataclasses_frozen.py:17:0 Invalid assignment [41]: Cannot reassign final attribute `dc1.b`.'] +""" diff --git a/conformance/results/pyre/dataclasses_hash.toml b/conformance/results/pyre/dataclasses_hash.toml index a71f51ca0..93dda1a73 100644 --- a/conformance/results/pyre/dataclasses_hash.toml +++ b/conformance/results/pyre/dataclasses_hash.toml @@ -1,6 +1,8 @@ conformant = "Partial" -notes = """ -Does not report when dataclass is not compatible with Hashable protocol. +notes = """Does not report when dataclass is not compatible with Hashable protocol. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/dataclasses_inheritance.toml b/conformance/results/pyre/dataclasses_inheritance.toml index 5000e40e5..f7331a090 100644 --- a/conformance/results/pyre/dataclasses_inheritance.toml +++ b/conformance/results/pyre/dataclasses_inheritance.toml @@ -1,7 +1,9 @@ conformant = "Partial" -notes = """ -Does not reject ClassVar that is overridden by instance variable. +notes = """Does not reject ClassVar that is overridden by instance variable. Does not reject instance variable that is overridden by ClassVar. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/dataclasses_kwonly.toml b/conformance/results/pyre/dataclasses_kwonly.toml index 2ed61b5ae..f1b294dff 100644 --- a/conformance/results/pyre/dataclasses_kwonly.toml +++ b/conformance/results/pyre/dataclasses_kwonly.toml @@ -4,3 +4,9 @@ dataclasses_kwonly.py:23:0 Too many arguments [19]: Call `DC1.__init__` expects dataclasses_kwonly.py:38:0 Too many arguments [19]: Call `DC2.__init__` expects 1 positional argument, 2 were provided. dataclasses_kwonly.py:53:0 Too many arguments [19]: Call `DC3.__init__` expects 1 positional argument, 2 were provided. """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['dataclasses_kwonly.py:23:0 Too many arguments [19]: Call `DC1.__init__` expects 1 positional argument, 2 were provided.'] +Line 38: Unexpected errors ['dataclasses_kwonly.py:38:0 Too many arguments [19]: Call `DC2.__init__` expects 1 positional argument, 2 were provided.'] +Line 53: Unexpected errors ['dataclasses_kwonly.py:53:0 Too many arguments [19]: Call `DC3.__init__` expects 1 positional argument, 2 were provided.'] +""" diff --git a/conformance/results/pyre/dataclasses_order.toml b/conformance/results/pyre/dataclasses_order.toml index 4f4d92b02..6723ff082 100644 --- a/conformance/results/pyre/dataclasses_order.toml +++ b/conformance/results/pyre/dataclasses_order.toml @@ -1,6 +1,8 @@ conformant = "Partial" -notes = """ -Does not report type incompatibility with comparison operator. +notes = """Does not report type incompatibility with comparison operator. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/dataclasses_postinit.toml b/conformance/results/pyre/dataclasses_postinit.toml index dd01d5656..5801b2b45 100644 --- a/conformance/results/pyre/dataclasses_postinit.toml +++ b/conformance/results/pyre/dataclasses_postinit.toml @@ -1,8 +1,11 @@ conformant = "Unsupported" -notes = """ -Does not perform validation of `__post_init__` method. +notes = """Does not perform validation of `__post_init__` method. Does not reject access of `InitVar` from object. """ output = """ dataclasses_postinit.py:54:4 Inconsistent override [14]: `dataclasses_postinit.DC4.__post_init__` overrides method defined in `DC3` inconsistently. Could not find parameter `_age` in overridden signature. """ +conformance_automated = "Fail" +errors_diff = """ +Line 54: Unexpected errors ['dataclasses_postinit.py:54:4 Inconsistent override [14]: `dataclasses_postinit.DC4.__post_init__` overrides method defined in `DC3` inconsistently. Could not find parameter `_age` in overridden signature.'] +""" diff --git a/conformance/results/pyre/dataclasses_slots.toml b/conformance/results/pyre/dataclasses_slots.toml index f23f3133f..a0c88b5c4 100644 --- a/conformance/results/pyre/dataclasses_slots.toml +++ b/conformance/results/pyre/dataclasses_slots.toml @@ -1,9 +1,12 @@ conformant = "Partial" -notes = """ -Does not report error when `slots=True` is used with `__slots__` definition. +notes = """Does not report error when `slots=True` is used with `__slots__` definition. Does not reject write to instance variable that is not defined in __slots__. Does not reject access to `__slots__` from dataclass instance when `slots=False`. """ output = """ dataclasses_slots.py:67:0 Undefined attribute [16]: `DC6` has no attribute `__slots__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 67: Unexpected errors ['dataclasses_slots.py:67:0 Undefined attribute [16]: `DC6` has no attribute `__slots__`.'] +""" diff --git a/conformance/results/pyre/dataclasses_transform_class.toml b/conformance/results/pyre/dataclasses_transform_class.toml index 1ce4be7d7..46f48dcc5 100644 --- a/conformance/results/pyre/dataclasses_transform_class.toml +++ b/conformance/results/pyre/dataclasses_transform_class.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ dataclasses_transform_class.py:27:0 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `ModelBase` to have type `str` but is never initialized. @@ -20,3 +19,21 @@ dataclasses_transform_class.py:111:0 Uninitialized attribute [13]: Attribute `id dataclasses_transform_class.py:111:0 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer3` to have type `str` but is never initialized. dataclasses_transform_class.py:116:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Unexpected errors ['dataclasses_transform_class.py:27:0 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `ModelBase` to have type `str` but is never initialized.'] +Line 52: Unexpected errors ['dataclasses_transform_class.py:52:0 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.'] +Line 57: Unexpected errors ['dataclasses_transform_class.py:57:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 63: Unexpected errors ['dataclasses_transform_class.py:63:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.'] +Line 65: Unexpected errors ['dataclasses_transform_class.py:65:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 69: Unexpected errors ['dataclasses_transform_class.py:69:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`.'] +Line 71: Unexpected errors ['dataclasses_transform_class.py:71:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 73: Unexpected errors ['dataclasses_transform_class.py:73:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 75: Unexpected errors ['dataclasses_transform_class.py:75:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.'] +Line 79: Unexpected errors ['dataclasses_transform_class.py:79:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.'] +Line 86: Unexpected errors ['dataclasses_transform_class.py:86:0 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `GenericModelBase` to have type `Variable[T]` but is never initialized.'] +Line 103: Unexpected errors ['dataclasses_transform_class.py:103:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 107: Unexpected errors ['dataclasses_transform_class.py:107:0 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `ModelBaseFrozen` to have type `str` but is never initialized.'] +Line 111: Unexpected errors ['dataclasses_transform_class.py:111:0 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer3` to have type `int` but is never initialized.', 'dataclasses_transform_class.py:111:0 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer3` to have type `str` but is never initialized.'] +Line 116: Unexpected errors ['dataclasses_transform_class.py:116:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +""" diff --git a/conformance/results/pyre/dataclasses_transform_field.toml b/conformance/results/pyre/dataclasses_transform_field.toml index cbecc0d24..ccbb281a6 100644 --- a/conformance/results/pyre/dataclasses_transform_field.toml +++ b/conformance/results/pyre/dataclasses_transform_field.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ dataclasses_transform_field.py:49:42 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. @@ -9,3 +8,11 @@ dataclasses_transform_field.py:64:0 Unexpected keyword [28]: Unexpected keyword dataclasses_transform_field.py:75:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. dataclasses_transform_field.py:77:0 Unexpected keyword [28]: Unexpected keyword argument `name` to call `object.__init__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 49: Unexpected errors ["dataclasses_transform_field.py:49:42 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] +Line 60: Unexpected errors ['dataclasses_transform_field.py:60:0 Unexpected keyword [28]: Unexpected keyword argument `name` to call `object.__init__`.'] +Line 64: Unexpected errors ['dataclasses_transform_field.py:64:0 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 75: Unexpected errors ['dataclasses_transform_field.py:75:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided.'] +Line 77: Unexpected errors ['dataclasses_transform_field.py:77:0 Unexpected keyword [28]: Unexpected keyword argument `name` to call `object.__init__`.'] +""" diff --git a/conformance/results/pyre/dataclasses_transform_func.toml b/conformance/results/pyre/dataclasses_transform_func.toml index 5c010ed56..ee83250e6 100644 --- a/conformance/results/pyre/dataclasses_transform_func.toml +++ b/conformance/results/pyre/dataclasses_transform_func.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ dataclasses_transform_func.py:20:0 Incompatible overload [43]: The implementation of `create_model` does not accept all possible arguments of overload defined on line `20`. @@ -24,3 +23,23 @@ dataclasses_transform_func.py:82:0 Uninitialized attribute [13]: Attribute `name dataclasses_transform_func.py:90:0 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized. dataclasses_transform_func.py:94:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 20: Unexpected errors ['dataclasses_transform_func.py:20:0 Incompatible overload [43]: The implementation of `create_model` does not accept all possible arguments of overload defined on line `20`.'] +Line 25: Unexpected errors ["dataclasses_transform_func.py:25:5 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] +Line 29: Unexpected errors ['dataclasses_transform_func.py:29:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] +Line 34: Unexpected errors ['dataclasses_transform_func.py:34:0 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer1` to have type `int` but is never initialized.', 'dataclasses_transform_func.py:34:0 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer1` to have type `str` but is never initialized.'] +Line 40: Unexpected errors ['dataclasses_transform_func.py:40:0 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.', 'dataclasses_transform_func.py:40:0 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer2` to have type `str` but is never initialized.'] +Line 46: Unexpected errors ['dataclasses_transform_func.py:46:0 Uninitialized attribute [13]: Attribute `salary` is declared in class `Customer2Subclass` to have type `float` but is never initialized.'] +Line 50: Unexpected errors ['dataclasses_transform_func.py:50:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 53: Unexpected errors ['dataclasses_transform_func.py:53:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.'] +Line 57: Unexpected errors ['dataclasses_transform_func.py:57:0 Incompatible attribute type [8]: Attribute `name` declared in class `Customer1` has type `str` but is used as type `int`.'] +Line 61: Unexpected errors ['dataclasses_transform_func.py:61:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`.'] +Line 65: Unexpected errors ['dataclasses_transform_func.py:65:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 67: Unexpected errors ['dataclasses_transform_func.py:67:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 71: Unexpected errors ['dataclasses_transform_func.py:71:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.'] +Line 73: Unexpected errors ['dataclasses_transform_func.py:73:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.'] +Line 82: Unexpected errors ['dataclasses_transform_func.py:82:0 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer3` to have type `int` but is never initialized.', 'dataclasses_transform_func.py:82:0 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer3` to have type `str` but is never initialized.'] +Line 90: Unexpected errors ['dataclasses_transform_func.py:90:0 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized.'] +Line 94: Unexpected errors ['dataclasses_transform_func.py:94:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +""" diff --git a/conformance/results/pyre/dataclasses_transform_meta.toml b/conformance/results/pyre/dataclasses_transform_meta.toml index 130917ca1..6137c8046 100644 --- a/conformance/results/pyre/dataclasses_transform_meta.toml +++ b/conformance/results/pyre/dataclasses_transform_meta.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ dataclasses_transform_meta.py:25:0 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `ModelMeta` to have type `str` but is never initialized. @@ -17,3 +16,18 @@ dataclasses_transform_meta.py:92:0 Uninitialized attribute [13]: Attribute `id` dataclasses_transform_meta.py:92:0 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer3` to have type `str` but is never initialized. dataclasses_transform_meta.py:97:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Unexpected errors ['dataclasses_transform_meta.py:25:0 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `ModelMeta` to have type `str` but is never initialized.'] +Line 52: Unexpected errors ['dataclasses_transform_meta.py:52:0 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.'] +Line 57: Unexpected errors ['dataclasses_transform_meta.py:57:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 63: Unexpected errors ['dataclasses_transform_meta.py:63:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.'] +Line 66: Unexpected errors ['dataclasses_transform_meta.py:66:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 70: Unexpected errors ['dataclasses_transform_meta.py:70:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`.'] +Line 72: Unexpected errors ['dataclasses_transform_meta.py:72:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 74: Unexpected errors ['dataclasses_transform_meta.py:74:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +Line 76: Unexpected errors ['dataclasses_transform_meta.py:76:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.'] +Line 80: Unexpected errors ['dataclasses_transform_meta.py:80:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.'] +Line 92: Unexpected errors ['dataclasses_transform_meta.py:92:0 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer3` to have type `int` but is never initialized.', 'dataclasses_transform_meta.py:92:0 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer3` to have type `str` but is never initialized.'] +Line 97: Unexpected errors ['dataclasses_transform_meta.py:97:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] +""" diff --git a/conformance/results/pyre/dataclasses_usage.toml b/conformance/results/pyre/dataclasses_usage.toml index 810fa6725..44a95eb3c 100644 --- a/conformance/results/pyre/dataclasses_usage.toml +++ b/conformance/results/pyre/dataclasses_usage.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report error when field with no default follows field with default. +notes = """Does not report error when field with no default follows field with default. Incorrectly reports error with InitVar that has default value. """ output = """ @@ -18,3 +17,21 @@ dataclasses_usage.py:172:0 Uninitialized attribute [13]: Attribute `x_squared` i dataclasses_usage.py:179:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. dataclasses_usage.py:205:0 Incompatible variable type [9]: v1 is declared to have type `DataclassProto` but is used as type `DC15`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 62: Expected 1 errors +Line 68: Expected 1 errors +Line 74: Expected 1 errors +Line 51: Unexpected errors ['dataclasses_usage.py:51:5 Missing argument [20]: Call `InventoryItem.__init__` expects argument `unit_price`.'] +Line 52: Unexpected errors ['dataclasses_usage.py:52:27 Incompatible parameter type [6]: In call `InventoryItem.__init__`, for 2nd positional argument, expected `float` but got `str`.'] +Line 53: Unexpected errors ['dataclasses_usage.py:53:5 Too many arguments [19]: Call `InventoryItem.__init__` expects 3 positional arguments, 4 were provided.'] +Line 73: Unexpected errors ['dataclasses_usage.py:73:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC3` has type `InitVar[int]` but is used as type `int`.'] +Line 84: Unexpected errors ['dataclasses_usage.py:84:5 Too many arguments [19]: Call `DC4.__init__` expects 1 positional argument, 2 were provided.'] +Line 89: Unexpected errors ['dataclasses_usage.py:89:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC5` has type `int` but is used as type `str`.'] +Line 116: Unexpected errors ['dataclasses_usage.py:116:0 Uninitialized attribute [13]: Attribute `y` is declared in class `DC8` to have type `int` but is never initialized.'] +Line 127: Unexpected errors ['dataclasses_usage.py:127:0 Too many arguments [19]: Call `DC7.__init__` expects 1 positional argument, 2 were provided.'] +Line 130: Unexpected errors ['dataclasses_usage.py:130:0 Missing argument [20]: Call `DC8.__init__` expects argument `y`.'] +Line 172: Unexpected errors ['dataclasses_usage.py:172:0 Uninitialized attribute [13]: Attribute `x` is declared in class `DC13` to have type `int` but is never initialized.', 'dataclasses_usage.py:172:0 Uninitialized attribute [13]: Attribute `x_squared` is declared in class `DC13` to have type `int` but is never initialized.'] +Line 179: Unexpected errors ['dataclasses_usage.py:179:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided.'] +Line 205: Unexpected errors ['dataclasses_usage.py:205:0 Incompatible variable type [9]: v1 is declared to have type `DataclassProto` but is used as type `DC15`.'] +""" diff --git a/conformance/results/pyre/directives_assert_type.toml b/conformance/results/pyre/directives_assert_type.toml index b83af4108..1d01c0c12 100644 --- a/conformance/results/pyre/directives_assert_type.toml +++ b/conformance/results/pyre/directives_assert_type.toml @@ -1,8 +1,14 @@ conformant = "Unsupported" -notes = """ -Does not understand "assert_type". +notes = """Does not understand "assert_type". """ output = """ directives_assert_type.py:31:4 Missing argument [20]: Call `assert_type` expects argument in position 0. directives_assert_type.py:33:4 Too many arguments [19]: Call `assert_type` expects 2 positional arguments, 3 were provided. """ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Expected 1 errors +Line 28: Expected 1 errors +Line 29: Expected 1 errors +Line 32: Expected 1 errors +""" diff --git a/conformance/results/pyre/directives_cast.toml b/conformance/results/pyre/directives_cast.toml index cbb4ea201..34eb670b7 100644 --- a/conformance/results/pyre/directives_cast.toml +++ b/conformance/results/pyre/directives_cast.toml @@ -4,3 +4,9 @@ directives_cast.py:15:7 Missing argument [20]: Call `cast` expects argument `typ directives_cast.py:16:12 Invalid type [31]: Expression `1` is not a valid type. directives_cast.py:17:7 Too many arguments [19]: Call `cast` expects 2 positional arguments, 3 were provided. """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['directives_cast.py:15:7 Missing argument [20]: Call `cast` expects argument `typ`.'] +Line 16: Unexpected errors ['directives_cast.py:16:12 Invalid type [31]: Expression `1` is not a valid type.'] +Line 17: Unexpected errors ['directives_cast.py:17:7 Too many arguments [19]: Call `cast` expects 2 positional arguments, 3 were provided.'] +""" diff --git a/conformance/results/pyre/directives_no_type_check.toml b/conformance/results/pyre/directives_no_type_check.toml index 52613b6a7..29a5dc850 100644 --- a/conformance/results/pyre/directives_no_type_check.toml +++ b/conformance/results/pyre/directives_no_type_check.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not honor @no_type_check decorator. +notes = """Does not honor @no_type_check decorator. """ output = """ directives_no_type_check.py:16:4 Incompatible attribute type [8]: Attribute `x` declared in class `ClassA` has type `int` but is used as type `str`. @@ -10,3 +9,11 @@ directives_no_type_check.py:25:6 Incompatible parameter type [6]: In call `func1 directives_no_type_check.py:25:18 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `str` but got `bytes`. directives_no_type_check.py:26:0 Missing argument [20]: Call `func1` expects argument `a`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['directives_no_type_check.py:16:4 Incompatible attribute type [8]: Attribute `x` declared in class `ClassA` has type `int` but is used as type `str`.'] +Line 21: Unexpected errors ['directives_no_type_check.py:21:12 Unsupported operand [58]: `+` is not supported for operand types `int` and `str`.'] +Line 22: Unexpected errors ['directives_no_type_check.py:22:4 Incompatible return type [7]: Expected `None` but got `int`.'] +Line 25: Unexpected errors ['directives_no_type_check.py:25:6 Incompatible parameter type [6]: In call `func1`, for 1st positional argument, expected `int` but got `bytes`.', 'directives_no_type_check.py:25:18 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `str` but got `bytes`.'] +Line 26: Unexpected errors ['directives_no_type_check.py:26:0 Missing argument [20]: Call `func1` expects argument `a`.'] +""" diff --git a/conformance/results/pyre/directives_reveal_type.toml b/conformance/results/pyre/directives_reveal_type.toml index fe33115be..b75505e26 100644 --- a/conformance/results/pyre/directives_reveal_type.toml +++ b/conformance/results/pyre/directives_reveal_type.toml @@ -1,8 +1,10 @@ conformant = "Unsupported" -notes = """ -Does not understand reveal_type call. +notes = """Does not understand reveal_type call. """ output = """ directives_reveal_type.py:19:4 Missing argument [20]: Call `reveal_type` expects argument in position 0. directives_reveal_type.py:20:4 Too many arguments [19]: Call `reveal_type` expects 1 positional argument, 2 were provided. """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/directives_type_checking.toml b/conformance/results/pyre/directives_type_checking.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyre/directives_type_checking.toml +++ b/conformance/results/pyre/directives_type_checking.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/directives_type_ignore.toml b/conformance/results/pyre/directives_type_ignore.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyre/directives_type_ignore.toml +++ b/conformance/results/pyre/directives_type_ignore.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/directives_type_ignore_file1.toml b/conformance/results/pyre/directives_type_ignore_file1.toml index 2dc002af4..66b1680ff 100644 --- a/conformance/results/pyre/directives_type_ignore_file1.toml +++ b/conformance/results/pyre/directives_type_ignore_file1.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Does not support file-level `#type: ignore` comment. +notes = """Does not support file-level `#type: ignore` comment. """ output = """ directives_type_ignore_file1.py:16:0 Incompatible variable type [9]: x is declared to have type `int` but is used as type `str`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['directives_type_ignore_file1.py:16:0 Incompatible variable type [9]: x is declared to have type `int` but is used as type `str`.'] +""" diff --git a/conformance/results/pyre/directives_type_ignore_file2.toml b/conformance/results/pyre/directives_type_ignore_file2.toml index dba9f5dd6..c19e7ca6b 100644 --- a/conformance/results/pyre/directives_type_ignore_file2.toml +++ b/conformance/results/pyre/directives_type_ignore_file2.toml @@ -2,3 +2,6 @@ conformant = "Pass" output = """ directives_type_ignore_file2.py:14:0 Incompatible variable type [9]: x is declared to have type `int` but is used as type `str`. """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/directives_version_platform.toml b/conformance/results/pyre/directives_version_platform.toml index f8f4a8d02..586c43695 100644 --- a/conformance/results/pyre/directives_version_platform.toml +++ b/conformance/results/pyre/directives_version_platform.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not support sys.platform checks. +notes = """Does not support sys.platform checks. Does not support os.name checks. """ output = """ @@ -9,3 +8,10 @@ directives_version_platform.py:36:4 Incompatible variable type [9]: val6 is decl directives_version_platform.py:40:4 Incompatible variable type [9]: val7 is declared to have type `int` but is used as type `str`. directives_version_platform.py:45:4 Incompatible variable type [9]: val8 is declared to have type `int` but is used as type `str`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 31: Unexpected errors ['directives_version_platform.py:31:4 Incompatible variable type [9]: val5 is declared to have type `int` but is used as type `str`.'] +Line 36: Unexpected errors ['directives_version_platform.py:36:4 Incompatible variable type [9]: val6 is declared to have type `int` but is used as type `str`.'] +Line 40: Unexpected errors ['directives_version_platform.py:40:4 Incompatible variable type [9]: val7 is declared to have type `int` but is used as type `str`.'] +Line 45: Unexpected errors ['directives_version_platform.py:45:4 Incompatible variable type [9]: val8 is declared to have type `int` but is used as type `str`.'] +""" diff --git a/conformance/results/pyre/generics_base_class.toml b/conformance/results/pyre/generics_base_class.toml index 4e4b14643..890907a19 100644 --- a/conformance/results/pyre/generics_base_class.toml +++ b/conformance/results/pyre/generics_base_class.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject illegal use of Generic. +notes = """Does not reject illegal use of Generic. Does not allow using generic in assert_type expression. """ output = """ @@ -10,3 +9,11 @@ generics_base_class.py:49:21 Invalid type parameters [24]: Generic type `LinkedL generics_base_class.py:61:17 Invalid type parameters [24]: Generic type `MyDict` expects 1 type parameter, received 2. generics_base_class.py:68:0 Duplicate type variables [59]: Duplicate type variable `T` in Generic[...]. """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_base_class.py:26:25 Incompatible parameter type [6]: In call `takes_dict_incorrect`, for 1st positional argument, expected `Dict[str, List[object]]` but got `SymbolTable`.'] +Line 45: Unexpected errors ['generics_base_class.py:45:25 Undefined attribute [16]: `typing.Iterator` has no attribute `__getitem__`.'] +Line 49: Unexpected errors ['generics_base_class.py:49:21 Invalid type parameters [24]: Generic type `LinkedList` expects 1 type parameter, received 2.'] +Line 61: Unexpected errors ['generics_base_class.py:61:17 Invalid type parameters [24]: Generic type `MyDict` expects 1 type parameter, received 2.'] +Line 68: Unexpected errors ['generics_base_class.py:68:0 Duplicate type variables [59]: Duplicate type variable `T` in Generic[...].'] +""" diff --git a/conformance/results/pyre/generics_basic.toml b/conformance/results/pyre/generics_basic.toml index 302d57ee1..a2a24385b 100644 --- a/conformance/results/pyre/generics_basic.toml +++ b/conformance/results/pyre/generics_basic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -False positives in examples using constrained type variables. +notes = """False positives in examples using constrained type variables. False negative in custom map example. False positive using `iter`. False negative for generic metaclass. @@ -16,3 +15,14 @@ generics_basic.py:59:14 Incompatible parameter type [6]: In call `concat`, for 2 generics_basic.py:107:0 Duplicate type variables [59]: Duplicate type variable `T` in Generic[...]. generics_basic.py:161:25 Undefined attribute [16]: `typing.Iterator` has no attribute `__getitem__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 31: Unexpected errors ['generics_basic.py:31:4 Incompatible return type [7]: Expected `Variable[AnyStr <: [str, bytes]]` but got `bytes`.', 'generics_basic.py:31:15 Incompatible parameter type [6]: In call `bytes.__add__`, for 1st positional argument, expected `Union[array[typing.Any], bytearray, bytes, _CData, memoryview, mmap, PickleBuffer]` but got `Variable[AnyStr <: [str, bytes]]`.'] +Line 36: Unexpected errors ['generics_basic.py:36:14 Incompatible parameter type [6]: In call `concat`, for 2nd positional argument, expected `Variable[AnyStr <: [str, bytes]]` but got `bytes`.'] +Line 37: Unexpected errors ['generics_basic.py:37:14 Incompatible parameter type [6]: In call `concat`, for 2nd positional argument, expected `Variable[AnyStr <: [str, bytes]]` but got `str`.'] +Line 44: Unexpected errors ["generics_basic.py:44:0 Invalid type [31]: TypeVar can't have a single explicit constraint. Did you mean `bound=str`?"] +Line 48: Unexpected errors ['generics_basic.py:48:0 Invalid type [31]: Expression `Variable[BadConstraint2 <: [str, Variable[generics_basic.T]]]` is not a valid type. Type variables cannot contain other type variables in their constraints.'] +Line 59: Unexpected errors ['generics_basic.py:59:14 Incompatible parameter type [6]: In call `concat`, for 2nd positional argument, expected `Variable[AnyStr <: [str, bytes]]` but got `bytes`.'] +Line 107: Unexpected errors ['generics_basic.py:107:0 Duplicate type variables [59]: Duplicate type variable `T` in Generic[...].'] +Line 161: Unexpected errors ['generics_basic.py:161:25 Undefined attribute [16]: `typing.Iterator` has no attribute `__getitem__`.'] +""" diff --git a/conformance/results/pyre/generics_defaults.toml b/conformance/results/pyre/generics_defaults.toml index bff72267d..2322628a3 100644 --- a/conformance/results/pyre/generics_defaults.toml +++ b/conformance/results/pyre/generics_defaults.toml @@ -28,3 +28,27 @@ generics_defaults.py:154:11 Undefined or invalid type [11]: Annotation `P` is no generics_defaults.py:157:12 Undefined attribute [16]: `Foo6` has no attribute `__getitem__`. generics_defaults.py:172:33 Undefined attribute [16]: `Foo7` has no attribute `__getitem__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Unexpected errors ['generics_defaults.py:25:4 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type.', 'generics_defaults.py:25:4 Undefined or invalid type [11]: Annotation `T` is not defined as a type.'] +Line 29: Unexpected errors ['generics_defaults.py:29:20 Undefined or invalid type [11]: Annotation `DefaultIntT` is not defined as a type.'] +Line 32: Unexpected errors ['generics_defaults.py:32:32 Undefined attribute [16]: `NoNonDefaults` has no attribute `__getitem__`.'] +Line 37: Unexpected errors ['generics_defaults.py:37:17 Undefined or invalid type [11]: Annotation `DefaultBoolT` is not defined as a type.'] +Line 40: Unexpected errors ['generics_defaults.py:40:12 Undefined attribute [16]: `OneDefault` has no attribute `__getitem__`.'] +Line 44: Unexpected errors ['generics_defaults.py:44:21 Undefined or invalid type [11]: Annotation `T1` is not defined as a type.', 'generics_defaults.py:44:21 Undefined or invalid type [11]: Annotation `T2` is not defined as a type.'] +Line 47: Unexpected errors ['generics_defaults.py:47:33 Undefined attribute [16]: `AllTheDefaults` has no attribute `__getitem__`.'] +Line 75: Unexpected errors ['generics_defaults.py:75:33 Incompatible parameter type [6]: In call `ParamSpec.__init__`, for argument `default`, expected `Union[None, Type[typing.Any], str]` but got `List[Type[Union[int, str]]]`.'] +Line 78: Unexpected errors ['generics_defaults.py:78:22 Undefined or invalid type [11]: Annotation `DefaultP` is not defined as a type.'] +Line 81: Unexpected errors ['generics_defaults.py:81:34 Undefined attribute [16]: `Class_ParamSpec` has no attribute `__getitem__`.'] +Line 90: Unexpected errors ['generics_defaults.py:90:59 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[int]]`.'] +Line 93: Unexpected errors ['generics_defaults.py:93:25 Invalid type [31]: Expression `typing.Generic[(*$local_generics_defaults$DefaultTs)]` is not a valid type.'] +Line 96: Unexpected errors ['generics_defaults.py:96:56 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_defaults.py:96:63 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[int]]`.'] +Line 97: Unexpected errors ['generics_defaults.py:97:53 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[str], Type[int]]`. Expected has length 0, but actual has length 2.'] +Line 98: Unexpected errors ['generics_defaults.py:98:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[int], Type[bool]]`. Expected has length 0, but actual has length 2.', 'generics_defaults.py:98:64 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[int], Type[bool]]`. Expected has length 0, but actual has length 2.'] +Line 130: Unexpected errors ['generics_defaults.py:130:13 Undefined or invalid type [11]: Annotation `T4` is not defined as a type.'] +Line 144: Unexpected errors ['generics_defaults.py:144:11 Invalid type [31]: Expression `typing.Generic[(*$local_generics_defaults$Ts, $local_generics_defaults$T5)]` is not a valid type.', 'generics_defaults.py:144:11 Undefined or invalid type [11]: Annotation `T5` is not defined as a type.'] +Line 151: Unexpected errors ['generics_defaults.py:151:19 Incompatible parameter type [6]: In call `ParamSpec.__init__`, for argument `default`, expected `Union[None, Type[typing.Any], str]` but got `List[Type[float]]`.'] +Line 154: Unexpected errors ['generics_defaults.py:154:11 Invalid type [31]: Expression `typing.Generic[(*$local_generics_defaults$Ts, $local_generics_defaults$P)]` is not a valid type.', 'generics_defaults.py:154:11 Undefined or invalid type [11]: Annotation `P` is not defined as a type.'] +Line 157: Unexpected errors ['generics_defaults.py:157:12 Undefined attribute [16]: `Foo6` has no attribute `__getitem__`.'] +Line 172: Unexpected errors ['generics_defaults.py:172:33 Undefined attribute [16]: `Foo7` has no attribute `__getitem__`.'] +""" diff --git a/conformance/results/pyre/generics_defaults_referential.toml b/conformance/results/pyre/generics_defaults_referential.toml index 12a75eda3..73419a963 100644 --- a/conformance/results/pyre/generics_defaults_referential.toml +++ b/conformance/results/pyre/generics_defaults_referential.toml @@ -17,3 +17,15 @@ generics_defaults_referential.py:98:10 Undefined or invalid type [11]: Annotatio generics_defaults_referential.py:102:22 Undefined attribute [16]: `Bar` has no attribute `__getitem__`. generics_defaults_referential.py:102:36 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `object`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 20: Unexpected errors ['generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StartT` is not defined as a type.', 'generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StepT` is not defined as a type.', 'generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StopT` is not defined as a type.'] +Line 23: Unexpected errors ['generics_defaults_referential.py:23:24 Undefined attribute [16]: `slice` has no attribute `__getitem__`.'] +Line 31: Unexpected errors ['generics_defaults_referential.py:31:10 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type.', 'generics_defaults_referential.py:31:10 Undefined or invalid type [11]: Annotation `T2` is not defined as a type.'] +Line 35: Unexpected errors ['generics_defaults_referential.py:35:24 Undefined attribute [16]: `Foo` has no attribute `__getitem__`.'] +Line 50: Unexpected errors ['generics_defaults_referential.py:50:11 Undefined or invalid type [11]: Annotation `S1` is not defined as a type.', 'generics_defaults_referential.py:50:11 Undefined or invalid type [11]: Annotation `S2` is not defined as a type.'] +Line 57: Unexpected errors ['generics_defaults_referential.py:57:13 Undefined or invalid type [11]: Annotation `Start2T` is not defined as a type.', 'generics_defaults_referential.py:57:13 Undefined or invalid type [11]: Annotation `Stop2T` is not defined as a type.'] +Line 95: Unexpected errors ['generics_defaults_referential.py:95:52 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +Line 98: Unexpected errors ['generics_defaults_referential.py:98:10 Undefined or invalid type [11]: Annotation `ListDefaultT` is not defined as a type.', 'generics_defaults_referential.py:98:10 Undefined or invalid type [11]: Annotation `Z1` is not defined as a type.'] +Line 102: Unexpected errors ['generics_defaults_referential.py:102:22 Undefined attribute [16]: `Bar` has no attribute `__getitem__`.', 'generics_defaults_referential.py:102:36 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `object`.'] +""" diff --git a/conformance/results/pyre/generics_defaults_specialization.toml b/conformance/results/pyre/generics_defaults_specialization.toml index 5df797da1..a6783dec8 100644 --- a/conformance/results/pyre/generics_defaults_specialization.toml +++ b/conformance/results/pyre/generics_defaults_specialization.toml @@ -14,3 +14,17 @@ generics_defaults_specialization.py:58:10 Undefined or invalid type [11]: Annota generics_defaults_specialization.py:65:0 Incompatible variable type [9]: v1 is declared to have type `Baz[]` but is used as type `Spam`. generics_defaults_specialization.py:65:4 Invalid type parameters [24]: Non-generic type `Baz` cannot take parameters. """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['generics_defaults_specialization.py:19:30 Undefined or invalid type [11]: Annotation `T1` is not defined as a type.', 'generics_defaults_specialization.py:19:30 Undefined or invalid type [11]: Annotation `T2` is not defined as a type.'] +Line 22: Unexpected errors ['generics_defaults_specialization.py:22:21 Undefined attribute [16]: `SomethingWithNoDefaults` has no attribute `__getitem__`.'] +Line 25: Unexpected errors ['generics_defaults_specialization.py:25:14 Undefined or invalid type [11]: Annotation `MyAlias` is not defined as a type.'] +Line 26: Unexpected errors ['generics_defaults_specialization.py:26:20 Undefined attribute [16]: `SomethingWithNoDefaults` has no attribute `__getitem__`.'] +Line 30: Unexpected errors ['generics_defaults_specialization.py:30:0 Undefined attribute [16]: `TypeAlias` has no attribute `__getitem__`.'] +Line 38: Unexpected errors ['generics_defaults_specialization.py:38:17 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type.'] +Line 45: Unexpected errors ['generics_defaults_specialization.py:45:22 Undefined attribute [16]: `Bar` has no attribute `__getitem__`.'] +Line 50: Unexpected errors ['generics_defaults_specialization.py:50:10 Invalid type parameters [24]: Non-generic type `SubclassMe` cannot take parameters.'] +Line 55: Unexpected errors ['generics_defaults_specialization.py:55:0 Undefined attribute [16]: `Foo` has no attribute `__getitem__`.'] +Line 58: Unexpected errors ['generics_defaults_specialization.py:58:10 Undefined or invalid type [11]: Annotation `DefaultIntT` is not defined as a type.'] +Line 65: Unexpected errors ['generics_defaults_specialization.py:65:0 Incompatible variable type [9]: v1 is declared to have type `Baz[]` but is used as type `Spam`.', 'generics_defaults_specialization.py:65:4 Invalid type parameters [24]: Non-generic type `Baz` cannot take parameters.'] +""" diff --git a/conformance/results/pyre/generics_paramspec_basic.toml b/conformance/results/pyre/generics_paramspec_basic.toml index 7d1bcadab..69019f0e1 100644 --- a/conformance/results/pyre/generics_paramspec_basic.toml +++ b/conformance/results/pyre/generics_paramspec_basic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not enforce name consistency for ParamSpec assigned to identifier. +notes = """Does not enforce name consistency for ParamSpec assigned to identifier. Incorrectly reports error for legitimate use of ParamSpec in generic type alias. Does not reject ParamSpec when used in various invalid locations. """ @@ -14,3 +13,11 @@ generics_paramspec_basic.py:27:13 Invalid type variable [34]: The type variable generics_paramspec_basic.py:27:13 Undefined or invalid type [11]: Annotation `Concatenate` is not defined as a type. generics_paramspec_basic.py:31:13 Invalid type parameters [24]: Single type parameter `Variable[_T]` expected, but a callable parameters `generics_paramspec_basic.P` was given for generic type list. """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['generics_paramspec_basic.py:15:0 Undefined or invalid type [11]: Annotation `P` is not defined as a type.'] +Line 17: Unexpected errors ['generics_paramspec_basic.py:17:0 Incompatible variable type [9]: TA2 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'generics_paramspec_basic.py:17:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[ParamSpec, None]`.'] +Line 18: Unexpected errors ['generics_paramspec_basic.py:18:0 Incompatible variable type [9]: TA3 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'generics_paramspec_basic.py:18:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[object, None]`.'] +Line 27: Unexpected errors ["generics_paramspec_basic.py:27:13 Invalid type variable [34]: The type variable `P` isn't present in the function's parameters.", 'generics_paramspec_basic.py:27:13 Undefined or invalid type [11]: Annotation `Concatenate` is not defined as a type.'] +Line 31: Unexpected errors ['generics_paramspec_basic.py:31:13 Invalid type parameters [24]: Single type parameter `Variable[_T]` expected, but a callable parameters `generics_paramspec_basic.P` was given for generic type list.'] +""" diff --git a/conformance/results/pyre/generics_paramspec_components.toml b/conformance/results/pyre/generics_paramspec_components.toml index 7e2cb81b8..55166dd50 100644 --- a/conformance/results/pyre/generics_paramspec_components.toml +++ b/conformance/results/pyre/generics_paramspec_components.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report illegal use of "P.args" on normal parameter. +notes = """Does not report illegal use of "P.args" on normal parameter. Does not report error when P.args is specified but P.kwargs is missing. Does not report error when P is out of scope and P.args and P.kwargs is used. Does not report error when calling callback defined with ParamSpec with incorrect arguments. @@ -20,3 +19,13 @@ generics_paramspec_components.py:83:8 Unexpected keyword [28]: Unexpected keywor generics_paramspec_components.py:98:19 Incompatible parameter type [6]: In call `twice`, for 2nd positional argument, expected `int` but got `str`. generics_paramspec_components.py:98:24 Incompatible parameter type [6]: In call `twice`, for 3rd positional argument, expected `str` but got `int`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['generics_paramspec_components.py:17:24 Undefined or invalid type [11]: Annotation `P.kwargs` is not defined as a type.', 'generics_paramspec_components.py:17:44 Undefined or invalid type [11]: Annotation `P.args` is not defined as a type.'] +Line 49: Unexpected errors ['generics_paramspec_components.py:49:8 Call error [29]: `typing.Callable[generics_paramspec_components.P, int]` cannot be safely called because the types and kinds of its parameters depend on a type variable.'] +Line 56: Unexpected errors ['generics_paramspec_components.py:56:32 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(str, $local_generics_paramspec_components$P)], None)]` is not a valid type.'] +Line 66: Unexpected errors ['generics_paramspec_components.py:66:14 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, $local_generics_paramspec_components$P)], int)]` is not a valid type.', 'generics_paramspec_components.py:66:14 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, $local_generics_paramspec_components$P)], int)]` is not a valid type.', "generics_paramspec_components.py:66:53 Invalid type variable [34]: The type variable `P` isn't present in the function's parameters."] +Line 74: Unexpected errors ['generics_paramspec_components.py:74:4 Incompatible return type [7]: Expected `typing.Callable[generics_paramspec_components.P, None]` but got `typing.Callable($local_generics_paramspec_components?remove$foo)[generics_paramspec_components.P, None]`.'] +Line 83: Unexpected errors ['generics_paramspec_components.py:83:8 Unexpected keyword [28]: Unexpected keyword argument `x` to call `foo`.'] +Line 98: Unexpected errors ['generics_paramspec_components.py:98:19 Incompatible parameter type [6]: In call `twice`, for 2nd positional argument, expected `int` but got `str`.', 'generics_paramspec_components.py:98:24 Incompatible parameter type [6]: In call `twice`, for 3rd positional argument, expected `str` but got `int`.'] +""" diff --git a/conformance/results/pyre/generics_paramspec_semantics.toml b/conformance/results/pyre/generics_paramspec_semantics.toml index b058c63ed..10c8848f2 100644 --- a/conformance/results/pyre/generics_paramspec_semantics.toml +++ b/conformance/results/pyre/generics_paramspec_semantics.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed). +notes = """Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed). Reports error for legitimate Callable type annotation that uses Concatenate. Does not evaluate the correct type for call of Callable defined with Concatenate. """ @@ -16,3 +15,15 @@ generics_paramspec_semantics.py:111:7 Invalid type [31]: Expression `typing.Call generics_paramspec_semantics.py:112:5 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(str, $local_generics_paramspec_semantics$P)], bool)]` is not a valid type. generics_paramspec_semantics.py:122:25 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, $local_generics_paramspec_semantics$P)], int)]` is not a valid type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_paramspec_semantics.py:26:0 Unexpected keyword [28]: Unexpected keyword argument `a` to anonymous call.'] +Line 27: Unexpected errors ['generics_paramspec_semantics.py:27:8 Incompatible parameter type [6]: In anonymous call, for 2nd positional argument, expected `bool` but got `str`.'] +Line 46: Unexpected errors ['generics_paramspec_semantics.py:46:16 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `typing.Callable[generics_paramspec_semantics.P, int]` but got `typing.Callable(y_x)[[Named(y, int), Named(x, str)], int]`.'] +Line 61: Unexpected errors ['generics_paramspec_semantics.py:61:22 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `typing.Callable[generics_paramspec_semantics.P, int]` but got `typing.Callable(keyword_only_y)[[KeywordOnly(y, int)], int]`.'] +Line 90: Unexpected errors ['generics_paramspec_semantics.py:90:32 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(str, $local_generics_paramspec_semantics$P)], bool)]` is not a valid type.'] +Line 100: Unexpected errors ['generics_paramspec_semantics.py:100:14 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, $local_generics_paramspec_semantics$P)], int)]` is not a valid type.', "generics_paramspec_semantics.py:100:53 Invalid type variable [34]: The type variable `P` isn't present in the function's parameters."] +Line 111: Unexpected errors ['generics_paramspec_semantics.py:111:7 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, $local_generics_paramspec_semantics$P)], int)]` is not a valid type.'] +Line 112: Unexpected errors ['generics_paramspec_semantics.py:112:5 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(str, $local_generics_paramspec_semantics$P)], bool)]` is not a valid type.'] +Line 122: Unexpected errors ['generics_paramspec_semantics.py:122:25 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, $local_generics_paramspec_semantics$P)], int)]` is not a valid type.'] +""" diff --git a/conformance/results/pyre/generics_paramspec_specialization.toml b/conformance/results/pyre/generics_paramspec_specialization.toml index 18dc721ba..d2ea908c9 100644 --- a/conformance/results/pyre/generics_paramspec_specialization.toml +++ b/conformance/results/pyre/generics_paramspec_specialization.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Reports error for legitimate use of ParamSpec and Concatenate in function signature. +notes = """Reports error for legitimate use of ParamSpec and Concatenate in function signature. Reports error for legitimate specialization of generic class parameterized with ParamSpec. """ output = """ @@ -20,3 +19,17 @@ generics_paramspec_specialization.py:56:15 Incompatible parameter type [6]: In a generics_paramspec_specialization.py:61:8 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `int` but got `str`. generics_paramspec_specialization.py:62:15 Incompatible parameter type [6]: In anonymous call, for 3rd positional argument, expected `bool` but got `str`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_paramspec_specialization.py:14:0 Uninitialized attribute [13]: Attribute `f` is declared in class `ClassA` to have type `typing.Callable[generics_paramspec_specialization.P1, int]` but is never initialized.', 'generics_paramspec_specialization.py:14:0 Uninitialized attribute [13]: Attribute `x` is declared in class `ClassA` to have type `Variable[T]` but is never initialized.'] +Line 19: Unexpected errors ['generics_paramspec_specialization.py:19:0 Uninitialized attribute [13]: Attribute `f1` is declared in class `ClassB` to have type `typing.Callable[generics_paramspec_specialization.P1, int]` but is never initialized.', 'generics_paramspec_specialization.py:19:0 Uninitialized attribute [13]: Attribute `f2` is declared in class `ClassB` to have type `typing.Callable[generics_paramspec_specialization.P2, int]` but is never initialized.', 'generics_paramspec_specialization.py:19:0 Uninitialized attribute [13]: Attribute `x` is declared in class `ClassB` to have type `Variable[T]` but is never initialized.'] +Line 29: Unexpected errors ["generics_paramspec_specialization.py:29:14 Invalid type variable [34]: The type variable `P2` isn't present in the function's parameters.", 'generics_paramspec_specialization.py:29:14 Undefined or invalid type [11]: Annotation `Concatenate` is not defined as a type.'] +Line 33: Unexpected errors ['generics_paramspec_specialization.py:33:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P2`, but a single type `...` was given for generic type ClassB.'] +Line 37: Unexpected errors ['generics_paramspec_specialization.py:37:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `...` was given for generic type ClassA.'] +Line 45: Unexpected errors ['generics_paramspec_specialization.py:45:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `int` was given for generic type ClassA.'] +Line 49: Unexpected errors ['generics_paramspec_specialization.py:49:0 Uninitialized attribute [13]: Attribute `f` is declared in class `ClassC` to have type `typing.Callable[generics_paramspec_specialization.P1, int]` but is never initialized.'] +Line 55: Unexpected errors ['generics_paramspec_specialization.py:55:8 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `int` but got `str`.'] +Line 56: Unexpected errors ['generics_paramspec_specialization.py:56:15 Incompatible parameter type [6]: In anonymous call, for 3rd positional argument, expected `bool` but got `str`.'] +Line 61: Unexpected errors ['generics_paramspec_specialization.py:61:8 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `int` but got `str`.'] +Line 62: Unexpected errors ['generics_paramspec_specialization.py:62:15 Incompatible parameter type [6]: In anonymous call, for 3rd positional argument, expected `bool` but got `str`.'] +""" diff --git a/conformance/results/pyre/generics_scoping.toml b/conformance/results/pyre/generics_scoping.toml index ae95728b0..69b6e6556 100644 --- a/conformance/results/pyre/generics_scoping.toml +++ b/conformance/results/pyre/generics_scoping.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -False negative on generic class nested within generic function with same type variable. +notes = """False negative on generic class nested within generic function with same type variable. False negative on generic class nested within generic class with same type variable. """ output = """ @@ -16,3 +15,16 @@ generics_scoping.py:84:13 Invalid type variable [34]: The type variable `Variabl generics_scoping.py:85:13 Invalid type variable [34]: The type variable `Variable[T]` can only be used to annotate generic classes or functions. generics_scoping.py:86:5 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Unexpected errors ['generics_scoping.py:25:9 Incompatible parameter type [6]: In call `MyClass.meth_2`, for 1st positional argument, expected `int` but got `str`.'] +Line 46: Unexpected errors ["generics_scoping.py:46:7 Invalid type variable [34]: The type variable `Variable[S]` isn't present in the function's parameters."] +Line 50: Unexpected errors ["generics_scoping.py:50:13 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[S]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[S]`."] +Line 70: Unexpected errors ['generics_scoping.py:70:0 Uninitialized attribute [13]: Attribute `attr` is declared in class `Outer` to have type `Outer.Inner[Variable[T]]` but is never initialized.'] +Line 73: Unexpected errors ['generics_scoping.py:73:4 Uninitialized attribute [13]: Attribute `x` is declared in class `Outer.AlsoBad` to have type `typing.List[Variable[T]]` but is never initialized.'] +Line 74: Unexpected errors ["generics_scoping.py:74:11 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`."] +Line 80: Unexpected errors ['generics_scoping.py:80:4 Incompatible attribute type [8]: Attribute `alias` declared in class `Outer` has type `TypeAlias` but is used as type `Type[List[Variable[_T]]]`.', 'generics_scoping.py:80:28 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +Line 84: Unexpected errors ['generics_scoping.py:84:13 Invalid type variable [34]: The type variable `Variable[T]` can only be used to annotate generic classes or functions.'] +Line 85: Unexpected errors ['generics_scoping.py:85:13 Invalid type variable [34]: The type variable `Variable[T]` can only be used to annotate generic classes or functions.'] +Line 86: Unexpected errors ['generics_scoping.py:86:5 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVar`.'] +""" diff --git a/conformance/results/pyre/generics_self_advanced.toml b/conformance/results/pyre/generics_self_advanced.toml index 2930afeb0..93c3ff9a0 100644 --- a/conformance/results/pyre/generics_self_advanced.toml +++ b/conformance/results/pyre/generics_self_advanced.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ generics_self_advanced.py:25:7 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. @@ -13,3 +12,15 @@ generics_self_advanced.py:43:32 Undefined attribute [16]: Module `typing` has no generics_self_advanced.py:44:30 Undefined attribute [16]: Module `typing` has no attribute `Self`. generics_self_advanced.py:45:35 Undefined attribute [16]: Module `typing` has no attribute `Self`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Unexpected errors ['generics_self_advanced.py:25:7 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] +Line 35: Unexpected errors ['generics_self_advanced.py:35:26 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 36: Unexpected errors ['generics_self_advanced.py:36:33 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 37: Unexpected errors ['generics_self_advanced.py:37:31 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 38: Unexpected errors ['generics_self_advanced.py:38:36 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 42: Unexpected errors ['generics_self_advanced.py:42:30 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 43: Unexpected errors ['generics_self_advanced.py:43:32 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 44: Unexpected errors ['generics_self_advanced.py:44:30 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 45: Unexpected errors ['generics_self_advanced.py:45:35 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +""" diff --git a/conformance/results/pyre/generics_self_attributes.toml b/conformance/results/pyre/generics_self_attributes.toml index f772cd636..fef8ce1ae 100644 --- a/conformance/results/pyre/generics_self_attributes.toml +++ b/conformance/results/pyre/generics_self_attributes.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ generics_self_attributes.py:16:10 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. @@ -8,3 +7,10 @@ generics_self_attributes.py:26:5 Unexpected keyword [28]: Unexpected keyword arg generics_self_attributes.py:29:14 Unexpected keyword [28]: Unexpected keyword argument `next` to call `OrdinalLinkedList.__init__`. generics_self_attributes.py:32:14 Unexpected keyword [28]: Unexpected keyword argument `next` to call `LinkedList.__init__`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['generics_self_attributes.py:16:10 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] +Line 26: Unexpected errors ['generics_self_attributes.py:26:5 Unexpected keyword [28]: Unexpected keyword argument `next` to call `OrdinalLinkedList.__init__`.'] +Line 29: Unexpected errors ['generics_self_attributes.py:29:14 Unexpected keyword [28]: Unexpected keyword argument `next` to call `OrdinalLinkedList.__init__`.'] +Line 32: Unexpected errors ['generics_self_attributes.py:32:14 Unexpected keyword [28]: Unexpected keyword argument `next` to call `LinkedList.__init__`.'] +""" diff --git a/conformance/results/pyre/generics_self_basic.toml b/conformance/results/pyre/generics_self_basic.toml index 66191b50c..714955443 100644 --- a/conformance/results/pyre/generics_self_basic.toml +++ b/conformance/results/pyre/generics_self_basic.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ generics_self_basic.py:13:26 Undefined attribute [16]: Module `typing` has no attribute `Self`. @@ -13,3 +12,15 @@ generics_self_basic.py:57:0 Uninitialized attribute [13]: Attribute `value` is d generics_self_basic.py:64:25 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. generics_self_basic.py:80:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeVar`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['generics_self_basic.py:13:26 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 19: Unexpected errors ['generics_self_basic.py:19:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`.'] +Line 26: Unexpected errors ['generics_self_basic.py:26:30 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 27: Unexpected errors ['generics_self_basic.py:27:15 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided.'] +Line 32: Unexpected errors ['generics_self_basic.py:32:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`.'] +Line 39: Unexpected errors ['generics_self_basic.py:39:27 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 57: Unexpected errors ['generics_self_basic.py:57:0 Uninitialized attribute [13]: Attribute `value` is declared in class `Container` to have type `Variable[T]` but is never initialized.'] +Line 64: Unexpected errors ['generics_self_basic.py:64:25 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] +Line 80: Unexpected errors ['generics_self_basic.py:80:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeVar`.'] +""" diff --git a/conformance/results/pyre/generics_self_protocols.toml b/conformance/results/pyre/generics_self_protocols.toml index 3943248a8..1983447ba 100644 --- a/conformance/results/pyre/generics_self_protocols.toml +++ b/conformance/results/pyre/generics_self_protocols.toml @@ -1,7 +1,10 @@ conformant = "Partial" -notes = """ -Does not reject protocol compatibility due to method `Self` return type. +notes = """Does not reject protocol compatibility due to method `Self` return type. """ output = """ generics_self_protocols.py:61:18 Incompatible parameter type [6]: In call `accepts_shape`, for 1st positional argument, expected `ShapeProtocol` but got `BadReturnType`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 61: Unexpected errors ['generics_self_protocols.py:61:18 Incompatible parameter type [6]: In call `accepts_shape`, for 1st positional argument, expected `ShapeProtocol` but got `BadReturnType`.'] +""" diff --git a/conformance/results/pyre/generics_self_usage.toml b/conformance/results/pyre/generics_self_usage.toml index 6349aa8a7..ffc5021fd 100644 --- a/conformance/results/pyre/generics_self_usage.toml +++ b/conformance/results/pyre/generics_self_usage.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ generics_self_usage.py:20:34 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. @@ -8,3 +7,9 @@ generics_self_usage.py:86:8 Incompatible return type [7]: Expected `Variable[_Se generics_self_usage.py:106:0 Incompatible variable type [9]: TupleSelf is declared to have type `TypeAlias` but is used as type `Type[tuple[Variable[_T_co](covariant)]]`. generics_self_usage.py:106:29 Undefined attribute [16]: Module `typing` has no attribute `Self`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 20: Unexpected errors ['generics_self_usage.py:20:34 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] +Line 86: Unexpected errors ['generics_self_usage.py:86:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_usage_Foo3__ (bound to Foo3)]` but got `Foo3`.'] +Line 106: Unexpected errors ['generics_self_usage.py:106:0 Incompatible variable type [9]: TupleSelf is declared to have type `TypeAlias` but is used as type `Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_self_usage.py:106:29 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +""" diff --git a/conformance/results/pyre/generics_syntax_compatibility.toml b/conformance/results/pyre/generics_syntax_compatibility.toml index 4d6fe8223..96a010a19 100644 --- a/conformance/results/pyre/generics_syntax_compatibility.toml +++ b/conformance/results/pyre/generics_syntax_compatibility.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_compatibility.py:14:13 Parsing failure [404]: invalid syntax """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_syntax_compatibility.py:14:13 Parsing failure [404]: invalid syntax'] +""" diff --git a/conformance/results/pyre/generics_syntax_declarations.toml b/conformance/results/pyre/generics_syntax_declarations.toml index e20d6f32e..51d31f19a 100644 --- a/conformance/results/pyre/generics_syntax_declarations.toml +++ b/conformance/results/pyre/generics_syntax_declarations.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_declarations.py:13:17 Parsing failure [404]: invalid syntax """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['generics_syntax_declarations.py:13:17 Parsing failure [404]: invalid syntax'] +""" diff --git a/conformance/results/pyre/generics_syntax_infer_variance.toml b/conformance/results/pyre/generics_syntax_infer_variance.toml index cc7ea7bd8..68511b297 100644 --- a/conformance/results/pyre/generics_syntax_infer_variance.toml +++ b/conformance/results/pyre/generics_syntax_infer_variance.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_infer_variance.py:129:25 Parsing failure [404]: invalid syntax """ +conformance_automated = "Fail" +errors_diff = """ +Line 129: Unexpected errors ['generics_syntax_infer_variance.py:129:25 Parsing failure [404]: invalid syntax'] +""" diff --git a/conformance/results/pyre/generics_syntax_scoping.toml b/conformance/results/pyre/generics_syntax_scoping.toml index 9a4db655f..379e82fe6 100644 --- a/conformance/results/pyre/generics_syntax_scoping.toml +++ b/conformance/results/pyre/generics_syntax_scoping.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_syntax_scoping.py:14:13 Parsing failure [404]: invalid syntax """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_syntax_scoping.py:14:13 Parsing failure [404]: invalid syntax'] +""" diff --git a/conformance/results/pyre/generics_type_erasure.toml b/conformance/results/pyre/generics_type_erasure.toml index 9c343f3a9..9d815ff1a 100644 --- a/conformance/results/pyre/generics_type_erasure.toml +++ b/conformance/results/pyre/generics_type_erasure.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Doesn't allow using Node[Any] in assert_type expression. +notes = """Doesn't allow using Node[Any] in assert_type expression. False negatives on instance attribute access on the type. """ output = """ @@ -9,3 +8,10 @@ generics_type_erasure.py:17:25 Incompatible parameter type [6]: In call `typing. generics_type_erasure.py:36:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[int]` but got `str`. generics_type_erasure.py:38:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[str]` but got `int`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['generics_type_erasure.py:11:0 Uninitialized attribute [13]: Attribute `label` is declared in class `Node` to have type `Variable[T]` but is never initialized.'] +Line 17: Unexpected errors ['generics_type_erasure.py:17:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[T]]` but got `object`.'] +Line 36: Unexpected errors ['generics_type_erasure.py:36:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[int]` but got `str`.'] +Line 38: Unexpected errors ['generics_type_erasure.py:38:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[str]` but got `int`.'] +""" diff --git a/conformance/results/pyre/generics_typevartuple_args.toml b/conformance/results/pyre/generics_typevartuple_args.toml index 741718ebf..07001066e 100644 --- a/conformance/results/pyre/generics_typevartuple_args.toml +++ b/conformance/results/pyre/generics_typevartuple_args.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ generics_typevartuple_args.py:16:25 Invalid type [31]: Expression `*$local_generics_typevartuple_args$Ts` is not a valid type. @@ -16,3 +15,16 @@ generics_typevartuple_args.py:62:17 Invalid type [31]: Expression `*tuple[(int, generics_typevartuple_args.py:70:17 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_args$Ts)]` is not a valid type. generics_typevartuple_args.py:75:12 Incompatible parameter type [6]: In call `func4`, for 2nd positional argument, expected `Tuple[]` but got `Tuple[int, int]`. Expected has length 1, but actual has length 2. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['generics_typevartuple_args.py:16:25 Invalid type [31]: Expression `*$local_generics_typevartuple_args$Ts` is not a valid type.', 'generics_typevartuple_args.py:16:33 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_args$Ts)]` is not a valid type.'] +Line 20: Unexpected errors ['generics_typevartuple_args.py:20:41 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[str]]`.'] +Line 27: Unexpected errors ['generics_typevartuple_args.py:27:30 Invalid type [31]: Expression `*tuple[(*$local_generics_typevartuple_args$Ts, generics_typevartuple_args.Env)]` is not a valid type.', 'generics_typevartuple_args.py:27:76 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_args$Ts)]` is not a valid type.'] +Line 31: Unexpected errors ['generics_typevartuple_args.py:31:38 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[]`.'] +Line 32: Unexpected errors ['generics_typevartuple_args.py:32:45 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[str]]`.'] +Line 42: Unexpected errors ['generics_typevartuple_args.py:42:17 Invalid type [31]: Expression `*tuple[(int, ...)]` is not a valid type.'] +Line 51: Unexpected errors ['generics_typevartuple_args.py:51:17 Invalid type [31]: Expression `*tuple[(int, *tuple[(str, ...)], str)]` is not a valid type.'] +Line 62: Unexpected errors ['generics_typevartuple_args.py:62:17 Invalid type [31]: Expression `*tuple[(int, str)]` is not a valid type.'] +Line 70: Unexpected errors ['generics_typevartuple_args.py:70:17 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_args$Ts)]` is not a valid type.'] +Line 75: Unexpected errors ['generics_typevartuple_args.py:75:12 Incompatible parameter type [6]: In call `func4`, for 2nd positional argument, expected `Tuple[]` but got `Tuple[int, int]`. Expected has length 1, but actual has length 2.'] +""" diff --git a/conformance/results/pyre/generics_typevartuple_basic.toml b/conformance/results/pyre/generics_typevartuple_basic.toml index 9e6060684..ca26bc306 100644 --- a/conformance/results/pyre/generics_typevartuple_basic.toml +++ b/conformance/results/pyre/generics_typevartuple_basic.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ generics_typevartuple_basic.py:12:13 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_basic$Ts)]` is not a valid type. @@ -48,3 +47,30 @@ generics_typevartuple_basic.py:97:31 Invalid type parameters [24]: Non-generic t generics_typevartuple_basic.py:97:48 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters. generics_typevartuple_basic.py:106:13 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_basic$Ts1, *$local_generics_typevartuple_basic$Ts2)]` is not a valid type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['generics_typevartuple_basic.py:12:13 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_basic$Ts)]` is not a valid type.'] +Line 16: Unexpected errors ['generics_typevartuple_basic.py:16:17 Invalid type [31]: Expression `*$local_generics_typevartuple_basic$Ts` is not a valid type.', 'generics_typevartuple_basic.py:16:25 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Ts)]` is not a valid type.'] +Line 23: Unexpected errors ['generics_typevartuple_basic.py:23:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.'] +Line 24: Unexpected errors ['generics_typevartuple_basic.py:24:30 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.'] +Line 25: Unexpected errors ['generics_typevartuple_basic.py:25:21 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.'] +Line 27: Unexpected errors ['generics_typevartuple_basic.py:27:27 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.'] +Line 36: Unexpected errors ['generics_typevartuple_basic.py:36:0 Incompatible variable type [9]: v1 is declared to have type `Array[]` but is used as type `Array`.', 'generics_typevartuple_basic.py:36:4 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:36:33 Incompatible parameter type [6]: In call `Array.__init__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Height, Width]`. Expected has length 1, but actual has length 2.'] +Line 37: Unexpected errors ['generics_typevartuple_basic.py:37:0 Incompatible variable type [9]: v2 is declared to have type `Array[]` but is used as type `Array`.', 'generics_typevartuple_basic.py:37:4 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:37:40 Incompatible parameter type [6]: In call `Array.__init__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Batch, Height, Width]`. Expected has length 1, but actual has length 3.'] +Line 38: Unexpected errors ['generics_typevartuple_basic.py:38:0 Incompatible variable type [9]: v3 is declared to have type `Array[]` but is used as type `Array`.', 'generics_typevartuple_basic.py:38:4 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 39: Unexpected errors ['generics_typevartuple_basic.py:39:4 Incompatible parameter type [6]: In call `Array.__init__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Time, Batch, Height, Width]`. Expected has length 1, but actual has length 4.'] +Line 42: Unexpected errors ['generics_typevartuple_basic.py:42:0 Incompatible variable type [9]: v4 is declared to have type `Array[]` but is used as type `Array`.', 'generics_typevartuple_basic.py:42:4 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:42:33 Incompatible parameter type [6]: In call `Array.__init__`, for 1st positional argument, expected `Tuple[]` but got `Height`.'] +Line 43: Unexpected errors ['generics_typevartuple_basic.py:43:0 Incompatible variable type [9]: v5 is declared to have type `Array[]` but is used as type `Array`.', 'generics_typevartuple_basic.py:43:4 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:43:40 Incompatible parameter type [6]: In call `Array.__init__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Batch, Width]`. Expected has length 1, but actual has length 2.'] +Line 44: Unexpected errors ['generics_typevartuple_basic.py:44:0 Incompatible variable type [9]: v6 is declared to have type `Array[]` but is used as type `Array`.', 'generics_typevartuple_basic.py:44:4 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 45: Unexpected errors ['generics_typevartuple_basic.py:45:4 Incompatible parameter type [6]: In call `Array.__init__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Time, Batch, Width, Height]`. Expected has length 1, but actual has length 4.'] +Line 52: Unexpected errors ['generics_typevartuple_basic.py:52:13 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type.'] +Line 54: Unexpected errors ['generics_typevartuple_basic.py:54:21 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.'] +Line 65: Unexpected errors ['generics_typevartuple_basic.py:65:6 Unexpected keyword [28]: Unexpected keyword argument `covariant` to call `TypeVarTuple.__init__`.'] +Line 66: Unexpected errors ['generics_typevartuple_basic.py:66:6 Too many arguments [19]: Call `TypeVarTuple.__init__` expects 1 positional argument, 3 were provided.'] +Line 67: Unexpected errors ['generics_typevartuple_basic.py:67:6 Unexpected keyword [28]: Unexpected keyword argument `bound` to call `TypeVarTuple.__init__`.'] +Line 75: Unexpected errors ['generics_typevartuple_basic.py:75:16 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Ts)]` is not a valid type.', 'generics_typevartuple_basic.py:75:34 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Ts)]` is not a valid type.', 'generics_typevartuple_basic.py:75:49 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_basic$Ts)]` is not a valid type.'] +Line 90: Unexpected errors ['generics_typevartuple_basic.py:90:6 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `Tuple[]` but got `Tuple[int, int]`. Expected has length 1, but actual has length 2.'] +Line 93: Unexpected errors ['generics_typevartuple_basic.py:93:16 Invalid type [31]: Expression `Array[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.', 'generics_typevartuple_basic.py:93:16 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:93:34 Invalid type [31]: Expression `Array[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.', 'generics_typevartuple_basic.py:93:34 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:93:52 Invalid type [31]: Expression `Array[(*$local_generics_typevartuple_basic$Shape)]` is not a valid type.', 'generics_typevartuple_basic.py:93:52 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 97: Unexpected errors ['generics_typevartuple_basic.py:97:13 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:97:31 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_basic.py:97:48 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 106: Unexpected errors ['generics_typevartuple_basic.py:106:13 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_basic$Ts1, *$local_generics_typevartuple_basic$Ts2)]` is not a valid type.'] +""" diff --git a/conformance/results/pyre/generics_typevartuple_callable.toml b/conformance/results/pyre/generics_typevartuple_callable.toml index f8b486438..fdd650a95 100644 --- a/conformance/results/pyre/generics_typevartuple_callable.toml +++ b/conformance/results/pyre/generics_typevartuple_callable.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ generics_typevartuple_callable.py:17:31 Invalid type [31]: Expression `typing.Callable[([*$local_generics_typevartuple_callable$Ts], None)]` is not a valid type. @@ -19,3 +18,14 @@ generics_typevartuple_callable.py:45:42 Invalid type [31]: Expression `tuple[($l generics_typevartuple_callable.py:45:42 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. generics_typevartuple_callable.py:49:41 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[float], Type[str], Type[complex]]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['generics_typevartuple_callable.py:17:31 Invalid type [31]: Expression `typing.Callable[([*$local_generics_typevartuple_callable$Ts], None)]` is not a valid type.', 'generics_typevartuple_callable.py:17:60 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_callable$Ts)]` is not a valid type.'] +Line 25: Unexpected errors ['generics_typevartuple_callable.py:25:8 Incompatible parameter type [6]: In call `Process.__init__`, for argument `target`, expected `typing.Callable[[unknown], None]` but got `typing.Callable(func1)[[Named(arg1, int), Named(arg2, str)], None]`.', 'generics_typevartuple_callable.py:25:22 Incompatible parameter type [6]: In call `Process.__init__`, for argument `args`, expected `Tuple[]` but got `Tuple[int, str]`. Expected has length 1, but actual has length 2.'] +Line 26: Unexpected errors ['generics_typevartuple_callable.py:26:8 Incompatible parameter type [6]: In call `Process.__init__`, for argument `target`, expected `typing.Callable[[unknown], None]` but got `typing.Callable(func1)[[Named(arg1, int), Named(arg2, str)], None]`.', 'generics_typevartuple_callable.py:26:22 Incompatible parameter type [6]: In call `Process.__init__`, for argument `args`, expected `Tuple[]` but got `Tuple[str, int]`. Expected has length 1, but actual has length 2.'] +Line 29: Unexpected errors ['generics_typevartuple_callable.py:29:13 Invalid type [31]: Expression `typing.Callable[([int, *$local_generics_typevartuple_callable$Ts, $local_generics_typevartuple_callable$T], tuple[($local_generics_typevartuple_callable$T, *$local_generics_typevartuple_callable$Ts)])]` is not a valid type.', 'generics_typevartuple_callable.py:29:56 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_callable$Ts, $local_generics_typevartuple_callable$T)]` is not a valid type.'] +Line 41: Unexpected errors ['generics_typevartuple_callable.py:41:18 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `typing.Callable[[int, unknown, Variable[T]], Tuple[Variable[T], unknown]]` but got `typing.Callable(callback1)[[Named(a, int), Named(b, str), Named(c, int), Named(d, complex)], Tuple[complex, str, int]]`.', 'generics_typevartuple_callable.py:41:36 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[int], Type[complex]]`.'] +Line 42: Unexpected errors ['generics_typevartuple_callable.py:42:18 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `typing.Callable[[int, unknown, Variable[T]], Tuple[Variable[T], unknown]]` but got `typing.Callable(callback2)[[Named(a, int), Named(d, str)], Tuple[str]]`.'] +Line 45: Unexpected errors ['generics_typevartuple_callable.py:45:17 Invalid type [31]: Expression `*tuple[(int, *$local_generics_typevartuple_callable$Ts, $local_generics_typevartuple_callable$T)]` is not a valid type.', 'generics_typevartuple_callable.py:45:42 Invalid type [31]: Expression `tuple[($local_generics_typevartuple_callable$T, *$local_generics_typevartuple_callable$Ts)]` is not a valid type.', "generics_typevartuple_callable.py:45:42 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] +Line 49: Unexpected errors ['generics_typevartuple_callable.py:49:41 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[float], Type[str], Type[complex]]`.'] +""" diff --git a/conformance/results/pyre/generics_typevartuple_concat.toml b/conformance/results/pyre/generics_typevartuple_concat.toml index 654d09802..f1f233c24 100644 --- a/conformance/results/pyre/generics_typevartuple_concat.toml +++ b/conformance/results/pyre/generics_typevartuple_concat.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ generics_typevartuple_concat.py:22:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_concat$Ts)]` is not a valid type. @@ -29,3 +28,19 @@ generics_typevartuple_concat.py:55:54 Invalid type [31]: Expression `tuple[(*$lo generics_typevartuple_concat.py:56:11 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `Variable[generics_typevartuple_concat.T]`. generics_typevartuple_concat.py:56:17 Incompatible parameter type [6]: In call `tuple.__getitem__`, for 1st positional argument, expected `typing_extensions.Literal[0]` but got `slice`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['generics_typevartuple_concat.py:22:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_concat$Ts)]` is not a valid type.'] +Line 26: Unexpected errors ['generics_typevartuple_concat.py:26:22 Invalid type [31]: Expression `Array[(*$local_generics_typevartuple_concat$Shape)]` is not a valid type.', 'generics_typevartuple_concat.py:26:22 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_concat.py:26:40 Invalid type [31]: Expression `Array[(generics_typevartuple_concat.Batch, *$local_generics_typevartuple_concat$Shape)]` is not a valid type.', 'generics_typevartuple_concat.py:26:40 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 30: Unexpected errors ['generics_typevartuple_concat.py:30:22 Invalid type [31]: Expression `Array[(generics_typevartuple_concat.Batch, *$local_generics_typevartuple_concat$Shape)]` is not a valid type.', 'generics_typevartuple_concat.py:30:22 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_concat.py:30:47 Invalid type [31]: Expression `Array[(*$local_generics_typevartuple_concat$Shape)]` is not a valid type.', 'generics_typevartuple_concat.py:30:47 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 34: Unexpected errors ['generics_typevartuple_concat.py:34:26 Invalid type [31]: Expression `Array[(*$local_generics_typevartuple_concat$Shape)]` is not a valid type.', 'generics_typevartuple_concat.py:34:26 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_concat.py:34:44 Invalid type [31]: Expression `Array[(generics_typevartuple_concat.Batch, *$local_generics_typevartuple_concat$Shape, generics_typevartuple_concat.Channels)]` is not a valid type.', 'generics_typevartuple_concat.py:34:44 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 38: Unexpected errors ['generics_typevartuple_concat.py:38:13 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 40: Unexpected errors ['generics_typevartuple_concat.py:40:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[Batch], Type[Height], Type[Width]]`. Expected has length 0, but actual has length 3.'] +Line 42: Unexpected errors ['generics_typevartuple_concat.py:42:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[Height], Type[Width]]`. Expected has length 0, but actual has length 2.'] +Line 44: Unexpected errors ['generics_typevartuple_concat.py:44:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[Batch], Type[Height], Type[Width], Type[Channels]]`. Expected has length 0, but actual has length 4.'] +Line 47: Unexpected errors ['generics_typevartuple_concat.py:47:26 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_concat$Ts)]` is not a valid type.', 'generics_typevartuple_concat.py:47:41 Invalid type [31]: Expression `tuple[($local_generics_typevartuple_concat$T, *$local_generics_typevartuple_concat$Ts)]` is not a valid type.'] +Line 51: Unexpected errors ['generics_typevartuple_concat.py:51:22 Incompatible parameter type [6]: In call `prefix_tuple`, for argument `y`, expected `Tuple[]` but got `Tuple[bool, str]`. Expected has length 1, but actual has length 2.'] +Line 52: Unexpected errors ['generics_typevartuple_concat.py:52:21 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[bool], Type[str]]`.'] +Line 55: Unexpected errors ['generics_typevartuple_concat.py:55:36 Invalid type [31]: Expression `tuple[($local_generics_typevartuple_concat$T, *$local_generics_typevartuple_concat$Ts)]` is not a valid type.', 'generics_typevartuple_concat.py:55:54 Invalid type [31]: Expression `tuple[(*$local_generics_typevartuple_concat$Ts, $local_generics_typevartuple_concat$T)]` is not a valid type.'] +Line 56: Unexpected errors ['generics_typevartuple_concat.py:56:11 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `Variable[generics_typevartuple_concat.T]`.', 'generics_typevartuple_concat.py:56:17 Incompatible parameter type [6]: In call `tuple.__getitem__`, for 1st positional argument, expected `typing_extensions.Literal[0]` but got `slice`.'] +""" diff --git a/conformance/results/pyre/generics_typevartuple_overloads.toml b/conformance/results/pyre/generics_typevartuple_overloads.toml index faa028c5e..426091df7 100644 --- a/conformance/results/pyre/generics_typevartuple_overloads.toml +++ b/conformance/results/pyre/generics_typevartuple_overloads.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ generics_typevartuple_overloads.py:16:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_overloads$Shape)]` is not a valid type. @@ -13,3 +12,12 @@ generics_typevartuple_overloads.py:29:37 Invalid type parameters [24]: Non-gener generics_typevartuple_overloads.py:30:37 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[TypeVar, TypeVar]`. Expected has length 0, but actual has length 2. generics_typevartuple_overloads.py:31:37 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[TypeVar, TypeVar, TypeVar]`. Expected has length 0, but actual has length 3. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['generics_typevartuple_overloads.py:16:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_overloads$Shape)]` is not a valid type.'] +Line 18: Unexpected errors ['generics_typevartuple_overloads.py:18:24 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_overloads.py:18:50 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 22: Unexpected errors ['generics_typevartuple_overloads.py:22:24 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_overloads.py:22:57 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 29: Unexpected errors ['generics_typevartuple_overloads.py:29:13 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_overloads.py:29:37 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 30: Unexpected errors ['generics_typevartuple_overloads.py:30:37 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[TypeVar, TypeVar]`. Expected has length 0, but actual has length 2.'] +Line 31: Unexpected errors ['generics_typevartuple_overloads.py:31:37 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[TypeVar, TypeVar, TypeVar]`. Expected has length 0, but actual has length 3.'] +""" diff --git a/conformance/results/pyre/generics_typevartuple_specialization.toml b/conformance/results/pyre/generics_typevartuple_specialization.toml index fb5937844..2451b9f3e 100644 --- a/conformance/results/pyre/generics_typevartuple_specialization.toml +++ b/conformance/results/pyre/generics_typevartuple_specialization.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ generics_typevartuple_specialization.py:16:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_specialization$Ts)]` is not a valid type. @@ -91,3 +90,52 @@ generics_typevartuple_specialization.py:159:25 Unable to concatenate tuple [60]: generics_typevartuple_specialization.py:159:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`. generics_typevartuple_specialization.py:162:13 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[TypeVar, *Tuple[typing.Any, ...]]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['generics_typevartuple_specialization.py:16:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_specialization$Ts)]` is not a valid type.'] +Line 24: Unexpected errors ['generics_typevartuple_specialization.py:24:26 Invalid type [31]: Expression `Array[(*tuple[(typing.Any, ...)])]` is not a valid type.', 'generics_typevartuple_specialization.py:24:26 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 28: Unexpected errors ['generics_typevartuple_specialization.py:28:13 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 33: Unexpected errors ['generics_typevartuple_specialization.py:33:13 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 41: Unexpected errors ['generics_typevartuple_specialization.py:41:17 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[Type[int], *Tuple[typing.Any, ...]]`.'] +Line 42: Unexpected errors ['generics_typevartuple_specialization.py:42:0 Incompatible variable type [9]: NamedArray is declared to have type `Type[Tuple[str, Array[]]]` but is used as type `Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:42:19 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[Array[]]]`.'] +Line 45: Unexpected errors ['generics_typevartuple_specialization.py:45:13 Undefined or invalid type [11]: Annotation `IntTuple` is not defined as a type.', 'generics_typevartuple_specialization.py:45:39 Undefined or invalid type [11]: Annotation `NamedArray` is not defined as a type.'] +Line 46: Unexpected errors ['generics_typevartuple_specialization.py:46:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[float], Type[bool]]`.'] +Line 47: Unexpected errors ['generics_typevartuple_specialization.py:47:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[Array[]]]`.', 'generics_typevartuple_specialization.py:47:36 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Type[Height]`.'] +Line 52: Unexpected errors ['generics_typevartuple_specialization.py:52:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[Array[]]]`.'] +Line 59: Unexpected errors ['generics_typevartuple_specialization.py:59:13 Invalid type [31]: Expression `typing.Generic[($local_generics_typevartuple_specialization$DType, *$local_generics_typevartuple_specialization$Shape)]` is not a valid type.', "generics_typevartuple_specialization.py:59:13 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[DType]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[DType]`."] +Line 63: Unexpected errors ['generics_typevartuple_specialization.py:63:20 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `typing.Tuple[Type[float], *Tuple[typing.Any, ...]]`.'] +Line 64: Unexpected errors ['generics_typevartuple_specialization.py:64:0 Invalid type parameters [24]: Non-generic type `Array2` cannot take parameters.'] +Line 68: Unexpected errors ['generics_typevartuple_specialization.py:68:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[object, object]`. Expected has length 0, but actual has length 2.'] +Line 69: Unexpected errors ['generics_typevartuple_specialization.py:69:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[int], object]`. Expected has length 0, but actual has length 2.'] +Line 72: Unexpected errors ['generics_typevartuple_specialization.py:72:38 Undefined or invalid type [11]: Annotation `FloatArray` is not defined as a type.'] +Line 89: Unexpected errors ['generics_typevartuple_specialization.py:89:22 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[TypeVar, *Tuple[typing.Any, ...]]`.'] +Line 92: Unexpected errors ['generics_typevartuple_specialization.py:92:13 Undefined or invalid type [11]: Annotation `VariadicTuple` is not defined as a type.'] +Line 93: Unexpected errors ['generics_typevartuple_specialization.py:93:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[int]]`.'] +Line 95: Unexpected errors ['generics_typevartuple_specialization.py:95:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[object, *Tuple[typing.Any, ...]]`.', 'generics_typevartuple_specialization.py:95:25 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:95:37 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[object, typing.Any]`.'] +Line 101: Unexpected errors ['generics_typevartuple_specialization.py:101:20 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[Type[int], *Tuple[typing.Any, ...]]`.'] +Line 103: Unexpected errors ['generics_typevartuple_specialization.py:103:32 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:103:39 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[float], typing.Any]`.'] +Line 110: Unexpected errors ['generics_typevartuple_specialization.py:110:16 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:110:23 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[float], typing.Any]`.'] +Line 117: Unexpected errors ['generics_typevartuple_specialization.py:117:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[*Tuple[typing.Any, ...], TypeVar, TypeVar]`.'] +Line 118: Unexpected errors ['generics_typevartuple_specialization.py:118:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[TypeVar, TypeVar, *Tuple[typing.Any, ...]]`.'] +Line 119: Unexpected errors ['generics_typevartuple_specialization.py:119:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[TypeVar, *Tuple[typing.Any, ...], TypeVar, TypeVar]`.'] +Line 120: Unexpected errors ['generics_typevartuple_specialization.py:120:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[TypeVar, TypeVar, *Tuple[typing.Any, ...]]`.', 'generics_typevartuple_specialization.py:120:12 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:120:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`.'] +Line 121: Unexpected errors ['generics_typevartuple_specialization.py:121:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[typing.Any, ...]`.', 'generics_typevartuple_specialization.py:121:12 Unable to concatenate tuple [60]: Concatenation not yet support for multiple variadic tuples: `*Ts, *Ts`.'] +Line 122: Unexpected errors ['generics_typevartuple_specialization.py:122:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[typing.Any, ...]`.', 'generics_typevartuple_specialization.py:122:12 Unable to concatenate tuple [60]: Concatenation not yet support for multiple variadic tuples: `*Ts, *tuple[(int, ...)]`.', 'generics_typevartuple_specialization.py:122:12 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:122:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`.'] +Line 125: Unexpected errors ['generics_typevartuple_specialization.py:125:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[*Tuple[typing.Any, ...], TypeVar, TypeVar]`.'] +Line 127: Unexpected errors ['generics_typevartuple_specialization.py:127:4 Undefined or invalid type [11]: Annotation `TA7` is not defined as a type.'] +Line 130: Unexpected errors ['generics_typevartuple_specialization.py:130:13 Invalid type [31]: Expression `$local_generics_typevartuple_specialization$TA7[(*$local_generics_typevartuple_specialization$Ts, $local_generics_typevartuple_specialization$T1, $local_generics_typevartuple_specialization$T2)]` is not a valid type.', "generics_typevartuple_specialization.py:130:13 Invalid type variable [34]: The type variable `Variable[T1]` isn't present in the function's parameters.", "generics_typevartuple_specialization.py:130:13 Invalid type variable [34]: The type variable `Variable[T2]` isn't present in the function's parameters.", 'generics_typevartuple_specialization.py:130:34 Invalid type [31]: Expression `tuple[(tuple[(*$local_generics_typevartuple_specialization$Ts)], $local_generics_typevartuple_specialization$T1, $local_generics_typevartuple_specialization$T2)]` is not a valid type.', "generics_typevartuple_specialization.py:130:34 Invalid type variable [34]: The type variable `Variable[T1]` isn't present in the function's parameters.", "generics_typevartuple_specialization.py:130:34 Invalid type variable [34]: The type variable `Variable[T2]` isn't present in the function's parameters."] +Line 135: Unexpected errors ['generics_typevartuple_specialization.py:135:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[tuple[Variable[_T_co](covariant)]], Type[str], Type[bool]]`.', 'generics_typevartuple_specialization.py:135:38 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[]`.'] +Line 136: Unexpected errors ['generics_typevartuple_specialization.py:136:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[tuple[str]], Type[bool], Type[float]]`.'] +Line 137: Unexpected errors ['generics_typevartuple_specialization.py:137:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[tuple[Variable[_T_co](covariant)]], Type[float], Type[int]]`.', 'generics_typevartuple_specialization.py:137:38 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[bool]]`.'] +Line 140: Unexpected errors ['generics_typevartuple_specialization.py:140:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[TypeVar, *Tuple[typing.Any, ...], TypeVar, TypeVar]`.'] +Line 143: Unexpected errors ['generics_typevartuple_specialization.py:143:13 Invalid type [31]: Expression `$local_generics_typevartuple_specialization$TA8[($local_generics_typevartuple_specialization$T1, *$local_generics_typevartuple_specialization$Ts, $local_generics_typevartuple_specialization$T2, $local_generics_typevartuple_specialization$T3)]` is not a valid type.', "generics_typevartuple_specialization.py:143:13 Invalid type variable [34]: The type variable `Variable[T1]` isn't present in the function's parameters.", "generics_typevartuple_specialization.py:143:13 Invalid type variable [34]: The type variable `Variable[T2]` isn't present in the function's parameters.", "generics_typevartuple_specialization.py:143:13 Invalid type variable [34]: The type variable `Variable[T3]` isn't present in the function's parameters.", 'generics_typevartuple_specialization.py:143:13 Undefined or invalid type [11]: Annotation `TA8` is not defined as a type.', 'generics_typevartuple_specialization.py:143:38 Invalid type [31]: Expression `tuple[(tuple[(*$local_generics_typevartuple_specialization$Ts)], $local_generics_typevartuple_specialization$T1, $local_generics_typevartuple_specialization$T2, $local_generics_typevartuple_specialization$T3)]` is not a valid type.', "generics_typevartuple_specialization.py:143:38 Invalid type variable [34]: The type variable `Variable[T1]` isn't present in the function's parameters.", "generics_typevartuple_specialization.py:143:38 Invalid type variable [34]: The type variable `Variable[T2]` isn't present in the function's parameters.", "generics_typevartuple_specialization.py:143:38 Invalid type variable [34]: The type variable `Variable[T3]` isn't present in the function's parameters."] +Line 148: Unexpected errors ['generics_typevartuple_specialization.py:148:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[tuple[Variable[_T_co](covariant)]], Type[str], Type[bool], Type[float]]`.', 'generics_typevartuple_specialization.py:148:38 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[]`.'] +Line 149: Unexpected errors ['generics_typevartuple_specialization.py:149:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[tuple[bool]], Type[str], Type[float], Type[int]]`.'] +Line 152: Unexpected errors ['generics_typevartuple_specialization.py:152:12 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[*Tuple[typing.Any, ...], TypeVar]`.'] +Line 153: Unexpected errors ['generics_typevartuple_specialization.py:153:11 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:153:18 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`.'] +Line 156: Unexpected errors ['generics_typevartuple_specialization.py:156:14 Undefined or invalid type [11]: Annotation `TA10` is not defined as a type.', 'generics_typevartuple_specialization.py:156:23 Invalid type [31]: Expression `$local_generics_typevartuple_specialization$TA9[(*tuple[(int, ...)], str)]` is not a valid type.', 'generics_typevartuple_specialization.py:156:23 Undefined or invalid type [11]: Annotation `TA9` is not defined as a type.', 'generics_typevartuple_specialization.py:156:54 Invalid type [31]: Expression `$local_generics_typevartuple_specialization$TA9[(*tuple[(int, ...)], str)]` is not a valid type.'] +Line 157: Unexpected errors ['generics_typevartuple_specialization.py:157:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[*Tuple[typing.Any, ...], Type[int]]`.', 'generics_typevartuple_specialization.py:157:25 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:157:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`.'] +Line 158: Unexpected errors ['generics_typevartuple_specialization.py:158:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[*Tuple[typing.Any, ...], Type[str]]`.', 'generics_typevartuple_specialization.py:158:25 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:158:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`.'] +Line 159: Unexpected errors ['generics_typevartuple_specialization.py:159:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[*Tuple[typing.Any, ...], Type[str]]`.', 'generics_typevartuple_specialization.py:159:25 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'generics_typevartuple_specialization.py:159:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], typing.Any]`.'] +Line 162: Unexpected errors ['generics_typevartuple_specialization.py:162:13 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[TypeVar, *Tuple[typing.Any, ...]]`.'] +""" diff --git a/conformance/results/pyre/generics_typevartuple_unpack.toml b/conformance/results/pyre/generics_typevartuple_unpack.toml index 35a821acb..98b8a67dd 100644 --- a/conformance/results/pyre/generics_typevartuple_unpack.toml +++ b/conformance/results/pyre/generics_typevartuple_unpack.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ generics_typevartuple_unpack.py:17:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_unpack$Ts)]` is not a valid type. @@ -15,3 +14,12 @@ generics_typevartuple_unpack.py:40:28 Invalid type parameters [24]: Non-generic generics_typevartuple_unpack.py:44:13 Invalid type [31]: Expression `Array[(*tuple[(typing.Any, ...)])]` is not a valid type. generics_typevartuple_unpack.py:44:13 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters. """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['generics_typevartuple_unpack.py:17:12 Invalid type [31]: Expression `typing.Generic[(*$local_generics_typevartuple_unpack$Ts)]` is not a valid type.'] +Line 21: Unexpected errors ['generics_typevartuple_unpack.py:21:30 Invalid type [31]: Expression `Array[(generics_typevartuple_unpack.Batch, *tuple[(typing.Any, ...)], generics_typevartuple_unpack.Channels)]` is not a valid type.', 'generics_typevartuple_unpack.py:21:30 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 26: Unexpected errors ['generics_typevartuple_unpack.py:26:7 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_unpack.py:26:49 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.', 'generics_typevartuple_unpack.py:26:76 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 36: Unexpected errors ['generics_typevartuple_unpack.py:36:29 Invalid type [31]: Expression `Array[(generics_typevartuple_unpack.Batch, *$local_generics_typevartuple_unpack$Shape)]` is not a valid type.', 'generics_typevartuple_unpack.py:36:29 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 40: Unexpected errors ['generics_typevartuple_unpack.py:40:28 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +Line 44: Unexpected errors ['generics_typevartuple_unpack.py:44:13 Invalid type [31]: Expression `Array[(*tuple[(typing.Any, ...)])]` is not a valid type.', 'generics_typevartuple_unpack.py:44:13 Invalid type parameters [24]: Non-generic type `Array` cannot take parameters.'] +""" diff --git a/conformance/results/pyre/generics_upper_bound.toml b/conformance/results/pyre/generics_upper_bound.toml index f60af4eab..7b0d7a90a 100644 --- a/conformance/results/pyre/generics_upper_bound.toml +++ b/conformance/results/pyre/generics_upper_bound.toml @@ -1,9 +1,13 @@ conformant = "Partial" -notes = """ -Does not reject use of upper bound with constrained TypeVar. +notes = """Does not reject use of upper bound with constrained TypeVar. """ output = """ generics_upper_bound.py:22:0 Invalid type [31]: Expression `Variable[T_Bad1 (bound to typing.List[Variable[generics_upper_bound.T]])]` is not a valid type. Type variables cannot contain other type variables in their constraints. generics_upper_bound.py:43:7 Incompatible parameter type [6]: In call `longer`, for 1st positional argument, expected `Variable[ST (bound to Sized)]` but got `int`. generics_upper_bound.py:43:10 Incompatible parameter type [6]: In call `longer`, for 2nd positional argument, expected `Variable[ST (bound to Sized)]` but got `int`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['generics_upper_bound.py:22:0 Invalid type [31]: Expression `Variable[T_Bad1 (bound to typing.List[Variable[generics_upper_bound.T]])]` is not a valid type. Type variables cannot contain other type variables in their constraints.'] +Line 43: Unexpected errors ['generics_upper_bound.py:43:7 Incompatible parameter type [6]: In call `longer`, for 1st positional argument, expected `Variable[ST (bound to Sized)]` but got `int`.', 'generics_upper_bound.py:43:10 Incompatible parameter type [6]: In call `longer`, for 2nd positional argument, expected `Variable[ST (bound to Sized)]` but got `int`.'] +""" diff --git a/conformance/results/pyre/generics_variance.toml b/conformance/results/pyre/generics_variance.toml index 49e1e2abc..aefb9e23f 100644 --- a/conformance/results/pyre/generics_variance.toml +++ b/conformance/results/pyre/generics_variance.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject a TypeVar that is defined as both covariant and contravariant. +notes = """Does not reject a TypeVar that is defined as both covariant and contravariant. Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible. """ output = """ @@ -11,3 +10,12 @@ generics_variance.py:105:0 Invalid type variance [46]: The type variable `Variab generics_variance.py:125:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T_contra](contravariant)` because subclasses cannot use more permissive type variables than their superclasses. generics_variance.py:131:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T_co](covariant)` because subclasses cannot use more permissive type variables than their superclasses. """ +conformance_automated = "Fail" +errors_diff = """ +Line 77: Unexpected errors ['generics_variance.py:77:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 81: Unexpected errors ['generics_variance.py:81:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 93: Unexpected errors ['generics_variance.py:93:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T_co](covariant)` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 105: Unexpected errors ['generics_variance.py:105:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T_contra](contravariant)` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 125: Unexpected errors ['generics_variance.py:125:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T_contra](contravariant)` because subclasses cannot use more permissive type variables than their superclasses.'] +Line 131: Unexpected errors ['generics_variance.py:131:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T_co](covariant)` because subclasses cannot use more permissive type variables than their superclasses.'] +""" diff --git a/conformance/results/pyre/generics_variance_inference.toml b/conformance/results/pyre/generics_variance_inference.toml index 71f27f7a6..9d1672c01 100644 --- a/conformance/results/pyre/generics_variance_inference.toml +++ b/conformance/results/pyre/generics_variance_inference.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ generics_variance_inference.py:15:13 Parsing failure [404]: invalid syntax """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['generics_variance_inference.py:15:13 Parsing failure [404]: invalid syntax'] +""" diff --git a/conformance/results/pyre/historical_positional.toml b/conformance/results/pyre/historical_positional.toml index 5e949b690..bc7905589 100644 --- a/conformance/results/pyre/historical_positional.toml +++ b/conformance/results/pyre/historical_positional.toml @@ -1,6 +1,5 @@ -conformant="Partial" -notes = """ -Does not reject positional-only parameter after non-positional-only parameter. +conformant = "Partial" +notes = """Does not reject positional-only parameter after non-positional-only parameter. Treats keyword-only parameter as positional-only. Applies legacy positional-only rules when PEP 570 syntax is used. """ @@ -10,3 +9,10 @@ historical_positional.py:32:0 Unexpected keyword [28]: Unexpected keyword argume historical_positional.py:43:0 Unexpected keyword [28]: Unexpected keyword argument `__x` to call `A.m1`. historical_positional.py:53:0 Unexpected keyword [28]: Unexpected keyword argument `__y` to call `f4`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 18: Unexpected errors ['historical_positional.py:18:0 Unexpected keyword [28]: Unexpected keyword argument `__x` to call `f1`.'] +Line 32: Unexpected errors ['historical_positional.py:32:0 Unexpected keyword [28]: Unexpected keyword argument `__y` to call `f3`.'] +Line 43: Unexpected errors ['historical_positional.py:43:0 Unexpected keyword [28]: Unexpected keyword argument `__x` to call `A.m1`.'] +Line 53: Unexpected errors ['historical_positional.py:53:0 Unexpected keyword [28]: Unexpected keyword argument `__y` to call `f4`.'] +""" diff --git a/conformance/results/pyre/literals_interactions.toml b/conformance/results/pyre/literals_interactions.toml index 4f88bb35a..144f256b1 100644 --- a/conformance/results/pyre/literals_interactions.toml +++ b/conformance/results/pyre/literals_interactions.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not detect out-of-bound tuple literal index. +notes = """Does not detect out-of-bound tuple literal index. Does not narrow type of `x` with `x in Literal` type guard pattern. Does not narrow type of `x` with `x == Literal` type guard pattern. """ @@ -9,3 +8,9 @@ literals_interactions.py:51:38 Incompatible parameter type [6]: In call `typing. literals_interactions.py:106:34 Incompatible parameter type [6]: In call `expects_bad_status`, for 1st positional argument, expected `Union[typing_extensions.Literal['ABORTED'], typing_extensions.Literal['MALFORMED']]` but got `str`. literals_interactions.py:109:31 Non-literal string [62]: In call `expects_pending_status`, for 1st positional argument, expected `LiteralString` but got `str`. Ensure only a string literal or a `LiteralString` is used. """ +conformance_automated = "Fail" +errors_diff = """ +Line 51: Unexpected errors ['literals_interactions.py:51:38 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[AnyStr <: [str, bytes]]]` but got `object`.'] +Line 106: Unexpected errors ["literals_interactions.py:106:34 Incompatible parameter type [6]: In call `expects_bad_status`, for 1st positional argument, expected `Union[typing_extensions.Literal['ABORTED'], typing_extensions.Literal['MALFORMED']]` but got `str`."] +Line 109: Unexpected errors ['literals_interactions.py:109:31 Non-literal string [62]: In call `expects_pending_status`, for 1st positional argument, expected `LiteralString` but got `str`. Ensure only a string literal or a `LiteralString` is used.'] +""" diff --git a/conformance/results/pyre/literals_literalstring.toml b/conformance/results/pyre/literals_literalstring.toml index c60ee6199..f9ae492b1 100644 --- a/conformance/results/pyre/literals_literalstring.toml +++ b/conformance/results/pyre/literals_literalstring.toml @@ -11,3 +11,15 @@ literals_literalstring.py:120:21 Incompatible parameter type [6]: In call `liter literals_literalstring.py:134:50 Incompatible parameter type [6]: In call `Container.__init__`, for 1st positional argument, expected `Variable[T (bound to typing_extensions.LiteralString)]` but got `str`. literals_literalstring.py:166:4 Incompatible variable type [9]: x1 is declared to have type `List[str]` but is used as type `List[typing_extensions.LiteralString]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['literals_literalstring.py:36:11 Invalid type [31]: Expression `LiteralString` is not a literal value.', 'literals_literalstring.py:36:11 Undefined or invalid type [11]: Annotation `typing` is not defined as a type.'] +Line 37: Unexpected errors ['literals_literalstring.py:37:13 Invalid type [31]: Expression `LiteralString` is not a literal value.'] +Line 43: Unexpected errors ["literals_literalstring.py:43:4 Incompatible variable type [9]: x2 is declared to have type `typing_extensions.Literal['']` but is used as type `typing_extensions.Literal['two']`."] +Line 66: Unexpected errors ['literals_literalstring.py:66:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.LiteralString` but is used as type `str`.'] +Line 74: Unexpected errors ['literals_literalstring.py:74:4 Incompatible variable type [9]: x3 is declared to have type `typing_extensions.LiteralString` but is used as type `typing_extensions.Literal[3]`.'] +Line 75: Unexpected errors ["literals_literalstring.py:75:4 Incompatible variable type [9]: x4 is declared to have type `typing_extensions.LiteralString` but is used as type `typing_extensions.Literal[b'test']`."] +Line 120: Unexpected errors ['literals_literalstring.py:120:21 Incompatible parameter type [6]: In call `literal_identity`, for 1st positional argument, expected `Variable[TLiteral (bound to typing_extensions.LiteralString)]` but got `str`.'] +Line 134: Unexpected errors ['literals_literalstring.py:134:50 Incompatible parameter type [6]: In call `Container.__init__`, for 1st positional argument, expected `Variable[T (bound to typing_extensions.LiteralString)]` but got `str`.'] +Line 166: Unexpected errors ['literals_literalstring.py:166:4 Incompatible variable type [9]: x1 is declared to have type `List[str]` but is used as type `List[typing_extensions.LiteralString]`.'] +""" diff --git a/conformance/results/pyre/literals_parameterizations.toml b/conformance/results/pyre/literals_parameterizations.toml index adb1fac3f..440e3b8a1 100644 --- a/conformance/results/pyre/literals_parameterizations.toml +++ b/conformance/results/pyre/literals_parameterizations.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not support type aliases in Literal type expression. +notes = """Does not support type aliases in Literal type expression. Does not support nested Literal type expression. Does not reject unary + operator in Literal type expression. Does not reject tuple in Literal type expression. @@ -29,3 +28,23 @@ literals_parameterizations.py:56:19 Invalid type [31]: Expression `typing.Litera literals_parameterizations.py:61:3 Invalid type [31]: Expression `my_function` is not a literal value. literals_parameterizations.py:65:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.Literal['Color.RED']` but is used as type `typing_extensions.Literal[Color.RED]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Unexpected errors ['literals_parameterizations.py:33:0 Invalid type [31]: Expression `AppendMode` is not a literal value.', 'literals_parameterizations.py:33:0 Invalid type [31]: Expression `ReadOnlyMode` is not a literal value.', 'literals_parameterizations.py:33:0 Invalid type [31]: Expression `WriteAndTruncateMode` is not a literal value.', 'literals_parameterizations.py:33:0 Invalid type [31]: Expression `WriteNoTruncateMode` is not a literal value.', 'literals_parameterizations.py:33:0 Undefined or invalid type [11]: Annotation `` is not defined as a type.'] +Line 35: Unexpected errors ['literals_parameterizations.py:35:8 Invalid type [31]: Expression `typing.Literal[(typing.Literal[(typing.Literal[(1, 2, 3)], "foo")], 5, None)]` is not a valid type.'] +Line 41: Unexpected errors ['literals_parameterizations.py:41:6 Invalid type [31]: Expression `typing.Literal[3.__add__(4)]` is not a valid type.'] +Line 42: Unexpected errors ['literals_parameterizations.py:42:6 Invalid type [31]: Expression `typing.Literal["foo".replace("o", "b")]` is not a valid type.'] +Line 43: Unexpected errors ['literals_parameterizations.py:43:6 Invalid type [31]: Expression `typing.Literal[4.__add__(3.000000j)]` is not a valid type.'] +Line 44: Unexpected errors ['literals_parameterizations.py:44:6 Invalid type [31]: Expression `typing.Literal[~ 5]` is not a valid type.'] +Line 45: Unexpected errors ['literals_parameterizations.py:45:6 Invalid type [31]: Expression `typing.Literal[not False]` is not a valid type.'] +Line 47: Unexpected errors ['literals_parameterizations.py:47:6 Invalid type [31]: Expression `typing.Literal[{ "a":"b","c":"d" }]` is not a valid type.'] +Line 48: Unexpected errors ['literals_parameterizations.py:48:6 Invalid type [31]: Expression `typing.Literal[int]` is not a valid type.'] +Line 49: Unexpected errors ['literals_parameterizations.py:49:6 Invalid type [31]: Expression `variable` is not a literal value.'] +Line 50: Unexpected errors ['literals_parameterizations.py:50:7 Invalid type [31]: Expression `T` is not a literal value.'] +Line 51: Unexpected errors ['literals_parameterizations.py:51:7 Invalid type [31]: Expression `typing.Literal[3.140000]` is not a valid type.'] +Line 52: Unexpected errors ['literals_parameterizations.py:52:7 Invalid type [31]: Expression `Any` is not a literal value.'] +Line 53: Unexpected errors ['literals_parameterizations.py:53:7 Invalid type [31]: Expression `typing.Literal[...]` is not a valid type.'] +Line 56: Unexpected errors ['literals_parameterizations.py:56:19 Invalid type [31]: Expression `typing.Literal[1.__add__(2)]` is not a valid type.'] +Line 61: Unexpected errors ['literals_parameterizations.py:61:3 Invalid type [31]: Expression `my_function` is not a literal value.'] +Line 65: Unexpected errors ["literals_parameterizations.py:65:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.Literal['Color.RED']` but is used as type `typing_extensions.Literal[Color.RED]`."] +""" diff --git a/conformance/results/pyre/literals_semantics.toml b/conformance/results/pyre/literals_semantics.toml index c7f8f8c9f..d45c90aec 100644 --- a/conformance/results/pyre/literals_semantics.toml +++ b/conformance/results/pyre/literals_semantics.toml @@ -1,9 +1,14 @@ conformant = "Partial" -notes = """ -Does not reject augmented operation that modifies literal value. +notes = """Does not reject augmented operation that modifies literal value. """ output = """ literals_semantics.py:10:0 Incompatible variable type [9]: v2 is declared to have type `typing_extensions.Literal[3]` but is used as type `typing_extensions.Literal[4]`. literals_semantics.py:24:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.Literal[False]` but is used as type `typing_extensions.Literal[0]`. literals_semantics.py:25:4 Incompatible variable type [9]: x2 is declared to have type `typing_extensions.Literal[0]` but is used as type `typing_extensions.Literal[False]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['literals_semantics.py:10:0 Incompatible variable type [9]: v2 is declared to have type `typing_extensions.Literal[3]` but is used as type `typing_extensions.Literal[4]`.'] +Line 24: Unexpected errors ['literals_semantics.py:24:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.Literal[False]` but is used as type `typing_extensions.Literal[0]`.'] +Line 25: Unexpected errors ['literals_semantics.py:25:4 Incompatible variable type [9]: x2 is declared to have type `typing_extensions.Literal[0]` but is used as type `typing_extensions.Literal[False]`.'] +""" diff --git a/conformance/results/pyre/namedtuples_define_class.toml b/conformance/results/pyre/namedtuples_define_class.toml index 9ba2af373..2a07f81b5 100644 --- a/conformance/results/pyre/namedtuples_define_class.toml +++ b/conformance/results/pyre/namedtuples_define_class.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not evaluate correct type for indexed named tuple instance with slice. +notes = """Does not evaluate correct type for indexed named tuple instance with slice. Does not report out-of-range index access with named tuple instance. Does not reject named tuple element with no default value after one with a default. Incorrectly rejects assignment of named tuple to a tuple with compatible type. @@ -19,3 +18,17 @@ namedtuples_define_class.py:73:0 Incompatible variable type [9]: Unable to unpac namedtuples_define_class.py:79:4 Invalid assignment [41]: Cannot reassign final attribute `x`. namedtuples_define_class.py:98:18 Incompatible parameter type [6]: In call `Property.__init__`, for 2nd positional argument, expected `str` but got `float`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Unexpected errors ['namedtuples_define_class.py:29:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[int]]`.'] +Line 30: Unexpected errors ['namedtuples_define_class.py:30:26 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[int], Type[str]]`.'] +Line 44: Unexpected errors ['namedtuples_define_class.py:44:5 Missing argument [20]: Call `Point.__init__` expects argument `y`.'] +Line 45: Unexpected errors ['namedtuples_define_class.py:45:5 Missing argument [20]: Call `Point.__init__` expects argument `y`.'] +Line 46: Unexpected errors ['namedtuples_define_class.py:46:14 Incompatible parameter type [6]: In call `Point.__init__`, for 2nd positional argument, expected `int` but got `str`.'] +Line 47: Unexpected errors ['namedtuples_define_class.py:47:17 Incompatible parameter type [6]: In call `Point.__init__`, for argument `units`, expected `str` but got `int`.'] +Line 48: Unexpected errors ['namedtuples_define_class.py:48:5 Too many arguments [19]: Call `Point.__init__` expects 3 positional arguments, 4 were provided.'] +Line 49: Unexpected errors ['namedtuples_define_class.py:49:6 Unexpected keyword [28]: Unexpected keyword argument `other` to call `Point.__init__`.'] +Line 73: Unexpected errors ['namedtuples_define_class.py:73:0 Incompatible variable type [9]: Unable to unpack `PointWithName`, expected a tuple.'] +Line 79: Unexpected errors ['namedtuples_define_class.py:79:4 Invalid assignment [41]: Cannot reassign final attribute `x`.'] +Line 98: Unexpected errors ['namedtuples_define_class.py:98:18 Incompatible parameter type [6]: In call `Property.__init__`, for 2nd positional argument, expected `str` but got `float`.'] +""" diff --git a/conformance/results/pyre/namedtuples_define_functional.toml b/conformance/results/pyre/namedtuples_define_functional.toml index 709475681..92177e7cb 100644 --- a/conformance/results/pyre/namedtuples_define_functional.toml +++ b/conformance/results/pyre/namedtuples_define_functional.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not reject duplicate field names in functional form. +notes = """Does not reject duplicate field names in functional form. Does not handle illegal named tuple names the same as runtime. Does not support defaults in functional form. """ @@ -27,3 +26,20 @@ namedtuples_define_functional.py:63:42 Invalid type parameters [24]: Generic typ namedtuples_define_functional.py:65:0 Too many arguments [19]: Call `NT5.__init__` expects 1 positional argument, 3 were provided. namedtuples_define_functional.py:66:0 Missing argument [20]: Call `NT5.__init__` expects argument `defaults`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['namedtuples_define_functional.py:16:7 Missing argument [20]: Call `Point1.__init__` expects argument `y`.'] +Line 21: Unexpected errors ['namedtuples_define_functional.py:21:7 Missing argument [20]: Call `Point2.__init__` expects argument `x`.'] +Line 26: Unexpected errors ['namedtuples_define_functional.py:26:7 Too many arguments [19]: Call `Point3.__init__` expects 2 positional arguments, 3 were provided.'] +Line 31: Unexpected errors ['namedtuples_define_functional.py:31:7 Unexpected keyword [28]: Unexpected keyword argument `z` to call `Point4.__init__`.'] +Line 36: Unexpected errors ['namedtuples_define_functional.py:36:17 Incompatible parameter type [6]: In call `Point5.__init__`, for 2nd positional argument, expected `int` but got `str`.'] +Line 37: Unexpected errors ['namedtuples_define_functional.py:37:7 Too many arguments [19]: Call `Point5.__init__` expects 2 positional arguments, 3 were provided.'] +Line 42: Unexpected errors ['namedtuples_define_functional.py:42:17 Incompatible parameter type [6]: In call `Point6.__init__`, for 2nd positional argument, expected `int` but got `str`.'] +Line 43: Unexpected errors ['namedtuples_define_functional.py:43:14 Incompatible parameter type [6]: In call `Point6.__init__`, for argument `x`, expected `int` but got `float`.'] +Line 54: Unexpected errors ['namedtuples_define_functional.py:54:47 Invalid type [31]: Expression `False` is not a valid type.', 'namedtuples_define_functional.py:54:47 Invalid type [31]: Expression `False` is not a valid type.', 'namedtuples_define_functional.py:54:47 Invalid type [31]: Expression `typing.Final[False]` is not a valid type.'] +Line 56: Unexpected errors ['namedtuples_define_functional.py:56:47 Invalid type [31]: Expression `True` is not a valid type.', 'namedtuples_define_functional.py:56:47 Invalid type [31]: Expression `True` is not a valid type.', 'namedtuples_define_functional.py:56:47 Invalid type [31]: Expression `typing.Final[True]` is not a valid type.'] +Line 57: Unexpected errors ['namedtuples_define_functional.py:57:0 Unexpected keyword [28]: Unexpected keyword argument `abc` to call `NT4.__init__`.'] +Line 63: Unexpected errors ['namedtuples_define_functional.py:63:42 Invalid type [31]: Expression `(1, 2)` is not a valid type.', 'namedtuples_define_functional.py:63:42 Invalid type [31]: Expression `(1, 2)` is not a valid type.', 'namedtuples_define_functional.py:63:42 Invalid type [31]: Expression `typing.Final[(1, 2)]` is not a valid type.', 'namedtuples_define_functional.py:63:42 Invalid type parameters [24]: Generic type `typing.Final` expects 1 type parameter, received 2.'] +Line 65: Unexpected errors ['namedtuples_define_functional.py:65:0 Too many arguments [19]: Call `NT5.__init__` expects 1 positional argument, 3 were provided.'] +Line 66: Unexpected errors ['namedtuples_define_functional.py:66:0 Missing argument [20]: Call `NT5.__init__` expects argument `defaults`.'] +""" diff --git a/conformance/results/pyre/namedtuples_type_compat.toml b/conformance/results/pyre/namedtuples_type_compat.toml index 7d99df8e7..3d10c16fa 100644 --- a/conformance/results/pyre/namedtuples_type_compat.toml +++ b/conformance/results/pyre/namedtuples_type_compat.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Rejects valid type compatibility between named tuple and tuple. +notes = """Rejects valid type compatibility between named tuple and tuple. """ output = """ namedtuples_type_compat.py:20:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple. @@ -9,3 +8,11 @@ namedtuples_type_compat.py:22:0 Incompatible variable type [9]: Unable to unpack namedtuples_type_compat.py:23:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple. namedtuples_type_compat.py:27:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple. """ +conformance_automated = "Fail" +errors_diff = """ +Line 20: Unexpected errors ['namedtuples_type_compat.py:20:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple.'] +Line 21: Unexpected errors ['namedtuples_type_compat.py:21:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple.'] +Line 22: Unexpected errors ['namedtuples_type_compat.py:22:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple.'] +Line 23: Unexpected errors ['namedtuples_type_compat.py:23:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple.'] +Line 27: Unexpected errors ['namedtuples_type_compat.py:27:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple.'] +""" diff --git a/conformance/results/pyre/namedtuples_usage.toml b/conformance/results/pyre/namedtuples_usage.toml index b72fd9a17..b9bb76627 100644 --- a/conformance/results/pyre/namedtuples_usage.toml +++ b/conformance/results/pyre/namedtuples_usage.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report out-of-range index access with named tuple instance. +notes = """Does not report out-of-range index access with named tuple instance. Does not reject attempt to delete named tuple field by name. Does not reject attempt to delete named tuple field by index. Incorrectly handles subclasses of named tuples that add more attributes. @@ -12,3 +11,11 @@ namedtuples_usage.py:52:0 Unable to unpack [23]: Unable to unpack 3 values, 2 we namedtuples_usage.py:53:0 Unable to unpack [23]: Unable to unpack 3 values, 4 were expected. namedtuples_usage.py:61:0 Unable to unpack [23]: Unable to unpack 0 values, 3 were expected. """ +conformance_automated = "Fail" +errors_diff = """ +Line 40: Unexpected errors ['namedtuples_usage.py:40:0 Invalid assignment [41]: Cannot reassign final attribute `p.x`.'] +Line 41: Unexpected errors ['namedtuples_usage.py:41:0 Undefined attribute [16]: `Point` has no attribute `__setitem__`.'] +Line 52: Unexpected errors ['namedtuples_usage.py:52:0 Unable to unpack [23]: Unable to unpack 3 values, 2 were expected.'] +Line 53: Unexpected errors ['namedtuples_usage.py:53:0 Unable to unpack [23]: Unable to unpack 3 values, 4 were expected.'] +Line 61: Unexpected errors ['namedtuples_usage.py:61:0 Unable to unpack [23]: Unable to unpack 0 values, 3 were expected.'] +""" diff --git a/conformance/results/pyre/narrowing_typeguard.toml b/conformance/results/pyre/narrowing_typeguard.toml index c9d950e42..944914ea9 100644 --- a/conformance/results/pyre/narrowing_typeguard.toml +++ b/conformance/results/pyre/narrowing_typeguard.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not support `tuple` in `assert_type` call. +notes = """Does not support `tuple` in `assert_type` call. Does not reject TypeGuard method with too few parameters. """ output = """ @@ -9,3 +8,8 @@ narrowing_typeguard.py:19:33 Incompatible parameter type [6]: In call `typing.Ge narrowing_typeguard.py:128:19 Incompatible parameter type [6]: In call `takes_callable_str`, for 1st positional argument, expected `typing.Callable[[object], str]` but got `typing.Callable(simple_typeguard)[[Named(val, object)], TypeGuard[int]]`. narrowing_typeguard.py:148:25 Incompatible parameter type [6]: In call `takes_callable_str_proto`, for 1st positional argument, expected `CallableStrProto` but got `typing.Callable(simple_typeguard)[[Named(val, object)], TypeGuard[int]]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['narrowing_typeguard.py:17:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[str]]`.'] +Line 19: Unexpected errors ['narrowing_typeguard.py:19:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], typing.Any]`.'] +""" diff --git a/conformance/results/pyre/overloads_basic.toml b/conformance/results/pyre/overloads_basic.toml index 0dd93e644..76ed4c32e 100644 --- a/conformance/results/pyre/overloads_basic.toml +++ b/conformance/results/pyre/overloads_basic.toml @@ -1,8 +1,12 @@ conformant = "Partial" -notes = """ -Does not reject a function with a single @overload signature. +notes = """Does not reject a function with a single @overload signature. """ output = """ overloads_basic.py:37:2 Incompatible parameter type [6]: In call `Bytes.__getitem__`, for 1st positional argument, expected `int` but got `str`. overloads_basic.py:75:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation. """ +conformance_automated = "Fail" +errors_diff = """ +Line 37: Unexpected errors ['overloads_basic.py:37:2 Incompatible parameter type [6]: In call `Bytes.__getitem__`, for 1st positional argument, expected `int` but got `str`.'] +Line 75: Unexpected errors ['overloads_basic.py:75:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation.'] +""" diff --git a/conformance/results/pyre/protocols_class_objects.toml b/conformance/results/pyre/protocols_class_objects.toml index ebdc29553..9a6bd288f 100644 --- a/conformance/results/pyre/protocols_class_objects.toml +++ b/conformance/results/pyre/protocols_class_objects.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject protocol class assigned to type[Proto]. +notes = """Does not reject protocol class assigned to type[Proto]. Incorrectly reports some class objects as incompatible with a protocol. Fails to report some class objects as incompatible with a protocol. """ @@ -9,3 +8,9 @@ protocols_class_objects.py:26:11 Invalid class instantiation [45]: Cannot instan protocols_class_objects.py:58:0 Incompatible variable type [9]: pa1 is declared to have type `ProtoA1` but is used as type `Type[ConcreteA]`. protocols_class_objects.py:93:0 Uninitialized attribute [13]: Attribute `attr1` is declared in class `CMeta` to have type `int` but is never initialized. """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['protocols_class_objects.py:26:11 Invalid class instantiation [45]: Cannot instantiate abstract class `Proto` with abstract method `meth`.'] +Line 58: Unexpected errors ['protocols_class_objects.py:58:0 Incompatible variable type [9]: pa1 is declared to have type `ProtoA1` but is used as type `Type[ConcreteA]`.'] +Line 93: Unexpected errors ['protocols_class_objects.py:93:0 Uninitialized attribute [13]: Attribute `attr1` is declared in class `CMeta` to have type `int` but is never initialized.'] +""" diff --git a/conformance/results/pyre/protocols_definition.toml b/conformance/results/pyre/protocols_definition.toml index 88a96e227..e3d4ca112 100644 --- a/conformance/results/pyre/protocols_definition.toml +++ b/conformance/results/pyre/protocols_definition.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar or vice versa. +notes = """Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar or vice versa. Does not reject read-only property in concrete class when attribute in protocol is mutable. Does not reject covariant attribute type when protocol attribute is mutable. Does not reject read-only property in concrete class when protocol has settable property. @@ -22,3 +21,19 @@ protocols_definition.py:287:0 Incompatible variable type [9]: v5_bad3 is declare protocols_definition.py:288:0 Incompatible variable type [9]: v5_bad4 is declared to have type `Template5` but is used as type `Concrete5_Bad4`. protocols_definition.py:289:0 Incompatible variable type [9]: v5_bad5 is declared to have type `Template5` but is used as type `Concrete5_Bad5`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['protocols_definition.py:30:10 Incompatible parameter type [6]: In call `close_all`, for 1st positional argument, expected `Iterable[SupportsClose]` but got `Iterable[int]`.'] +Line 67: Unexpected errors ['protocols_definition.py:67:8 Undefined attribute [16]: `Template` has no attribute `temp`.'] +Line 114: Unexpected errors ['protocols_definition.py:114:0 Incompatible variable type [9]: v2_bad1 is declared to have type `Template2` but is used as type `Concrete2_Bad1`.'] +Line 115: Unexpected errors ['protocols_definition.py:115:0 Incompatible variable type [9]: v2_bad2 is declared to have type `Template2` but is used as type `Concrete2_Bad2`.'] +Line 156: Unexpected errors ['protocols_definition.py:156:0 Incompatible variable type [9]: v3_bad1 is declared to have type `Template3` but is used as type `Concrete3_Bad1`.'] +Line 159: Unexpected errors ['protocols_definition.py:159:0 Incompatible variable type [9]: v3_bad4 is declared to have type `Template3` but is used as type `Concrete3_Bad4`.'] +Line 218: Unexpected errors ['protocols_definition.py:218:0 Incompatible variable type [9]: v4_bad1 is declared to have type `Template4` but is used as type `Concrete4_Bad1`.'] +Line 219: Unexpected errors ['protocols_definition.py:219:0 Incompatible variable type [9]: v4_bad2 is declared to have type `Template4` but is used as type `Concrete4_Bad2`.'] +Line 285: Unexpected errors ['protocols_definition.py:285:0 Incompatible variable type [9]: v5_bad1 is declared to have type `Template5` but is used as type `Concrete5_Bad1`.'] +Line 286: Unexpected errors ['protocols_definition.py:286:0 Incompatible variable type [9]: v5_bad2 is declared to have type `Template5` but is used as type `Concrete5_Bad2`.'] +Line 287: Unexpected errors ['protocols_definition.py:287:0 Incompatible variable type [9]: v5_bad3 is declared to have type `Template5` but is used as type `Concrete5_Bad3`.'] +Line 288: Unexpected errors ['protocols_definition.py:288:0 Incompatible variable type [9]: v5_bad4 is declared to have type `Template5` but is used as type `Concrete5_Bad4`.'] +Line 289: Unexpected errors ['protocols_definition.py:289:0 Incompatible variable type [9]: v5_bad5 is declared to have type `Template5` but is used as type `Concrete5_Bad5`.'] +""" diff --git a/conformance/results/pyre/protocols_explicit.toml b/conformance/results/pyre/protocols_explicit.toml index a1645f2b2..69987c8aa 100644 --- a/conformance/results/pyre/protocols_explicit.toml +++ b/conformance/results/pyre/protocols_explicit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report error when calling unimplemented protocol method from derived class. +notes = """Does not report error when calling unimplemented protocol method from derived class. Does not report error when method is not implemented in derived class. """ output = """ @@ -13,3 +12,11 @@ protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `cm11` inheri protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `im1` inherited from protocol `Proto1` in class `Concrete3` to have type `int` but is never initialized. protocols_explicit.py:159:6 Invalid class instantiation [45]: Cannot instantiate abstract class `Concrete7A` with abstract method `method1`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 54: Unexpected errors ['protocols_explicit.py:54:0 Uninitialized attribute [13]: Attribute `other` inherited from protocol `RGB` in class `Point` to have type `int` but is never initialized.'] +Line 59: Unexpected errors ['protocols_explicit.py:59:4 Invalid class instantiation [45]: Cannot instantiate abstract class `Point` with abstract method `intensity`.'] +Line 82: Unexpected errors ['protocols_explicit.py:82:0 Uninitialized attribute [13]: Attribute `cm1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized.', 'protocols_explicit.py:82:0 Uninitialized attribute [13]: Attribute `im1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized.'] +Line 97: Unexpected errors ['protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `cm10` inherited from protocol `Proto2` in class `Concrete3` to have type `int` but is never initialized.', 'protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `cm11` inherited from protocol `Proto3` in class `Concrete3` to have type `int` but is never initialized.', 'protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `im1` inherited from protocol `Proto1` in class `Concrete3` to have type `int` but is never initialized.'] +Line 159: Unexpected errors ['protocols_explicit.py:159:6 Invalid class instantiation [45]: Cannot instantiate abstract class `Concrete7A` with abstract method `method1`.'] +""" diff --git a/conformance/results/pyre/protocols_generic.toml b/conformance/results/pyre/protocols_generic.toml index 45e702d11..54d64fb71 100644 --- a/conformance/results/pyre/protocols_generic.toml +++ b/conformance/results/pyre/protocols_generic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject the use of Protocol and Generic together as base classes. +notes = """Does not reject the use of Protocol and Generic together as base classes. Does not detect protocol mismatch when method-scoped TypeVar is used in protocol. """ output = """ @@ -11,3 +10,12 @@ protocols_generic.py:74:4 Incompatible variable type [9]: v1 is declared to have protocols_generic.py:75:4 Incompatible variable type [9]: v2 is declared to have type `AttrProto[int]` but is used as type `AttrProto[float]`. protocols_generic.py:146:0 Incompatible variable type [9]: hp3 is declared to have type `HasPropertyProto` but is used as type `ConcreteHasProperty3`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 40: Unexpected errors ['protocols_generic.py:40:0 Incompatible variable type [9]: p2 is declared to have type `Proto1[int, str]` but is used as type `Concrete1`.'] +Line 56: Unexpected errors ['protocols_generic.py:56:4 Incompatible variable type [9]: v2 is declared to have type `Box[int]` but is used as type `Box[float]`.'] +Line 66: Unexpected errors ['protocols_generic.py:66:4 Incompatible variable type [9]: v2 is declared to have type `Sender[float]` but is used as type `Sender[int]`.'] +Line 74: Unexpected errors ['protocols_generic.py:74:4 Incompatible variable type [9]: v1 is declared to have type `AttrProto[float]` but is used as type `AttrProto[int]`.'] +Line 75: Unexpected errors ['protocols_generic.py:75:4 Incompatible variable type [9]: v2 is declared to have type `AttrProto[int]` but is used as type `AttrProto[float]`.'] +Line 146: Unexpected errors ['protocols_generic.py:146:0 Incompatible variable type [9]: hp3 is declared to have type `HasPropertyProto` but is used as type `ConcreteHasProperty3`.'] +""" diff --git a/conformance/results/pyre/protocols_merging.toml b/conformance/results/pyre/protocols_merging.toml index ee1a86c18..3d9504f6e 100644 --- a/conformance/results/pyre/protocols_merging.toml +++ b/conformance/results/pyre/protocols_merging.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject a protocol class that derives from a non-protocol class. +notes = """Does not reject a protocol class that derives from a non-protocol class. """ output = """ protocols_merging.py:52:0 Incompatible variable type [9]: s6 is declared to have type `SizedAndClosable1` but is used as type `SCConcrete2`. @@ -9,3 +8,11 @@ protocols_merging.py:54:0 Incompatible variable type [9]: s8 is declared to have protocols_merging.py:83:4 Invalid class instantiation [45]: Cannot instantiate abstract class `SizedAndClosable4` with abstract method `close`. protocols_merging.py:84:0 Incompatible variable type [9]: y is declared to have type `SizedAndClosable4` but is used as type `SCConcrete1`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 52: Unexpected errors ['protocols_merging.py:52:0 Incompatible variable type [9]: s6 is declared to have type `SizedAndClosable1` but is used as type `SCConcrete2`.'] +Line 53: Unexpected errors ['protocols_merging.py:53:0 Incompatible variable type [9]: s7 is declared to have type `SizedAndClosable2` but is used as type `SCConcrete2`.'] +Line 54: Unexpected errors ['protocols_merging.py:54:0 Incompatible variable type [9]: s8 is declared to have type `SizedAndClosable3` but is used as type `SCConcrete2`.'] +Line 83: Unexpected errors ['protocols_merging.py:83:4 Invalid class instantiation [45]: Cannot instantiate abstract class `SizedAndClosable4` with abstract method `close`.'] +Line 84: Unexpected errors ['protocols_merging.py:84:0 Incompatible variable type [9]: y is declared to have type `SizedAndClosable4` but is used as type `SCConcrete1`.'] +""" diff --git a/conformance/results/pyre/protocols_modules.toml b/conformance/results/pyre/protocols_modules.toml index 8e5b07869..40ddbba89 100644 --- a/conformance/results/pyre/protocols_modules.toml +++ b/conformance/results/pyre/protocols_modules.toml @@ -1,6 +1,8 @@ conformant = "Unsupported" -notes = """ -Does not perform protocol checks for modules. +notes = """Does not perform protocol checks for modules. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/protocols_recursive.toml b/conformance/results/pyre/protocols_recursive.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyre/protocols_recursive.toml +++ b/conformance/results/pyre/protocols_recursive.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/protocols_runtime_checkable.toml b/conformance/results/pyre/protocols_runtime_checkable.toml index 80197221f..f86004cf6 100644 --- a/conformance/results/pyre/protocols_runtime_checkable.toml +++ b/conformance/results/pyre/protocols_runtime_checkable.toml @@ -1,8 +1,10 @@ conformant = "Unsupported" -notes = """ -Does not reject isinstance or issubclass call for protocol that is not runtime_checkable. +notes = """Does not reject isinstance or issubclass call for protocol that is not runtime_checkable. Does not reject issubclass call for data protocol. Does not report unsafe overlap for runtime_checkable protocol. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/protocols_self.toml b/conformance/results/pyre/protocols_self.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyre/protocols_self.toml +++ b/conformance/results/pyre/protocols_self.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/protocols_subtyping.toml b/conformance/results/pyre/protocols_subtyping.toml index 3fe6fc12c..1349617e2 100644 --- a/conformance/results/pyre/protocols_subtyping.toml +++ b/conformance/results/pyre/protocols_subtyping.toml @@ -8,3 +8,13 @@ protocols_subtyping.py:80:4 Incompatible variable type [9]: v4 is declared to ha protocols_subtyping.py:102:4 Incompatible variable type [9]: v4 is declared to have type `Proto7[int, float]` but is used as type `Proto6[float, float]`. protocols_subtyping.py:103:4 Incompatible variable type [9]: v5 is declared to have type `Proto7[float, object]` but is used as type `Proto6[float, float]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['protocols_subtyping.py:16:5 Invalid class instantiation [45]: Cannot instantiate protocol `Proto1`.'] +Line 38: Unexpected errors ['protocols_subtyping.py:38:4 Incompatible variable type [9]: v2 is declared to have type `Concrete2` but is used as type `Proto2`.'] +Line 55: Unexpected errors ['protocols_subtyping.py:55:4 Incompatible variable type [9]: v2 is declared to have type `Proto3` but is used as type `Proto2`.'] +Line 79: Unexpected errors ['protocols_subtyping.py:79:4 Incompatible variable type [9]: v3 is declared to have type `Proto4[int, float]` but is used as type `Proto5[int]`.'] +Line 80: Unexpected errors ['protocols_subtyping.py:80:4 Incompatible variable type [9]: v4 is declared to have type `Proto5[float]` but is used as type `Proto4[int, int]`.'] +Line 102: Unexpected errors ['protocols_subtyping.py:102:4 Incompatible variable type [9]: v4 is declared to have type `Proto7[int, float]` but is used as type `Proto6[float, float]`.'] +Line 103: Unexpected errors ['protocols_subtyping.py:103:4 Incompatible variable type [9]: v5 is declared to have type `Proto7[float, object]` but is used as type `Proto6[float, float]`.'] +""" diff --git a/conformance/results/pyre/protocols_variance.toml b/conformance/results/pyre/protocols_variance.toml index 26d50b961..76800f54a 100644 --- a/conformance/results/pyre/protocols_variance.toml +++ b/conformance/results/pyre/protocols_variance.toml @@ -1,8 +1,12 @@ conformant = "Unsupported" -notes = """ -Does not detect incorrect TypeVar variance within generic protocols. +notes = """Does not detect incorrect TypeVar variance within generic protocols. """ output = """ protocols_variance.py:62:17 Invalid type variance [46]: The type variable `Variable[T1_co](covariant)` is covariant and cannot be a parameter type. protocols_variance.py:72:4 Invalid type variance [46]: The type variable `Variable[T1_contra](contravariant)` is contravariant and cannot be a return type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 62: Unexpected errors ['protocols_variance.py:62:17 Invalid type variance [46]: The type variable `Variable[T1_co](covariant)` is covariant and cannot be a parameter type.'] +Line 72: Unexpected errors ['protocols_variance.py:72:4 Invalid type variance [46]: The type variable `Variable[T1_contra](contravariant)` is contravariant and cannot be a return type.'] +""" diff --git a/conformance/results/pyre/qualifiers_annotated.toml b/conformance/results/pyre/qualifiers_annotated.toml index b4ddd0ee5..63e0d36fa 100644 --- a/conformance/results/pyre/qualifiers_annotated.toml +++ b/conformance/results/pyre/qualifiers_annotated.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject Annotated with a single parameter. +notes = """Does not reject Annotated with a single parameter. Does not reject call of Annotated with no type arguments. """ output = """ @@ -23,3 +22,24 @@ qualifiers_annotated.py:85:6 Incompatible parameter type [6]: In call `func4`, f qualifiers_annotated.py:92:10 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[int], str]`. Expected has length 0, but actual has length 2. qualifiers_annotated.py:93:0 Call error [29]: `TypeAlias` is not a function. """ +conformance_automated = "Fail" +errors_diff = """ +Line 43: Unexpected errors ['qualifiers_annotated.py:43:6 Undefined or invalid type [11]: Annotation `` is not defined as a type.'] +Line 44: Unexpected errors ['qualifiers_annotated.py:44:6 Invalid type [31]: Expression `typing.Annotated[(((int, str)), "")]` is not a valid type.'] +Line 45: Unexpected errors ['qualifiers_annotated.py:45:6 Invalid type [31]: Expression `typing.Annotated[(comprehension(int for generators(generator($target$i in range(1) if ))), "")]` is not a valid type.'] +Line 46: Unexpected errors ['qualifiers_annotated.py:46:6 Invalid type [31]: Expression `typing.Annotated[({ "a":"b" }, "")]` is not a valid type.'] +Line 47: Unexpected errors ['qualifiers_annotated.py:47:6 Invalid type [31]: Expression `typing.Annotated[(lambda () (int)(), "")]` is not a valid type.'] +Line 48: Unexpected errors ['qualifiers_annotated.py:48:6 Invalid type [31]: Expression `typing.Annotated[([int][0], "")]` is not a valid type.'] +Line 49: Unexpected errors ['qualifiers_annotated.py:49:6 Invalid type [31]: Expression `typing.Annotated[(int if 1 < 3 else str, "")]` is not a valid type.'] +Line 50: Unexpected errors ['qualifiers_annotated.py:50:16 Unbound name [10]: Name `var1` is used but not defined in the current scope.'] +Line 51: Unexpected errors ['qualifiers_annotated.py:51:6 Invalid type [31]: Expression `typing.Annotated[(True, "")]` is not a valid type.'] +Line 52: Unexpected errors ['qualifiers_annotated.py:52:7 Invalid type [31]: Expression `typing.Annotated[(1, "")]` is not a valid type.'] +Line 53: Unexpected errors ['qualifiers_annotated.py:53:7 Invalid type [31]: Expression `typing.Annotated[(list or set, "")]` is not a valid type.'] +Line 54: Unexpected errors ['qualifiers_annotated.py:54:7 Invalid type [31]: Expression `typing.Annotated[(f"{"int"}", "")]` is not a valid type.'] +Line 76: Unexpected errors ['qualifiers_annotated.py:76:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[int], str]`. Expected has length 0, but actual has length 2.'] +Line 77: Unexpected errors ['qualifiers_annotated.py:77:0 Incompatible variable type [9]: not_type2 is declared to have type `Type[typing.Any]` but is used as type `TypeAlias`.'] +Line 84: Unexpected errors ['qualifiers_annotated.py:84:16 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[str], str]`. Expected has length 0, but actual has length 2.'] +Line 85: Unexpected errors ['qualifiers_annotated.py:85:6 Incompatible parameter type [6]: In call `func4`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeAlias`.'] +Line 92: Unexpected errors ['qualifiers_annotated.py:92:10 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[]` but got `Tuple[Type[int], str]`. Expected has length 0, but actual has length 2.'] +Line 93: Unexpected errors ['qualifiers_annotated.py:93:0 Call error [29]: `TypeAlias` is not a function.'] +""" diff --git a/conformance/results/pyre/qualifiers_final_annotation.toml b/conformance/results/pyre/qualifiers_final_annotation.toml index 79bd08fdb..bd84e614e 100644 --- a/conformance/results/pyre/qualifiers_final_annotation.toml +++ b/conformance/results/pyre/qualifiers_final_annotation.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report Final variable with missing initialization in module scope. +notes = """Does not report Final variable with missing initialization in module scope. Does not report error for invalid nesting of Final and ClassVar. Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition. """ @@ -32,3 +31,30 @@ qualifiers_final_annotation.py:149:8 Invalid assignment [41]: Cannot reassign fi qualifiers_final_annotation.py:152:29 Invalid assignment [41]: Cannot reassign final attribute `x`. qualifiers_final_annotation.py:155:8 Invalid assignment [41]: Cannot reassign final attribute `x`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 18: Unexpected errors ['qualifiers_final_annotation.py:18:6 Invalid type parameters [24]: Generic type `Final` expects 1 type parameter, received 2.'] +Line 28: Unexpected errors ['qualifiers_final_annotation.py:28:0 Uninitialized attribute [13]: Attribute `ID3` is declared in class `ClassA` to have type `int` but is never initialized.'] +Line 34: Unexpected errors ['qualifiers_final_annotation.py:34:4 Invalid assignment [41]: Cannot reassign final attribute `ClassA.ID2`.'] +Line 54: Unexpected errors ['qualifiers_final_annotation.py:54:8 Invalid assignment [41]: Cannot reassign final attribute `self.ID5`.'] +Line 62: Unexpected errors ['qualifiers_final_annotation.py:62:8 Undefined attribute [16]: `ClassA` has no attribute `id3`.'] +Line 63: Unexpected errors ['qualifiers_final_annotation.py:63:8 Undefined attribute [16]: `ClassA` has no attribute `id4`.'] +Line 65: Unexpected errors ['qualifiers_final_annotation.py:65:8 Invalid assignment [41]: Cannot reassign final attribute `self.ID7`.'] +Line 67: Unexpected errors ['qualifiers_final_annotation.py:67:8 Invalid assignment [41]: Cannot reassign final attribute `self.ID7`.'] +Line 71: Unexpected errors ['qualifiers_final_annotation.py:71:0 Invalid assignment [41]: Cannot reassign final attribute `RATE`.'] +Line 81: Unexpected errors ['qualifiers_final_annotation.py:81:0 Invalid assignment [41]: Cannot reassign final attribute `ClassB.DEFAULT_ID`.'] +Line 94: Unexpected errors ['qualifiers_final_annotation.py:94:4 Invalid assignment [41]: Cannot reassign final attribute `BORDER_WIDTH`.'] +Line 107: Unexpected errors ['qualifiers_final_annotation.py:107:4 Incompatible attribute type [8]: Attribute `VALUE2` declared in class `ClassD` has type `Final` but is used as type `int`.', 'qualifiers_final_annotation.py:107:4 Invalid type [31]: Expression `Final` is not a valid type. Final cannot be nested.'] +Line 118: Unexpected errors ['qualifiers_final_annotation.py:118:0 Invalid type [31]: Expression `typing.List[Final[int]]` is not a valid type. Final cannot be nested.'] +Line 121: Unexpected errors ['qualifiers_final_annotation.py:121:10 Invalid type [31]: Parameter `x` cannot be annotated with Final.'] +Line 131: Unexpected errors ['qualifiers_final_annotation.py:131:0 Uninitialized attribute [13]: Attribute `($local_qualifiers_final_annotation$X, int)` is declared in class `N` to have type `typing.Any` but is never initialized.', 'qualifiers_final_annotation.py:131:0 Uninitialized attribute [13]: Attribute `($local_qualifiers_final_annotation$Y, int)` is declared in class `N` to have type `typing.Any` but is never initialized.'] +Line 133: Unexpected errors ['qualifiers_final_annotation.py:133:0 Unexpected keyword [28]: Unexpected keyword argument `x` to call `N.__init__`.'] +Line 134: Unexpected errors ['qualifiers_final_annotation.py:134:0 Unexpected keyword [28]: Unexpected keyword argument `a` to call `N.__init__`.'] +Line 135: Unexpected errors ['qualifiers_final_annotation.py:135:0 Unexpected keyword [28]: Unexpected keyword argument `x` to call `N.__init__`.'] +Line 141: Unexpected errors ['qualifiers_final_annotation.py:141:4 Invalid assignment [41]: Cannot reassign final attribute `ID1`.'] +Line 145: Unexpected errors ['qualifiers_final_annotation.py:145:4 Invalid assignment [41]: Cannot reassign final attribute `x`.'] +Line 147: Unexpected errors ['qualifiers_final_annotation.py:147:9 Invalid assignment [41]: Cannot reassign final attribute `x`.'] +Line 149: Unexpected errors ['qualifiers_final_annotation.py:149:8 Invalid assignment [41]: Cannot reassign final attribute `x`.'] +Line 152: Unexpected errors ['qualifiers_final_annotation.py:152:29 Invalid assignment [41]: Cannot reassign final attribute `x`.'] +Line 155: Unexpected errors ['qualifiers_final_annotation.py:155:8 Invalid assignment [41]: Cannot reassign final attribute `x`.'] +""" diff --git a/conformance/results/pyre/qualifiers_final_decorator.toml b/conformance/results/pyre/qualifiers_final_decorator.toml index a9722413d..a4a692a81 100644 --- a/conformance/results/pyre/qualifiers_final_decorator.toml +++ b/conformance/results/pyre/qualifiers_final_decorator.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Reports error for overloaded method implementation marked @final if its overloads do not. +notes = """Reports error for overloaded method implementation marked @final if its overloads do not. Does not report error for overloaded @final method defined in stub file. Reports misleading error when overload is marked @final but implementation is not. """ @@ -16,3 +15,15 @@ qualifiers_final_decorator.py:118:4 Inconsistent override [14]: `qualifiers_fina qualifiers_final_decorator.py:118:4 Invalid override [40]: `qualifiers_final_decorator.Derived5.method` cannot override final method defined in `Base5_2`. qualifiers_final_decorator.py:126:0 Invalid inheritance [39]: `final` cannot be used with non-method functions. """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['qualifiers_final_decorator.py:21:0 Invalid inheritance [39]: Cannot inherit from final class `Base1`.'] +Line 51: Unexpected errors ['qualifiers_final_decorator.py:51:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] +Line 56: Unexpected errors ['qualifiers_final_decorator.py:56:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method1` cannot override final method defined in `Base2`.'] +Line 60: Unexpected errors ['qualifiers_final_decorator.py:60:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method2` cannot override final method defined in `Base2`.'] +Line 64: Unexpected errors ['qualifiers_final_decorator.py:64:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method3` cannot override final method defined in `Base2`.'] +Line 75: Unexpected errors ['qualifiers_final_decorator.py:75:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method4` cannot override final method defined in `Base2`.'] +Line 86: Unexpected errors ['qualifiers_final_decorator.py:86:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] +Line 118: Unexpected errors ['qualifiers_final_decorator.py:118:4 Inconsistent override [14]: `qualifiers_final_decorator.Derived5.method` overrides method defined in `Base5_2` inconsistently. Could not find parameter `v` in overriding signature.', 'qualifiers_final_decorator.py:118:4 Invalid override [40]: `qualifiers_final_decorator.Derived5.method` cannot override final method defined in `Base5_2`.'] +Line 126: Unexpected errors ['qualifiers_final_decorator.py:126:0 Invalid inheritance [39]: `final` cannot be used with non-method functions.'] +""" diff --git a/conformance/results/pyre/specialtypes_any.toml b/conformance/results/pyre/specialtypes_any.toml index 1af969071..15a88059d 100644 --- a/conformance/results/pyre/specialtypes_any.toml +++ b/conformance/results/pyre/specialtypes_any.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not treat missing type argument as Any in generic type. +notes = """Does not treat missing type argument as Any in generic type. Does not support Any as a base class. """ output = """ @@ -12,3 +11,13 @@ specialtypes_any.py:81:13 Invalid inheritance [39]: `typing.Any` is not a valid specialtypes_any.py:87:12 Undefined attribute [16]: `ClassA` has no attribute `method2`. specialtypes_any.py:88:12 Undefined attribute [16]: `ClassA` has no attribute `method3`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 48: Unexpected errors ['specialtypes_any.py:48:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `object`.'] +Line 49: Unexpected errors ['specialtypes_any.py:49:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_KT]], Type[Variable[_VT]]]` but got `Tuple[object, object]`.'] +Line 62: Unexpected errors ['specialtypes_any.py:62:28 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[object, typing.Any]`.'] +Line 72: Unexpected errors ['specialtypes_any.py:72:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[typing.Any, object]`.'] +Line 81: Unexpected errors ['specialtypes_any.py:81:13 Invalid inheritance [39]: `typing.Any` is not a valid parent class.'] +Line 87: Unexpected errors ['specialtypes_any.py:87:12 Undefined attribute [16]: `ClassA` has no attribute `method2`.'] +Line 88: Unexpected errors ['specialtypes_any.py:88:12 Undefined attribute [16]: `ClassA` has no attribute `method3`.'] +""" diff --git a/conformance/results/pyre/specialtypes_never.toml b/conformance/results/pyre/specialtypes_never.toml index 9e76f23fe..3cfe84489 100644 --- a/conformance/results/pyre/specialtypes_never.toml +++ b/conformance/results/pyre/specialtypes_never.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not treat Never as compatible with all other types. +notes = """Does not treat Never as compatible with all other types. """ output = """ specialtypes_never.py:21:8 Incompatible return type [7]: Function declared non-returnable, but got `None`. @@ -14,3 +13,15 @@ specialtypes_never.py:86:4 Incompatible variable type [9]: v4 is declared to hav specialtypes_never.py:95:4 Incompatible return type [7]: Expected `ClassB[Variable[U]]` but got `ClassB[Never]`. specialtypes_never.py:104:4 Incompatible return type [7]: Expected `ClassC[Variable[U]]` but got `ClassC[Never]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['specialtypes_never.py:21:8 Incompatible return type [7]: Function declared non-returnable, but got `None`.'] +Line 58: Unexpected errors ['specialtypes_never.py:58:0 Uninitialized attribute [13]: Attribute `x` is declared in class `ClassA` to have type `NoReturn` but is never initialized.', 'specialtypes_never.py:58:0 Uninitialized attribute [13]: Attribute `y` is declared in class `ClassA` to have type `typing.List[NoReturn]` but is never initialized.'] +Line 67: Unexpected errors ['specialtypes_never.py:67:4 Incompatible variable type [9]: v1 is declared to have type `int` but is used as type `Never`.'] +Line 68: Unexpected errors ['specialtypes_never.py:68:4 Incompatible variable type [9]: v2 is declared to have type `str` but is used as type `Never`.'] +Line 69: Unexpected errors ['specialtypes_never.py:69:4 Incompatible variable type [9]: v3 is declared to have type `List[str]` but is used as type `Never`.'] +Line 85: Unexpected errors ['specialtypes_never.py:85:4 Incompatible variable type [9]: v3 is declared to have type `List[int]` but is used as type `List[Never]`.'] +Line 86: Unexpected errors ['specialtypes_never.py:86:4 Incompatible variable type [9]: v4 is declared to have type `Never` but is used as type `NoReturn`.'] +Line 95: Unexpected errors ['specialtypes_never.py:95:4 Incompatible return type [7]: Expected `ClassB[Variable[U]]` but got `ClassB[Never]`.'] +Line 104: Unexpected errors ['specialtypes_never.py:104:4 Incompatible return type [7]: Expected `ClassC[Variable[U]]` but got `ClassC[Never]`.'] +""" diff --git a/conformance/results/pyre/specialtypes_none.toml b/conformance/results/pyre/specialtypes_none.toml index d96e591c0..f297f0be2 100644 --- a/conformance/results/pyre/specialtypes_none.toml +++ b/conformance/results/pyre/specialtypes_none.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not correctly handle type annotation type[None]. +notes = """Does not correctly handle type annotation type[None]. """ output = """ specialtypes_none.py:21:6 Incompatible parameter type [6]: In call `func1`, for 1st positional argument, expected `None` but got `Type[None]`. @@ -8,3 +7,10 @@ specialtypes_none.py:27:0 Incompatible variable type [9]: none2 is declared to h specialtypes_none.py:36:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_meta](covariant)]` but got `None`. specialtypes_none.py:41:6 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `Type[None]` but got `None`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['specialtypes_none.py:21:6 Incompatible parameter type [6]: In call `func1`, for 1st positional argument, expected `None` but got `Type[None]`.'] +Line 27: Unexpected errors ['specialtypes_none.py:27:0 Incompatible variable type [9]: none2 is declared to have type `Iterable[typing.Any]` but is used as type `None`.'] +Line 36: Unexpected errors ['specialtypes_none.py:36:27 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_meta](covariant)]` but got `None`.'] +Line 41: Unexpected errors ['specialtypes_none.py:41:6 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `Type[None]` but got `None`.'] +""" diff --git a/conformance/results/pyre/specialtypes_promotions.toml b/conformance/results/pyre/specialtypes_promotions.toml index 18ce19078..e64aba867 100644 --- a/conformance/results/pyre/specialtypes_promotions.toml +++ b/conformance/results/pyre/specialtypes_promotions.toml @@ -1,6 +1,8 @@ conformant = "Partial" -notes = """ -Does not reject use of attribute that is compatible only with float. +notes = """Does not reject use of attribute that is compatible only with float. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyre/specialtypes_type.toml b/conformance/results/pyre/specialtypes_type.toml index c457538bc..4e64848c1 100644 --- a/conformance/results/pyre/specialtypes_type.toml +++ b/conformance/results/pyre/specialtypes_type.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject Callable when passed to type[T]. +notes = """Does not reject Callable when passed to type[T]. Does not treat `type` same as `type[Any]` for assert_type. Does not allow access to unknown attributes from object of type `type[Any]`. Does not reject access to unknown attributes from object of type `Type[object]`. @@ -23,3 +22,21 @@ specialtypes_type.py:143:0 Undefined attribute [16]: `TypeAlias` has no attribut specialtypes_type.py:165:4 Incompatible variable type [9]: x1 is declared to have type `typing.Callable[..., typing.Any]` but is used as type `Type[typing.Any]`. specialtypes_type.py:166:4 Incompatible variable type [9]: x2 is declared to have type `typing.Callable[[int, int], int]` but is used as type `Type[typing.Any]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 56: Unexpected errors ['specialtypes_type.py:56:6 Incompatible parameter type [6]: In call `func4`, for 1st positional argument, expected `Type[Union[BasicUser, ProUser]]` but got `Type[TeamUser]`.'] +Line 76: Unexpected errors ['specialtypes_type.py:76:11 Invalid type parameters [24]: Generic type `type` expects 1 type parameter, received 2, use `typing.Type[]` to avoid runtime subscripting errors.'] +Line 84: Unexpected errors ['specialtypes_type.py:84:24 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_meta](covariant)]` but got `object`.'] +Line 98: Unexpected errors ['specialtypes_type.py:98:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[type], typing.Any]`.'] +Line 102: Unexpected errors ['specialtypes_type.py:102:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[type], typing.Any]`.'] +Line 106: Unexpected errors ['specialtypes_type.py:106:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[type], typing.Any]`.'] +Line 110: Unexpected errors ['specialtypes_type.py:110:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[type], typing.Any]`.'] +Line 117: Unexpected errors ['specialtypes_type.py:117:4 Undefined attribute [16]: `object` has no attribute `unknown`.'] +Line 137: Unexpected errors ['specialtypes_type.py:137:24 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_meta](covariant)]` but got `object`.'] +Line 138: Unexpected errors ['specialtypes_type.py:138:24 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_meta](covariant)]` but got `object`.'] +Line 139: Unexpected errors ['specialtypes_type.py:139:24 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_meta](covariant)]` but got `object`.'] +Line 140: Unexpected errors ['specialtypes_type.py:140:24 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_meta](covariant)]` but got `object`.'] +Line 143: Unexpected errors ['specialtypes_type.py:143:0 Undefined attribute [16]: `TypeAlias` has no attribute `unknown`.'] +Line 165: Unexpected errors ['specialtypes_type.py:165:4 Incompatible variable type [9]: x1 is declared to have type `typing.Callable[..., typing.Any]` but is used as type `Type[typing.Any]`.'] +Line 166: Unexpected errors ['specialtypes_type.py:166:4 Incompatible variable type [9]: x2 is declared to have type `typing.Callable[[int, int], int]` but is used as type `Type[typing.Any]`.'] +""" diff --git a/conformance/results/pyre/tuples_type_compat.toml b/conformance/results/pyre/tuples_type_compat.toml index 0f2e9912c..2589b487e 100644 --- a/conformance/results/pyre/tuples_type_compat.toml +++ b/conformance/results/pyre/tuples_type_compat.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not support some unpacked tuple forms. +notes = """Does not support some unpacked tuple forms. Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`. Does not support tuple narrowing based on `len()` type guard (optional). Does not correctly evaluate `Sequence[Never]` for `tuple[()]`. @@ -60,3 +59,48 @@ tuples_type_compat.py:174:8 Invalid type [31]: Expression `tuple[(*tuple[(str, . tuples_type_compat.py:175:4 Incompatible variable type [9]: t9 is declared to have type `Tuple[unknown, str, str, str]` but is used as type `Tuple[str, str]`. tuples_type_compat.py:175:8 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], str, str, str)]` is not a valid type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['tuples_type_compat.py:15:4 Incompatible variable type [9]: v2 is declared to have type `Tuple[int, int]` but is used as type `Tuple[float, complex]`.'] +Line 22: Unexpected errors ['tuples_type_compat.py:22:30 Invalid type [31]: Expression `tuple[(int, *tuple[(int, ...)])]` is not a valid type.'] +Line 27: Unexpected errors ['tuples_type_compat.py:27:8 Invalid type [31]: Expression `tuple[(int, *tuple[(int, ...)])]` is not a valid type.'] +Line 47: Unexpected errors ['tuples_type_compat.py:47:8 Invalid type [31]: Expression `tuple[(int, *tuple[(str, ...)])]` is not a valid type.'] +Line 55: Unexpected errors ['tuples_type_compat.py:55:21 Undefined or invalid type [11]: Annotation `SomeType` is not defined as a type.'] +Line 71: Unexpected errors ['tuples_type_compat.py:71:15 Invalid type [31]: Expression `typing.Union[(tuple[int], tuple[(str, str)], tuple[(int, *tuple[(str, ...)], int)])]` is not a valid type.'] +Line 78: Unexpected errors ['tuples_type_compat.py:78:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[str]]`.', 'tuples_type_compat.py:78:49 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[int]]`.'] +Line 82: Unexpected errors ['tuples_type_compat.py:82:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[str], Type[int]]`.'] +Line 91: Unexpected errors ['tuples_type_compat.py:91:15 Invalid type [31]: Expression `typing.Union[(tuple[int], tuple[(str, str)], tuple[(int, *tuple[(str, ...)], int)])]` is not a valid type.'] +Line 99: Unexpected errors ['tuples_type_compat.py:99:35 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[str]]`.', 'tuples_type_compat.py:99:53 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[int]]`.'] +Line 103: Unexpected errors ['tuples_type_compat.py:103:35 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[str], Type[int]]`.'] +Line 115: Unexpected errors ['tuples_type_compat.py:115:36 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[UnionType, Type[str]]`.'] +Line 117: Unexpected errors ['tuples_type_compat.py:117:36 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[UnionType, Type[int]]`.'] +Line 134: Unexpected errors ['tuples_type_compat.py:134:39 Invalid type [31]: Expression `tuple[(int, *tuple[(str, ...)])]` is not a valid type.'] +Line 137: Unexpected errors ['tuples_type_compat.py:137:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `UnionType`.'] +Line 139: Unexpected errors ['tuples_type_compat.py:139:39 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `UnionType`.'] +Line 143: Unexpected errors ['tuples_type_compat.py:143:4 Invalid type [31]: Expression `tuple[(int, *tuple[str])]` is not a valid type.'] +Line 144: Unexpected errors ["tuples_type_compat.py:144:0 Incompatible variable type [9]: t1 is declared to have type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal['']]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal['']]`."] +Line 146: Unexpected errors ['tuples_type_compat.py:146:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[int, unknown]` but is used as type `Tuple[int]`.', 'tuples_type_compat.py:146:4 Invalid type [31]: Expression `tuple[(int, *tuple[(str, ...)])]` is not a valid type.'] +Line 147: Unexpected errors ["tuples_type_compat.py:147:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal['']]`."] +Line 148: Unexpected errors ["tuples_type_compat.py:148:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal['']]`."] +Line 149: Unexpected errors ["tuples_type_compat.py:149:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[1], typing_extensions.Literal['']]`."] +Line 150: Unexpected errors ["tuples_type_compat.py:150:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal[1]]`."] +Line 153: Unexpected errors ['tuples_type_compat.py:153:0 Incompatible variable type [9]: t3 is declared to have type `Tuple[int, unknown, int]` but is used as type `Tuple[int, int]`.', 'tuples_type_compat.py:153:4 Invalid type [31]: Expression `tuple[(int, *tuple[(str, ...)], int)]` is not a valid type.'] +Line 154: Unexpected errors ["tuples_type_compat.py:154:0 Incompatible variable type [9]: t3 is declared to have type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[2]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal[2]]`."] +Line 155: Unexpected errors ["tuples_type_compat.py:155:0 Incompatible variable type [9]: t3 is declared to have type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[2]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal[''], typing_extensions.Literal[2]]`."] +Line 156: Unexpected errors ["tuples_type_compat.py:156:0 Incompatible variable type [9]: t3 is declared to have type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[2]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal['']]`."] +Line 157: Unexpected errors ["tuples_type_compat.py:157:0 Incompatible variable type [9]: t3 is declared to have type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[2]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal[''], float]`."] +Line 159: Unexpected errors ['tuples_type_compat.py:159:0 Incompatible variable type [9]: t4 is declared to have type `Tuple[unknown, int]` but is used as type `Tuple[int]`.', 'tuples_type_compat.py:159:4 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], int)]` is not a valid type.'] +Line 160: Unexpected errors ["tuples_type_compat.py:160:0 Incompatible variable type [9]: t4 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[''], typing_extensions.Literal[1]]`."] +Line 161: Unexpected errors ["tuples_type_compat.py:161:0 Incompatible variable type [9]: t4 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[''], typing_extensions.Literal[''], typing_extensions.Literal[1]]`."] +Line 162: Unexpected errors ["tuples_type_compat.py:162:0 Incompatible variable type [9]: t4 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[1], typing_extensions.Literal[''], typing_extensions.Literal[1]]`."] +Line 163: Unexpected errors ["tuples_type_compat.py:163:0 Incompatible variable type [9]: t4 is declared to have type `Tuple[typing_extensions.Literal[1]]` but is used as type `Tuple[typing_extensions.Literal[''], typing_extensions.Literal[''], float]`."] +Line 167: Unexpected errors ['tuples_type_compat.py:167:4 Incompatible variable type [9]: t1 is declared to have type `Tuple[str, str, unknown]` but is used as type `Tuple[str, str]`.', 'tuples_type_compat.py:167:8 Invalid type [31]: Expression `tuple[(str, str, *tuple[(int, ...)])]` is not a valid type.'] +Line 168: Unexpected errors ['tuples_type_compat.py:168:4 Incompatible variable type [9]: t2 is declared to have type `Tuple[str, str, unknown]` but is used as type `Tuple[str, str]`.', 'tuples_type_compat.py:168:8 Invalid type [31]: Expression `tuple[(str, str, *tuple[int])]` is not a valid type.'] +Line 169: Unexpected errors ['tuples_type_compat.py:169:8 Invalid type [31]: Expression `tuple[(str, *tuple[(str, ...)])]` is not a valid type.'] +Line 170: Unexpected errors ['tuples_type_compat.py:170:4 Incompatible variable type [9]: t4 is declared to have type `Tuple[str, str, unknown]` but is used as type `Tuple[str, str]`.', 'tuples_type_compat.py:170:8 Invalid type [31]: Expression `tuple[(str, str, *tuple[(str, ...)])]` is not a valid type.'] +Line 171: Unexpected errors ['tuples_type_compat.py:171:4 Incompatible variable type [9]: t5 is declared to have type `Tuple[str, str, str, unknown]` but is used as type `Tuple[str, str]`.', 'tuples_type_compat.py:171:8 Invalid type [31]: Expression `tuple[(str, str, str, *tuple[(str, ...)])]` is not a valid type.'] +Line 172: Unexpected errors ['tuples_type_compat.py:172:4 Incompatible variable type [9]: t6 is declared to have type `Tuple[str, unknown, str]` but is used as type `Tuple[str, str]`.', 'tuples_type_compat.py:172:8 Invalid type [31]: Expression `tuple[(str, *tuple[(int, ...)], str)]` is not a valid type.'] +Line 173: Unexpected errors ['tuples_type_compat.py:173:8 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], str)]` is not a valid type.'] +Line 174: Unexpected errors ['tuples_type_compat.py:174:8 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], str)]` is not a valid type.'] +Line 175: Unexpected errors ['tuples_type_compat.py:175:4 Incompatible variable type [9]: t9 is declared to have type `Tuple[unknown, str, str, str]` but is used as type `Tuple[str, str]`.', 'tuples_type_compat.py:175:8 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], str, str, str)]` is not a valid type.'] +""" diff --git a/conformance/results/pyre/tuples_type_form.toml b/conformance/results/pyre/tuples_type_form.toml index f0f67b266..5b5b7ba92 100644 --- a/conformance/results/pyre/tuples_type_form.toml +++ b/conformance/results/pyre/tuples_type_form.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject some invalid tuple forms involving ellipsis. +notes = """Does not reject some invalid tuple forms involving ellipsis. """ output = """ tuples_type_form.py:12:0 Incompatible variable type [9]: t1 is declared to have type `Tuple[int]` but is used as type `Tuple[int, int]`. @@ -11,3 +10,13 @@ tuples_type_form.py:36:0 Incompatible variable type [9]: t20 is declared to have tuples_type_form.py:44:5 Invalid type [31]: Expression `tuple[(*tuple[str], ...)]` is not a valid type. tuples_type_form.py:45:5 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], ...)]` is not a valid type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['tuples_type_form.py:12:0 Incompatible variable type [9]: t1 is declared to have type `Tuple[int]` but is used as type `Tuple[int, int]`.'] +Line 14: Unexpected errors ['tuples_type_form.py:14:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[int, int]` but is used as type `Tuple[int]`.'] +Line 15: Unexpected errors ['tuples_type_form.py:15:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[int, int]` but is used as type `Tuple[int, str]`.'] +Line 25: Unexpected errors ['tuples_type_form.py:25:0 Incompatible variable type [9]: t10 is declared to have type `Tuple[]` but is used as type `Tuple[int]`.'] +Line 36: Unexpected errors ['tuples_type_form.py:36:0 Incompatible variable type [9]: t20 is declared to have type `typing.Tuple[int, ...]` but is used as type `Tuple[int, int, int, str]`.'] +Line 44: Unexpected errors ['tuples_type_form.py:44:5 Invalid type [31]: Expression `tuple[(*tuple[str], ...)]` is not a valid type.'] +Line 45: Unexpected errors ['tuples_type_form.py:45:5 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], ...)]` is not a valid type.'] +""" diff --git a/conformance/results/pyre/tuples_unpacked.toml b/conformance/results/pyre/tuples_unpacked.toml index cc952218c..36fa25054 100644 --- a/conformance/results/pyre/tuples_unpacked.toml +++ b/conformance/results/pyre/tuples_unpacked.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Rejects some legal tuple type forms involving unpack. +notes = """Rejects some legal tuple type forms involving unpack. Does not reject some illegal tuple type forms involving unpack. """ output = """ @@ -27,3 +26,22 @@ tuples_unpacked.py:49:8 Invalid type [31]: Expression `tuple[(*tuple[str], *$loc tuples_unpacked.py:50:8 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], *$local_tuples_unpacked$Ts)]` is not a valid type. tuples_unpacked.py:56:5 Undefined or invalid type [11]: Annotation `Unpack` is not defined as a type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['tuples_unpacked.py:16:13 Invalid type [31]: Expression `tuple[(int, *tuple[(bool, bool)], str)]` is not a valid type.'] +Line 17: Unexpected errors ['tuples_unpacked.py:17:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[bool], Type[bool], Type[str]]`.'] +Line 18: Unexpected errors ['tuples_unpacked.py:18:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[*Tuple[typing.Any, ...], Type[bool], Type[str]]`.', 'tuples_unpacked.py:18:25 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'tuples_unpacked.py:18:32 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[int], Type[bool]]`.'] +Line 19: Unexpected errors ['tuples_unpacked.py:19:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[Type[int], Type[bool], *Tuple[typing.Any, ...]]`.', 'tuples_unpacked.py:19:25 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'tuples_unpacked.py:19:43 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[bool], Type[str]]`.'] +Line 25: Unexpected errors ['tuples_unpacked.py:25:13 Invalid type [31]: Expression `tuple[(int, *tuple[(bool, ...)], str)]` is not a valid type.'] +Line 26: Unexpected errors ['tuples_unpacked.py:26:25 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `typing.Tuple[Type[int], *Tuple[typing.Any, ...], Type[str]]`.', 'tuples_unpacked.py:26:25 Unable to concatenate tuple [60]: Expected to unpack an iterable, but got `typing.Type[tuple[Variable[_T_co](covariant)]]`.', 'tuples_unpacked.py:26:37 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[bool], typing.Any]`.'] +Line 31: Unexpected errors ['tuples_unpacked.py:31:6 Invalid type [31]: Expression `tuple[(*tuple[int], *tuple[int])]` is not a valid type.'] +Line 32: Unexpected errors ['tuples_unpacked.py:32:6 Invalid type [31]: Expression `tuple[(*tuple[(int, ...)], *tuple[int])]` is not a valid type.'] +Line 37: Unexpected errors ['tuples_unpacked.py:37:4 Invalid type [31]: Expression `tuple[(*tuple[str], *tuple[str])]` is not a valid type.'] +Line 38: Unexpected errors ['tuples_unpacked.py:38:4 Invalid type [31]: Expression `tuple[(*tuple[(str, *tuple[(str, ...)])])]` is not a valid type.'] +Line 39: Unexpected errors ['tuples_unpacked.py:39:4 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], *tuple[(int, ...)])]` is not a valid type.'] +Line 40: Unexpected errors ['tuples_unpacked.py:40:4 Invalid type [31]: Expression `tuple[(*tuple[(str, *tuple[(str, ...)])], *tuple[(int, ...)])]` is not a valid type.'] +Line 48: Unexpected errors ['tuples_unpacked.py:48:13 Invalid type [31]: Expression `tuple[(*$local_tuples_unpacked$Ts)]` is not a valid type.'] +Line 49: Unexpected errors ['tuples_unpacked.py:49:8 Invalid type [31]: Expression `tuple[(*tuple[str], *$local_tuples_unpacked$Ts)]` is not a valid type.'] +Line 50: Unexpected errors ['tuples_unpacked.py:50:8 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], *$local_tuples_unpacked$Ts)]` is not a valid type.'] +Line 56: Unexpected errors ['tuples_unpacked.py:56:5 Undefined or invalid type [11]: Annotation `Unpack` is not defined as a type.'] +""" diff --git a/conformance/results/pyre/typeddicts_alt_syntax.toml b/conformance/results/pyre/typeddicts_alt_syntax.toml index 1435a730a..fc3030207 100644 --- a/conformance/results/pyre/typeddicts_alt_syntax.toml +++ b/conformance/results/pyre/typeddicts_alt_syntax.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report when name of TypedDict doesn't match assigned identifier name. +notes = """Does not report when name of TypedDict doesn't match assigned identifier name. Does not support keyword-argument form of alternative syntax (deprecated in 3.11). """ output = """ @@ -8,3 +7,9 @@ typeddicts_alt_syntax.py:23:16 Call error [29]: `object` is not a function. typeddicts_alt_syntax.py:41:9 Call error [29]: `object` is not a function. typeddicts_alt_syntax.py:43:8 Undefined or invalid type [11]: Annotation `Movie2` is not defined as a type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['typeddicts_alt_syntax.py:23:16 Call error [29]: `object` is not a function.'] +Line 41: Unexpected errors ['typeddicts_alt_syntax.py:41:9 Call error [29]: `object` is not a function.'] +Line 43: Unexpected errors ['typeddicts_alt_syntax.py:43:8 Undefined or invalid type [11]: Annotation `Movie2` is not defined as a type.'] +""" diff --git a/conformance/results/pyre/typeddicts_class_syntax.toml b/conformance/results/pyre/typeddicts_class_syntax.toml index 50ffee139..decb26bb5 100644 --- a/conformance/results/pyre/typeddicts_class_syntax.toml +++ b/conformance/results/pyre/typeddicts_class_syntax.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject methods within TypedDict class. +notes = """Does not reject methods within TypedDict class. Does not report when metaclass is provided. Does not report when other keyword argument is provided. Does not support generic TypedDict class. @@ -9,3 +8,7 @@ output = """ typeddicts_class_syntax.py:57:0 Uninitialized attribute [13]: Attribute `name` is declared in class `GenericTypedDict` to have type `str` but is never initialized. typeddicts_class_syntax.py:57:0 Uninitialized attribute [13]: Attribute `value` is declared in class `GenericTypedDict` to have type `Variable[T]` but is never initialized. """ +conformance_automated = "Fail" +errors_diff = """ +Line 57: Unexpected errors ['typeddicts_class_syntax.py:57:0 Uninitialized attribute [13]: Attribute `name` is declared in class `GenericTypedDict` to have type `str` but is never initialized.', 'typeddicts_class_syntax.py:57:0 Uninitialized attribute [13]: Attribute `value` is declared in class `GenericTypedDict` to have type `Variable[T]` but is never initialized.'] +""" diff --git a/conformance/results/pyre/typeddicts_final.toml b/conformance/results/pyre/typeddicts_final.toml index c55712229..100c873f7 100644 --- a/conformance/results/pyre/typeddicts_final.toml +++ b/conformance/results/pyre/typeddicts_final.toml @@ -1,7 +1,10 @@ conformant = "Partial" -notes = """ -Does not handle value with literal type as index to TypedDict object. +notes = """Does not handle value with literal type as index to TypedDict object. """ output = """ typeddicts_final.py:26:17 Incompatible parameter type [6]: In call `TypedDictionary.__getitem__`, for 1st positional argument, expected `typing_extensions.Literal['name']` but got `Union[typing_extensions.Literal['name'], typing_extensions.Literal['year']]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ["typeddicts_final.py:26:17 Incompatible parameter type [6]: In call `TypedDictionary.__getitem__`, for 1st positional argument, expected `typing_extensions.Literal['name']` but got `Union[typing_extensions.Literal['name'], typing_extensions.Literal['year']]`."] +""" diff --git a/conformance/results/pyre/typeddicts_inheritance.toml b/conformance/results/pyre/typeddicts_inheritance.toml index d15915ca3..d21219a3e 100644 --- a/conformance/results/pyre/typeddicts_inheritance.toml +++ b/conformance/results/pyre/typeddicts_inheritance.toml @@ -1,8 +1,12 @@ conformant = "Partial" -notes = """ -Does not reject TypedDict class that inherits from non-TypedDict class. +notes = """Does not reject TypedDict class that inherits from non-TypedDict class. """ output = """ typeddicts_inheritance.py:54:0 Inconsistent override [15]: `x` overrides attribute defined in `X1` inconsistently. Type `int` is not a subtype of the overridden attribute `str`. typeddicts_inheritance.py:65:0 Invalid inheritance [39]: Field `x` has type `int` in base class `X2` and type `str` in base class `Y2`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 54: Unexpected errors ['typeddicts_inheritance.py:54:0 Inconsistent override [15]: `x` overrides attribute defined in `X1` inconsistently. Type `int` is not a subtype of the overridden attribute `str`.'] +Line 65: Unexpected errors ['typeddicts_inheritance.py:65:0 Invalid inheritance [39]: Field `x` has type `int` in base class `X2` and type `str` in base class `Y2`.'] +""" diff --git a/conformance/results/pyre/typeddicts_operations.toml b/conformance/results/pyre/typeddicts_operations.toml index 202a0a974..431219867 100644 --- a/conformance/results/pyre/typeddicts_operations.toml +++ b/conformance/results/pyre/typeddicts_operations.toml @@ -12,3 +12,17 @@ typeddicts_operations.py:44:10 TypedDict accessed with a missing key [27]: Typed typeddicts_operations.py:47:0 Undefined attribute [16]: `Movie` has no attribute `clear`. typeddicts_operations.py:62:0 Undefined attribute [16]: `MovieOptional` has no attribute `clear`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['typeddicts_operations.py:22:16 Invalid TypedDict operation [54]: Expected `str` to be assigned to `Movie` field `name` but got `int`.'] +Line 23: Unexpected errors ['typeddicts_operations.py:23:16 Invalid TypedDict operation [54]: Expected `int` to be assigned to `Movie` field `year` but got `str`.'] +Line 24: Unexpected errors ['typeddicts_operations.py:24:6 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `other`.'] +Line 26: Unexpected errors ['typeddicts_operations.py:26:12 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `other`.'] +Line 28: Unexpected errors ['typeddicts_operations.py:28:8 TypedDict initialization error [55]: Missing required field `year` for TypedDict `Movie`.'] +Line 29: Unexpected errors ['typeddicts_operations.py:29:8 TypedDict initialization error [55]: Expected type `int` for `Movie` field `year` but got `float`.'] +Line 32: Unexpected errors ['typeddicts_operations.py:32:8 TypedDict initialization error [55]: TypedDict `Movie` has no field `other`.'] +Line 37: Unexpected errors ['typeddicts_operations.py:37:4 Incompatible variable type [9]: movie is declared to have type `Movie` but is used as type `Dict[str, Union[int, str]]`.'] +Line 44: Unexpected errors ['typeddicts_operations.py:44:10 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `other`.'] +Line 47: Unexpected errors ['typeddicts_operations.py:47:0 Undefined attribute [16]: `Movie` has no attribute `clear`.'] +Line 62: Unexpected errors ['typeddicts_operations.py:62:0 Undefined attribute [16]: `MovieOptional` has no attribute `clear`.'] +""" diff --git a/conformance/results/pyre/typeddicts_readonly.toml b/conformance/results/pyre/typeddicts_readonly.toml index 646cf91a1..93dd54c7a 100644 --- a/conformance/results/pyre/typeddicts_readonly.toml +++ b/conformance/results/pyre/typeddicts_readonly.toml @@ -3,3 +3,8 @@ output = """ typeddicts_readonly.py:8:0 Undefined import [21]: Could not find a name `ReadOnly` defined in module `typing_extensions`. typeddicts_readonly.py:18:13 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['typeddicts_readonly.py:8:0 Undefined import [21]: Could not find a name `ReadOnly` defined in module `typing_extensions`.'] +Line 18: Unexpected errors ['typeddicts_readonly.py:18:13 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type.'] +""" diff --git a/conformance/results/pyre/typeddicts_readonly_consistency.toml b/conformance/results/pyre/typeddicts_readonly_consistency.toml index dfcf7d5be..3e25563a1 100644 --- a/conformance/results/pyre/typeddicts_readonly_consistency.toml +++ b/conformance/results/pyre/typeddicts_readonly_consistency.toml @@ -13,3 +13,18 @@ typeddicts_readonly_consistency.py:82:4 Incompatible variable type [9]: v4 is de typeddicts_readonly_consistency.py:84:4 Incompatible variable type [9]: v5 is declared to have type `C2` but is used as type `A2`. typeddicts_readonly_consistency.py:85:4 Incompatible variable type [9]: v6 is declared to have type `C2` but is used as type `B2`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['typeddicts_readonly_consistency.py:8:0 Undefined import [21]: Could not find a name `ReadOnly` defined in module `typing_extensions`.'] +Line 30: Unexpected errors ['typeddicts_readonly_consistency.py:30:7 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type.'] +Line 37: Unexpected errors ['typeddicts_readonly_consistency.py:37:4 Incompatible variable type [9]: v3 is declared to have type `B1` but is used as type `A1`.'] +Line 38: Unexpected errors ['typeddicts_readonly_consistency.py:38:4 Incompatible variable type [9]: v4 is declared to have type `B1` but is used as type `C1`.'] +Line 40: Unexpected errors ['typeddicts_readonly_consistency.py:40:4 Incompatible variable type [9]: v5 is declared to have type `C1` but is used as type `A1`.'] +Line 41: Unexpected errors ['typeddicts_readonly_consistency.py:41:4 Incompatible variable type [9]: v6 is declared to have type `C1` but is used as type `B1`.'] +Line 78: Unexpected errors ['typeddicts_readonly_consistency.py:78:4 Incompatible variable type [9]: v1 is declared to have type `A2` but is used as type `B2`.'] +Line 79: Unexpected errors ['typeddicts_readonly_consistency.py:79:4 Incompatible variable type [9]: v2 is declared to have type `A2` but is used as type `C2`.'] +Line 81: Unexpected errors ['typeddicts_readonly_consistency.py:81:4 Incompatible variable type [9]: v3 is declared to have type `B2` but is used as type `A2`.'] +Line 82: Unexpected errors ['typeddicts_readonly_consistency.py:82:4 Incompatible variable type [9]: v4 is declared to have type `B2` but is used as type `C2`.'] +Line 84: Unexpected errors ['typeddicts_readonly_consistency.py:84:4 Incompatible variable type [9]: v5 is declared to have type `C2` but is used as type `A2`.'] +Line 85: Unexpected errors ['typeddicts_readonly_consistency.py:85:4 Incompatible variable type [9]: v6 is declared to have type `C2` but is used as type `B2`.'] +""" diff --git a/conformance/results/pyre/typeddicts_readonly_inheritance.toml b/conformance/results/pyre/typeddicts_readonly_inheritance.toml index 38e9ee799..b36cfecf2 100644 --- a/conformance/results/pyre/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pyre/typeddicts_readonly_inheritance.toml @@ -12,3 +12,17 @@ typeddicts_readonly_inheritance.py:93:0 Inconsistent override [15]: `a` override typeddicts_readonly_inheritance.py:97:0 Inconsistent override [15]: `a` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`. typeddicts_readonly_inheritance.py:119:0 Invalid inheritance [39]: Field `x` has type `int` in base class `TD_A1` and type `float` in base class `TD_A2`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['typeddicts_readonly_inheritance.py:8:0 Undefined import [21]: Could not find a name `ReadOnly` defined in module `typing_extensions`.'] +Line 15: Unexpected errors ['typeddicts_readonly_inheritance.py:15:10 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type.'] +Line 18: Unexpected errors ['typeddicts_readonly_inheritance.py:18:0 Inconsistent override [15]: `name` overrides attribute defined in `NamedDict` inconsistently. Type `str` is not a subtype of the overridden attribute `unknown`.'] +Line 65: Unexpected errors ['typeddicts_readonly_inheritance.py:65:18 TypedDict initialization error [55]: Missing required field `name` for TypedDict `RequiredName`.'] +Line 75: Unexpected errors ['typeddicts_readonly_inheritance.py:75:0 Inconsistent override [15]: `ident` overrides attribute defined in `OptionalIdent` inconsistently. Type `str` is not a subtype of the overridden attribute `unknown`.'] +Line 82: Unexpected errors ['typeddicts_readonly_inheritance.py:82:13 Invalid TypedDict operation [54]: Expected `str` to be assigned to `User` field `ident` but got `int`.'] +Line 83: Unexpected errors ['typeddicts_readonly_inheritance.py:83:4 TypedDict initialization error [55]: Expected type `str` for `User` field `ident` but got `int`.'] +Line 84: Unexpected errors ['typeddicts_readonly_inheritance.py:84:4 TypedDict initialization error [55]: Missing required field `ident` for TypedDict `User`.'] +Line 93: Unexpected errors ['typeddicts_readonly_inheritance.py:93:0 Inconsistent override [15]: `a` overrides attribute defined in `F1` inconsistently. Type `unknown` is not a subtype of the overridden attribute `int`.'] +Line 97: Unexpected errors ['typeddicts_readonly_inheritance.py:97:0 Inconsistent override [15]: `a` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`.'] +Line 119: Unexpected errors ['typeddicts_readonly_inheritance.py:119:0 Invalid inheritance [39]: Field `x` has type `int` in base class `TD_A1` and type `float` in base class `TD_A2`.'] +""" diff --git a/conformance/results/pyre/typeddicts_readonly_kwargs.toml b/conformance/results/pyre/typeddicts_readonly_kwargs.toml index f78bd4bff..af33e0a88 100644 --- a/conformance/results/pyre/typeddicts_readonly_kwargs.toml +++ b/conformance/results/pyre/typeddicts_readonly_kwargs.toml @@ -4,3 +4,9 @@ typeddicts_readonly_kwargs.py:9:0 Undefined import [21]: Could not find a name ` typeddicts_readonly_kwargs.py:24:10 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type. typeddicts_readonly_kwargs.py:29:33 Undefined or invalid type [11]: Annotation `Unpack` is not defined as a type. """ +conformance_automated = "Fail" +errors_diff = """ +Line 9: Unexpected errors ['typeddicts_readonly_kwargs.py:9:0 Undefined import [21]: Could not find a name `ReadOnly` defined in module `typing_extensions`.'] +Line 24: Unexpected errors ['typeddicts_readonly_kwargs.py:24:10 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type.'] +Line 29: Unexpected errors ['typeddicts_readonly_kwargs.py:29:33 Undefined or invalid type [11]: Annotation `Unpack` is not defined as a type.'] +""" diff --git a/conformance/results/pyre/typeddicts_readonly_update.toml b/conformance/results/pyre/typeddicts_readonly_update.toml index 7ba44ab4a..be89aa5dd 100644 --- a/conformance/results/pyre/typeddicts_readonly_update.toml +++ b/conformance/results/pyre/typeddicts_readonly_update.toml @@ -4,3 +4,9 @@ typeddicts_readonly_update.py:9:0 Undefined import [21]: Could not find a name ` typeddicts_readonly_update.py:17:7 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type. typeddicts_readonly_update.py:34:13 Incompatible parameter type [6]: In call `TypedDictionary.update`, for 1st positional argument, expected `A` but got `B`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 9: Unexpected errors ['typeddicts_readonly_update.py:9:0 Undefined import [21]: Could not find a name `ReadOnly` defined in module `typing_extensions`.'] +Line 17: Unexpected errors ['typeddicts_readonly_update.py:17:7 Undefined or invalid type [11]: Annotation `ReadOnly` is not defined as a type.'] +Line 34: Unexpected errors ['typeddicts_readonly_update.py:34:13 Incompatible parameter type [6]: In call `TypedDictionary.update`, for 1st positional argument, expected `A` but got `B`.'] +""" diff --git a/conformance/results/pyre/typeddicts_required.toml b/conformance/results/pyre/typeddicts_required.toml index 9a654d815..9b9caf6af 100644 --- a/conformance/results/pyre/typeddicts_required.toml +++ b/conformance/results/pyre/typeddicts_required.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject use of `Required` in function parameter annotation. +notes = """Does not reject use of `Required` in function parameter annotation. Does not reject nested use of `Required` in type annotation. Does not support recursive TypedDict definitions. """ @@ -9,3 +8,9 @@ typeddicts_required.py:11:0 Uninitialized attribute [13]: Attribute `x` is decla typeddicts_required.py:71:62 Undefined or invalid type [11]: Annotation `RecursiveMovie` is not defined as a type. typeddicts_required.py:74:24 TypedDict initialization error [55]: Expected type `unknown` for `RecursiveMovie` field `predecessor` but got `typing.Dict[str, str]`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['typeddicts_required.py:11:0 Uninitialized attribute [13]: Attribute `x` is declared in class `NotTypedDict` to have type `Required[int]` but is never initialized.'] +Line 71: Unexpected errors ['typeddicts_required.py:71:62 Undefined or invalid type [11]: Annotation `RecursiveMovie` is not defined as a type.'] +Line 74: Unexpected errors ['typeddicts_required.py:74:24 TypedDict initialization error [55]: Expected type `unknown` for `RecursiveMovie` field `predecessor` but got `typing.Dict[str, str]`.'] +""" diff --git a/conformance/results/pyre/typeddicts_type_consistency.toml b/conformance/results/pyre/typeddicts_type_consistency.toml index 28b9043e4..d02ad75cf 100644 --- a/conformance/results/pyre/typeddicts_type_consistency.toml +++ b/conformance/results/pyre/typeddicts_type_consistency.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject assignment of TypedDict with missing key. +notes = """Does not reject assignment of TypedDict with missing key. Does not return non-Optional value from `get` method for required key. Does not properly handle nested TypedDicts. """ @@ -17,3 +16,17 @@ typeddicts_type_consistency.py:105:0 Incompatible variable type [9]: age4 is dec typeddicts_type_consistency.py:124:41 TypedDict initialization error [55]: Expected type `str` for `Inner1` field `inner_key` but got `int`. typeddicts_type_consistency.py:150:0 Incompatible variable type [9]: o4 is declared to have type `Outer3` but is used as type `Outer2`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['typeddicts_type_consistency.py:21:0 Incompatible variable type [9]: a1 is declared to have type `A1` but is used as type `B1`.'] +Line 38: Unexpected errors ['typeddicts_type_consistency.py:38:0 Incompatible variable type [9]: a2 is declared to have type `A2` but is used as type `B2`.'] +Line 69: Unexpected errors ['typeddicts_type_consistency.py:69:11 TypedDict initialization error [55]: TypedDict `A3` has no field `y`.'] +Line 76: Unexpected errors ['typeddicts_type_consistency.py:76:0 Incompatible variable type [9]: d1 is declared to have type `Dict[str, int]` but is used as type `B3`.'] +Line 77: Unexpected errors ['typeddicts_type_consistency.py:77:0 Incompatible variable type [9]: d2 is declared to have type `Dict[str, object]` but is used as type `B3`.'] +Line 78: Unexpected errors ['typeddicts_type_consistency.py:78:0 Incompatible variable type [9]: d3 is declared to have type `Dict[typing.Any, typing.Any]` but is used as type `B3`.'] +Line 82: Unexpected errors ['typeddicts_type_consistency.py:82:0 Incompatible variable type [9]: m1 is declared to have type `Mapping[str, int]` but is used as type `B3`.'] +Line 99: Unexpected errors ['typeddicts_type_consistency.py:99:0 Incompatible variable type [9]: name3 is declared to have type `str` but is used as type `Optional[str]`.'] +Line 105: Unexpected errors ['typeddicts_type_consistency.py:105:0 Incompatible variable type [9]: age4 is declared to have type `int` but is used as type `Union[str, int]`.'] +Line 124: Unexpected errors ['typeddicts_type_consistency.py:124:41 TypedDict initialization error [55]: Expected type `str` for `Inner1` field `inner_key` but got `int`.'] +Line 150: Unexpected errors ['typeddicts_type_consistency.py:150:0 Incompatible variable type [9]: o4 is declared to have type `Outer3` but is used as type `Outer2`.'] +""" diff --git a/conformance/results/pyre/typeddicts_usage.toml b/conformance/results/pyre/typeddicts_usage.toml index 739dbf331..4ffde2377 100644 --- a/conformance/results/pyre/typeddicts_usage.toml +++ b/conformance/results/pyre/typeddicts_usage.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report errant use of TypedDict in `isinstance` call. +notes = """Does not report errant use of TypedDict in `isinstance` call. Does not reject use of TypedDict as TypeVar bound. """ output = """ @@ -8,3 +7,7 @@ typeddicts_usage.py:23:6 TypedDict accessed with a missing key [27]: TypedDict ` typeddicts_usage.py:24:16 Invalid TypedDict operation [54]: Expected `int` to be assigned to `Movie` field `year` but got `str`. typeddicts_usage.py:28:16 TypedDict initialization error [55]: Missing required field `name` for TypedDict `Movie`. """ +conformance_automated = "Fail" +errors_diff = """ +Line 28: Unexpected errors ['typeddicts_usage.py:28:16 TypedDict initialization error [55]: Missing required field `name` for TypedDict `Movie`.'] +""" diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index ceaea838a..f4e6f95fc 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.19" -test_duration = 5.3 +test_duration = 6.4 diff --git a/conformance/results/pyright/aliases_explicit.toml b/conformance/results/pyright/aliases_explicit.toml index 2c117fa6e..d72d8a80b 100644 --- a/conformance/results/pyright/aliases_explicit.toml +++ b/conformance/results/pyright/aliases_explicit.toml @@ -45,3 +45,19 @@ aliases_explicit.py:101:6 - error: Object of type "UnionType" is not callable (r aliases_explicit.py:102:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments) aliases_explicit.py:102:5 - error: Type "set[Unknown]" is already specialized (reportInvalidTypeArguments) """ +conformance_automated = "Fail" +errors_diff = """ +Line 67: Expected 1 errors, got 2 (['aliases_explicit.py:67:24 - error: Expected no type arguments for class "int" (reportInvalidTypeArguments)', 'aliases_explicit.py:67:24 - error: Expected no type arguments for class "NoneType" (reportInvalidTypeArguments)']) +Line 79: Expected 1 errors, got 2 (['aliases_explicit.py:79:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:79:21 - error: Call expression not allowed in type expression (reportInvalidTypeForm)']) +Line 80: Expected 1 errors, got 3 (['aliases_explicit.py:80:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:80:21 - error: List expression not allowed in type annotation', 'aliases_explicit.py:80:21 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues)']) +Line 81: Expected 1 errors, got 2 (['aliases_explicit.py:81:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:81:21 - error: Tuple expression not allowed in type annotation']) +Line 82: Expected 1 errors, got 3 (['aliases_explicit.py:82:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:82:21 - error: List expression not allowed in type annotation', 'aliases_explicit.py:82:21 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)']) +Line 83: Expected 1 errors, got 3 (['aliases_explicit.py:83:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:83:21 - error: Dictionary expression not allowed in type annotation', 'aliases_explicit.py:83:21 - error: Expected type expression but received "dict[str, str]" (reportGeneralTypeIssues)']) +Line 84: Expected 1 errors, got 2 (['aliases_explicit.py:84:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:84:21 - error: Call expression not allowed in type expression (reportInvalidTypeForm)']) +Line 85: Expected 1 errors, got 3 (['aliases_explicit.py:85:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:85:21 - error: List expression not allowed in type annotation', 'aliases_explicit.py:85:21 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)']) +Line 86: Expected 1 errors, got 2 (['aliases_explicit.py:86:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:86:21 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm)']) +Line 89: Expected 1 errors, got 2 (['aliases_explicit.py:89:22 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:89:22 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues)']) +Line 90: Expected 1 errors, got 2 (['aliases_explicit.py:90:22 - error: Invalid expression form for type alias definition (reportInvalidTypeForm)', 'aliases_explicit.py:90:22 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm)']) +Line 91: Expected 1 errors, got 2 (['aliases_explicit.py:91:22 - error: Expected expression', 'aliases_explicit.py:91:22 - error: Tuple expression not allowed in type annotation']) +Line 102: Expected 1 errors, got 2 (['aliases_explicit.py:102:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments)', 'aliases_explicit.py:102:5 - error: Type "set[Unknown]" is already specialized (reportInvalidTypeArguments)']) +""" diff --git a/conformance/results/pyright/aliases_implicit.toml b/conformance/results/pyright/aliases_implicit.toml index 982a9ae7d..2c2a102d3 100644 --- a/conformance/results/pyright/aliases_implicit.toml +++ b/conformance/results/pyright/aliases_implicit.toml @@ -27,3 +27,28 @@ aliases_implicit.py:133:6 - error: Object of type "UnionType" is not callable (r aliases_implicit.py:135:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments) aliases_implicit.py:135:5 - error: Type "set[Unknown]" is already specialized (reportInvalidTypeArguments) """ +conformance_automated = "Fail" +errors_diff = """ +Line 76: Unexpected errors ['aliases_implicit.py:76:24 - error: Expected no type arguments for class "int" (reportInvalidTypeArguments)', 'aliases_implicit.py:76:24 - error: Expected no type arguments for class "NoneType" (reportInvalidTypeArguments)'] +Line 77: Unexpected errors ['aliases_implicit.py:77:9 - error: Type "list[int | None]" is already specialized (reportInvalidTypeArguments)'] +Line 78: Unexpected errors ['aliases_implicit.py:78:29 - error: Too many type arguments provided for "GoodTypeAlias4[T@GoodTypeAlias4]"; expected 1 but received 2'] +Line 79: Unexpected errors ['aliases_implicit.py:79:29 - error: Too many type arguments provided for "GoodTypeAlias8[T@GoodTypeAlias8]"; expected 1 but received 2'] +Line 80: Unexpected errors ['aliases_implicit.py:80:24 - error: Expected ParamSpec, ellipsis, or list of types'] +Line 81: Unexpected errors ['aliases_implicit.py:81:9 - error: Could not specialize type "GoodTypeAlias12[TFloat@GoodTypeAlias12]"'] +Line 106: Unexpected errors ['aliases_implicit.py:106:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 107: Unexpected errors ['aliases_implicit.py:107:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 108: Unexpected errors ['aliases_implicit.py:108:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 109: Unexpected errors ['aliases_implicit.py:109:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 110: Unexpected errors ['aliases_implicit.py:110:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 111: Unexpected errors ['aliases_implicit.py:111:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 112: Unexpected errors ['aliases_implicit.py:112:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 113: Unexpected errors ['aliases_implicit.py:113:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 114: Unexpected errors ['aliases_implicit.py:114:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 115: Unexpected errors ['aliases_implicit.py:115:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 116: Unexpected errors ['aliases_implicit.py:116:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 117: Unexpected errors ['aliases_implicit.py:117:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 118: Unexpected errors ['aliases_implicit.py:118:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 119: Unexpected errors ['aliases_implicit.py:119:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 133: Unexpected errors ['aliases_implicit.py:133:6 - error: Object of type "UnionType" is not callable (reportCallIssue)'] +Line 135: Unexpected errors ['aliases_implicit.py:135:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments)', 'aliases_implicit.py:135:5 - error: Type "set[Unknown]" is already specialized (reportInvalidTypeArguments)'] +""" diff --git a/conformance/results/pyright/aliases_newtype.toml b/conformance/results/pyright/aliases_newtype.toml index f7df3cbf1..d2a535d5d 100644 --- a/conformance/results/pyright/aliases_newtype.toml +++ b/conformance/results/pyright/aliases_newtype.toml @@ -17,3 +17,19 @@ aliases_newtype.py:58:38 - error: NewType cannot be used with structural type (a aliases_newtype.py:60:15 - error: NewType requires two positional arguments (reportCallIssue) aliases_newtype.py:62:38 - error: The second argument to NewType must be a known class, not Any or Unknown (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['aliases_newtype.py:11:8 - error: Argument of type "Literal[\\'user\\']" cannot be assigned to parameter "_x" of type "int" in function "__init__"'] +Line 12: Unexpected errors ['aliases_newtype.py:12:14 - error: Expression of type "Literal[42]" cannot be assigned to declared type "UserId"'] +Line 20: Unexpected errors ['aliases_newtype.py:20:16 - error: Second argument to "isinstance" must be a class or tuple of classes'] +Line 23: Unexpected errors ['aliases_newtype.py:23:21 - error: Base class "UserId" is marked final and cannot be subclassed'] +Line 32: Unexpected errors ['aliases_newtype.py:32:1 - error: NewType must be assigned to a variable with the same name (reportGeneralTypeIssues)'] +Line 38: Unexpected errors ['aliases_newtype.py:38:19 - error: Expected no type arguments for class "GoodNewType1" (reportInvalidTypeArguments)'] +Line 44: Unexpected errors ['aliases_newtype.py:44:38 - error: Expected class as second argument to NewType (reportGeneralTypeIssues)'] +Line 47: Unexpected errors ['aliases_newtype.py:47:43 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues)'] +Line 49: Unexpected errors ['aliases_newtype.py:49:38 - error: NewType cannot be used with structural type (a protocol or TypedDict class) (reportGeneralTypeIssues)'] +Line 51: Unexpected errors ['aliases_newtype.py:51:38 - error: NewType cannot be used with Literal type (reportGeneralTypeIssues)'] +Line 58: Unexpected errors ['aliases_newtype.py:58:38 - error: NewType cannot be used with structural type (a protocol or TypedDict class) (reportGeneralTypeIssues)'] +Line 60: Unexpected errors ['aliases_newtype.py:60:15 - error: NewType requires two positional arguments (reportCallIssue)'] +Line 62: Unexpected errors ['aliases_newtype.py:62:38 - error: The second argument to NewType must be a known class, not Any or Unknown (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/aliases_recursive.toml b/conformance/results/pyright/aliases_recursive.toml index ea15580be..9f69a81a8 100644 --- a/conformance/results/pyright/aliases_recursive.toml +++ b/conformance/results/pyright/aliases_recursive.toml @@ -64,3 +64,17 @@ aliases_recursive.py:73:51 - error: Expression of type "list[list[int | list[str aliases_recursive.py:76:29 - error: Type alias "RecursiveUnion" cannot use itself in its definition (reportGeneralTypeIssues) aliases_recursive.py:78:31 - error: Type alias "MutualReference1" cannot use itself in its definition (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['aliases_recursive.py:19:12 - error: Expression of type "dict[str, int | complex]" cannot be assigned to declared type "Json"'] +Line 20: Unexpected errors ['aliases_recursive.py:20:16 - error: Expression of type "list[int | complex]" cannot be assigned to declared type "Json"'] +Line 38: Unexpected errors ['aliases_recursive.py:38:22 - error: Expression of type "tuple[Literal[1], tuple[Literal[\\'1\\'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" cannot be assigned to declared type "RecursiveTuple"'] +Line 39: Unexpected errors ['aliases_recursive.py:39:22 - error: Expression of type "tuple[Literal[1], list[int]]" cannot be assigned to declared type "RecursiveTuple"'] +Line 50: Unexpected errors ['aliases_recursive.py:50:24 - error: Expression of type "dict[str, list[int]]" cannot be assigned to declared type "RecursiveMapping"'] +Line 51: Unexpected errors ['aliases_recursive.py:51:24 - error: Expression of type "dict[str, str | int | list[int]]" cannot be assigned to declared type "RecursiveMapping"'] +Line 52: Unexpected errors ['aliases_recursive.py:52:24 - error: Expression of type "dict[str, str | int | dict[str, str | int | list[int]]]" cannot be assigned to declared type "RecursiveMapping"'] +Line 67: Unexpected errors ['aliases_recursive.py:67:38 - error: Expression of type "list[str | list[float]]" cannot be assigned to declared type "GenericTypeAlias1[str]"'] +Line 73: Unexpected errors ['aliases_recursive.py:73:51 - error: Expression of type "list[list[int | list[str | int | list[float]]] | str]" cannot be assigned to declared type "GenericTypeAlias2[str, int]"'] +Line 76: Unexpected errors ['aliases_recursive.py:76:29 - error: Type alias "RecursiveUnion" cannot use itself in its definition (reportGeneralTypeIssues)'] +Line 78: Unexpected errors ['aliases_recursive.py:78:31 - error: Type alias "MutualReference1" cannot use itself in its definition (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/aliases_type_statement.toml b/conformance/results/pyright/aliases_type_statement.toml index cfd429291..7751ff379 100644 --- a/conformance/results/pyright/aliases_type_statement.toml +++ b/conformance/results/pyright/aliases_type_statement.toml @@ -51,3 +51,33 @@ aliases_type_statement.py:84:28 - error: Type alias "RecursiveTypeAlias3" cannot aliases_type_statement.py:86:31 - error: Type alias "RecursiveTypeAlias4" cannot use itself in its definition (reportGeneralTypeIssues) aliases_type_statement.py:90:28 - error: Type alias "RecursiveTypeAlias6" cannot use itself in its definition (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['aliases_type_statement.py:17:12 - error: Cannot access member "bit_count" for type "TypeAliasType"'] +Line 19: Unexpected errors ['aliases_type_statement.py:19:1 - error: Object of type "TypeAliasType" is not callable (reportCallIssue)'] +Line 23: Unexpected errors ['aliases_type_statement.py:23:18 - error: Cannot access member "other_attrib" for type "TypeAliasType"'] +Line 26: Unexpected errors ['aliases_type_statement.py:26:18 - error: A type alias defined in a "type" statement cannot be used as a base class'] +Line 31: Unexpected errors ['aliases_type_statement.py:31:22 - error: Argument of type "GoodAlias1" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "isinstance"', 'aliases_type_statement.py:31:22 - error: Second argument to "isinstance" must be a class or tuple of classes'] +Line 37: Unexpected errors ['aliases_type_statement.py:37:22 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 38: Unexpected errors ['aliases_type_statement.py:38:22 - error: List expression not allowed in type annotation', 'aliases_type_statement.py:38:22 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues)'] +Line 39: Unexpected errors ['aliases_type_statement.py:39:22 - error: Tuple expression not allowed in type annotation'] +Line 40: Unexpected errors ['aliases_type_statement.py:40:22 - error: List expression not allowed in type annotation', 'aliases_type_statement.py:40:22 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 41: Unexpected errors ['aliases_type_statement.py:41:22 - error: Dictionary expression not allowed in type annotation', 'aliases_type_statement.py:41:22 - error: Expected type expression but received "dict[str, str]" (reportGeneralTypeIssues)'] +Line 42: Unexpected errors ['aliases_type_statement.py:42:22 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 43: Unexpected errors ['aliases_type_statement.py:43:22 - error: List expression not allowed in type annotation', 'aliases_type_statement.py:43:22 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 44: Unexpected errors ['aliases_type_statement.py:44:22 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm)'] +Line 45: Unexpected errors ['aliases_type_statement.py:45:22 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 46: Unexpected errors ['aliases_type_statement.py:46:23 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues)'] +Line 47: Unexpected errors ['aliases_type_statement.py:47:23 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues)'] +Line 48: Unexpected errors ['aliases_type_statement.py:48:23 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm)'] +Line 49: Unexpected errors ['aliases_type_statement.py:49:23 - error: Expected expression', 'aliases_type_statement.py:49:23 - error: Tuple expression not allowed in type annotation'] +Line 52: Unexpected errors ['aliases_type_statement.py:52:10 - error: Type alias declaration "BadTypeAlias14" is obscured by a declaration of the same name (reportRedeclaration)'] +Line 58: Unexpected errors ['aliases_type_statement.py:58:10 - error: A type statement can be used only within a module or class scope (reportGeneralTypeIssues)'] +Line 64: Unexpected errors ['aliases_type_statement.py:64:23 - error: Type parameter "V" is not included in the type parameter list for "TA1" (reportGeneralTypeIssues)'] +Line 69: Unexpected errors ['aliases_type_statement.py:69:17 - error: Type parameter "T1" is not included in the type parameter list for "TA2" (reportGeneralTypeIssues)'] +Line 79: Unexpected errors ['aliases_type_statement.py:79:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]"'] +Line 81: Unexpected errors ['aliases_type_statement.py:81:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]"'] +Line 84: Unexpected errors ['aliases_type_statement.py:84:28 - error: Type alias "RecursiveTypeAlias3" cannot use itself in its definition (reportGeneralTypeIssues)'] +Line 86: Unexpected errors ['aliases_type_statement.py:86:31 - error: Type alias "RecursiveTypeAlias4" cannot use itself in its definition (reportGeneralTypeIssues)'] +Line 90: Unexpected errors ['aliases_type_statement.py:90:28 - error: Type alias "RecursiveTypeAlias6" cannot use itself in its definition (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/aliases_typealiastype.toml b/conformance/results/pyright/aliases_typealiastype.toml index e7e26face..1ee84a8a1 100644 --- a/conformance/results/pyright/aliases_typealiastype.toml +++ b/conformance/results/pyright/aliases_typealiastype.toml @@ -29,3 +29,27 @@ aliases_typealiastype.py:70:42 - error: Expected expression aliases_typealiastype.py:70:42 - error: Tuple expression not allowed in type annotation   Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) """ +conformance_automated = "Fail" +errors_diff = """ +Line 32: Unexpected errors ['aliases_typealiastype.py:32:18 - error: Cannot access member "other_attrib" for type "TypeAliasType"'] +Line 40: Unexpected errors ['aliases_typealiastype.py:40:5 - error: Could not specialize type "GoodAlias5[S@GoodAlias5, TStr@GoodAlias5, P@GoodAlias5, Ts@GoodAlias5]"'] +Line 44: Unexpected errors ['aliases_typealiastype.py:44:23 - error: Type variable "S" has no meaning in this context (reportGeneralTypeIssues)'] +Line 46: Unexpected errors ['aliases_typealiastype.py:46:45 - error: Type variable "S" has no meaning in this context (reportGeneralTypeIssues)'] +Line 48: Unexpected errors ['aliases_typealiastype.py:48:35 - error: Type parameter list must be a tuple containing only TypeVar, TypeVarTuple, or ParamSpec'] +Line 50: Unexpected errors ['aliases_typealiastype.py:50:40 - error: Type alias "BadAlias4" cannot use itself in its definition (reportGeneralTypeIssues)'] +Line 52: Unexpected errors ['aliases_typealiastype.py:52:18 - error: Type alias "BadAlias5" cannot use itself in its definition (reportGeneralTypeIssues)'] +Line 54: Unexpected errors ['aliases_typealiastype.py:54:40 - error: Type alias "BadAlias6" cannot use itself in its definition (reportGeneralTypeIssues)'] +Line 58: Unexpected errors ['aliases_typealiastype.py:58:40 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 59: Unexpected errors ['aliases_typealiastype.py:59:40 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues)'] +Line 60: Unexpected errors ['aliases_typealiastype.py:60:42 - error: Expected type expression but received "tuple[tuple[type[int], type[str]]]" (reportGeneralTypeIssues)'] +Line 61: Unexpected errors ['aliases_typealiastype.py:61:42 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 62: Unexpected errors ['aliases_typealiastype.py:62:42 - error: Expected type expression but received "dict[str, str]" (reportGeneralTypeIssues)'] +Line 63: Unexpected errors ['aliases_typealiastype.py:63:42 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 64: Unexpected errors ['aliases_typealiastype.py:64:42 - error: List expression not allowed in type annotation', 'aliases_typealiastype.py:64:42 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 65: Unexpected errors ['aliases_typealiastype.py:65:42 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm)'] +Line 66: Unexpected errors ['aliases_typealiastype.py:66:42 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 67: Unexpected errors ['aliases_typealiastype.py:67:42 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues)'] +Line 68: Unexpected errors ['aliases_typealiastype.py:68:42 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues)'] +Line 69: Unexpected errors ['aliases_typealiastype.py:69:42 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm)'] +Line 70: Unexpected errors ['aliases_typealiastype.py:70:42 - error: Expected expression', 'aliases_typealiastype.py:70:42 - error: Tuple expression not allowed in type annotation'] +""" diff --git a/conformance/results/pyright/aliases_variance.toml b/conformance/results/pyright/aliases_variance.toml index 87205e5d1..dffa0c157 100644 --- a/conformance/results/pyright/aliases_variance.toml +++ b/conformance/results/pyright/aliases_variance.toml @@ -9,3 +9,10 @@ aliases_variance.py:32:26 - error: Could not specialize type "A_Alias_2[T_co@A_A aliases_variance.py:44:26 - error: Could not specialize type "B_Alias_1[T_co@B_Alias_1, T_contra@B_Alias_1]"   Variance of type argument "T_contra@ClassB_1" is incompatible with "T_co@B_Alias_1" """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['aliases_variance.py:24:23 - error: Type "T_co@ClassA_1" cannot be assigned to type variable "T@ClassA"'] +Line 28: Unexpected errors ['aliases_variance.py:28:26 - error: Could not specialize type "A_Alias_1[T_co@A_Alias_1]"'] +Line 32: Unexpected errors ['aliases_variance.py:32:26 - error: Could not specialize type "A_Alias_2[T_co@A_Alias_2]"'] +Line 44: Unexpected errors ['aliases_variance.py:44:26 - error: Could not specialize type "B_Alias_1[T_co@B_Alias_1, T_contra@B_Alias_1]"'] +""" diff --git a/conformance/results/pyright/annotations_coroutines.toml b/conformance/results/pyright/annotations_coroutines.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/annotations_coroutines.toml +++ b/conformance/results/pyright/annotations_coroutines.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/annotations_forward_refs.toml b/conformance/results/pyright/annotations_forward_refs.toml index fd85110be..9e0b9275a 100644 --- a/conformance/results/pyright/annotations_forward_refs.toml +++ b/conformance/results/pyright/annotations_forward_refs.toml @@ -35,3 +35,28 @@ annotations_forward_refs.py:80:14 - error: Type of "ClassF" could not be determi annotations_forward_refs.py:80:14 - error: Variable not allowed in type expression (reportInvalidTypeForm) annotations_forward_refs.py:89:8 - error: Expected type expression but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['annotations_forward_refs.py:22:7 - error: "ClassA" is not defined (reportUndefinedVariable)'] +Line 23: Unexpected errors ['annotations_forward_refs.py:23:12 - error: "ClassA" is not defined (reportUndefinedVariable)'] +Line 24: Unexpected errors ['annotations_forward_refs.py:24:7 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues)'] +Line 25: Unexpected errors ['annotations_forward_refs.py:25:13 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues)'] +Line 41: Unexpected errors ['annotations_forward_refs.py:41:9 - error: Expected type but received a string literal (reportGeneralTypeIssues)'] +Line 42: Unexpected errors ['annotations_forward_refs.py:42:10 - error: List expression not allowed in type annotation', 'annotations_forward_refs.py:42:10 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues)'] +Line 43: Unexpected errors ['annotations_forward_refs.py:43:10 - error: Tuple expression not allowed in type annotation'] +Line 44: Unexpected errors ['annotations_forward_refs.py:44:10 - error: List expression not allowed in type annotation', 'annotations_forward_refs.py:44:10 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 45: Unexpected errors ['annotations_forward_refs.py:45:10 - error: Dictionary expression not allowed in type annotation', 'annotations_forward_refs.py:45:10 - error: Expected type expression but received "dict[Unknown, Unknown]" (reportGeneralTypeIssues)'] +Line 46: Unexpected errors ['annotations_forward_refs.py:46:10 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 47: Unexpected errors ['annotations_forward_refs.py:47:10 - error: List expression not allowed in type annotation', 'annotations_forward_refs.py:47:10 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 48: Unexpected errors ['annotations_forward_refs.py:48:10 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm)'] +Line 49: Unexpected errors ['annotations_forward_refs.py:49:10 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 50: Unexpected errors ['annotations_forward_refs.py:50:11 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues)'] +Line 51: Unexpected errors ['annotations_forward_refs.py:51:11 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues)'] +Line 52: Unexpected errors ['annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type annotation (reportInvalidTypeForm)'] +Line 53: Unexpected errors ['annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm)'] +Line 54: Unexpected errors ['annotations_forward_refs.py:54:11 - error: Expected expression', 'annotations_forward_refs.py:54:11 - error: Tuple expression not allowed in type annotation'] +Line 55: Unexpected errors ['annotations_forward_refs.py:55:10 - error: Module cannot be used as a type (reportGeneralTypeIssues)'] +Line 66: Unexpected errors ['annotations_forward_refs.py:66:26 - error: "ClassB" is not defined (reportUndefinedVariable)'] +Line 80: Unexpected errors ['annotations_forward_refs.py:80:14 - error: Type of "ClassF" could not be determined because it refers to itself (reportGeneralTypeIssues)', 'annotations_forward_refs.py:80:14 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 89: Unexpected errors ['annotations_forward_refs.py:89:8 - error: Expected type expression but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/annotations_generators.toml b/conformance/results/pyright/annotations_generators.toml index 6ecdccc78..3d1e67c17 100644 --- a/conformance/results/pyright/annotations_generators.toml +++ b/conformance/results/pyright/annotations_generators.toml @@ -31,3 +31,18 @@ annotations_generators.py:135:16 - error: Return type of generator function must     Type parameter "_SendT_contra@Generator" is contravariant, but "int" is not a supertype of "str"       "str" is incompatible with "int" (reportReturnType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 51: Unexpected errors ['annotations_generators.py:51:21 - error: Function with declared return type "C" must return value on all code paths'] +Line 54: Unexpected errors ['annotations_generators.py:54:16 - error: Expression of type "Literal[False]" cannot be assigned to return type "C"'] +Line 57: Unexpected errors ['annotations_generators.py:57:15 - error: Return type of generator function must be compatible with "Generator[Literal[3], Any, Any]"'] +Line 66: Unexpected errors ['annotations_generators.py:66:15 - error: Return type of generator function must be compatible with "Generator[Literal[3], Any, Any]"'] +Line 75: Unexpected errors ['annotations_generators.py:75:11 - error: Return type of generator function must be compatible with "Generator[B, Any, Any]"'] +Line 86: Unexpected errors ['annotations_generators.py:86:21 - error: Return type of generator function must be compatible with "Generator[Any, Any, Any]"'] +Line 87: Unexpected errors ['annotations_generators.py:87:11 - error: Return type of generator function must be compatible with "Generator[None, Any, Any]"'] +Line 91: Unexpected errors ['annotations_generators.py:91:27 - error: Return type of async generator function must be compatible with "AsyncGenerator[Any, Any]"'] +Line 92: Unexpected errors ['annotations_generators.py:92:11 - error: Return type of async generator function must be compatible with "AsyncGenerator[None, Any]"'] +Line 118: Unexpected errors ['annotations_generators.py:118:16 - error: Return type of generator function must be compatible with "Generator[A, Any, Any]"'] +Line 119: Unexpected errors ['annotations_generators.py:119:16 - error: Return type of generator function must be compatible with "Generator[int, Any, Any]"'] +Line 135: Unexpected errors ['annotations_generators.py:135:16 - error: Return type of generator function must be compatible with "Generator[None, Any, Any]"'] +""" diff --git a/conformance/results/pyright/annotations_methods.toml b/conformance/results/pyright/annotations_methods.toml index 924eef535..985f75966 100644 --- a/conformance/results/pyright/annotations_methods.toml +++ b/conformance/results/pyright/annotations_methods.toml @@ -1,8 +1,11 @@ conformant = "Pass" -notes = """ -Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. +notes = """Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. """ output = """ annotations_methods.py:46:8 - error: Argument of type "A" cannot be assigned to parameter "self" of type "B" in function "copy"   "A" is incompatible with "B" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 46: Unexpected errors ['annotations_methods.py:46:8 - error: Argument of type "A" cannot be assigned to parameter "self" of type "B" in function "copy"'] +""" diff --git a/conformance/results/pyright/annotations_typeexpr.toml b/conformance/results/pyright/annotations_typeexpr.toml index 39438c80d..e91de4fae 100644 --- a/conformance/results/pyright/annotations_typeexpr.toml +++ b/conformance/results/pyright/annotations_typeexpr.toml @@ -27,3 +27,21 @@ annotations_typeexpr.py:101:10 - error: Tuple expression not allowed in type ann   Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) annotations_typeexpr.py:102:10 - error: Module cannot be used as a type (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 88: Unexpected errors ['annotations_typeexpr.py:88:9 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 89: Unexpected errors ['annotations_typeexpr.py:89:9 - error: List expression not allowed in type annotation', 'annotations_typeexpr.py:89:9 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues)'] +Line 90: Unexpected errors ['annotations_typeexpr.py:90:9 - error: Tuple expression not allowed in type annotation'] +Line 91: Unexpected errors ['annotations_typeexpr.py:91:9 - error: List expression not allowed in type annotation', 'annotations_typeexpr.py:91:9 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 92: Unexpected errors ['annotations_typeexpr.py:92:9 - error: Dictionary expression not allowed in type annotation', 'annotations_typeexpr.py:92:9 - error: Expected type expression but received "dict[Unknown, Unknown]" (reportGeneralTypeIssues)'] +Line 93: Unexpected errors ['annotations_typeexpr.py:93:9 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 94: Unexpected errors ['annotations_typeexpr.py:94:9 - error: List expression not allowed in type annotation', 'annotations_typeexpr.py:94:9 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 95: Unexpected errors ['annotations_typeexpr.py:95:9 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm)'] +Line 96: Unexpected errors ['annotations_typeexpr.py:96:9 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +Line 97: Unexpected errors ['annotations_typeexpr.py:97:10 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues)'] +Line 98: Unexpected errors ['annotations_typeexpr.py:98:10 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues)'] +Line 99: Unexpected errors ['annotations_typeexpr.py:99:10 - error: Unary operator not allowed in type annotation (reportInvalidTypeForm)'] +Line 100: Unexpected errors ['annotations_typeexpr.py:100:10 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm)'] +Line 101: Unexpected errors ['annotations_typeexpr.py:101:10 - error: Expected expression', 'annotations_typeexpr.py:101:10 - error: Tuple expression not allowed in type annotation'] +Line 102: Unexpected errors ['annotations_typeexpr.py:102:10 - error: Module cannot be used as a type (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/callables_annotation.toml b/conformance/results/pyright/callables_annotation.toml index 83712e8a8..0fd0378d9 100644 --- a/conformance/results/pyright/callables_annotation.toml +++ b/conformance/results/pyright/callables_annotation.toml @@ -13,3 +13,16 @@ callables_annotation.py:42:14 - error: Expected parameter type list or "..." callables_annotation.py:42:24 - error: Expected only two type arguments to "Callable" callables_annotation.py:43:15 - error: "..." is not allowed in this context """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['callables_annotation.py:13:5 - error: Expected 1 more positional argument (reportCallIssue)'] +Line 14: Unexpected errors ['callables_annotation.py:14:11 - error: Argument of type "Literal[2]" cannot be assigned to parameter of type "str"'] +Line 15: Unexpected errors ['callables_annotation.py:15:15 - error: Expected 2 positional arguments (reportCallIssue)'] +Line 16: Unexpected errors ['callables_annotation.py:16:10 - error: Expected 2 more positional arguments (reportCallIssue)'] +Line 22: Unexpected errors ['callables_annotation.py:22:8 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 39: Unexpected errors ['callables_annotation.py:39:14 - error: Expected parameter type list or "..."'] +Line 40: Unexpected errors ['callables_annotation.py:40:14 - error: Expected parameter type list or "..."'] +Line 41: Unexpected errors ['callables_annotation.py:41:18 - error: List expression not allowed for this type argument'] +Line 42: Unexpected errors ['callables_annotation.py:42:14 - error: Expected parameter type list or "..."', 'callables_annotation.py:42:24 - error: Expected only two type arguments to "Callable"'] +Line 43: Unexpected errors ['callables_annotation.py:43:15 - error: "..." is not allowed in this context'] +""" diff --git a/conformance/results/pyright/callables_kwargs.toml b/conformance/results/pyright/callables_kwargs.toml index 8eeb7666f..be026aa10 100644 --- a/conformance/results/pyright/callables_kwargs.toml +++ b/conformance/results/pyright/callables_kwargs.toml @@ -28,3 +28,19 @@ callables_kwargs.py:100:19 - error: Expression of type "(**kwargs: **TD2) -> Non callables_kwargs.py:109:30 - error: Typed dictionary overlaps with keyword parameter: v1 (reportGeneralTypeIssues) callables_kwargs.py:121:21 - error: Expected TypedDict type argument for Unpack (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['callables_kwargs.py:26:5 - error: Could not access item in TypedDict'] +Line 43: Unexpected errors ['callables_kwargs.py:43:5 - error: Arguments missing for parameters "v1", "v3" (reportCallIssue)'] +Line 48: Unexpected errors ['callables_kwargs.py:48:32 - error: No parameter named "v4" (reportCallIssue)'] +Line 49: Unexpected errors ['callables_kwargs.py:49:11 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 55: Unexpected errors ['callables_kwargs.py:55:13 - error: Argument of type "str" cannot be assigned to parameter "v1" of type "int" in function "func1"'] +Line 60: Unexpected errors ['callables_kwargs.py:60:19 - error: Unable to match unpacked TypedDict argument to parameters'] +Line 61: Unexpected errors ['callables_kwargs.py:61:16 - error: Unable to match unpacked TypedDict argument to parameters'] +Line 62: Unexpected errors ['callables_kwargs.py:62:19 - error: Unable to match unpacked TypedDict argument to parameters'] +Line 98: Unexpected errors ['callables_kwargs.py:98:19 - error: Expression of type "(**kwargs: **TD2) -> None" cannot be assigned to declared type "TDProtocol3"'] +Line 99: Unexpected errors ['callables_kwargs.py:99:19 - error: Expression of type "(**kwargs: **TD2) -> None" cannot be assigned to declared type "TDProtocol4"'] +Line 100: Unexpected errors ['callables_kwargs.py:100:19 - error: Expression of type "(**kwargs: **TD2) -> None" cannot be assigned to declared type "TDProtocol5"'] +Line 109: Unexpected errors ['callables_kwargs.py:109:30 - error: Typed dictionary overlaps with keyword parameter: v1 (reportGeneralTypeIssues)'] +Line 121: Unexpected errors ['callables_kwargs.py:121:21 - error: Expected TypedDict type argument for Unpack (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/callables_protocol.toml b/conformance/results/pyright/callables_protocol.toml index d3487ae93..33a63ee7a 100644 --- a/conformance/results/pyright/callables_protocol.toml +++ b/conformance/results/pyright/callables_protocol.toml @@ -58,3 +58,23 @@ callables_protocol.py:311:27 - error: Expression of type "(*, path: str) -> str"   Type "(*, path: str) -> str" cannot be assigned to type "(*, path: str = ...) -> str"     Parameter "path" is missing default argument (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 35: Unexpected errors ['callables_protocol.py:35:7 - error: Expression of type "(*vals: bytes, max_items: int | None) -> list[bytes]" cannot be assigned to declared type "Proto1"'] +Line 36: Unexpected errors ['callables_protocol.py:36:7 - error: Expression of type "(*vals: bytes) -> list[bytes]" cannot be assigned to declared type "Proto1"'] +Line 37: Unexpected errors ['callables_protocol.py:37:7 - error: Expression of type "(*vals: bytes, max_len: str | None) -> list[bytes]" cannot be assigned to declared type "Proto1"'] +Line 67: Unexpected errors ['callables_protocol.py:67:7 - error: Expression of type "(*a: bytes) -> None" cannot be assigned to declared type "Proto2"'] +Line 68: Unexpected errors ['callables_protocol.py:68:7 - error: Expression of type "(*a: str, **b: str) -> None" cannot be assigned to declared type "Proto2"'] +Line 69: Unexpected errors ['callables_protocol.py:69:7 - error: Expression of type "(*a: bytes, **b: bytes) -> None" cannot be assigned to declared type "Proto2"'] +Line 70: Unexpected errors ['callables_protocol.py:70:7 - error: Expression of type "(**b: str) -> None" cannot be assigned to declared type "Proto2"'] +Line 97: Unexpected errors ['callables_protocol.py:97:16 - error: Expression of type "(x: int) -> None" cannot be assigned to declared type "Proto4"'] +Line 121: Unexpected errors ['callables_protocol.py:121:18 - error: Expression of type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" cannot be assigned to declared type "NotProto6"'] +Line 169: Unexpected errors ['callables_protocol.py:169:7 - error: Expression of type "(x: int) -> Any" cannot be assigned to declared type "Proto8"'] +Line 186: Unexpected errors ['callables_protocol.py:186:33 - error: Cannot assign member "other_attribute" for type "Proto9[P@decorator1, R@decorator1]"'] +Line 187: Unexpected errors ['callables_protocol.py:187:15 - error: Cannot assign member "xxx" for type "Proto9[P@decorator1, R@decorator1]"'] +Line 197: Unexpected errors ['callables_protocol.py:197:16 - error: Cannot access member "other_attribute2" for type "Proto9[(x: int), str]"'] +Line 238: Unexpected errors ['callables_protocol.py:238:8 - error: Expression of type "(x: int, y: str, /) -> Any" cannot be assigned to declared type "Proto11"'] +Line 260: Unexpected errors ['callables_protocol.py:260:8 - error: Expression of type "(*args: Any, kwarg0: Any) -> None" cannot be assigned to declared type "Proto12"'] +Line 284: Unexpected errors ['callables_protocol.py:284:27 - error: Expression of type "(path: str) -> str" cannot be assigned to declared type "Proto13_Default"'] +Line 311: Unexpected errors ['callables_protocol.py:311:27 - error: Expression of type "(*, path: str) -> str" cannot be assigned to declared type "Proto14_Default"'] +""" diff --git a/conformance/results/pyright/classes_classvar.toml b/conformance/results/pyright/classes_classvar.toml index 7189c5804..4414efeac 100644 --- a/conformance/results/pyright/classes_classvar.toml +++ b/conformance/results/pyright/classes_classvar.toml @@ -23,3 +23,23 @@ classes_classvar.py:129:13 - error: Expression of type "ProtoAImpl" cannot be as     "x" is defined as a ClassVar in protocol     "y" is defined as a ClassVar in protocol (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['classes_classvar.py:36:25 - error: Expected only one type argument after "ClassVar"'] +Line 37: Unexpected errors ['classes_classvar.py:37:14 - error: Expected type expression but received "Literal[3]" (reportGeneralTypeIssues)'] +Line 38: Unexpected errors ['classes_classvar.py:38:14 - error: "var" is not defined (reportUndefinedVariable)'] +Line 43: Unexpected errors ['classes_classvar.py:43:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues)'] +Line 44: Unexpected errors ['classes_classvar.py:44:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues)'] +Line 45: Unexpected errors ['classes_classvar.py:45:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues)'] +Line 50: Unexpected errors ['classes_classvar.py:50:33 - error: Expression of type "dict[Any, Any]" cannot be assigned to declared type "list[str]" (reportAssignmentType)'] +Line 52: Unexpected errors ['classes_classvar.py:52:11 - error: "Final" is not defined (reportUndefinedVariable)'] +Line 53: Unexpected errors ['classes_classvar.py:53:17 - error: "ClassVar" is not allowed in this context'] +Line 61: Unexpected errors ['classes_classvar.py:61:26 - error: "ClassVar" is not allowed in this context'] +Line 62: Unexpected errors ['classes_classvar.py:62:12 - error: "ClassVar" is not allowed in this context'] +Line 63: Unexpected errors ['classes_classvar.py:63:18 - error: "ClassVar" is not allowed in this context'] +Line 65: Unexpected errors ['classes_classvar.py:65:26 - error: "ClassVar" is not allowed in this context'] +Line 69: Unexpected errors ['classes_classvar.py:69:8 - error: "ClassVar" is not allowed in this context'] +Line 70: Unexpected errors ['classes_classvar.py:70:20 - error: "ClassVar" is not allowed in this context'] +Line 100: Unexpected errors ['classes_classvar.py:100:14 - error: Cannot assign member "stats" for type "Starship"'] +Line 129: Unexpected errors ['classes_classvar.py:129:13 - error: Expression of type "ProtoAImpl" cannot be assigned to declared type "ProtoA"'] +""" diff --git a/conformance/results/pyright/classes_override.toml b/conformance/results/pyright/classes_override.toml index 8fa4d0924..c82345645 100644 --- a/conformance/results/pyright/classes_override.toml +++ b/conformance/results/pyright/classes_override.toml @@ -6,3 +6,11 @@ classes_override.py:79:9 - error: Method "static_method1" is marked as override, classes_override.py:84:9 - error: Method "class_method1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues) classes_override.py:91:9 - error: Method "property1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 53: Unexpected errors ['classes_override.py:53:9 - error: Method "method3" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)'] +Line 65: Unexpected errors ['classes_override.py:65:9 - error: Method "method4" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)'] +Line 79: Unexpected errors ['classes_override.py:79:9 - error: Method "static_method1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)'] +Line 84: Unexpected errors ['classes_override.py:84:9 - error: Method "class_method1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)'] +Line 91: Unexpected errors ['classes_override.py:91:9 - error: Method "property1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/dataclasses_descriptors.toml b/conformance/results/pyright/dataclasses_descriptors.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/dataclasses_descriptors.toml +++ b/conformance/results/pyright/dataclasses_descriptors.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/dataclasses_frozen.toml b/conformance/results/pyright/dataclasses_frozen.toml index 75e50fbcd..222a13c7a 100644 --- a/conformance/results/pyright/dataclasses_frozen.toml +++ b/conformance/results/pyright/dataclasses_frozen.toml @@ -9,3 +9,10 @@ dataclasses_frozen.py:17:5 - error: Cannot assign member "b" for type "DC1" dataclasses_frozen.py:22:1 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues) dataclasses_frozen.py:32:12 - error: A frozen class cannot inherit from a class that is not frozen (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['dataclasses_frozen.py:16:5 - error: Cannot assign member "a" for type "DC1"'] +Line 17: Unexpected errors ['dataclasses_frozen.py:17:5 - error: Cannot assign member "b" for type "DC1"'] +Line 22: Unexpected errors ['dataclasses_frozen.py:22:1 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues)'] +Line 32: Unexpected errors ['dataclasses_frozen.py:32:12 - error: A frozen class cannot inherit from a class that is not frozen (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/dataclasses_hash.toml b/conformance/results/pyright/dataclasses_hash.toml index 67fb8d04a..e6297a958 100644 --- a/conformance/results/pyright/dataclasses_hash.toml +++ b/conformance/results/pyright/dataclasses_hash.toml @@ -9,3 +9,8 @@ dataclasses_hash.py:32:16 - error: Expression of type "DC3" cannot be assigned t     "__hash__" is an incompatible type       Type "None" cannot be assigned to type "() -> int" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['dataclasses_hash.py:15:16 - error: Expression of type "DC1" cannot be assigned to declared type "Hashable"'] +Line 32: Unexpected errors ['dataclasses_hash.py:32:16 - error: Expression of type "DC3" cannot be assigned to declared type "Hashable"'] +""" diff --git a/conformance/results/pyright/dataclasses_inheritance.toml b/conformance/results/pyright/dataclasses_inheritance.toml index 6a1dfbd25..93121c566 100644 --- a/conformance/results/pyright/dataclasses_inheritance.toml +++ b/conformance/results/pyright/dataclasses_inheritance.toml @@ -3,3 +3,8 @@ output = """ dataclasses_inheritance.py:60:5 - error: Class variable "x" overrides instance variable of same name in class "DC6" (reportIncompatibleVariableOverride) dataclasses_inheritance.py:64:5 - error: Instance variable "y" overrides class variable of same name in class "DC6" (reportIncompatibleVariableOverride) """ +conformance_automated = "Fail" +errors_diff = """ +Line 60: Unexpected errors ['dataclasses_inheritance.py:60:5 - error: Class variable "x" overrides instance variable of same name in class "DC6" (reportIncompatibleVariableOverride)'] +Line 64: Unexpected errors ['dataclasses_inheritance.py:64:5 - error: Instance variable "y" overrides class variable of same name in class "DC6" (reportIncompatibleVariableOverride)'] +""" diff --git a/conformance/results/pyright/dataclasses_kwonly.toml b/conformance/results/pyright/dataclasses_kwonly.toml index 1e72bfef7..da6049e83 100644 --- a/conformance/results/pyright/dataclasses_kwonly.toml +++ b/conformance/results/pyright/dataclasses_kwonly.toml @@ -4,3 +4,9 @@ dataclasses_kwonly.py:23:11 - error: Expected 1 positional argument (reportCallI dataclasses_kwonly.py:38:11 - error: Expected 1 positional argument (reportCallIssue) dataclasses_kwonly.py:53:11 - error: Expected 1 positional argument (reportCallIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['dataclasses_kwonly.py:23:11 - error: Expected 1 positional argument (reportCallIssue)'] +Line 38: Unexpected errors ['dataclasses_kwonly.py:38:11 - error: Expected 1 positional argument (reportCallIssue)'] +Line 53: Unexpected errors ['dataclasses_kwonly.py:53:11 - error: Expected 1 positional argument (reportCallIssue)'] +""" diff --git a/conformance/results/pyright/dataclasses_order.toml b/conformance/results/pyright/dataclasses_order.toml index be5667fc7..34582bde9 100644 --- a/conformance/results/pyright/dataclasses_order.toml +++ b/conformance/results/pyright/dataclasses_order.toml @@ -2,3 +2,7 @@ conformant = "Pass" output = """ dataclasses_order.py:50:4 - error: Operator "<" not supported for types "DC1" and "DC2" (reportOperatorIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 50: Unexpected errors ['dataclasses_order.py:50:4 - error: Operator "<" not supported for types "DC1" and "DC2" (reportOperatorIssue)'] +""" diff --git a/conformance/results/pyright/dataclasses_postinit.toml b/conformance/results/pyright/dataclasses_postinit.toml index e283acbb5..b36eeb442 100644 --- a/conformance/results/pyright/dataclasses_postinit.toml +++ b/conformance/results/pyright/dataclasses_postinit.toml @@ -8,3 +8,10 @@ dataclasses_postinit.py:29:11 - error: Cannot access member "y" for type "DC1"   Member "y" is an init-only field (reportAttributeAccessIssue) dataclasses_postinit.py:36:9 - error: Dataclass __post_init__ incorrect parameter count; number of InitVar fields is 2 (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['dataclasses_postinit.py:19:40 - error: Dataclass __post_init__ method parameter type mismatch for field "y"'] +Line 28: Unexpected errors ['dataclasses_postinit.py:28:11 - error: Cannot access member "x" for type "DC1"'] +Line 29: Unexpected errors ['dataclasses_postinit.py:29:11 - error: Cannot access member "y" for type "DC1"'] +Line 36: Unexpected errors ['dataclasses_postinit.py:36:9 - error: Dataclass __post_init__ incorrect parameter count; number of InitVar fields is 2 (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/dataclasses_slots.toml b/conformance/results/pyright/dataclasses_slots.toml index e5686ae1a..915d74739 100644 --- a/conformance/results/pyright/dataclasses_slots.toml +++ b/conformance/results/pyright/dataclasses_slots.toml @@ -8,3 +8,11 @@ dataclasses_slots.py:67:5 - error: Cannot access member "__slots__" for type "ty dataclasses_slots.py:70:8 - error: Cannot access member "__slots__" for type "DC6"   Member "__slots__" is unknown (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['dataclasses_slots.py:11:12 - error: __slots__ is already defined in class (reportGeneralTypeIssues)'] +Line 26: Unexpected errors ['dataclasses_slots.py:26:14 - error: "y" is not specified in __slots__ (reportGeneralTypeIssues)'] +Line 39: Unexpected errors ['dataclasses_slots.py:39:14 - error: "y" is not specified in __slots__ (reportGeneralTypeIssues)'] +Line 67: Unexpected errors ['dataclasses_slots.py:67:5 - error: Cannot access member "__slots__" for type "type[DC6]"'] +Line 70: Unexpected errors ['dataclasses_slots.py:70:8 - error: Cannot access member "__slots__" for type "DC6"'] +""" diff --git a/conformance/results/pyright/dataclasses_transform_class.toml b/conformance/results/pyright/dataclasses_transform_class.toml index e1cba48ea..bffc58a10 100644 --- a/conformance/results/pyright/dataclasses_transform_class.toml +++ b/conformance/results/pyright/dataclasses_transform_class.toml @@ -11,3 +11,12 @@ dataclasses_transform_class.py:119:6 - error: Cannot assign member "id" for type   "Customer3" is frozen     Member "__set__" is unknown (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 48: Unexpected errors ['dataclasses_transform_class.py:48:7 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues)'] +Line 60: Unexpected errors ['dataclasses_transform_class.py:60:6 - error: Cannot assign member "id" for type "Customer1"'] +Line 63: Unexpected errors ['dataclasses_transform_class.py:63:18 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 69: Unexpected errors ['dataclasses_transform_class.py:69:6 - error: Operator "<" not supported for types "Customer1" and "Customer1" (reportOperatorIssue)'] +Line 79: Unexpected errors ['dataclasses_transform_class.py:79:18 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 119: Unexpected errors ['dataclasses_transform_class.py:119:6 - error: Cannot assign member "id" for type "Customer3"'] +""" diff --git a/conformance/results/pyright/dataclasses_transform_field.toml b/conformance/results/pyright/dataclasses_transform_field.toml index d0512366d..3b1439e2f 100644 --- a/conformance/results/pyright/dataclasses_transform_field.toml +++ b/conformance/results/pyright/dataclasses_transform_field.toml @@ -3,3 +3,8 @@ output = """ dataclasses_transform_field.py:64:16 - error: No parameter named "id" (reportCallIssue) dataclasses_transform_field.py:75:16 - error: Expected 0 positional arguments (reportCallIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 64: Unexpected errors ['dataclasses_transform_field.py:64:16 - error: No parameter named "id" (reportCallIssue)'] +Line 75: Unexpected errors ['dataclasses_transform_field.py:75:16 - error: Expected 0 positional arguments (reportCallIssue)'] +""" diff --git a/conformance/results/pyright/dataclasses_transform_func.toml b/conformance/results/pyright/dataclasses_transform_func.toml index f7c1d3ce4..943816ab2 100644 --- a/conformance/results/pyright/dataclasses_transform_func.toml +++ b/conformance/results/pyright/dataclasses_transform_func.toml @@ -10,3 +10,12 @@ dataclasses_transform_func.py:97:6 - error: Cannot assign member "id" for type "   "Customer3" is frozen     Member "__set__" is unknown (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 57: Unexpected errors ['dataclasses_transform_func.py:57:13 - error: Cannot assign member "name" for type "Customer1"'] +Line 61: Unexpected errors ['dataclasses_transform_func.py:61:6 - error: Operator "<" not supported for types "Customer1" and "Customer1" (reportOperatorIssue)'] +Line 65: Unexpected errors ['dataclasses_transform_func.py:65:36 - error: No parameter named "salary" (reportCallIssue)'] +Line 71: Unexpected errors ['dataclasses_transform_func.py:71:18 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 89: Unexpected errors ['dataclasses_transform_func.py:89:1 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues)'] +Line 97: Unexpected errors ['dataclasses_transform_func.py:97:6 - error: Cannot assign member "id" for type "Customer3"'] +""" diff --git a/conformance/results/pyright/dataclasses_transform_meta.toml b/conformance/results/pyright/dataclasses_transform_meta.toml index 29f22ef64..d1354fb91 100644 --- a/conformance/results/pyright/dataclasses_transform_meta.toml +++ b/conformance/results/pyright/dataclasses_transform_meta.toml @@ -11,3 +11,12 @@ dataclasses_transform_meta.py:100:6 - error: Cannot assign member "id" for type   "Customer3" is frozen     Member "__set__" is unknown (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 48: Unexpected errors ['dataclasses_transform_meta.py:48:36 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues)'] +Line 60: Unexpected errors ['dataclasses_transform_meta.py:60:6 - error: Cannot assign member "id" for type "Customer1"'] +Line 63: Unexpected errors ['dataclasses_transform_meta.py:63:18 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 70: Unexpected errors ['dataclasses_transform_meta.py:70:6 - error: Operator "<" not supported for types "Customer1" and "Customer1" (reportOperatorIssue)'] +Line 80: Unexpected errors ['dataclasses_transform_meta.py:80:18 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 100: Unexpected errors ['dataclasses_transform_meta.py:100:6 - error: Cannot assign member "id" for type "Customer3"'] +""" diff --git a/conformance/results/pyright/dataclasses_usage.toml b/conformance/results/pyright/dataclasses_usage.toml index f72df637d..8ae420b18 100644 --- a/conformance/results/pyright/dataclasses_usage.toml +++ b/conformance/results/pyright/dataclasses_usage.toml @@ -15,3 +15,15 @@ dataclasses_usage.py:130:1 - error: Argument missing for parameter "y" (reportCa dataclasses_usage.py:179:1 - error: Expected no arguments to "DC13" constructor (reportCallIssue) dataclasses_usage.py:228:9 - error: Dataclass field without type annotation will cause runtime exception (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 51: Unexpected errors ['dataclasses_usage.py:51:6 - error: Argument missing for parameter "unit_price" (reportCallIssue)'] +Line 52: Unexpected errors ['dataclasses_usage.py:52:28 - error: Argument of type "Literal[\\'price\\']" cannot be assigned to parameter "unit_price" of type "float" in function "__init__"'] +Line 53: Unexpected errors ['dataclasses_usage.py:53:36 - error: Expected 3 positional arguments (reportCallIssue)'] +Line 84: Unexpected errors ['dataclasses_usage.py:84:13 - error: Expected 1 positional argument (reportCallIssue)'] +Line 89: Unexpected errors ['dataclasses_usage.py:89:36 - error: Argument of type "type[str]" cannot be assigned to parameter "default_factory" of type "() -> _T@field" in function "field"'] +Line 127: Unexpected errors ['dataclasses_usage.py:127:8 - error: Expected 1 positional argument (reportCallIssue)'] +Line 130: Unexpected errors ['dataclasses_usage.py:130:1 - error: Argument missing for parameter "y" (reportCallIssue)'] +Line 179: Unexpected errors ['dataclasses_usage.py:179:1 - error: Expected no arguments to "DC13" constructor (reportCallIssue)'] +Line 228: Unexpected errors ['dataclasses_usage.py:228:9 - error: Dataclass field without type annotation will cause runtime exception (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/directives_assert_type.toml b/conformance/results/pyright/directives_assert_type.toml index b107b5c01..dd05d5ac4 100644 --- a/conformance/results/pyright/directives_assert_type.toml +++ b/conformance/results/pyright/directives_assert_type.toml @@ -7,3 +7,6 @@ directives_assert_type.py:31:5 - error: "assert_type" expects two positional arg directives_assert_type.py:32:17 - error: "assert_type" mismatch: expected "int" but received "Literal['']" (reportAssertTypeFailure) directives_assert_type.py:33:5 - error: "assert_type" expects two positional arguments """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/directives_cast.toml b/conformance/results/pyright/directives_cast.toml index 39edb613d..ba358266b 100644 --- a/conformance/results/pyright/directives_cast.toml +++ b/conformance/results/pyright/directives_cast.toml @@ -6,3 +6,9 @@ directives_cast.py:16:13 - error: Expected type expression but received "Literal directives_cast.py:17:8 - error: No overloads for "cast" match the provided arguments   Argument types: (type[int], Literal[''], Literal['']) (reportCallIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['directives_cast.py:15:8 - error: No overloads for "cast" match the provided arguments'] +Line 16: Unexpected errors ['directives_cast.py:16:13 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues)'] +Line 17: Unexpected errors ['directives_cast.py:17:8 - error: No overloads for "cast" match the provided arguments'] +""" diff --git a/conformance/results/pyright/directives_no_type_check.toml b/conformance/results/pyright/directives_no_type_check.toml index 44b5df203..70cfdfbf5 100644 --- a/conformance/results/pyright/directives_no_type_check.toml +++ b/conformance/results/pyright/directives_no_type_check.toml @@ -1,9 +1,13 @@ conformant = "Pass" -notes = """ -Does not honor `@no_type_check` class decorator. +notes = """Does not honor `@no_type_check` class decorator. """ output = """ directives_no_type_check.py:16:14 - error: Expression of type "Literal['']" cannot be assigned to declared type "int"   "Literal['']" is incompatible with "int" (reportAssignmentType) directives_no_type_check.py:26:1 - error: Arguments missing for parameters "a", "b" (reportCallIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['directives_no_type_check.py:16:14 - error: Expression of type "Literal[\\'\\']" cannot be assigned to declared type "int"'] +Line 26: Unexpected errors ['directives_no_type_check.py:26:1 - error: Arguments missing for parameters "a", "b" (reportCallIssue)'] +""" diff --git a/conformance/results/pyright/directives_reveal_type.toml b/conformance/results/pyright/directives_reveal_type.toml index aa4078ead..2a419e552 100644 --- a/conformance/results/pyright/directives_reveal_type.toml +++ b/conformance/results/pyright/directives_reveal_type.toml @@ -7,3 +7,6 @@ directives_reveal_type.py:17:17 - information: Type of "d" is "ForwardReference" directives_reveal_type.py:19:5 - error: Expected a single positional argument for "reveal_type" call directives_reveal_type.py:20:5 - error: Expected a single positional argument for "reveal_type" call """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/directives_type_checking.toml b/conformance/results/pyright/directives_type_checking.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/directives_type_checking.toml +++ b/conformance/results/pyright/directives_type_checking.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/directives_type_ignore.toml b/conformance/results/pyright/directives_type_ignore.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/directives_type_ignore.toml +++ b/conformance/results/pyright/directives_type_ignore.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/directives_type_ignore_file1.toml b/conformance/results/pyright/directives_type_ignore_file1.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/directives_type_ignore_file1.toml +++ b/conformance/results/pyright/directives_type_ignore_file1.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/directives_type_ignore_file2.toml b/conformance/results/pyright/directives_type_ignore_file2.toml index c05757089..29ba6d20a 100644 --- a/conformance/results/pyright/directives_type_ignore_file2.toml +++ b/conformance/results/pyright/directives_type_ignore_file2.toml @@ -3,3 +3,6 @@ output = """ directives_type_ignore_file2.py:14:10 - error: Expression of type "Literal['']" cannot be assigned to declared type "int"   "Literal['']" is incompatible with "int" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/directives_version_platform.toml b/conformance/results/pyright/directives_version_platform.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/directives_version_platform.toml +++ b/conformance/results/pyright/directives_version_platform.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/generics_base_class.toml b/conformance/results/pyright/generics_base_class.toml index 15e6a9987..a97fda0f4 100644 --- a/conformance/results/pyright/generics_base_class.toml +++ b/conformance/results/pyright/generics_base_class.toml @@ -11,3 +11,12 @@ generics_base_class.py:49:38 - error: Too many type arguments provided for "Link generics_base_class.py:61:30 - error: Too many type arguments provided for "MyDict"; expected 1 but received 2 (reportInvalidTypeArguments) generics_base_class.py:68:28 - error: Type arguments for "Generic" must be unique """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_base_class.py:26:26 - error: Argument of type "SymbolTable" cannot be assigned to parameter "x" of type "dict[str, list[object]]" in function "takes_dict_incorrect"'] +Line 29: Unexpected errors ['generics_base_class.py:29:14 - error: "Generic" is not valid in this context (reportGeneralTypeIssues)'] +Line 30: Unexpected errors ['generics_base_class.py:30:8 - error: "Generic" requires at least one type argument', 'generics_base_class.py:30:8 - error: "Generic" is not valid in this context (reportGeneralTypeIssues)'] +Line 49: Unexpected errors ['generics_base_class.py:49:38 - error: Too many type arguments provided for "LinkedList"; expected 1 but received 2 (reportInvalidTypeArguments)'] +Line 61: Unexpected errors ['generics_base_class.py:61:30 - error: Too many type arguments provided for "MyDict"; expected 1 but received 2 (reportInvalidTypeArguments)'] +Line 68: Unexpected errors ['generics_base_class.py:68:28 - error: Type arguments for "Generic" must be unique'] +""" diff --git a/conformance/results/pyright/generics_basic.toml b/conformance/results/pyright/generics_basic.toml index 95b7803a8..f5efbeb84 100644 --- a/conformance/results/pyright/generics_basic.toml +++ b/conformance/results/pyright/generics_basic.toml @@ -16,3 +16,15 @@ generics_basic.py:141:5 - error: Argument of type "Literal[0]" cannot be assigne   "Literal[0]" is incompatible with "str" (reportArgumentType) generics_basic.py:167:37 - error: Metaclass cannot be generic (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['generics_basic.py:36:15 - error: Argument of type "bytes" cannot be assigned to parameter "y" of type "AnyStr@concat" in function "concat"'] +Line 37: Unexpected errors ['generics_basic.py:37:15 - error: Argument of type "str" cannot be assigned to parameter "y" of type "AnyStr@concat" in function "concat"'] +Line 44: Unexpected errors ['generics_basic.py:44:44 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues)'] +Line 48: Unexpected errors ['generics_basic.py:48:49 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues)', 'generics_basic.py:48:49 - error: TypeVar constraint type cannot be generic'] +Line 59: Unexpected errors ['generics_basic.py:59:15 - error: Argument of type "bytes" cannot be assigned to parameter "y" of type "AnyStr@concat" in function "concat"'] +Line 107: Unexpected errors ['generics_basic.py:107:24 - error: Type arguments for "Generic" must be unique'] +Line 140: Unexpected errors ['generics_basic.py:140:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"'] +Line 141: Unexpected errors ['generics_basic.py:141:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"'] +Line 167: Unexpected errors ['generics_basic.py:167:37 - error: Metaclass cannot be generic (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/generics_defaults.toml b/conformance/results/pyright/generics_defaults.toml index 7d7b2b662..cbce5de86 100644 --- a/conformance/results/pyright/generics_defaults.toml +++ b/conformance/results/pyright/generics_defaults.toml @@ -7,3 +7,12 @@ generics_defaults.py:116:36 - error: TypeVar default type must be one of the con generics_defaults.py:144:7 - error: TypeVar "T5" has a default value and cannot follow TypeVarTuple "Ts" (reportGeneralTypeIssues) generics_defaults.py:173:18 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['generics_defaults.py:24:7 - error: "T" cannot appear after "DefaultStrT" in type parameter list because it has no default type (reportGeneralTypeIssues)'] +Line 52: Unexpected errors ['generics_defaults.py:52:16 - error: Too few type arguments provided for "AllTheDefaults"; expected 2 but received 1 (reportInvalidTypeArguments)'] +Line 107: Unexpected errors ['generics_defaults.py:107:35 - error: TypeVar default type must be a subtype of the bound type (reportGeneralTypeIssues)'] +Line 116: Unexpected errors ['generics_defaults.py:116:36 - error: TypeVar default type must be one of the constrained types (reportGeneralTypeIssues)'] +Line 144: Unexpected errors ['generics_defaults.py:144:7 - error: TypeVar "T5" has a default value and cannot follow TypeVarTuple "Ts" (reportGeneralTypeIssues)'] +Line 173: Unexpected errors ['generics_defaults.py:173:18 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/generics_defaults_referential.toml b/conformance/results/pyright/generics_defaults_referential.toml index 3f5e25eb8..7bc0440c9 100644 --- a/conformance/results/pyright/generics_defaults_referential.toml +++ b/conformance/results/pyright/generics_defaults_referential.toml @@ -12,3 +12,13 @@ generics_defaults_referential.py:72:29 - error: TypeVar default type must be a s generics_defaults_referential.py:79:37 - error: TypeVar default type must be one of the constrained types (reportGeneralTypeIssues) generics_defaults_referential.py:85:44 - error: TypeVar default type must be one of the constrained types (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 37: Unexpected errors ['generics_defaults_referential.py:37:8 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter "b" of type "int" in function "__init__"'] +Line 40: Unexpected errors ['generics_defaults_referential.py:40:5 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter "a" of type "int" in function "__init__"'] +Line 57: Unexpected errors ['generics_defaults_referential.py:57:7 - error: Type parameter "Start2T" has a default type that refers to one or more type variables that are out of scope'] +Line 64: Unexpected errors ['generics_defaults_referential.py:64:11 - error: Type parameter "S2" has a default type that refers to one or more type variables that are out of scope'] +Line 72: Unexpected errors ['generics_defaults_referential.py:72:29 - error: TypeVar default type must be a subtype of the bound type (reportGeneralTypeIssues)'] +Line 79: Unexpected errors ['generics_defaults_referential.py:79:37 - error: TypeVar default type must be one of the constrained types (reportGeneralTypeIssues)'] +Line 85: Unexpected errors ['generics_defaults_referential.py:85:44 - error: TypeVar default type must be one of the constrained types (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/generics_defaults_specialization.toml b/conformance/results/pyright/generics_defaults_specialization.toml index 31a411e17..4192ef731 100644 --- a/conformance/results/pyright/generics_defaults_specialization.toml +++ b/conformance/results/pyright/generics_defaults_specialization.toml @@ -3,3 +3,8 @@ output = """ generics_defaults_specialization.py:30:15 - error: Too many type arguments provided for "MyAlias[DefaultStrT@MyAlias]"; expected 1 but received 2 generics_defaults_specialization.py:55:5 - error: Expected no type arguments for class "Foo" (reportInvalidTypeArguments) """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['generics_defaults_specialization.py:30:15 - error: Too many type arguments provided for "MyAlias[DefaultStrT@MyAlias]"; expected 1 but received 2'] +Line 55: Unexpected errors ['generics_defaults_specialization.py:55:5 - error: Expected no type arguments for class "Foo" (reportInvalidTypeArguments)'] +""" diff --git a/conformance/results/pyright/generics_paramspec_basic.toml b/conformance/results/pyright/generics_paramspec_basic.toml index 231bc6d2f..6428369f0 100644 --- a/conformance/results/pyright/generics_paramspec_basic.toml +++ b/conformance/results/pyright/generics_paramspec_basic.toml @@ -11,3 +11,13 @@ generics_paramspec_basic.py:35:35 - error: ParamSpec is not allowed in this cont generics_paramspec_basic.py:39:18 - error: ParamSpec is not allowed in this context generics_paramspec_basic.py:39:31 - error: ParamSpec is not allowed in this context """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['generics_paramspec_basic.py:10:1 - error: ParamSpec must be assigned to a variable named "NotIt"'] +Line 15: Unexpected errors ['generics_paramspec_basic.py:15:18 - error: ParamSpec is not allowed in this context'] +Line 23: Unexpected errors ['generics_paramspec_basic.py:23:14 - error: ParamSpec is not allowed in this context', 'generics_paramspec_basic.py:23:20 - error: ParamSpec is not allowed in this context'] +Line 27: Unexpected errors ['generics_paramspec_basic.py:27:14 - error: "Concatenate" is not allowed in this context'] +Line 31: Unexpected errors ['generics_paramspec_basic.py:31:19 - error: Type "P@func3" cannot be assigned to type variable "_T@list"'] +Line 35: Unexpected errors ['generics_paramspec_basic.py:35:35 - error: ParamSpec is not allowed in this context'] +Line 39: Unexpected errors ['generics_paramspec_basic.py:39:18 - error: ParamSpec is not allowed in this context', 'generics_paramspec_basic.py:39:31 - error: ParamSpec is not allowed in this context'] +""" diff --git a/conformance/results/pyright/generics_paramspec_components.toml b/conformance/results/pyright/generics_paramspec_components.toml index bfb866257..d42012fa5 100644 --- a/conformance/results/pyright/generics_paramspec_components.toml +++ b/conformance/results/pyright/generics_paramspec_components.toml @@ -23,3 +23,22 @@ generics_paramspec_components.py:98:20 - error: Argument of type "Literal['A']" generics_paramspec_components.py:98:25 - error: Argument of type "Literal[1]" cannot be assigned to parameter "b" of type "str"   "Literal[1]" is incompatible with "str" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['generics_paramspec_components.py:17:25 - error: "kwargs" member of ParamSpec is valid only when used with **kwargs parameter', 'generics_paramspec_components.py:17:45 - error: "args" member of ParamSpec is valid only when used with *args parameter'] +Line 20: Unexpected errors ['generics_paramspec_components.py:20:23 - error: "args" member of ParamSpec is valid only when used with *args parameter'] +Line 23: Unexpected errors ['generics_paramspec_components.py:23:28 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues)', 'generics_paramspec_components.py:23:46 - error: "args" member of ParamSpec is valid only when used with *args parameter'] +Line 26: Unexpected errors ['generics_paramspec_components.py:26:28 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues)'] +Line 30: Unexpected errors ['generics_paramspec_components.py:30:25 - error: ParamSpec "P" has no meaning in this context (reportGeneralTypeIssues)', 'generics_paramspec_components.py:30:43 - error: ParamSpec "P" has no meaning in this context (reportGeneralTypeIssues)'] +Line 35: Unexpected errors ['generics_paramspec_components.py:35:18 - error: "args" member of ParamSpec is valid only when used with *args parameter'] +Line 36: Unexpected errors ['generics_paramspec_components.py:36:20 - error: "kwargs" member of ParamSpec is valid only when used with **kwargs parameter'] +Line 38: Unexpected errors ['generics_paramspec_components.py:38:26 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues)'] +Line 41: Unexpected errors ['generics_paramspec_components.py:41:31 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues)'] +Line 49: Unexpected errors ['generics_paramspec_components.py:49:9 - error: Arguments for ParamSpec "P@decorator" are missing (reportCallIssue)'] +Line 51: Unexpected errors ['generics_paramspec_components.py:51:11 - error: Expected 0 positional arguments (reportCallIssue)'] +Line 60: Unexpected errors ['generics_paramspec_components.py:60:28 - error: Keyword parameter "s" cannot appear in signature after ParamSpec args parameter (reportGeneralTypeIssues)'] +Line 70: Unexpected errors ['generics_paramspec_components.py:70:12 - error: Expected 1 positional argument (reportCallIssue)'] +Line 72: Unexpected errors ['generics_paramspec_components.py:72:12 - error: Expected 1 positional argument (reportCallIssue)'] +Line 83: Unexpected errors ['generics_paramspec_components.py:83:19 - error: Expected 2 positional arguments (reportCallIssue)'] +Line 98: Unexpected errors ['generics_paramspec_components.py:98:20 - error: Argument of type "Literal[\\'A\\']" cannot be assigned to parameter "a" of type "int"', 'generics_paramspec_components.py:98:25 - error: Argument of type "Literal[1]" cannot be assigned to parameter "b" of type "str"'] +""" diff --git a/conformance/results/pyright/generics_paramspec_semantics.toml b/conformance/results/pyright/generics_paramspec_semantics.toml index 012580a71..c353fabef 100644 --- a/conformance/results/pyright/generics_paramspec_semantics.toml +++ b/conformance/results/pyright/generics_paramspec_semantics.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed). +notes = """Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed). """ output = """ generics_paramspec_semantics.py:26:6 - error: Expected 2 more positional arguments (reportCallIssue) @@ -31,3 +30,16 @@ generics_paramspec_semantics.py:136:2 - error: Argument of type "(**kwargs: int)   Type "(**kwargs: int) -> int" cannot be assigned to type "(int, **P@expects_int_first) -> int"     Function accepts too many positional parameters; expected 0 but received 1 (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_paramspec_semantics.py:26:6 - error: Expected 2 more positional arguments (reportCallIssue)'] +Line 27: Unexpected errors ['generics_paramspec_semantics.py:27:9 - error: Argument of type "Literal[\\'A\\']" cannot be assigned to parameter "b" of type "bool"'] +Line 46: Unexpected errors ['generics_paramspec_semantics.py:46:17 - error: Argument of type "(y: int, x: str) -> int" cannot be assigned to parameter "y" of type "(**P@func1) -> int" in function "func1"'] +Line 61: Unexpected errors ['generics_paramspec_semantics.py:61:23 - error: Argument of type "(*, y: int) -> int" cannot be assigned to parameter "y" of type "(**P@func1) -> int" in function "func1"'] +Line 97: Unexpected errors ['generics_paramspec_semantics.py:97:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str"'] +Line 107: Unexpected errors ['generics_paramspec_semantics.py:107:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter "args" of type "bool"'] +Line 119: Unexpected errors ['generics_paramspec_semantics.py:119:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str"'] +Line 126: Unexpected errors ['generics_paramspec_semantics.py:126:2 - error: Argument of type "(x: str) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first"'] +Line 131: Unexpected errors ['generics_paramspec_semantics.py:131:2 - error: Argument of type "(*, x: int) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first"'] +Line 136: Unexpected errors ['generics_paramspec_semantics.py:136:2 - error: Argument of type "(**kwargs: int) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first"'] +""" diff --git a/conformance/results/pyright/generics_paramspec_specialization.toml b/conformance/results/pyright/generics_paramspec_specialization.toml index 2f4ad5aa8..8bdaa9c63 100644 --- a/conformance/results/pyright/generics_paramspec_specialization.toml +++ b/conformance/results/pyright/generics_paramspec_specialization.toml @@ -11,3 +11,11 @@ generics_paramspec_specialization.py:61:9 - error: Argument of type "Literal[''] generics_paramspec_specialization.py:62:16 - error: Argument of type "Literal['']" cannot be assigned to parameter of type "bool"   "Literal['']" is incompatible with "bool" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 45: Unexpected errors ['generics_paramspec_specialization.py:45:27 - error: Type "int" cannot be assigned to type variable "P1@ClassA"'] +Line 55: Unexpected errors ['generics_paramspec_specialization.py:55:9 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter of type "int"'] +Line 56: Unexpected errors ['generics_paramspec_specialization.py:56:16 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter of type "bool"'] +Line 61: Unexpected errors ['generics_paramspec_specialization.py:61:9 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter of type "int"'] +Line 62: Unexpected errors ['generics_paramspec_specialization.py:62:16 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter of type "bool"'] +""" diff --git a/conformance/results/pyright/generics_scoping.toml b/conformance/results/pyright/generics_scoping.toml index 536c67e99..26886be83 100644 --- a/conformance/results/pyright/generics_scoping.toml +++ b/conformance/results/pyright/generics_scoping.toml @@ -12,3 +12,16 @@ generics_scoping.py:84:14 - error: Type variable "T" has no meaning in this cont generics_scoping.py:85:19 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues) generics_scoping.py:86:6 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Unexpected errors ['generics_scoping.py:25:10 - error: Argument of type "Literal[\\'a\\']" cannot be assigned to parameter "x" of type "int" in function "meth_2"'] +Line 46: Unexpected errors ['generics_scoping.py:46:13 - error: Type variable "S" has no meaning in this context (reportGeneralTypeIssues)'] +Line 50: Unexpected errors ['generics_scoping.py:50:19 - error: Type variable "S" has no meaning in this context (reportGeneralTypeIssues)'] +Line 61: Unexpected errors ['generics_scoping.py:61:29 - error: TypeVar "T" is already in use by an outer scope (reportGeneralTypeIssues)'] +Line 71: Unexpected errors ['generics_scoping.py:71:24 - error: TypeVar "T" is already in use by an outer scope (reportGeneralTypeIssues)'] +Line 74: Unexpected errors ['generics_scoping.py:74:17 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues)'] +Line 80: Unexpected errors ['generics_scoping.py:80:5 - error: Generic type alias within class cannot use bound type variables T'] +Line 84: Unexpected errors ['generics_scoping.py:84:14 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues)'] +Line 85: Unexpected errors ['generics_scoping.py:85:19 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues)'] +Line 86: Unexpected errors ['generics_scoping.py:86:6 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/generics_self_advanced.toml b/conformance/results/pyright/generics_self_advanced.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/generics_self_advanced.toml +++ b/conformance/results/pyright/generics_self_advanced.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/generics_self_attributes.toml b/conformance/results/pyright/generics_self_attributes.toml index 4f368ac29..2164f3d2d 100644 --- a/conformance/results/pyright/generics_self_attributes.toml +++ b/conformance/results/pyright/generics_self_attributes.toml @@ -12,3 +12,8 @@ generics_self_attributes.py:32:8 - error: Cannot assign member "next" for type "       "LinkedList[int]" is incompatible with "OrdinalLinkedList"       "LinkedList[int]" is incompatible with "None" (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_self_attributes.py:26:38 - error: Argument of type "LinkedList[int]" cannot be assigned to parameter "next" of type "OrdinalLinkedList | None" in function "__init__"'] +Line 32: Unexpected errors ['generics_self_attributes.py:32:8 - error: Cannot assign member "next" for type "OrdinalLinkedList"'] +""" diff --git a/conformance/results/pyright/generics_self_basic.toml b/conformance/results/pyright/generics_self_basic.toml index 6f7e25be3..4e62ea980 100644 --- a/conformance/results/pyright/generics_self_basic.toml +++ b/conformance/results/pyright/generics_self_basic.toml @@ -6,3 +6,9 @@ generics_self_basic.py:32:16 - error: Expression of type "Shape" cannot be assig   Type "Shape" cannot be assigned to type "Self@Shape" (reportReturnType) generics_self_basic.py:64:31 - error: Expected no type arguments for class "Self" (reportInvalidTypeArguments) """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['generics_self_basic.py:19:16 - error: Expression of type "Shape" cannot be assigned to return type "Self@Shape"'] +Line 32: Unexpected errors ['generics_self_basic.py:32:16 - error: Expression of type "Shape" cannot be assigned to return type "Self@Shape"'] +Line 64: Unexpected errors ['generics_self_basic.py:64:31 - error: Expected no type arguments for class "Self" (reportInvalidTypeArguments)'] +""" diff --git a/conformance/results/pyright/generics_self_protocols.toml b/conformance/results/pyright/generics_self_protocols.toml index 81021b78f..50e9b872a 100644 --- a/conformance/results/pyright/generics_self_protocols.toml +++ b/conformance/results/pyright/generics_self_protocols.toml @@ -13,3 +13,8 @@ generics_self_protocols.py:64:19 - error: Argument of type "ReturnDifferentClass         Function return type "ReturnConcreteShape" is incompatible with type "ReturnDifferentClass"           "ReturnConcreteShape" is incompatible with "ReturnDifferentClass" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 61: Unexpected errors ['generics_self_protocols.py:61:19 - error: Argument of type "BadReturnType" cannot be assigned to parameter "shape" of type "ShapeProtocol" in function "accepts_shape"'] +Line 64: Unexpected errors ['generics_self_protocols.py:64:19 - error: Argument of type "ReturnDifferentClass" cannot be assigned to parameter "shape" of type "ShapeProtocol" in function "accepts_shape"'] +""" diff --git a/conformance/results/pyright/generics_self_usage.toml b/conformance/results/pyright/generics_self_usage.toml index f8c401f03..954f4e269 100644 --- a/conformance/results/pyright/generics_self_usage.toml +++ b/conformance/results/pyright/generics_self_usage.toml @@ -17,3 +17,17 @@ generics_self_usage.py:116:40 - error: "Self" is not valid in this context (repo generics_self_usage.py:121:37 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues) generics_self_usage.py:125:42 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 73: Unexpected errors ['generics_self_usage.py:73:14 - error: "Self" is not valid in this context (reportGeneralTypeIssues)', 'generics_self_usage.py:73:23 - error: "Self" is not valid in this context (reportGeneralTypeIssues)'] +Line 76: Unexpected errors ['generics_self_usage.py:76:6 - error: "Self" is not valid in this context (reportGeneralTypeIssues)'] +Line 82: Unexpected errors ['generics_self_usage.py:82:54 - error: "Self" cannot be used in a function with a `self` or `cls` parameter that has a type annotation other than "Self" (reportGeneralTypeIssues)'] +Line 86: Unexpected errors ['generics_self_usage.py:86:16 - error: Expression of type "Foo3" cannot be assigned to return type "Self@Foo3"'] +Line 101: Unexpected errors ['generics_self_usage.py:101:15 - error: "Self" is not valid in this context (reportGeneralTypeIssues)'] +Line 103: Unexpected errors ['generics_self_usage.py:103:12 - error: "Self" is not valid in this context (reportGeneralTypeIssues)'] +Line 106: Unexpected errors ['generics_self_usage.py:106:30 - error: "Self" is not valid in this context (reportGeneralTypeIssues)'] +Line 111: Unexpected errors ['generics_self_usage.py:111:19 - error: "Self" is not valid in this context (reportGeneralTypeIssues)'] +Line 116: Unexpected errors ['generics_self_usage.py:116:31 - error: "Self" is not valid in this context (reportGeneralTypeIssues)', 'generics_self_usage.py:116:40 - error: "Self" is not valid in this context (reportGeneralTypeIssues)'] +Line 121: Unexpected errors ['generics_self_usage.py:121:37 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues)'] +Line 125: Unexpected errors ['generics_self_usage.py:125:42 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/generics_syntax_compatibility.toml b/conformance/results/pyright/generics_syntax_compatibility.toml index 533aef8ae..72fa08062 100644 --- a/conformance/results/pyright/generics_syntax_compatibility.toml +++ b/conformance/results/pyright/generics_syntax_compatibility.toml @@ -4,3 +4,8 @@ generics_syntax_compatibility.py:14:22 - error: Type parameter "K" is not includ generics_syntax_compatibility.py:26:35 - error: Type parameter "K" is not included in the type parameter list for "method2" (reportGeneralTypeIssues) generics_syntax_compatibility.py:26:45 - error: Type parameter "K" is not included in the type parameter list for "method2" (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_syntax_compatibility.py:14:22 - error: Type parameter "K" is not included in the type parameter list for "ClassA" (reportGeneralTypeIssues)'] +Line 26: Unexpected errors ['generics_syntax_compatibility.py:26:35 - error: Type parameter "K" is not included in the type parameter list for "method2" (reportGeneralTypeIssues)', 'generics_syntax_compatibility.py:26:45 - error: Type parameter "K" is not included in the type parameter list for "method2" (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/generics_syntax_declarations.toml b/conformance/results/pyright/generics_syntax_declarations.toml index 4d8c398f5..b783178f1 100644 --- a/conformance/results/pyright/generics_syntax_declarations.toml +++ b/conformance/results/pyright/generics_syntax_declarations.toml @@ -12,3 +12,16 @@ generics_syntax_declarations.py:73:17 - error: Expected type expression but rece generics_syntax_declarations.py:77:18 - error: Expected type expression but received "Literal[3]" (reportGeneralTypeIssues) generics_syntax_declarations.py:81:23 - error: "S" is not defined (reportUndefinedVariable) """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['generics_syntax_declarations.py:19:17 - error: "Generic" base class cannot be used with type parameter syntax (reportGeneralTypeIssues)'] +Line 27: Unexpected errors ['generics_syntax_declarations.py:27:20 - error: Type arguments are not allowed with Protocol class when using type parameter syntax (reportGeneralTypeIssues)'] +Line 34: Unexpected errors ['generics_syntax_declarations.py:34:11 - error: Cannot access member "is_integer" for type "str*"'] +Line 46: Unexpected errors ['generics_syntax_declarations.py:46:21 - error: TypeVar constraint type cannot be generic'] +Line 50: Unexpected errors ['generics_syntax_declarations.py:50:17 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues)'] +Line 62: Unexpected errors ['generics_syntax_declarations.py:62:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues)'] +Line 66: Unexpected errors ['generics_syntax_declarations.py:66:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues)'] +Line 73: Unexpected errors ['generics_syntax_declarations.py:73:17 - error: Expected type expression but received "tuple[type[bytes], type[str]]" (reportGeneralTypeIssues)'] +Line 77: Unexpected errors ['generics_syntax_declarations.py:77:18 - error: Expected type expression but received "Literal[3]" (reportGeneralTypeIssues)'] +Line 81: Unexpected errors ['generics_syntax_declarations.py:81:23 - error: "S" is not defined (reportUndefinedVariable)'] +""" diff --git a/conformance/results/pyright/generics_syntax_infer_variance.toml b/conformance/results/pyright/generics_syntax_infer_variance.toml index 70cc41f7f..3aa5dfd27 100644 --- a/conformance/results/pyright/generics_syntax_infer_variance.toml +++ b/conformance/results/pyright/generics_syntax_infer_variance.toml @@ -61,3 +61,25 @@ generics_syntax_infer_variance.py:152:45 - error: Expression of type "ShouldBeCo     Type parameter "T@ShouldBeContravariant1" is contravariant, but "int" is not a supertype of "float"       "float" is incompatible with "int" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['generics_syntax_infer_variance.py:16:42 - error: TypeVar cannot be both covariant and contravariant'] +Line 20: Unexpected errors ['generics_syntax_infer_variance.py:20:46 - error: TypeVar cannot be both covariant and contravariant'] +Line 33: Unexpected errors ['generics_syntax_infer_variance.py:33:35 - error: Expression of type "ShouldBeCovariant1[float]" cannot be assigned to declared type "ShouldBeCovariant1[int]"'] +Line 41: Unexpected errors ['generics_syntax_infer_variance.py:41:35 - error: Expression of type "ShouldBeCovariant2[float]" cannot be assigned to declared type "ShouldBeCovariant2[int]"'] +Line 50: Unexpected errors ['generics_syntax_infer_variance.py:50:35 - error: Expression of type "ShouldBeCovariant3[float]" cannot be assigned to declared type "ShouldBeCovariant3[int]"'] +Line 59: Unexpected errors ['generics_syntax_infer_variance.py:59:34 - error: Expression of type "ShouldBeCovariant4[float]" cannot be assigned to declared type "ShouldBeCovariant4[int]"'] +Line 72: Unexpected errors ['generics_syntax_infer_variance.py:72:34 - error: Expression of type "ShouldBeCovariant5[float]" cannot be assigned to declared type "ShouldBeCovariant5[int]"'] +Line 83: Unexpected errors ['generics_syntax_infer_variance.py:83:34 - error: Expression of type "ShouldBeCovariant6[float]" cannot be assigned to declared type "ShouldBeCovariant6[int]"'] +Line 99: Unexpected errors ['generics_syntax_infer_variance.py:99:38 - error: Expression of type "ShouldBeInvariant1[int]" cannot be assigned to declared type "ShouldBeInvariant1[float]"'] +Line 100: Unexpected errors ['generics_syntax_infer_variance.py:100:36 - error: Expression of type "ShouldBeInvariant1[float]" cannot be assigned to declared type "ShouldBeInvariant1[int]"'] +Line 114: Unexpected errors ['generics_syntax_infer_variance.py:114:38 - error: Expression of type "ShouldBeInvariant2[int]" cannot be assigned to declared type "ShouldBeInvariant2[float]"'] +Line 115: Unexpected errors ['generics_syntax_infer_variance.py:115:36 - error: Expression of type "ShouldBeInvariant2[float]" cannot be assigned to declared type "ShouldBeInvariant2[int]"'] +Line 122: Unexpected errors ['generics_syntax_infer_variance.py:122:43 - error: Expression of type "ShouldBeInvariant3[int, str]" cannot be assigned to declared type "ShouldBeInvariant3[float, str]"'] +Line 123: Unexpected errors ['generics_syntax_infer_variance.py:123:41 - error: Expression of type "ShouldBeInvariant3[float, str]" cannot be assigned to declared type "ShouldBeInvariant3[int, str]"'] +Line 124: Unexpected errors ['generics_syntax_infer_variance.py:124:43 - error: Expression of type "ShouldBeInvariant3[str, int]" cannot be assigned to declared type "ShouldBeInvariant3[str, float]"'] +Line 125: Unexpected errors ['generics_syntax_infer_variance.py:125:41 - error: Expression of type "ShouldBeInvariant3[str, float]" cannot be assigned to declared type "ShouldBeInvariant3[str, int]"'] +Line 133: Unexpected errors ['generics_syntax_infer_variance.py:133:38 - error: Expression of type "ShouldBeInvariant4[int]" cannot be assigned to declared type "ShouldBeInvariant4[float]"'] +Line 141: Unexpected errors ['generics_syntax_infer_variance.py:141:38 - error: Expression of type "ShouldBeInvariant5[int]" cannot be assigned to declared type "ShouldBeInvariant5[float]"'] +Line 152: Unexpected errors ['generics_syntax_infer_variance.py:152:45 - error: Expression of type "ShouldBeContravariant1[int]" cannot be assigned to declared type "ShouldBeContravariant1[float]"'] +""" diff --git a/conformance/results/pyright/generics_syntax_scoping.toml b/conformance/results/pyright/generics_syntax_scoping.toml index 4969c8f13..8186d6890 100644 --- a/conformance/results/pyright/generics_syntax_scoping.toml +++ b/conformance/results/pyright/generics_syntax_scoping.toml @@ -11,3 +11,15 @@ generics_syntax_scoping.py:95:17 - error: Type parameter "T" is already in use generics_syntax_scoping.py:98:17 - error: Type parameter "T" is already in use generics_syntax_scoping.py:98:29 - error: Variable not allowed in type expression (reportInvalidTypeForm) """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_syntax_scoping.py:14:29 - error: "S" is not defined (reportUndefinedVariable)'] +Line 18: Unexpected errors ['generics_syntax_scoping.py:18:26 - error: "T" is not defined (reportUndefinedVariable)'] +Line 35: Unexpected errors ['generics_syntax_scoping.py:35:7 - error: "T" is not defined (reportUndefinedVariable)'] +Line 44: Unexpected errors ['generics_syntax_scoping.py:44:17 - error: "T" is not defined (reportUndefinedVariable)'] +Line 62: Unexpected errors ['generics_syntax_scoping.py:62:25 - error: "assert_type" mismatch: expected "str" but received "Literal[\\'\\']" (reportAssertTypeFailure)'] +Line 67: Unexpected errors ['generics_syntax_scoping.py:67:25 - error: "assert_type" mismatch: expected "int" but received "Literal[0]" (reportAssertTypeFailure)'] +Line 92: Unexpected errors ['generics_syntax_scoping.py:92:17 - error: Type parameter "T" is already in use'] +Line 95: Unexpected errors ['generics_syntax_scoping.py:95:17 - error: Type parameter "T" is already in use'] +Line 98: Unexpected errors ['generics_syntax_scoping.py:98:17 - error: Type parameter "T" is already in use', 'generics_syntax_scoping.py:98:29 - error: Variable not allowed in type expression (reportInvalidTypeForm)'] +""" diff --git a/conformance/results/pyright/generics_type_erasure.toml b/conformance/results/pyright/generics_type_erasure.toml index c73e3d1c4..8c93af29a 100644 --- a/conformance/results/pyright/generics_type_erasure.toml +++ b/conformance/results/pyright/generics_type_erasure.toml @@ -14,3 +14,13 @@ generics_type_erasure.py:42:6 - error: Access to generic instance variable throu generics_type_erasure.py:43:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues) generics_type_erasure.py:44:10 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['generics_type_erasure.py:36:16 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter "label" of type "int | None" in function "__init__"'] +Line 38: Unexpected errors ['generics_type_erasure.py:38:16 - error: Argument of type "Literal[0]" cannot be assigned to parameter "label" of type "str | None" in function "__init__"'] +Line 40: Unexpected errors ['generics_type_erasure.py:40:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)'] +Line 41: Unexpected errors ['generics_type_erasure.py:41:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)'] +Line 42: Unexpected errors ['generics_type_erasure.py:42:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)'] +Line 43: Unexpected errors ['generics_type_erasure.py:43:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)'] +Line 44: Unexpected errors ['generics_type_erasure.py:44:10 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/generics_typevartuple_args.toml b/conformance/results/pyright/generics_typevartuple_args.toml index bb47ac592..1ea5f2394 100644 --- a/conformance/results/pyright/generics_typevartuple_args.toml +++ b/conformance/results/pyright/generics_typevartuple_args.toml @@ -17,3 +17,15 @@ generics_typevartuple_args.py:75:13 - error: Argument of type "tuple[Literal[1], generics_typevartuple_args.py:76:14 - error: Argument of type "tuple[Literal['1']]" cannot be assigned to parameter "args" of type "tuple[*Ts@func4]" in function "func4"   "Literal['1']" is incompatible with "int" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Unexpected errors ['generics_typevartuple_args.py:33:16 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter of type "Env" in function "exec_le"'] +Line 34: Unexpected errors ['generics_typevartuple_args.py:34:16 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter of type "Env" in function "exec_le"'] +Line 48: Unexpected errors ['generics_typevartuple_args.py:48:10 - error: Argument of type "Literal[\\'2\\']" cannot be assigned to parameter of type "int" in function "func1"'] +Line 57: Unexpected errors ['generics_typevartuple_args.py:57:10 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str" in function "func2"'] +Line 58: Unexpected errors ['generics_typevartuple_args.py:58:1 - error: Argument missing for parameter "args[2]" (reportCallIssue)'] +Line 59: Unexpected errors ['generics_typevartuple_args.py:59:1 - error: Argument missing for parameter "args[2]" (reportCallIssue)'] +Line 67: Unexpected errors ['generics_typevartuple_args.py:67:1 - error: Argument missing for parameter "args[1]" (reportCallIssue)'] +Line 75: Unexpected errors ['generics_typevartuple_args.py:75:13 - error: Argument of type "tuple[Literal[1], Literal[2]]" cannot be assigned to parameter "args" of type "tuple[*Ts@func4]" in function "func4"'] +Line 76: Unexpected errors ['generics_typevartuple_args.py:76:14 - error: Argument of type "tuple[Literal[\\'1\\']]" cannot be assigned to parameter "args" of type "tuple[*Ts@func4]" in function "func4"'] +""" diff --git a/conformance/results/pyright/generics_typevartuple_basic.toml b/conformance/results/pyright/generics_typevartuple_basic.toml index 29621377a..15dee93c3 100644 --- a/conformance/results/pyright/generics_typevartuple_basic.toml +++ b/conformance/results/pyright/generics_typevartuple_basic.toml @@ -30,3 +30,21 @@ generics_typevartuple_basic.py:100:17 - error: Argument of type "Array[Height, W generics_typevartuple_basic.py:106:14 - error: Generic class can have at most one TypeVarTuple type parameter but received multiple ("Ts1", "Ts2") (reportGeneralTypeIssues) generics_typevartuple_basic.py:106:29 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple """ +conformance_automated = "Fail" +errors_diff = """ +Line 42: Unexpected errors ['generics_typevartuple_basic.py:42:34 - error: Argument of type "Height" cannot be assigned to parameter "shape" of type "tuple[*Shape@Array]" in function "__init__"'] +Line 43: Unexpected errors ['generics_typevartuple_basic.py:43:35 - error: Expression of type "Array[Batch, Width]" cannot be assigned to declared type "Array[Batch, Height, Width]"'] +Line 44: Unexpected errors ['generics_typevartuple_basic.py:44:41 - error: Expression of type "Array[Time, Batch, Width, Height]" cannot be assigned to declared type "Array[Time, Batch, Height, Width]"'] +Line 52: Unexpected errors ['generics_typevartuple_basic.py:52:22 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape'] +Line 53: Unexpected errors ['generics_typevartuple_basic.py:53:37 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape'] +Line 56: Unexpected errors ['generics_typevartuple_basic.py:56:34 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape'] +Line 59: Unexpected errors ['generics_typevartuple_basic.py:59:24 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape'] +Line 65: Unexpected errors ['generics_typevartuple_basic.py:65:27 - error: "covariant" is unknown parameter to TypeVarTuple'] +Line 66: Unexpected errors ['generics_typevartuple_basic.py:66:27 - error: TypeVarTuple cannot have value constraints', 'generics_typevartuple_basic.py:66:32 - error: TypeVarTuple cannot have value constraints'] +Line 67: Unexpected errors ['generics_typevartuple_basic.py:67:27 - error: "bound" is unknown parameter to TypeVarTuple'] +Line 89: Unexpected errors ['generics_typevartuple_basic.py:89:14 - error: Argument of type "tuple[Literal[\\'0\\']]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"'] +Line 90: Unexpected errors ['generics_typevartuple_basic.py:90:15 - error: Argument of type "tuple[Literal[0]]" cannot be assigned to parameter "arg2" of type "tuple[*Ts@func2]" in function "func2"'] +Line 99: Unexpected errors ['generics_typevartuple_basic.py:99:17 - error: Argument of type "Array[Width]" cannot be assigned to parameter "y" of type "Array[*Shape@multiply]" in function "multiply"'] +Line 100: Unexpected errors ['generics_typevartuple_basic.py:100:17 - error: Argument of type "Array[Height, Width]" cannot be assigned to parameter "y" of type "Array[*Shape@multiply]" in function "multiply"'] +Line 106: Unexpected errors ['generics_typevartuple_basic.py:106:14 - error: Generic class can have at most one TypeVarTuple type parameter but received multiple ("Ts1", "Ts2") (reportGeneralTypeIssues)', 'generics_typevartuple_basic.py:106:29 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +""" diff --git a/conformance/results/pyright/generics_typevartuple_callable.toml b/conformance/results/pyright/generics_typevartuple_callable.toml index ae68a0e07..bf45367fb 100644 --- a/conformance/results/pyright/generics_typevartuple_callable.toml +++ b/conformance/results/pyright/generics_typevartuple_callable.toml @@ -4,3 +4,7 @@ generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal   "Literal['']" is incompatible with "int"   "Literal[0]" is incompatible with "str" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[\\'\\'], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"'] +""" diff --git a/conformance/results/pyright/generics_typevartuple_concat.toml b/conformance/results/pyright/generics_typevartuple_concat.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/generics_typevartuple_concat.toml +++ b/conformance/results/pyright/generics_typevartuple_concat.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/generics_typevartuple_overloads.toml b/conformance/results/pyright/generics_typevartuple_overloads.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/generics_typevartuple_overloads.toml +++ b/conformance/results/pyright/generics_typevartuple_overloads.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/generics_typevartuple_specialization.toml b/conformance/results/pyright/generics_typevartuple_specialization.toml index d541b2c6e..a3b107b78 100644 --- a/conformance/results/pyright/generics_typevartuple_specialization.toml +++ b/conformance/results/pyright/generics_typevartuple_specialization.toml @@ -11,3 +11,12 @@ generics_typevartuple_specialization.py:127:9 - error: Too few type arguments pr generics_typevartuple_specialization.py:163:14 - error: Could not specialize type "TA11[T@TA11, *Ts1@TA11]"   Unpacked arguments cannot be used in type argument lists """ +conformance_automated = "Fail" +errors_diff = """ +Line 109: Unexpected errors ['generics_typevartuple_specialization.py:109:18 - error: Type variable "Ts" has no meaning in this context (reportGeneralTypeIssues)', 'generics_typevartuple_specialization.py:109:18 - error: Could not specialize type "IntTupleGeneric[T@IntTupleGeneric]"'] +Line 110: Unexpected errors ['generics_typevartuple_specialization.py:110:18 - error: Could not specialize type "IntTupleGeneric[T@IntTupleGeneric]"'] +Line 121: Unexpected errors ['generics_typevartuple_specialization.py:121:27 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +Line 122: Unexpected errors ['generics_typevartuple_specialization.py:122:27 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +Line 127: Unexpected errors ['generics_typevartuple_specialization.py:127:9 - error: Too few type arguments provided for "TA7[*Ts@TA7, T1@TA7, T2@TA7]"; expected 3 but received 2'] +Line 163: Unexpected errors ['generics_typevartuple_specialization.py:163:14 - error: Could not specialize type "TA11[T@TA11, *Ts1@TA11]"'] +""" diff --git a/conformance/results/pyright/generics_typevartuple_unpack.toml b/conformance/results/pyright/generics_typevartuple_unpack.toml index 39c25839b..23f900a25 100644 --- a/conformance/results/pyright/generics_typevartuple_unpack.toml +++ b/conformance/results/pyright/generics_typevartuple_unpack.toml @@ -4,3 +4,7 @@ generics_typevartuple_unpack.py:30:28 - error: Argument of type "Array[Batch]" c   "Array[Batch]" is incompatible with "Array[Batch, *tuple[Any, ...], Channels]"     Type parameter "Ts@Array" is invariant, but "*tuple[Batch]" is not the same as "*tuple[Batch, *tuple[Any, ...], Channels]" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['generics_typevartuple_unpack.py:30:28 - error: Argument of type "Array[Batch]" cannot be assigned to parameter "x" of type "Array[Batch, *tuple[Any, ...], Channels]" in function "process_batch_channels"'] +""" diff --git a/conformance/results/pyright/generics_upper_bound.toml b/conformance/results/pyright/generics_upper_bound.toml index 6cd0ae334..634197eca 100644 --- a/conformance/results/pyright/generics_upper_bound.toml +++ b/conformance/results/pyright/generics_upper_bound.toml @@ -12,3 +12,9 @@ generics_upper_bound.py:43:11 - error: Argument of type "Literal[3]" cannot be a       "__len__" is not present (reportArgumentType) generics_upper_bound.py:48:44 - error: TypeVar cannot be both bound and constrained """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['generics_upper_bound.py:22:34 - error: TypeVar bound type cannot be generic', 'generics_upper_bound.py:22:39 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues)'] +Line 43: Unexpected errors ['generics_upper_bound.py:43:8 - error: Argument of type "Literal[3]" cannot be assigned to parameter "x" of type "ST@longer" in function "longer"', 'generics_upper_bound.py:43:11 - error: Argument of type "Literal[3]" cannot be assigned to parameter "y" of type "ST@longer" in function "longer"'] +Line 48: Unexpected errors ['generics_upper_bound.py:48:44 - error: TypeVar cannot be both bound and constrained'] +""" diff --git a/conformance/results/pyright/generics_variance.toml b/conformance/results/pyright/generics_variance.toml index 7fc32ad62..139477bf5 100644 --- a/conformance/results/pyright/generics_variance.toml +++ b/conformance/results/pyright/generics_variance.toml @@ -26,3 +26,19 @@ generics_variance.py:191:43 - error: Could not specialize type "Contra_TA[T_cont generics_variance.py:196:15 - error: Could not specialize type "Contra_TA[T_contra@Contra_TA]"   Variance of type argument "Contra_TA[Contra_TA[T_co@ContraToContraToContra_WithTA]]" is incompatible with "T_contra@Contra_TA" """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['generics_variance.py:14:50 - error: TypeVar cannot be both covariant and contravariant'] +Line 77: Unexpected errors ['generics_variance.py:77:18 - error: Type "T_co@Class1" cannot be assigned to type variable "T@Inv"'] +Line 81: Unexpected errors ['generics_variance.py:81:18 - error: Type "T_contra@Class2" cannot be assigned to type variable "T@Inv"'] +Line 93: Unexpected errors ['generics_variance.py:93:20 - error: Type "T_contra@Co_Child3" cannot be assigned to type variable "T_co@Co"'] +Line 105: Unexpected errors ['generics_variance.py:105:28 - error: Type "T_co@Contra_Child3" cannot be assigned to type variable "T_contra@Contra"'] +Line 113: Unexpected errors ['generics_variance.py:113:28 - error: Type "Co[T_co@Contra_Child5]" cannot be assigned to type variable "T_contra@Contra"'] +Line 126: Unexpected errors ['generics_variance.py:126:20 - error: Type "T_co@CoContra_Child2" cannot be assigned to type variable "T_contra@CoContra"'] +Line 132: Unexpected errors ['generics_variance.py:132:14 - error: Type "T_contra@CoContra_Child3" cannot be assigned to type variable "T_co@CoContra"'] +Line 142: Unexpected errors ['generics_variance.py:142:24 - error: Type "Co[T_co@CoContra_Child5]" cannot be assigned to type variable "T_contra@CoContra"'] +Line 163: Unexpected errors ['generics_variance.py:163:33 - error: Type "Co[Contra[T_contra@CoToContraToContra]]" cannot be assigned to type variable "T_contra@Contra"'] +Line 167: Unexpected errors ['generics_variance.py:167:37 - error: Type "Contra[Contra[T_co@ContraToContraToContra]]" cannot be assigned to type variable "T_contra@Contra"'] +Line 191: Unexpected errors ['generics_variance.py:191:43 - error: Could not specialize type "Contra_TA[T_contra@Contra_TA]"'] +Line 196: Unexpected errors ['generics_variance.py:196:15 - error: Could not specialize type "Contra_TA[T_contra@Contra_TA]"'] +""" diff --git a/conformance/results/pyright/generics_variance_inference.toml b/conformance/results/pyright/generics_variance_inference.toml index 3409e25df..aec981404 100644 --- a/conformance/results/pyright/generics_variance_inference.toml +++ b/conformance/results/pyright/generics_variance_inference.toml @@ -80,3 +80,29 @@ generics_variance_inference.py:194:37 - error: Expression of type "ShouldBeContr     Type parameter "T@ShouldBeContravariant2" is contravariant, but "int" is not a supertype of "float"       "float" is incompatible with "int" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['generics_variance_inference.py:24:33 - error: Expression of type "ClassA[float, int, int]" cannot be assigned to declared type "ClassA[int, int, int]"'] +Line 25: Unexpected errors ['generics_variance_inference.py:25:37 - error: Expression of type "ClassA[float, int, int]" cannot be assigned to declared type "ClassA[float, float, int]"'] +Line 28: Unexpected errors ['generics_variance_inference.py:28:33 - error: Expression of type "ClassA[int, float, float]" cannot be assigned to declared type "ClassA[int, int, int]"'] +Line 41: Unexpected errors ['generics_variance_inference.py:41:35 - error: Expression of type "ShouldBeCovariant1[float]" cannot be assigned to declared type "ShouldBeCovariant1[int]"'] +Line 49: Unexpected errors ['generics_variance_inference.py:49:35 - error: Expression of type "ShouldBeCovariant2[float]" cannot be assigned to declared type "ShouldBeCovariant2[int]"'] +Line 58: Unexpected errors ['generics_variance_inference.py:58:35 - error: Expression of type "ShouldBeCovariant3[float]" cannot be assigned to declared type "ShouldBeCovariant3[int]"'] +Line 67: Unexpected errors ['generics_variance_inference.py:67:34 - error: Expression of type "ShouldBeCovariant4[float]" cannot be assigned to declared type "ShouldBeCovariant4[int]"'] +Line 80: Unexpected errors ['generics_variance_inference.py:80:34 - error: Expression of type "ShouldBeCovariant5[float]" cannot be assigned to declared type "ShouldBeCovariant5[int]"'] +Line 96: Unexpected errors ['generics_variance_inference.py:96:38 - error: Expression of type "ShouldBeInvariant1[int]" cannot be assigned to declared type "ShouldBeInvariant1[float]"'] +Line 97: Unexpected errors ['generics_variance_inference.py:97:36 - error: Expression of type "ShouldBeInvariant1[float]" cannot be assigned to declared type "ShouldBeInvariant1[int]"'] +Line 111: Unexpected errors ['generics_variance_inference.py:111:38 - error: Expression of type "ShouldBeInvariant2[int]" cannot be assigned to declared type "ShouldBeInvariant2[float]"'] +Line 112: Unexpected errors ['generics_variance_inference.py:112:36 - error: Expression of type "ShouldBeInvariant2[float]" cannot be assigned to declared type "ShouldBeInvariant2[int]"'] +Line 119: Unexpected errors ['generics_variance_inference.py:119:43 - error: Expression of type "ShouldBeInvariant3[int, str]" cannot be assigned to declared type "ShouldBeInvariant3[float, str]"'] +Line 120: Unexpected errors ['generics_variance_inference.py:120:41 - error: Expression of type "ShouldBeInvariant3[float, str]" cannot be assigned to declared type "ShouldBeInvariant3[int, str]"'] +Line 121: Unexpected errors ['generics_variance_inference.py:121:43 - error: Expression of type "ShouldBeInvariant3[str, int]" cannot be assigned to declared type "ShouldBeInvariant3[str, float]"'] +Line 122: Unexpected errors ['generics_variance_inference.py:122:41 - error: Expression of type "ShouldBeInvariant3[str, float]" cannot be assigned to declared type "ShouldBeInvariant3[str, int]"'] +Line 130: Unexpected errors ['generics_variance_inference.py:130:38 - error: Expression of type "ShouldBeInvariant4[int]" cannot be assigned to declared type "ShouldBeInvariant4[float]"'] +Line 138: Unexpected errors ['generics_variance_inference.py:138:38 - error: Expression of type "ShouldBeInvariant5[int]" cannot be assigned to declared type "ShouldBeInvariant5[float]"'] +Line 149: Unexpected errors ['generics_variance_inference.py:149:45 - error: Expression of type "ShouldBeContravariant1[int]" cannot be assigned to declared type "ShouldBeContravariant1[float]"'] +Line 169: Unexpected errors ['generics_variance_inference.py:169:31 - error: Expression of type "ShouldBeInvariant6[float]" cannot be assigned to declared type "ShouldBeInvariant6[int]"'] +Line 170: Unexpected errors ['generics_variance_inference.py:170:33 - error: Expression of type "ShouldBeInvariant6[int]" cannot be assigned to declared type "ShouldBeInvariant6[float]"'] +Line 181: Unexpected errors ['generics_variance_inference.py:181:31 - error: Expression of type "ShouldBeCovariant6[float]" cannot be assigned to declared type "ShouldBeCovariant6[int]"'] +Line 194: Unexpected errors ['generics_variance_inference.py:194:37 - error: Expression of type "ShouldBeContravariant2[int]" cannot be assigned to declared type "ShouldBeContravariant2[float]"'] +""" diff --git a/conformance/results/pyright/historical_positional.toml b/conformance/results/pyright/historical_positional.toml index 1ee2ac4b8..04c490bea 100644 --- a/conformance/results/pyright/historical_positional.toml +++ b/conformance/results/pyright/historical_positional.toml @@ -1,7 +1,14 @@ -conformant="Pass" +conformant = "Pass" output = """ historical_positional.py:18:8 - error: Expected 1 more positional argument (reportCallIssue) historical_positional.py:26:16 - error: Position-only parameter not allowed after parameter that is not position-only (reportGeneralTypeIssues) historical_positional.py:38:26 - error: Position-only parameter not allowed after parameter that is not position-only (reportGeneralTypeIssues) historical_positional.py:43:10 - error: Expected 1 more positional argument (reportCallIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 18: Unexpected errors ['historical_positional.py:18:8 - error: Expected 1 more positional argument (reportCallIssue)'] +Line 26: Unexpected errors ['historical_positional.py:26:16 - error: Position-only parameter not allowed after parameter that is not position-only (reportGeneralTypeIssues)'] +Line 38: Unexpected errors ['historical_positional.py:38:26 - error: Position-only parameter not allowed after parameter that is not position-only (reportGeneralTypeIssues)'] +Line 43: Unexpected errors ['historical_positional.py:43:10 - error: Expected 1 more positional argument (reportCallIssue)'] +""" diff --git a/conformance/results/pyright/literals_interactions.toml b/conformance/results/pyright/literals_interactions.toml index 203a7064d..c2478c055 100644 --- a/conformance/results/pyright/literals_interactions.toml +++ b/conformance/results/pyright/literals_interactions.toml @@ -5,3 +5,10 @@ literals_interactions.py:16:5 - error: Index -5 is out of range for type tuple[i literals_interactions.py:17:5 - error: Index 4 is out of range for type tuple[int, str, list[bool]] (reportGeneralTypeIssues) literals_interactions.py:18:5 - error: Index -4 is out of range for type tuple[int, str, list[bool]] (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['literals_interactions.py:15:5 - error: Index 5 is out of range for type tuple[int, str, list[bool]] (reportGeneralTypeIssues)'] +Line 16: Unexpected errors ['literals_interactions.py:16:5 - error: Index -5 is out of range for type tuple[int, str, list[bool]] (reportGeneralTypeIssues)'] +Line 17: Unexpected errors ['literals_interactions.py:17:5 - error: Index 4 is out of range for type tuple[int, str, list[bool]] (reportGeneralTypeIssues)'] +Line 18: Unexpected errors ['literals_interactions.py:18:5 - error: Index -4 is out of range for type tuple[int, str, list[bool]] (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/literals_literalstring.toml b/conformance/results/pyright/literals_literalstring.toml index ea9734e6b..f8d67f571 100644 --- a/conformance/results/pyright/literals_literalstring.toml +++ b/conformance/results/pyright/literals_literalstring.toml @@ -23,3 +23,16 @@ literals_literalstring.py:166:21 - error: Expression of type "list[LiteralString     Type parameter "_T@list" is invariant, but "LiteralString" is not the same as "str"     Consider switching from "list" to "Sequence" which is covariant (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['literals_literalstring.py:36:29 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 37: Unexpected errors ['literals_literalstring.py:37:22 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 43: Unexpected errors ['literals_literalstring.py:43:23 - error: Expression of type "Literal[\\'two\\']" cannot be assigned to declared type "Literal[\\'\\']"'] +Line 66: Unexpected errors ['literals_literalstring.py:66:25 - error: Expression of type "str" cannot be assigned to declared type "LiteralString"'] +Line 74: Unexpected errors ['literals_literalstring.py:74:25 - error: Expression of type "Literal[3]" cannot be assigned to declared type "LiteralString"'] +Line 75: Unexpected errors ['literals_literalstring.py:75:25 - error: Expression of type "Literal[b"test"]" cannot be assigned to declared type "LiteralString"'] +Line 120: Unexpected errors ['literals_literalstring.py:120:22 - error: Argument of type "str" cannot be assigned to parameter "s" of type "TLiteral@literal_identity" in function "literal_identity"'] +Line 134: Unexpected errors ['literals_literalstring.py:134:51 - error: Argument of type "str" cannot be assigned to parameter "value" of type "T@Container" in function "__init__"'] +Line 142: Unexpected errors ['literals_literalstring.py:142:5 - error: Overload 1 for "func8" overlaps overload 2 and returns an incompatible type (reportOverlappingOverload)', 'literals_literalstring.py:142:5 - error: Overload 1 for "func8" overlaps overload 3 and returns an incompatible type (reportOverlappingOverload)'] +Line 166: Unexpected errors ['literals_literalstring.py:166:21 - error: Expression of type "list[LiteralString]" cannot be assigned to declared type "list[str]"'] +""" diff --git a/conformance/results/pyright/literals_parameterizations.toml b/conformance/results/pyright/literals_parameterizations.toml index 17043523a..657b5d8dd 100644 --- a/conformance/results/pyright/literals_parameterizations.toml +++ b/conformance/results/pyright/literals_parameterizations.toml @@ -19,3 +19,23 @@ literals_parameterizations.py:61:12 - error: Type arguments for "Literal" must b literals_parameterizations.py:65:32 - error: Expression of type "Literal[Color.RED]" cannot be assigned to declared type "Literal['Color.RED']"   "Literal[Color.RED]" cannot be assigned to type "Literal['Color.RED']" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 41: Unexpected errors ['literals_parameterizations.py:41:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 42: Unexpected errors ['literals_parameterizations.py:42:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 43: Unexpected errors ['literals_parameterizations.py:43:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 44: Unexpected errors ['literals_parameterizations.py:44:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 45: Unexpected errors ['literals_parameterizations.py:45:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 46: Unexpected errors ['literals_parameterizations.py:46:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 47: Unexpected errors ['literals_parameterizations.py:47:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 48: Unexpected errors ['literals_parameterizations.py:48:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 49: Unexpected errors ['literals_parameterizations.py:49:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 50: Unexpected errors ['literals_parameterizations.py:50:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 51: Unexpected errors ['literals_parameterizations.py:51:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 52: Unexpected errors ['literals_parameterizations.py:52:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 53: Unexpected errors ['literals_parameterizations.py:53:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 56: Unexpected errors ['literals_parameterizations.py:56:28 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 60: Unexpected errors ['literals_parameterizations.py:60:4 - error: "Literal" cannot be used in this context without a type argument'] +Line 61: Unexpected errors ['literals_parameterizations.py:61:12 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value'] +Line 65: Unexpected errors ['literals_parameterizations.py:65:32 - error: Expression of type "Literal[Color.RED]" cannot be assigned to declared type "Literal[\\'Color.RED\\']"'] +""" diff --git a/conformance/results/pyright/literals_semantics.toml b/conformance/results/pyright/literals_semantics.toml index e12298cbe..711eeaa56 100644 --- a/conformance/results/pyright/literals_semantics.toml +++ b/conformance/results/pyright/literals_semantics.toml @@ -8,3 +8,10 @@ literals_semantics.py:25:22 - error: Expression of type "Literal[False]" cannot   "Literal[False]" cannot be assigned to type "Literal[0]" (reportAssignmentType) literals_semantics.py:33:10 - error: Expression of type "Literal[6, 7, 8]" cannot be assigned to declared type "Literal[3, 4, 5]" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['literals_semantics.py:10:18 - error: Expression of type "Literal[4]" cannot be assigned to declared type "Literal[3]"'] +Line 24: Unexpected errors ['literals_semantics.py:24:26 - error: Expression of type "Literal[0]" cannot be assigned to declared type "Literal[False]"'] +Line 25: Unexpected errors ['literals_semantics.py:25:22 - error: Expression of type "Literal[False]" cannot be assigned to declared type "Literal[0]"'] +Line 33: Unexpected errors ['literals_semantics.py:33:10 - error: Expression of type "Literal[6, 7, 8]" cannot be assigned to declared type "Literal[3, 4, 5]" (reportAssignmentType)'] +""" diff --git a/conformance/results/pyright/namedtuples_define_class.toml b/conformance/results/pyright/namedtuples_define_class.toml index 7f9e594b8..a378a0891 100644 --- a/conformance/results/pyright/namedtuples_define_class.toml +++ b/conformance/results/pyright/namedtuples_define_class.toml @@ -16,3 +16,18 @@ namedtuples_define_class.py:98:19 - error: Argument of type "float" cannot be as   "float" is incompatible with "str" (reportArgumentType) namedtuples_define_class.py:105:7 - error: Multiple inheritance with NamedTuple is not supported (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 32: Unexpected errors ['namedtuples_define_class.py:32:7 - error: Index 3 is out of range for type Point (reportGeneralTypeIssues)'] +Line 33: Unexpected errors ['namedtuples_define_class.py:33:7 - error: Index -4 is out of range for type Point (reportGeneralTypeIssues)'] +Line 44: Unexpected errors ['namedtuples_define_class.py:44:6 - error: Argument missing for parameter "y" (reportCallIssue)'] +Line 45: Unexpected errors ['namedtuples_define_class.py:45:6 - error: Argument missing for parameter "y" (reportCallIssue)'] +Line 46: Unexpected errors ['namedtuples_define_class.py:46:15 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter "y" of type "int" in function "__init__"'] +Line 47: Unexpected errors ['namedtuples_define_class.py:47:24 - error: Argument of type "Literal[3]" cannot be assigned to parameter "units" of type "str" in function "__init__"'] +Line 48: Unexpected errors ['namedtuples_define_class.py:48:22 - error: Expected 3 positional arguments (reportCallIssue)'] +Line 49: Unexpected errors ['namedtuples_define_class.py:49:23 - error: No parameter named "other" (reportCallIssue)'] +Line 59: Unexpected errors ['namedtuples_define_class.py:59:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues)'] +Line 79: Unexpected errors ['namedtuples_define_class.py:79:5 - error: Cannot override "x" because parent class "Point" is a named tuple (reportIncompatibleVariableOverride)'] +Line 98: Unexpected errors ['namedtuples_define_class.py:98:19 - error: Argument of type "float" cannot be assigned to parameter "value" of type "str" in function "__init__"'] +Line 105: Unexpected errors ['namedtuples_define_class.py:105:7 - error: Multiple inheritance with NamedTuple is not supported (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/namedtuples_define_functional.toml b/conformance/results/pyright/namedtuples_define_functional.toml index cc33ba00a..2f4004527 100644 --- a/conformance/results/pyright/namedtuples_define_functional.toml +++ b/conformance/results/pyright/namedtuples_define_functional.toml @@ -17,3 +17,18 @@ namedtuples_define_functional.py:53:33 - error: Field names cannot be a keyword namedtuples_define_functional.py:54:33 - error: Field names cannot be a keyword (reportGeneralTypeIssues) namedtuples_define_functional.py:66:1 - error: Argument missing for parameter "a" (reportCallIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['namedtuples_define_functional.py:16:8 - error: Argument missing for parameter "y" (reportCallIssue)'] +Line 21: Unexpected errors ['namedtuples_define_functional.py:21:8 - error: Arguments missing for parameters "x", "y" (reportCallIssue)'] +Line 26: Unexpected errors ['namedtuples_define_functional.py:26:21 - error: Expected 2 positional arguments (reportCallIssue)'] +Line 31: Unexpected errors ['namedtuples_define_functional.py:31:8 - error: Argument missing for parameter "y" (reportCallIssue)', 'namedtuples_define_functional.py:31:18 - error: No parameter named "z" (reportCallIssue)'] +Line 36: Unexpected errors ['namedtuples_define_functional.py:36:18 - error: Argument of type "Literal[\\'1\\']" cannot be assigned to parameter "y" of type "int" in function "__new__"'] +Line 37: Unexpected errors ['namedtuples_define_functional.py:37:21 - error: Expected 2 positional arguments (reportCallIssue)'] +Line 42: Unexpected errors ['namedtuples_define_functional.py:42:18 - error: Argument of type "Literal[\\'1\\']" cannot be assigned to parameter "y" of type "int" in function "__new__"'] +Line 43: Unexpected errors ['namedtuples_define_functional.py:43:17 - error: Argument of type "float" cannot be assigned to parameter "x" of type "int" in function "__new__"'] +Line 52: Unexpected errors ['namedtuples_define_functional.py:52:31 - error: Names within a named tuple must be unique (reportGeneralTypeIssues)'] +Line 53: Unexpected errors ['namedtuples_define_functional.py:53:33 - error: Field names cannot be a keyword (reportGeneralTypeIssues)'] +Line 54: Unexpected errors ['namedtuples_define_functional.py:54:33 - error: Field names cannot be a keyword (reportGeneralTypeIssues)'] +Line 66: Unexpected errors ['namedtuples_define_functional.py:66:1 - error: Argument missing for parameter "a" (reportCallIssue)'] +""" diff --git a/conformance/results/pyright/namedtuples_type_compat.toml b/conformance/results/pyright/namedtuples_type_compat.toml index 2bfa38362..3e04bf3f2 100644 --- a/conformance/results/pyright/namedtuples_type_compat.toml +++ b/conformance/results/pyright/namedtuples_type_compat.toml @@ -8,3 +8,8 @@ namedtuples_type_compat.py:23:28 - error: Expression of type "Point" cannot be a     Tuple entry 2 is incorrect type       "int" is incompatible with "str" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['namedtuples_type_compat.py:22:23 - error: Expression of type "Point" cannot be assigned to declared type "tuple[int, int]"'] +Line 23: Unexpected errors ['namedtuples_type_compat.py:23:28 - error: Expression of type "Point" cannot be assigned to declared type "tuple[int, str, str]"'] +""" diff --git a/conformance/results/pyright/namedtuples_usage.toml b/conformance/results/pyright/namedtuples_usage.toml index dc9920d5c..9c2008a3b 100644 --- a/conformance/results/pyright/namedtuples_usage.toml +++ b/conformance/results/pyright/namedtuples_usage.toml @@ -17,3 +17,14 @@ namedtuples_usage.py:53:1 - error: Expression with type "Point" cannot be assign   Type "Point" is incompatible with target tuple     Tuple size mismatch; expected 4 but received 3 (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 34: Unexpected errors ['namedtuples_usage.py:34:7 - error: Index 3 is out of range for type Point (reportGeneralTypeIssues)'] +Line 35: Unexpected errors ['namedtuples_usage.py:35:7 - error: Index -4 is out of range for type Point (reportGeneralTypeIssues)'] +Line 40: Unexpected errors ['namedtuples_usage.py:40:3 - error: Cannot assign member "x" for type "Point"'] +Line 41: Unexpected errors ['namedtuples_usage.py:41:1 - error: "__setitem__" method not defined on type "Point" (reportIndexIssue)'] +Line 42: Unexpected errors ['namedtuples_usage.py:42:7 - error: Cannot delete member "x" for type "Point"'] +Line 43: Unexpected errors ['namedtuples_usage.py:43:5 - error: "__delitem__" method not defined on type "Point" (reportIndexIssue)'] +Line 52: Unexpected errors ['namedtuples_usage.py:52:1 - error: Expression with type "Point" cannot be assigned to target tuple'] +Line 53: Unexpected errors ['namedtuples_usage.py:53:1 - error: Expression with type "Point" cannot be assigned to target tuple'] +""" diff --git a/conformance/results/pyright/narrowing_typeguard.toml b/conformance/results/pyright/narrowing_typeguard.toml index 8a5bfb00b..1aa634d3a 100644 --- a/conformance/results/pyright/narrowing_typeguard.toml +++ b/conformance/results/pyright/narrowing_typeguard.toml @@ -13,3 +13,8 @@ narrowing_typeguard.py:148:26 - error: Argument of type "(val: object) -> TypeGu       "TypeGuard[int]" is incompatible with "str"       "bool" is incompatible with "str" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 102: Unexpected errors ['narrowing_typeguard.py:102:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues)'] +Line 107: Unexpected errors ['narrowing_typeguard.py:107:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/overloads_basic.toml b/conformance/results/pyright/overloads_basic.toml index 676dde157..6fb00e5ab 100644 --- a/conformance/results/pyright/overloads_basic.toml +++ b/conformance/results/pyright/overloads_basic.toml @@ -6,3 +6,9 @@ overloads_basic.py:37:1 - error: Argument of type "Literal['']" cannot be assign overloads_basic.py:63:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload) overloads_basic.py:75:5 - error: "func2" is marked as overload, but no implementation is provided (reportNoOverloadImplementation) """ +conformance_automated = "Fail" +errors_diff = """ +Line 37: Unexpected errors ['overloads_basic.py:37:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue)', 'overloads_basic.py:37:1 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter "__s" of type "slice" in function "__getitem__"'] +Line 63: Unexpected errors ['overloads_basic.py:63:5 - error: "func1" is marked as overload, but additional overloads are missing (reportInconsistentOverload)'] +Line 75: Unexpected errors ['overloads_basic.py:75:5 - error: "func2" is marked as overload, but no implementation is provided (reportNoOverloadImplementation)'] +""" diff --git a/conformance/results/pyright/protocols_class_objects.toml b/conformance/results/pyright/protocols_class_objects.toml index da8e0bba4..be8d055d9 100644 --- a/conformance/results/pyright/protocols_class_objects.toml +++ b/conformance/results/pyright/protocols_class_objects.toml @@ -24,3 +24,14 @@ protocols_class_objects.py:104:16 - error: Expression of type "type[ConcreteC2]" protocols_class_objects.py:105:16 - error: Expression of type "type[ConcreteC3]" cannot be assigned to declared type "ProtoC1"   "attr1" is defined as a ClassVar in protocol (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Unexpected errors ['protocols_class_objects.py:29:5 - error: Argument of type "type[Proto]" cannot be assigned to parameter "cls" of type "type[Proto]" in function "fun"'] +Line 34: Unexpected errors ['protocols_class_objects.py:34:7 - error: Expression of type "type[Proto]" cannot be assigned to declared type "type[Proto]"'] +Line 58: Unexpected errors ['protocols_class_objects.py:58:16 - error: Expression of type "type[ConcreteA]" cannot be assigned to declared type "ProtoA1"'] +Line 74: Unexpected errors ['protocols_class_objects.py:74:16 - error: Expression of type "type[ConcreteB]" cannot be assigned to declared type "ProtoB1"'] +Line 101: Unexpected errors ['protocols_class_objects.py:101:16 - error: Expression of type "type[ConcreteC1]" cannot be assigned to declared type "ProtoC1"'] +Line 103: Unexpected errors ['protocols_class_objects.py:103:16 - error: Expression of type "type[ConcreteC2]" cannot be assigned to declared type "ProtoC1"'] +Line 104: Unexpected errors ['protocols_class_objects.py:104:16 - error: Expression of type "type[ConcreteC2]" cannot be assigned to declared type "ProtoC2"'] +Line 105: Unexpected errors ['protocols_class_objects.py:105:16 - error: Expression of type "type[ConcreteC3]" cannot be assigned to declared type "ProtoC1"'] +""" diff --git a/conformance/results/pyright/protocols_definition.toml b/conformance/results/pyright/protocols_definition.toml index 2a57d0588..0b4de7df8 100644 --- a/conformance/results/pyright/protocols_definition.toml +++ b/conformance/results/pyright/protocols_definition.toml @@ -93,3 +93,27 @@ protocols_definition.py:341:22 - error: Expression of type "Concrete6_Bad3" cann   "Concrete6_Bad3" is incompatible with protocol "Template6"     "val1" is writable in protocol (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['protocols_definition.py:30:12 - error: Argument of type "list[int]" cannot be assigned to parameter "things" of type "Iterable[SupportsClose]" in function "close_all"'] +Line 67: Unexpected errors ['protocols_definition.py:67:14 - error: Instance or class variables within a Protocol class must be explicitly declared within the class body'] +Line 114: Unexpected errors ['protocols_definition.py:114:22 - error: Expression of type "Concrete2_Bad1" cannot be assigned to declared type "Template2"'] +Line 115: Unexpected errors ['protocols_definition.py:115:22 - error: Expression of type "Concrete2_Bad2" cannot be assigned to declared type "Template2"'] +Line 116: Unexpected errors ['protocols_definition.py:116:22 - error: Expression of type "Concrete2_Bad3" cannot be assigned to declared type "Template2"'] +Line 117: Unexpected errors ['protocols_definition.py:117:22 - error: Expression of type "Concrete2_Bad4" cannot be assigned to declared type "Template2"'] +Line 156: Unexpected errors ['protocols_definition.py:156:22 - error: Expression of type "Concrete3_Bad1" cannot be assigned to declared type "Template3"'] +Line 157: Unexpected errors ['protocols_definition.py:157:22 - error: Expression of type "Concrete3_Bad2" cannot be assigned to declared type "Template3"'] +Line 158: Unexpected errors ['protocols_definition.py:158:22 - error: Expression of type "Concrete3_Bad3" cannot be assigned to declared type "Template3"'] +Line 159: Unexpected errors ['protocols_definition.py:159:22 - error: Expression of type "Concrete3_Bad4" cannot be assigned to declared type "Template3"'] +Line 160: Unexpected errors ['protocols_definition.py:160:22 - error: Expression of type "Concrete3_Bad5" cannot be assigned to declared type "Template3"'] +Line 218: Unexpected errors ['protocols_definition.py:218:22 - error: Expression of type "Concrete4_Bad1" cannot be assigned to declared type "Template4"'] +Line 219: Unexpected errors ['protocols_definition.py:219:22 - error: Expression of type "Concrete4_Bad2" cannot be assigned to declared type "Template4"'] +Line 285: Unexpected errors ['protocols_definition.py:285:22 - error: Expression of type "Concrete5_Bad1" cannot be assigned to declared type "Template5"'] +Line 286: Unexpected errors ['protocols_definition.py:286:22 - error: Expression of type "Concrete5_Bad2" cannot be assigned to declared type "Template5"'] +Line 287: Unexpected errors ['protocols_definition.py:287:22 - error: Expression of type "Concrete5_Bad3" cannot be assigned to declared type "Template5"'] +Line 288: Unexpected errors ['protocols_definition.py:288:22 - error: Expression of type "Concrete5_Bad4" cannot be assigned to declared type "Template5"'] +Line 289: Unexpected errors ['protocols_definition.py:289:22 - error: Expression of type "Concrete5_Bad5" cannot be assigned to declared type "Template5"'] +Line 339: Unexpected errors ['protocols_definition.py:339:22 - error: Expression of type "Concrete6_Bad1" cannot be assigned to declared type "Template6"'] +Line 340: Unexpected errors ['protocols_definition.py:340:22 - error: Expression of type "Concrete6_Bad2" cannot be assigned to declared type "Template6"'] +Line 341: Unexpected errors ['protocols_definition.py:341:22 - error: Expression of type "Concrete6_Bad3" cannot be assigned to declared type "Template6"'] +""" diff --git a/conformance/results/pyright/protocols_explicit.toml b/conformance/results/pyright/protocols_explicit.toml index 681fca606..8b56e8a54 100644 --- a/conformance/results/pyright/protocols_explicit.toml +++ b/conformance/results/pyright/protocols_explicit.toml @@ -19,3 +19,13 @@ protocols_explicit.py:129:6 - error: Cannot instantiate abstract class "Concrete protocols_explicit.py:159:7 - error: Cannot instantiate abstract class "Concrete7A"   "Proto7.method1" is not implemented (reportAbstractUsage) """ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Unexpected errors ['protocols_explicit.py:27:16 - error: Method "draw" cannot be called because it is abstract and unimplemented (reportAbstractUsage)'] +Line 56: Unexpected errors ['protocols_explicit.py:56:32 - error: Cannot assign member "rgb" for type "Point*"'] +Line 59: Unexpected errors ['protocols_explicit.py:59:5 - error: Cannot instantiate abstract class "Point"'] +Line 86: Unexpected errors ['protocols_explicit.py:86:6 - error: Cannot instantiate abstract class "Concrete1"'] +Line 104: Unexpected errors ['protocols_explicit.py:104:6 - error: Cannot instantiate abstract class "Concrete3"'] +Line 129: Unexpected errors ['protocols_explicit.py:129:6 - error: Cannot instantiate abstract class "Concrete5"'] +Line 159: Unexpected errors ['protocols_explicit.py:159:7 - error: Cannot instantiate abstract class "Concrete7A"'] +""" diff --git a/conformance/results/pyright/protocols_generic.toml b/conformance/results/pyright/protocols_generic.toml index 035084089..a9d8aa84e 100644 --- a/conformance/results/pyright/protocols_generic.toml +++ b/conformance/results/pyright/protocols_generic.toml @@ -38,3 +38,14 @@ protocols_generic.py:147:25 - error: Expression of type "ConcreteHasProperty4" c         Parameter 2: type "(T@m) -> str" cannot be assigned to type "(int) -> str"           Type "(str) -> str" cannot be assigned to type "(int) -> str" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 40: Unexpected errors ['protocols_generic.py:40:24 - error: Expression of type "Concrete1" cannot be assigned to declared type "Proto1[int, str]"'] +Line 44: Unexpected errors ['protocols_generic.py:44:30 - error: Only one Generic[...] or Protocol[...] base class allowed (reportGeneralTypeIssues)'] +Line 56: Unexpected errors ['protocols_generic.py:56:20 - error: Expression of type "Box[float]" cannot be assigned to declared type "Box[int]"'] +Line 66: Unexpected errors ['protocols_generic.py:66:25 - error: Expression of type "Sender[int]" cannot be assigned to declared type "Sender[float]"'] +Line 74: Unexpected errors ['protocols_generic.py:74:28 - error: Expression of type "AttrProto[int]" cannot be assigned to declared type "AttrProto[float]"'] +Line 75: Unexpected errors ['protocols_generic.py:75:26 - error: Expression of type "AttrProto[float]" cannot be assigned to declared type "AttrProto[int]"'] +Line 146: Unexpected errors ['protocols_generic.py:146:25 - error: Expression of type "ConcreteHasProperty3" cannot be assigned to declared type "HasPropertyProto"'] +Line 147: Unexpected errors ['protocols_generic.py:147:25 - error: Expression of type "ConcreteHasProperty4" cannot be assigned to declared type "HasPropertyProto"'] +""" diff --git a/conformance/results/pyright/protocols_merging.toml b/conformance/results/pyright/protocols_merging.toml index 1ca1d584c..7be03a2fb 100644 --- a/conformance/results/pyright/protocols_merging.toml +++ b/conformance/results/pyright/protocols_merging.toml @@ -14,3 +14,12 @@ protocols_merging.py:83:5 - error: Cannot instantiate abstract class "SizedAndCl protocols_merging.py:84:24 - error: Expression of type "SCConcrete1" cannot be assigned to declared type "SizedAndClosable4"   "SCConcrete1" is incompatible with "SizedAndClosable4" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 52: Unexpected errors ['protocols_merging.py:52:25 - error: Expression of type "SCConcrete2" cannot be assigned to declared type "SizedAndClosable1"'] +Line 53: Unexpected errors ['protocols_merging.py:53:25 - error: Expression of type "SCConcrete2" cannot be assigned to declared type "SizedAndClosable2"'] +Line 54: Unexpected errors ['protocols_merging.py:54:25 - error: Expression of type "SCConcrete2" cannot be assigned to declared type "SizedAndClosable3"'] +Line 68: Unexpected errors ['protocols_merging.py:68:16 - error: Protocol class "BadProto" cannot derive from non-protocol class "SizedAndClosable3" (reportGeneralTypeIssues)'] +Line 83: Unexpected errors ['protocols_merging.py:83:5 - error: Cannot instantiate abstract class "SizedAndClosable4"'] +Line 84: Unexpected errors ['protocols_merging.py:84:24 - error: Expression of type "SCConcrete1" cannot be assigned to declared type "SizedAndClosable4"'] +""" diff --git a/conformance/results/pyright/protocols_modules.toml b/conformance/results/pyright/protocols_modules.toml index f280523d0..f7de65c2f 100644 --- a/conformance/results/pyright/protocols_modules.toml +++ b/conformance/results/pyright/protocols_modules.toml @@ -12,3 +12,9 @@ protocols_modules.py:48:18 - error: Expression of type "Module("_protocols_modul protocols_modules.py:49:18 - error: Expression of type "Module("_protocols_modules2")" cannot be assigned to declared type "Reporter3"   "not_implemented" is not present (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['protocols_modules.py:26:17 - error: Expression of type "Module("_protocols_modules1")" cannot be assigned to declared type "Options2"'] +Line 48: Unexpected errors ['protocols_modules.py:48:18 - error: Expression of type "Module("_protocols_modules2")" cannot be assigned to declared type "Reporter2"'] +Line 49: Unexpected errors ['protocols_modules.py:49:18 - error: Expression of type "Module("_protocols_modules2")" cannot be assigned to declared type "Reporter3"'] +""" diff --git a/conformance/results/pyright/protocols_recursive.toml b/conformance/results/pyright/protocols_recursive.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/protocols_recursive.toml +++ b/conformance/results/pyright/protocols_recursive.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/protocols_runtime_checkable.toml b/conformance/results/pyright/protocols_runtime_checkable.toml index 6de813c97..db056a2f6 100644 --- a/conformance/results/pyright/protocols_runtime_checkable.toml +++ b/conformance/results/pyright/protocols_runtime_checkable.toml @@ -15,3 +15,12 @@ protocols_runtime_checkable.py:96:19 - error: Class overlaps "Proto3" unsafely a protocols_runtime_checkable.py:96:19 - error: Class overlaps "NonDataProtocol" unsafely and could produce a match at runtime   Attributes of "Concrete3A" have the same names as the protocol (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['protocols_runtime_checkable.py:23:22 - error: Second argument to "isinstance" must be a class or tuple of classes'] +Line 55: Unexpected errors ['protocols_runtime_checkable.py:55:22 - error: Data protocols (which include non-method attributes) are not allowed in issubclass calls (reportGeneralTypeIssues)'] +Line 61: Unexpected errors ['protocols_runtime_checkable.py:61:22 - error: Data protocols (which include non-method attributes) are not allowed in issubclass calls (reportGeneralTypeIssues)'] +Line 88: Unexpected errors ['protocols_runtime_checkable.py:88:19 - error: Class overlaps "Proto3" unsafely and could produce a match at runtime'] +Line 92: Unexpected errors ['protocols_runtime_checkable.py:92:9 - error: Class overlaps "Proto3" unsafely and could produce a match at runtime', 'protocols_runtime_checkable.py:92:9 - error: Class overlaps "NonDataProtocol" unsafely and could produce a match at runtime'] +Line 96: Unexpected errors ['protocols_runtime_checkable.py:96:19 - error: Class overlaps "Proto3" unsafely and could produce a match at runtime', 'protocols_runtime_checkable.py:96:19 - error: Class overlaps "NonDataProtocol" unsafely and could produce a match at runtime'] +""" diff --git a/conformance/results/pyright/protocols_self.toml b/conformance/results/pyright/protocols_self.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/protocols_self.toml +++ b/conformance/results/pyright/protocols_self.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/protocols_subtyping.toml b/conformance/results/pyright/protocols_subtyping.toml index 447c2614b..8cb746fac 100644 --- a/conformance/results/pyright/protocols_subtyping.toml +++ b/conformance/results/pyright/protocols_subtyping.toml @@ -23,3 +23,13 @@ protocols_subtyping.py:103:33 - error: Expression of type "Proto6[float, float]"     Type parameter "T_contra@Proto7" is contravariant, but "float" is not a supertype of "object"       "object" is incompatible with "float" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['protocols_subtyping.py:16:6 - error: Cannot instantiate protocol class "Proto1" (reportAbstractUsage)'] +Line 38: Unexpected errors ['protocols_subtyping.py:38:21 - error: Expression of type "Proto2" cannot be assigned to declared type "Concrete2"'] +Line 55: Unexpected errors ['protocols_subtyping.py:55:18 - error: Expression of type "Proto2" cannot be assigned to declared type "Proto3"'] +Line 79: Unexpected errors ['protocols_subtyping.py:79:30 - error: Expression of type "Proto5[int]" cannot be assigned to declared type "Proto4[int, float]"'] +Line 80: Unexpected errors ['protocols_subtyping.py:80:25 - error: Expression of type "Proto4[int, int]" cannot be assigned to declared type "Proto5[float]"'] +Line 102: Unexpected errors ['protocols_subtyping.py:102:30 - error: Expression of type "Proto6[float, float]" cannot be assigned to declared type "Proto7[int, float]"'] +Line 103: Unexpected errors ['protocols_subtyping.py:103:33 - error: Expression of type "Proto6[float, float]" cannot be assigned to declared type "Proto7[float, object]"'] +""" diff --git a/conformance/results/pyright/protocols_variance.toml b/conformance/results/pyright/protocols_variance.toml index 5033905d4..86b272789 100644 --- a/conformance/results/pyright/protocols_variance.toml +++ b/conformance/results/pyright/protocols_variance.toml @@ -10,3 +10,8 @@ protocols_variance.py:71:7 - warning: Type variable "T1_contra" used in generic protocols_variance.py:72:21 - error: Contravariant type variable cannot be used in return type (reportGeneralTypeIssues) protocols_variance.py:104:7 - warning: Type variable "T1" used in generic protocol "Protocol12" should be covariant (reportInvalidTypeVarUse) """ +conformance_automated = "Fail" +errors_diff = """ +Line 62: Unexpected errors ['protocols_variance.py:62:22 - error: Covariant type variable cannot be used in parameter type (reportGeneralTypeIssues)'] +Line 72: Unexpected errors ['protocols_variance.py:72:21 - error: Contravariant type variable cannot be used in return type (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/qualifiers_annotated.toml b/conformance/results/pyright/qualifiers_annotated.toml index cef4b886a..3570d9c09 100644 --- a/conformance/results/pyright/qualifiers_annotated.toml +++ b/conformance/results/pyright/qualifiers_annotated.toml @@ -27,3 +27,26 @@ qualifiers_annotated.py:91:1 - error: "Annotated" cannot be instantiated (report qualifiers_annotated.py:92:1 - error: Object of type "type[Annotated]" is not callable (reportCallIssue) qualifiers_annotated.py:93:1 - error: Object of type "type[Annotated]" is not callable (reportCallIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 43: Unexpected errors ['qualifiers_annotated.py:43:17 - error: List expression not allowed for this type argument'] +Line 44: Unexpected errors ['qualifiers_annotated.py:44:17 - error: Expected type expression but received "tuple[tuple[type[int], type[str]]]" (reportGeneralTypeIssues)'] +Line 45: Unexpected errors ['qualifiers_annotated.py:45:17 - error: List expression not allowed for this type argument', 'qualifiers_annotated.py:45:18 - error: Expected type expression but received "Generator[type[int], None, None]" (reportGeneralTypeIssues)'] +Line 46: Unexpected errors ['qualifiers_annotated.py:46:17 - error: Expected type expression but received "dict[str, str]" (reportGeneralTypeIssues)', 'qualifiers_annotated.py:46:17 - error: Dictionary expression not allowed in type annotation'] +Line 47: Unexpected errors ['qualifiers_annotated.py:47:17 - error: Call expression not allowed in type expression (reportInvalidTypeForm)'] +Line 48: Unexpected errors ['qualifiers_annotated.py:48:17 - error: List expression not allowed in type annotation', 'qualifiers_annotated.py:48:17 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues)'] +Line 49: Unexpected errors ['qualifiers_annotated.py:49:17 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm)'] +Line 50: Unexpected errors ['qualifiers_annotated.py:50:17 - error: "var1" is not defined (reportUndefinedVariable)'] +Line 51: Unexpected errors ['qualifiers_annotated.py:51:17 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues)'] +Line 52: Unexpected errors ['qualifiers_annotated.py:52:18 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues)'] +Line 53: Unexpected errors ['qualifiers_annotated.py:53:18 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm)'] +Line 54: Unexpected errors ['qualifiers_annotated.py:54:18 - error: Expected expression', 'qualifiers_annotated.py:54:18 - error: Tuple expression not allowed in type annotation'] +Line 64: Unexpected errors ['qualifiers_annotated.py:64:8 - error: Expected one type argument and one or more annotations for "Annotated"'] +Line 76: Unexpected errors ['qualifiers_annotated.py:76:24 - error: Expression of type "type[int]" cannot be assigned to declared type "type[Any]" (reportAssignmentType)'] +Line 77: Unexpected errors ['qualifiers_annotated.py:77:24 - error: Expression of type "SmallInt" cannot be assigned to declared type "type[Any]" (reportAssignmentType)'] +Line 84: Unexpected errors ['qualifiers_annotated.py:84:7 - error: Argument of type "type[str]" cannot be assigned to parameter "x" of type "type[T@func4]" in function "func4" (reportArgumentType)'] +Line 85: Unexpected errors ['qualifiers_annotated.py:85:7 - error: Argument of type "SmallInt" cannot be assigned to parameter "x" of type "type[T@func4]" in function "func4" (reportArgumentType)'] +Line 91: Unexpected errors ['qualifiers_annotated.py:91:1 - error: "Annotated" cannot be instantiated (reportCallIssue)'] +Line 92: Unexpected errors ['qualifiers_annotated.py:92:1 - error: Object of type "type[Annotated]" is not callable (reportCallIssue)'] +Line 93: Unexpected errors ['qualifiers_annotated.py:93:1 - error: Object of type "type[Annotated]" is not callable (reportCallIssue)'] +""" diff --git a/conformance/results/pyright/qualifiers_final_annotation.toml b/conformance/results/pyright/qualifiers_final_annotation.toml index fe425195a..db22cb394 100644 --- a/conformance/results/pyright/qualifiers_final_annotation.toml +++ b/conformance/results/pyright/qualifiers_final_annotation.toml @@ -43,3 +43,30 @@ qualifiers_final_annotation.py:149:9 - error: "x" is declared as Final and canno qualifiers_final_annotation.py:152:30 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues) qualifiers_final_annotation.py:155:9 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['qualifiers_final_annotation.py:16:1 - error: "BAD1" is declared Final, but value is not assigned (reportGeneralTypeIssues)'] +Line 18: Unexpected errors ['qualifiers_final_annotation.py:18:7 - error: Expected a single type argument after "Final"'] +Line 34: Unexpected errors ['qualifiers_final_annotation.py:34:5 - error: "ID2" is declared Final, but value is not assigned (reportGeneralTypeIssues)'] +Line 38: Unexpected errors ['qualifiers_final_annotation.py:38:5 - error: "ID3" is declared Final, but value is not assigned (reportGeneralTypeIssues)'] +Line 54: Unexpected errors ['qualifiers_final_annotation.py:54:14 - error: Cannot assign member "ID5" for type "ClassA*"'] +Line 62: Unexpected errors ['qualifiers_final_annotation.py:62:19 - error: "Final" is not allowed in this context'] +Line 63: Unexpected errors ['qualifiers_final_annotation.py:63:19 - error: "Final" is not allowed in this context', 'qualifiers_final_annotation.py:63:32 - error: Cannot assign member "id4" for type "ClassA*"'] +Line 65: Unexpected errors ['qualifiers_final_annotation.py:65:14 - error: Cannot assign member "ID7" for type "ClassA*"'] +Line 67: Unexpected errors ['qualifiers_final_annotation.py:67:14 - error: Cannot assign member "ID7" for type "ClassA*"'] +Line 71: Unexpected errors ['qualifiers_final_annotation.py:71:1 - error: "RATE" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)'] +Line 81: Unexpected errors ['qualifiers_final_annotation.py:81:8 - error: Cannot assign member "DEFAULT_ID" for type "type[ClassB]"'] +Line 94: Unexpected errors ['qualifiers_final_annotation.py:94:5 - error: "BORDER_WIDTH" cannot be redeclared because parent class "ClassC" declares it as Final (reportGeneralTypeIssues)'] +Line 107: Unexpected errors ['qualifiers_final_annotation.py:107:22 - error: "Final" is not allowed in this context', 'qualifiers_final_annotation.py:107:31 - error: Expression of type "Literal[1]" cannot be assigned to declared type "Final"'] +Line 108: Unexpected errors ['qualifiers_final_annotation.py:108:19 - error: "ClassVar" is not allowed in this context'] +Line 118: Unexpected errors ['qualifiers_final_annotation.py:118:9 - error: "Final" is not allowed in this context'] +Line 121: Unexpected errors ['qualifiers_final_annotation.py:121:14 - error: "Final" is not allowed in this context'] +Line 134: Unexpected errors ['qualifiers_final_annotation.py:134:1 - error: Arguments missing for parameters "x", "y" (reportCallIssue)', 'qualifiers_final_annotation.py:134:3 - error: No parameter named "a" (reportCallIssue)'] +Line 135: Unexpected errors ['qualifiers_final_annotation.py:135:5 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter "x" of type "int" in function "__new__"', 'qualifiers_final_annotation.py:135:11 - error: Argument of type "Literal[\\'\\']" cannot be assigned to parameter "y" of type "int" in function "__new__"'] +Line 141: Unexpected errors ['qualifiers_final_annotation.py:141:5 - error: "ID1" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)'] +Line 145: Unexpected errors ['qualifiers_final_annotation.py:145:5 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)'] +Line 147: Unexpected errors ['qualifiers_final_annotation.py:147:10 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)'] +Line 149: Unexpected errors ['qualifiers_final_annotation.py:149:9 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)'] +Line 152: Unexpected errors ['qualifiers_final_annotation.py:152:30 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)'] +Line 155: Unexpected errors ['qualifiers_final_annotation.py:155:9 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/qualifiers_final_decorator.toml b/conformance/results/pyright/qualifiers_final_decorator.toml index a1d501600..157aa0fa4 100644 --- a/conformance/results/pyright/qualifiers_final_decorator.toml +++ b/conformance/results/pyright/qualifiers_final_decorator.toml @@ -15,3 +15,16 @@ qualifiers_final_decorator.py:118:9 - error: Method "method" overrides class "Ba   Parameter 2 mismatch: base parameter "v" is keyword parameter, override parameter is position-only (reportIncompatibleMethodOverride) qualifiers_final_decorator.py:126:5 - error: Function "func1" cannot be marked @final because it is not a method (reportGeneralTypeIssues) """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['qualifiers_final_decorator.py:21:16 - error: Base class "Base1" is marked final and cannot be subclassed'] +Line 56: Unexpected errors ['qualifiers_final_decorator.py:56:9 - error: Method "method1" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride)'] +Line 60: Unexpected errors ['qualifiers_final_decorator.py:60:9 - error: Method "method2" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride)'] +Line 64: Unexpected errors ['qualifiers_final_decorator.py:64:9 - error: Method "method3" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride)'] +Line 75: Unexpected errors ['qualifiers_final_decorator.py:75:9 - error: Method "method4" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride)'] +Line 86: Unexpected errors ['qualifiers_final_decorator.py:86:9 - error: Overload for "method" is marked @final but implementation is not (reportInconsistentOverload)'] +Line 89: Unexpected errors ['qualifiers_final_decorator.py:89:9 - error: Method "method" cannot override final method defined in class "Base3" (reportIncompatibleMethodOverride)'] +Line 102: Unexpected errors ['qualifiers_final_decorator.py:102:9 - error: Method "method" cannot override final method defined in class "Base4" (reportIncompatibleMethodOverride)'] +Line 118: Unexpected errors ['qualifiers_final_decorator.py:118:9 - error: Method "method" cannot override final method defined in class "Base5_2" (reportIncompatibleMethodOverride)', 'qualifiers_final_decorator.py:118:9 - error: Method "method" overrides class "Base5_2" in an incompatible manner'] +Line 126: Unexpected errors ['qualifiers_final_decorator.py:126:5 - error: Function "func1" cannot be marked @final because it is not a method (reportGeneralTypeIssues)'] +""" diff --git a/conformance/results/pyright/specialtypes_any.toml b/conformance/results/pyright/specialtypes_any.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/specialtypes_any.toml +++ b/conformance/results/pyright/specialtypes_any.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/specialtypes_never.toml b/conformance/results/pyright/specialtypes_never.toml index 7edcc251c..a077c5075 100644 --- a/conformance/results/pyright/specialtypes_never.toml +++ b/conformance/results/pyright/specialtypes_never.toml @@ -9,3 +9,9 @@ specialtypes_never.py:104:12 - error: Expression of type "ClassC[Never]" cannot   "ClassC[Never]" is incompatible with "ClassC[U@func10]"     Type parameter "T@ClassC" is invariant, but "Never" is not the same as "U@func10" (reportReturnType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['specialtypes_never.py:19:22 - error: Function with declared return type "NoReturn" cannot return "None" (reportReturnType)'] +Line 85: Unexpected errors ['specialtypes_never.py:85:21 - error: Expression of type "list[Never]" cannot be assigned to declared type "list[int]"'] +Line 104: Unexpected errors ['specialtypes_never.py:104:12 - error: Expression of type "ClassC[Never]" cannot be assigned to return type "ClassC[U@func10]"'] +""" diff --git a/conformance/results/pyright/specialtypes_none.toml b/conformance/results/pyright/specialtypes_none.toml index bac89a6f6..0c87f8f84 100644 --- a/conformance/results/pyright/specialtypes_none.toml +++ b/conformance/results/pyright/specialtypes_none.toml @@ -8,3 +8,9 @@ specialtypes_none.py:27:19 - error: Expression of type "None" cannot be assigned specialtypes_none.py:41:7 - error: Argument of type "None" cannot be assigned to parameter "val1" of type "type[None]" in function "func2"   Type "None" cannot be assigned to type "type[None]" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['specialtypes_none.py:21:7 - error: Argument of type "type[None]" cannot be assigned to parameter "val1" of type "None" in function "func1"'] +Line 27: Unexpected errors ['specialtypes_none.py:27:19 - error: Expression of type "None" cannot be assigned to declared type "Iterable[Unknown]"'] +Line 41: Unexpected errors ['specialtypes_none.py:41:7 - error: Argument of type "None" cannot be assigned to parameter "val1" of type "type[None]" in function "func2"'] +""" diff --git a/conformance/results/pyright/specialtypes_promotions.toml b/conformance/results/pyright/specialtypes_promotions.toml index 1bc97b0e7..f33c6c103 100644 --- a/conformance/results/pyright/specialtypes_promotions.toml +++ b/conformance/results/pyright/specialtypes_promotions.toml @@ -3,3 +3,7 @@ output = """ specialtypes_promotions.py:13:7 - error: Cannot access member "numerator" for type "float"   Member "numerator" is unknown (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['specialtypes_promotions.py:13:7 - error: Cannot access member "numerator" for type "float"'] +""" diff --git a/conformance/results/pyright/specialtypes_type.toml b/conformance/results/pyright/specialtypes_type.toml index 5ea2ea64a..1e6792574 100644 --- a/conformance/results/pyright/specialtypes_type.toml +++ b/conformance/results/pyright/specialtypes_type.toml @@ -21,3 +21,15 @@ specialtypes_type.py:145:5 - error: Cannot access member "unknown" for type "TA3 specialtypes_type.py:146:5 - error: Cannot access member "unknown" for type "TA4"   Member "unknown" is unknown (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 56: Unexpected errors ['specialtypes_type.py:56:7 - error: Argument of type "type[TeamUser]" cannot be assigned to parameter "user_class" of type "type[BasicUser] | type[ProUser]" in function "func4"'] +Line 70: Unexpected errors ['specialtypes_type.py:70:7 - error: Argument of type "type[Callable]" cannot be assigned to parameter "x" of type "type[T@func5]" in function "func5" (reportArgumentType)'] +Line 76: Unexpected errors ['specialtypes_type.py:76:22 - error: Too many type arguments provided for "type"; expected 1 but received 2'] +Line 117: Unexpected errors ['specialtypes_type.py:117:7 - error: Cannot access member "unknown" for type "type[object]"'] +Line 120: Unexpected errors ['specialtypes_type.py:120:7 - error: Cannot access member "unknown" for type "type[object]"'] +Line 143: Unexpected errors ['specialtypes_type.py:143:5 - error: Cannot access member "unknown" for type "TA1"'] +Line 144: Unexpected errors ['specialtypes_type.py:144:5 - error: Cannot access member "unknown" for type "TA2"'] +Line 145: Unexpected errors ['specialtypes_type.py:145:5 - error: Cannot access member "unknown" for type "TA3"'] +Line 146: Unexpected errors ['specialtypes_type.py:146:5 - error: Cannot access member "unknown" for type "TA4"'] +""" diff --git a/conformance/results/pyright/tuples_type_compat.toml b/conformance/results/pyright/tuples_type_compat.toml index 73d507e01..b6c253b52 100644 --- a/conformance/results/pyright/tuples_type_compat.toml +++ b/conformance/results/pyright/tuples_type_compat.toml @@ -44,3 +44,22 @@ tuples_type_compat.py:175:50 - error: Expression of type "tuple[str, str]" canno   "tuple[str, str]" is incompatible with "tuple[*tuple[str, ...], str, str, str]"     Tuple size mismatch; expected 3 or more but received 2 (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['tuples_type_compat.py:15:27 - error: Expression of type "tuple[float, complex]" cannot be assigned to declared type "tuple[int, int]"'] +Line 29: Unexpected errors ['tuples_type_compat.py:29:10 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int, *tuple[int, ...]]"'] +Line 32: Unexpected errors ['tuples_type_compat.py:32:10 - error: Expression of type "tuple[int, *tuple[int, ...]]" cannot be assigned to declared type "tuple[int]"'] +Line 33: Unexpected errors ['tuples_type_compat.py:33:10 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int]"'] +Line 43: Unexpected errors ['tuples_type_compat.py:43:22 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int]"'] +Line 62: Unexpected errors ['tuples_type_compat.py:62:26 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int, int]"'] +Line 144: Unexpected errors ['tuples_type_compat.py:144:6 - error: Expression of type "tuple[Literal[1], Literal[\\'\\'], Literal[\\'\\']]" cannot be assigned to declared type "tuple[int, str]"'] +Line 149: Unexpected errors ['tuples_type_compat.py:149:10 - error: Expression of type "tuple[Literal[1], Literal[1], Literal[\\'\\']]" cannot be assigned to declared type "tuple[int, *tuple[str, ...]]"'] +Line 150: Unexpected errors ['tuples_type_compat.py:150:14 - error: Expression of type "tuple[Literal[1], Literal[\\'\\'], Literal[1]]" cannot be assigned to declared type "tuple[int, *tuple[str, ...]]"'] +Line 156: Unexpected errors ['tuples_type_compat.py:156:14 - error: Expression of type "tuple[Literal[1], Literal[\\'\\'], Literal[\\'\\']]" cannot be assigned to declared type "tuple[int, *tuple[str, ...], int]"'] +Line 157: Unexpected errors ['tuples_type_compat.py:157:18 - error: Expression of type "tuple[Literal[1], Literal[\\'\\'], Literal[\\'\\'], float]" cannot be assigned to declared type "tuple[int, *tuple[str, ...], int]"'] +Line 162: Unexpected errors ['tuples_type_compat.py:162:7 - error: Expression of type "tuple[Literal[1], Literal[\\'\\'], Literal[1]]" cannot be assigned to declared type "tuple[*tuple[str, ...], int]"'] +Line 163: Unexpected errors ['tuples_type_compat.py:163:15 - error: Expression of type "tuple[Literal[\\'\\'], Literal[\\'\\'], float]" cannot be assigned to declared type "tuple[*tuple[str, ...], int]"'] +Line 168: Unexpected errors ['tuples_type_compat.py:168:40 - error: Expression of type "tuple[str, str]" cannot be assigned to declared type "tuple[str, str, int]"'] +Line 171: Unexpected errors ['tuples_type_compat.py:171:50 - error: Expression of type "tuple[str, str]" cannot be assigned to declared type "tuple[str, str, str, *tuple[str, ...]]"'] +Line 175: Unexpected errors ['tuples_type_compat.py:175:50 - error: Expression of type "tuple[str, str]" cannot be assigned to declared type "tuple[*tuple[str, ...], str, str, str]"'] +""" diff --git a/conformance/results/pyright/tuples_type_form.toml b/conformance/results/pyright/tuples_type_form.toml index 7b6b5424e..c92452554 100644 --- a/conformance/results/pyright/tuples_type_form.toml +++ b/conformance/results/pyright/tuples_type_form.toml @@ -20,3 +20,17 @@ tuples_type_form.py:43:17 - error: "..." is allowed only as the second of two ar tuples_type_form.py:44:25 - error: "..." cannot be used with an unpacked TypeVarTuple or tuple tuples_type_form.py:45:30 - error: "..." cannot be used with an unpacked TypeVarTuple or tuple """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['tuples_type_form.py:12:6 - error: Expression of type "tuple[Literal[1], Literal[2]]" cannot be assigned to declared type "tuple[int]"'] +Line 14: Unexpected errors ['tuples_type_form.py:14:6 - error: Expression of type "tuple[Literal[1]]" cannot be assigned to declared type "tuple[int, int]"'] +Line 15: Unexpected errors ['tuples_type_form.py:15:10 - error: Expression of type "tuple[Literal[1], Literal[\\'\\']]" cannot be assigned to declared type "tuple[int, int]"'] +Line 25: Unexpected errors ['tuples_type_form.py:25:7 - error: Expression of type "tuple[Literal[1]]" cannot be assigned to declared type "tuple[()]"'] +Line 36: Unexpected errors ['tuples_type_form.py:36:17 - error: Expression of type "tuple[Literal[1], Literal[2], Literal[3], Literal[\\'\\']]" cannot be assigned to declared type "tuple[int, ...]"'] +Line 40: Unexpected errors ['tuples_type_form.py:40:22 - error: "..." is allowed only as the second of two arguments'] +Line 41: Unexpected errors ['tuples_type_form.py:41:12 - error: "..." is allowed only as the second of two arguments'] +Line 42: Unexpected errors ['tuples_type_form.py:42:12 - error: "..." is allowed only as the second of two arguments'] +Line 43: Unexpected errors ['tuples_type_form.py:43:17 - error: "..." is allowed only as the second of two arguments'] +Line 44: Unexpected errors ['tuples_type_form.py:44:25 - error: "..." cannot be used with an unpacked TypeVarTuple or tuple'] +Line 45: Unexpected errors ['tuples_type_form.py:45:30 - error: "..." cannot be used with an unpacked TypeVarTuple or tuple'] +""" diff --git a/conformance/results/pyright/tuples_unpacked.toml b/conformance/results/pyright/tuples_unpacked.toml index 337fbbc3f..880421988 100644 --- a/conformance/results/pyright/tuples_unpacked.toml +++ b/conformance/results/pyright/tuples_unpacked.toml @@ -6,3 +6,11 @@ tuples_unpacked.py:50:34 - error: Type argument list can have at most one unpack tuples_unpacked.py:58:37 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple tuples_unpacked.py:60:50 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple """ +conformance_automated = "Fail" +errors_diff = """ +Line 39: Unexpected errors ['tuples_unpacked.py:39:30 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +Line 40: Unexpected errors ['tuples_unpacked.py:40:43 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +Line 50: Unexpected errors ['tuples_unpacked.py:50:34 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +Line 58: Unexpected errors ['tuples_unpacked.py:58:37 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +Line 60: Unexpected errors ['tuples_unpacked.py:60:50 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple'] +""" diff --git a/conformance/results/pyright/typeddicts_alt_syntax.toml b/conformance/results/pyright/typeddicts_alt_syntax.toml index fb79028fd..232768e8b 100644 --- a/conformance/results/pyright/typeddicts_alt_syntax.toml +++ b/conformance/results/pyright/typeddicts_alt_syntax.toml @@ -7,3 +7,11 @@ typeddicts_alt_syntax.py:35:78 - error: Extra TypedDict arguments not supported typeddicts_alt_syntax.py:45:43 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "Movie2"   "Literal['']" is incompatible with "int" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['typeddicts_alt_syntax.py:23:17 - error: Expected dict or keyword parameter as second parameter (reportArgumentType)'] +Line 27: Unexpected errors ['typeddicts_alt_syntax.py:27:45 - error: Expected string literal for dictionary entry name (reportGeneralTypeIssues)'] +Line 31: Unexpected errors ['typeddicts_alt_syntax.py:31:1 - error: TypedDict must be assigned to a variable named "WrongName" (reportGeneralTypeIssues)'] +Line 35: Unexpected errors ['typeddicts_alt_syntax.py:35:78 - error: Extra TypedDict arguments not supported (reportCallIssue)'] +Line 45: Unexpected errors ['typeddicts_alt_syntax.py:45:43 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "Movie2"'] +""" diff --git a/conformance/results/pyright/typeddicts_class_syntax.toml b/conformance/results/pyright/typeddicts_class_syntax.toml index 530af0877..82ad0e01d 100644 --- a/conformance/results/pyright/typeddicts_class_syntax.toml +++ b/conformance/results/pyright/typeddicts_class_syntax.toml @@ -6,3 +6,11 @@ typeddicts_class_syntax.py:38:5 - error: TypedDict classes can contain only type typeddicts_class_syntax.py:44:32 - error: TypedDict does not support __init_subclass__ parameter "metaclass" typeddicts_class_syntax.py:49:32 - error: TypedDict does not support __init_subclass__ parameter "other" """ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Unexpected errors ['typeddicts_class_syntax.py:29:5 - error: TypedDict classes can contain only type annotations (reportGeneralTypeIssues)'] +Line 33: Unexpected errors ['typeddicts_class_syntax.py:33:5 - error: TypedDict classes can contain only type annotations (reportGeneralTypeIssues)'] +Line 38: Unexpected errors ['typeddicts_class_syntax.py:38:5 - error: TypedDict classes can contain only type annotations (reportGeneralTypeIssues)'] +Line 44: Unexpected errors ['typeddicts_class_syntax.py:44:32 - error: TypedDict does not support __init_subclass__ parameter "metaclass"'] +Line 49: Unexpected errors ['typeddicts_class_syntax.py:49:32 - error: TypedDict does not support __init_subclass__ parameter "other"'] +""" diff --git a/conformance/results/pyright/typeddicts_final.toml b/conformance/results/pyright/typeddicts_final.toml index 2146548eb..a23d569d5 100644 --- a/conformance/results/pyright/typeddicts_final.toml +++ b/conformance/results/pyright/typeddicts_final.toml @@ -1,3 +1,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pyright/typeddicts_inheritance.toml b/conformance/results/pyright/typeddicts_inheritance.toml index d0470b408..d358228a7 100644 --- a/conformance/results/pyright/typeddicts_inheritance.toml +++ b/conformance/results/pyright/typeddicts_inheritance.toml @@ -7,3 +7,9 @@ typeddicts_inheritance.py:55:4 - error: "x" overrides symbol of same name in cla     Override type "int" is not the same as base type "str" (reportIncompatibleVariableOverride) typeddicts_inheritance.py:65:7 - error: Base classes for class "XYZ2" define variable "x" in incompatible way (reportIncompatibleVariableOverride) """ +conformance_automated = "Fail" +errors_diff = """ +Line 44: Unexpected errors ['typeddicts_inheritance.py:44:7 - error: All base classes for TypedDict classes must also be TypedDict classes'] +Line 55: Unexpected errors ['typeddicts_inheritance.py:55:4 - error: "x" overrides symbol of same name in class "X1"'] +Line 65: Unexpected errors ['typeddicts_inheritance.py:65:7 - error: Base classes for class "XYZ2" define variable "x" in incompatible way (reportIncompatibleVariableOverride)'] +""" diff --git a/conformance/results/pyright/typeddicts_operations.toml b/conformance/results/pyright/typeddicts_operations.toml index 5a7e45084..39e543a7a 100644 --- a/conformance/results/pyright/typeddicts_operations.toml +++ b/conformance/results/pyright/typeddicts_operations.toml @@ -22,3 +22,17 @@ typeddicts_operations.py:49:5 - error: Could not delete item in TypedDict typeddicts_operations.py:62:16 - error: Cannot access member "clear" for type "MovieOptional"   Member "clear" is unknown (reportAttributeAccessIssue) """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['typeddicts_operations.py:22:1 - error: Could not assign item in TypedDict'] +Line 23: Unexpected errors ['typeddicts_operations.py:23:1 - error: Could not assign item in TypedDict'] +Line 24: Unexpected errors ['typeddicts_operations.py:24:1 - error: Could not assign item in TypedDict'] +Line 26: Unexpected errors ['typeddicts_operations.py:26:7 - error: Could not access item in TypedDict'] +Line 28: Unexpected errors ['typeddicts_operations.py:28:9 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "Movie"'] +Line 29: Unexpected errors ['typeddicts_operations.py:29:42 - error: Expression of type "dict[str, str | float]" cannot be assigned to declared type "Movie"'] +Line 32: Unexpected errors ['typeddicts_operations.py:32:36 - error: Expression of type "dict[str, str | int]" cannot be assigned to declared type "Movie"'] +Line 37: Unexpected errors ['typeddicts_operations.py:37:20 - error: Expression of type "dict[str, str | int]" cannot be assigned to declared type "Movie" (reportAssignmentType)'] +Line 47: Unexpected errors ['typeddicts_operations.py:47:7 - error: Cannot access member "clear" for type "Movie"'] +Line 49: Unexpected errors ['typeddicts_operations.py:49:5 - error: Could not delete item in TypedDict'] +Line 62: Unexpected errors ['typeddicts_operations.py:62:16 - error: Cannot access member "clear" for type "MovieOptional"'] +""" diff --git a/conformance/results/pyright/typeddicts_readonly.toml b/conformance/results/pyright/typeddicts_readonly.toml index 854f39f9a..c9a749131 100644 --- a/conformance/results/pyright/typeddicts_readonly.toml +++ b/conformance/results/pyright/typeddicts_readonly.toml @@ -13,3 +13,12 @@ typeddicts_readonly.py:60:1 - error: Could not assign item in TypedDict typeddicts_readonly.py:61:1 - error: Could not assign item in TypedDict   "year" is a read-only key in "Movie2" (reportTypedDictNotRequiredAccess) """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['typeddicts_readonly.py:24:1 - error: Could not assign item in TypedDict'] +Line 36: Unexpected errors ['typeddicts_readonly.py:36:1 - error: Could not assign item in TypedDict'] +Line 50: Unexpected errors ['typeddicts_readonly.py:50:1 - error: Could not assign item in TypedDict'] +Line 51: Unexpected errors ['typeddicts_readonly.py:51:1 - error: Could not assign item in TypedDict'] +Line 60: Unexpected errors ['typeddicts_readonly.py:60:1 - error: Could not assign item in TypedDict'] +Line 61: Unexpected errors ['typeddicts_readonly.py:61:1 - error: Could not assign item in TypedDict'] +""" diff --git a/conformance/results/pyright/typeddicts_readonly_consistency.toml b/conformance/results/pyright/typeddicts_readonly_consistency.toml index f52bc5184..50570fb8d 100644 --- a/conformance/results/pyright/typeddicts_readonly_consistency.toml +++ b/conformance/results/pyright/typeddicts_readonly_consistency.toml @@ -17,3 +17,13 @@ typeddicts_readonly_consistency.py:84:14 - error: Expression of type "A2" cannot typeddicts_readonly_consistency.py:85:14 - error: Expression of type "B2" cannot be assigned to declared type "C2"   "x" is required in "C2" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 37: Unexpected errors ['typeddicts_readonly_consistency.py:37:14 - error: Expression of type "A1" cannot be assigned to declared type "B1"'] +Line 38: Unexpected errors ['typeddicts_readonly_consistency.py:38:14 - error: Expression of type "C1" cannot be assigned to declared type "B1"'] +Line 40: Unexpected errors ['typeddicts_readonly_consistency.py:40:14 - error: Expression of type "A1" cannot be assigned to declared type "C1"'] +Line 81: Unexpected errors ['typeddicts_readonly_consistency.py:81:14 - error: Expression of type "A2" cannot be assigned to declared type "B2"'] +Line 82: Unexpected errors ['typeddicts_readonly_consistency.py:82:14 - error: Expression of type "C2" cannot be assigned to declared type "B2"'] +Line 84: Unexpected errors ['typeddicts_readonly_consistency.py:84:14 - error: Expression of type "A2" cannot be assigned to declared type "C2"'] +Line 85: Unexpected errors ['typeddicts_readonly_consistency.py:85:14 - error: Expression of type "B2" cannot be assigned to declared type "C2"'] +""" diff --git a/conformance/results/pyright/typeddicts_readonly_inheritance.toml b/conformance/results/pyright/typeddicts_readonly_inheritance.toml index 23f0c8c76..9eaf8cbfb 100644 --- a/conformance/results/pyright/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pyright/typeddicts_readonly_inheritance.toml @@ -20,3 +20,17 @@ typeddicts_readonly_inheritance.py:106:5 - error: TypedDict item "c" cannot be r typeddicts_readonly_inheritance.py:119:7 - error: Base classes for class "TD_A" define variable "x" in incompatible way (reportIncompatibleVariableOverride) typeddicts_readonly_inheritance.py:132:7 - error: TypedDict item "x" cannot be redefined as NotRequired (reportIncompatibleVariableOverride) """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['typeddicts_readonly_inheritance.py:36:1 - error: Could not assign item in TypedDict'] +Line 50: Unexpected errors ['typeddicts_readonly_inheritance.py:50:5 - error: "alt" overrides symbol of same name in class "AlbumCollection"'] +Line 65: Unexpected errors ['typeddicts_readonly_inheritance.py:65:19 - error: Expression of type "dict[Any, Any]" cannot be assigned to declared type "RequiredName"'] +Line 82: Unexpected errors ['typeddicts_readonly_inheritance.py:82:1 - error: Could not assign item in TypedDict'] +Line 83: Unexpected errors ['typeddicts_readonly_inheritance.py:83:15 - error: Expression of type "dict[str, int]" cannot be assigned to declared type "User"'] +Line 84: Unexpected errors ['typeddicts_readonly_inheritance.py:84:5 - error: Expression of type "dict[Any, Any]" cannot be assigned to declared type "User"'] +Line 94: Unexpected errors ['typeddicts_readonly_inheritance.py:94:5 - error: TypedDict item "a" cannot be redefined as ReadOnly (reportGeneralTypeIssues)'] +Line 98: Unexpected errors ['typeddicts_readonly_inheritance.py:98:5 - error: TypedDict item "a" cannot be redefined as NotRequired (reportGeneralTypeIssues)'] +Line 106: Unexpected errors ['typeddicts_readonly_inheritance.py:106:5 - error: TypedDict item "c" cannot be redefined as NotRequired (reportGeneralTypeIssues)'] +Line 119: Unexpected errors ['typeddicts_readonly_inheritance.py:119:7 - error: Base classes for class "TD_A" define variable "x" in incompatible way (reportIncompatibleVariableOverride)'] +Line 132: Unexpected errors ['typeddicts_readonly_inheritance.py:132:7 - error: TypedDict item "x" cannot be redefined as NotRequired (reportIncompatibleVariableOverride)'] +""" diff --git a/conformance/results/pyright/typeddicts_readonly_kwargs.toml b/conformance/results/pyright/typeddicts_readonly_kwargs.toml index fd67ff84d..e4713ced1 100644 --- a/conformance/results/pyright/typeddicts_readonly_kwargs.toml +++ b/conformance/results/pyright/typeddicts_readonly_kwargs.toml @@ -3,3 +3,7 @@ output = """ typeddicts_readonly_kwargs.py:33:5 - error: Could not assign item in TypedDict   "key1" is a read-only key in "*ReadOnlyArgs" (reportTypedDictNotRequiredAccess) """ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Unexpected errors ['typeddicts_readonly_kwargs.py:33:5 - error: Could not assign item in TypedDict'] +""" diff --git a/conformance/results/pyright/typeddicts_readonly_update.toml b/conformance/results/pyright/typeddicts_readonly_update.toml index 893497510..a77c883c5 100644 --- a/conformance/results/pyright/typeddicts_readonly_update.toml +++ b/conformance/results/pyright/typeddicts_readonly_update.toml @@ -5,3 +5,7 @@ typeddicts_readonly_update.py:23:11 - error: Argument of type "A" cannot be assi   "x" is an incompatible type     Type "int" cannot be assigned to type "Never" (reportArgumentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['typeddicts_readonly_update.py:23:1 - error: No overloads for "update" match the provided arguments (reportCallIssue)', 'typeddicts_readonly_update.py:23:11 - error: Argument of type "A" cannot be assigned to parameter "__m" of type "Partial[A]" in function "update"'] +""" diff --git a/conformance/results/pyright/typeddicts_required.toml b/conformance/results/pyright/typeddicts_required.toml index 55fc83dad..3ee576c25 100644 --- a/conformance/results/pyright/typeddicts_required.toml +++ b/conformance/results/pyright/typeddicts_required.toml @@ -5,3 +5,10 @@ typeddicts_required.py:16:8 - error: "NotRequired" is not allowed in this contex typeddicts_required.py:59:8 - error: "Required" is not allowed in this context typeddicts_required.py:60:8 - error: "Required" is not allowed in this context """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['typeddicts_required.py:12:8 - error: "Required" is not allowed in this context'] +Line 16: Unexpected errors ['typeddicts_required.py:16:8 - error: "NotRequired" is not allowed in this context'] +Line 59: Unexpected errors ['typeddicts_required.py:59:8 - error: "Required" is not allowed in this context'] +Line 60: Unexpected errors ['typeddicts_required.py:60:8 - error: "Required" is not allowed in this context'] +""" diff --git a/conformance/results/pyright/typeddicts_type_consistency.toml b/conformance/results/pyright/typeddicts_type_consistency.toml index 83d54f749..0bed7ff59 100644 --- a/conformance/results/pyright/typeddicts_type_consistency.toml +++ b/conformance/results/pyright/typeddicts_type_consistency.toml @@ -23,3 +23,15 @@ typeddicts_type_consistency.py:82:25 - error: Expression of type "B3" cannot be typeddicts_type_consistency.py:124:56 - error: Expression of type "dict[str, dict[str, dict[str, int]]]" cannot be assigned to declared type "Outer1"   "Literal[1]" is incompatible with "str" (reportAssignmentType) """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['typeddicts_type_consistency.py:21:10 - error: Expression of type "B1" cannot be assigned to declared type "A1"'] +Line 38: Unexpected errors ['typeddicts_type_consistency.py:38:10 - error: Expression of type "B2" cannot be assigned to declared type "A2"'] +Line 65: Unexpected errors ['typeddicts_type_consistency.py:65:6 - error: Expression of type "A3" cannot be assigned to declared type "B3"'] +Line 69: Unexpected errors ['typeddicts_type_consistency.py:69:21 - error: Expression of type "dict[str, int]" cannot be assigned to declared type "A3"'] +Line 76: Unexpected errors ['typeddicts_type_consistency.py:76:22 - error: Expression of type "B3" cannot be assigned to declared type "dict[str, int]"'] +Line 77: Unexpected errors ['typeddicts_type_consistency.py:77:25 - error: Expression of type "B3" cannot be assigned to declared type "dict[str, object]"'] +Line 78: Unexpected errors ['typeddicts_type_consistency.py:78:22 - error: Expression of type "B3" cannot be assigned to declared type "dict[Any, Any]"'] +Line 82: Unexpected errors ['typeddicts_type_consistency.py:82:25 - error: Expression of type "B3" cannot be assigned to declared type "Mapping[str, int]"'] +Line 124: Unexpected errors ['typeddicts_type_consistency.py:124:56 - error: Expression of type "dict[str, dict[str, dict[str, int]]]" cannot be assigned to declared type "Outer1"'] +""" diff --git a/conformance/results/pyright/typeddicts_usage.toml b/conformance/results/pyright/typeddicts_usage.toml index 7dfc99955..1cbd395bb 100644 --- a/conformance/results/pyright/typeddicts_usage.toml +++ b/conformance/results/pyright/typeddicts_usage.toml @@ -10,3 +10,9 @@ typeddicts_usage.py:35:22 - error: Second argument to "isinstance" must be a cla   TypedDict class not allowed for instance or class checks (reportArgumentType) typeddicts_usage.py:40:24 - error: "TypedDict" cannot be used in this context """ +conformance_automated = "Fail" +errors_diff = """ +Line 28: Unexpected errors ['typeddicts_usage.py:28:18 - error: Expression of type "dict[str, str | int]" cannot be assigned to declared type "Movie"'] +Line 35: Unexpected errors ['typeddicts_usage.py:35:22 - error: Second argument to "isinstance" must be a class or tuple of classes'] +Line 40: Unexpected errors ['typeddicts_usage.py:40:24 - error: "TypedDict" cannot be used in this context'] +""" diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 4b1baca77..9d0780a91 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ version = "pyright 1.1.357" -test_duration = 1.6 +test_duration = 1.7 diff --git a/conformance/results/pytype/aliases_explicit.toml b/conformance/results/pytype/aliases_explicit.toml index c46fcb51c..ec05ea520 100644 --- a/conformance/results/pytype/aliases_explicit.toml +++ b/conformance/results/pytype/aliases_explicit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. +notes = """Incorrectly reports error for type alias defined with ParamSpec. Does not report invalid specialization of generic type alias with bound TypeVar. Incorrectly evaluates generic type alias with ParamSpec with missing type argument. Does not report some illegal annotation forms as invalid type aliases. @@ -26,3 +25,16 @@ File "aliases_explicit.py", line 89, in : Invalid type annotation '1' fo File "aliases_explicit.py", line 91, in : Invalid type annotation '' for BadTypeAlias13 [invalid-annotation] File "aliases_explicit.py", line 102, in : Invalid type annotation 'Union[list, set][int]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 79: Expected 1 errors +Line 84: Expected 1 errors +Line 85: Expected 1 errors +Line 86: Expected 1 errors +Line 90: Expected 1 errors +Line 100: Expected 1 errors +Line 101: Expected 1 errors +Line 41: Unexpected errors ['File "aliases_explicit.py", line 41, in : Invalid type annotation \\'[str, str]\\' [invalid-annotation]', 'File "aliases_explicit.py", line 41, in : Invalid type annotation \\'Callable[Concatenate[int, P], R][[str, str], None]\\' [invalid-annotation]'] +Line 57: Unexpected errors ['File "aliases_explicit.py", line 57, in good_type_aliases: Callable[Concatenate, Any] [assert-type]'] +Line 60: Unexpected errors ['File "aliases_explicit.py", line 60, in good_type_aliases: Callable[[Any], None] [assert-type]'] +""" diff --git a/conformance/results/pytype/aliases_implicit.toml b/conformance/results/pytype/aliases_implicit.toml index 7814b1000..9f92073c0 100644 --- a/conformance/results/pytype/aliases_implicit.toml +++ b/conformance/results/pytype/aliases_implicit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. +notes = """Incorrectly reports error for type alias defined with ParamSpec. Does not report invalid specialization of generic type alias with bound TypeVar. Incorrectly evaluates generic type alias with ParamSpec with missing type argument. Allows some illegal annotation forms to be interpreted as valid type aliases. @@ -25,3 +24,16 @@ File "aliases_implicit.py", line 105, in : Invalid type annotation '((in File "aliases_implicit.py", line 105, in : Invalid type annotation "{'a': 'b'}" for p5 [invalid-annotation] File "aliases_implicit.py", line 135, in : Invalid type annotation 'Union[list, set][int]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 54: Unexpected errors ['File "aliases_implicit.py", line 54, in : Invalid type annotation \\'[str, str]\\' [invalid-annotation]', 'File "aliases_implicit.py", line 54, in : Invalid type annotation \\'Callable[Concatenate[int, P], R][[str, str], None]\\' [invalid-annotation]'] +Line 68: Unexpected errors ['File "aliases_implicit.py", line 68, in good_type_aliases: Callable[Concatenate, Any] [assert-type]'] +Line 72: Unexpected errors ['File "aliases_implicit.py", line 72, in good_type_aliases: Callable[[Any], None] [assert-type]'] +Line 76: Unexpected errors ['File "aliases_implicit.py", line 76, in : Invalid type annotation \\'Optional[int][int]\\' [invalid-annotation]'] +Line 77: Unexpected errors ['File "aliases_implicit.py", line 77, in : Invalid type annotation \\'List[Optional[int]][int]\\' [invalid-annotation]'] +Line 78: Unexpected errors ['File "aliases_implicit.py", line 78, in : Invalid type annotation \\'List[T][int, int]\\' [invalid-annotation]'] +Line 79: Unexpected errors ['File "aliases_implicit.py", line 79, in : Invalid type annotation \\'Callable[[int, T], T][int, int]\\' [invalid-annotation]'] +Line 80: Unexpected errors ['File "aliases_implicit.py", line 80, in : Invalid type annotation \\'Callable[Concatenate[int, P], R][int, int]\\' [invalid-annotation]'] +Line 105: Unexpected errors ['File "aliases_implicit.py", line 105, in : Invalid type annotation \\'[int, str]\\' for p2 [invalid-annotation]', 'File "aliases_implicit.py", line 105, in : Invalid type annotation \\'True\\' for p10 [invalid-annotation]', 'File "aliases_implicit.py", line 105, in : Invalid type annotation \\'\\' for p4 [invalid-annotation]', 'File "aliases_implicit.py", line 105, in : Invalid type annotation \\'3\\' for p9 [invalid-annotation]', 'File "aliases_implicit.py", line 105, in : Invalid type annotation \\'1\\' for p11 [invalid-annotation]', 'File "aliases_implicit.py", line 105, in : Invalid type annotation \\'((int, str),)\\' for p3 [invalid-annotation]', 'File "aliases_implicit.py", line 105, in : Invalid type annotation "{\\'a\\': \\'b\\'}" for p5 [invalid-annotation]'] +Line 135: Unexpected errors ['File "aliases_implicit.py", line 135, in : Invalid type annotation \\'Union[list, set][int]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/aliases_newtype.toml b/conformance/results/pytype/aliases_newtype.toml index 432653ebf..2e392e85c 100644 --- a/conformance/results/pytype/aliases_newtype.toml +++ b/conformance/results/pytype/aliases_newtype.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject use of NewType in `isinstance` call. +notes = """Does not reject use of NewType in `isinstance` call. Does not reject use of NewType in class definition statement. Does not report inconsistency between name of NewType and assigned identifier name. Does not reject use of NewType with generic class with TypeVar. @@ -14,3 +13,10 @@ File "aliases_newtype.py", line 12, in : Type annotation for u1 does not File "aliases_newtype.py", line 38, in : class GoodNewType1 is not indexable [not-indexable] File "aliases_newtype.py", line 60, in : Function typing.NewType expects 2 arg(s), got 3 [wrong-arg-count] """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['File "aliases_newtype.py", line 11, in : Function UserId.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 12: Unexpected errors ['File "aliases_newtype.py", line 12, in : Type annotation for u1 does not match type of assignment [annotation-type-mismatch]'] +Line 38: Unexpected errors ['File "aliases_newtype.py", line 38, in : class GoodNewType1 is not indexable [not-indexable]'] +Line 60: Unexpected errors ['File "aliases_newtype.py", line 60, in : Function typing.NewType expects 2 arg(s), got 3 [wrong-arg-count]'] +""" diff --git a/conformance/results/pytype/aliases_recursive.toml b/conformance/results/pytype/aliases_recursive.toml index 910abbb2e..d51c1fd6e 100644 --- a/conformance/results/pytype/aliases_recursive.toml +++ b/conformance/results/pytype/aliases_recursive.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not detect type violation for some deeply-nested types. +notes = """Does not detect type violation for some deeply-nested types. Does not properly handle `|` for unions in some recursive type alias definitions. Does not detect cyclical references in recursive type alias definition. """ @@ -25,3 +24,20 @@ File "aliases_recursive.py", line 72, in : Invalid type annotation 'Gene File "aliases_recursive.py", line 73, in : Invalid type annotation 'list[str, int]' [invalid-annotation] File "aliases_recursive.py", line 73, in : Invalid type annotation 'GenericTypeAlias2[str, int]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['File "aliases_recursive.py", line 19, in : Type annotation for j4 does not match type of assignment [annotation-type-mismatch]'] +Line 20: Unexpected errors ['File "aliases_recursive.py", line 20, in : Type annotation for j5 does not match type of assignment [annotation-type-mismatch]'] +Line 38: Unexpected errors ['File "aliases_recursive.py", line 38, in : Type annotation for t6 does not match type of assignment [annotation-type-mismatch]'] +Line 39: Unexpected errors ['File "aliases_recursive.py", line 39, in : Type annotation for t6 does not match type of assignment [annotation-type-mismatch]'] +Line 50: Unexpected errors ['File "aliases_recursive.py", line 50, in : Type annotation for m7 does not match type of assignment [annotation-type-mismatch]'] +Line 51: Unexpected errors ['File "aliases_recursive.py", line 51, in : Type annotation for m8 does not match type of assignment [annotation-type-mismatch]'] +Line 62: Unexpected errors ['File "aliases_recursive.py", line 62, in : unsupported operand type(s) for |: \\'\\'GenericTypeAlias1[T1]\\': str\\' and \\'T1: TypeVar\\' [unsupported-operands]'] +Line 63: Unexpected errors ['File "aliases_recursive.py", line 63, in : Invalid type annotation \\'list[str]\\' [invalid-annotation]'] +Line 66: Unexpected errors ['File "aliases_recursive.py", line 66, in : Invalid type annotation \\'list[str]\\' [invalid-annotation]', 'File "aliases_recursive.py", line 66, in : Invalid type annotation \\'GenericTypeAlias1[str]\\' [invalid-annotation]'] +Line 67: Unexpected errors ['File "aliases_recursive.py", line 67, in : Invalid type annotation \\'list[str]\\' [invalid-annotation]', 'File "aliases_recursive.py", line 67, in : Invalid type annotation \\'GenericTypeAlias1[str]\\' [invalid-annotation]'] +Line 69: Unexpected errors ['File "aliases_recursive.py", line 69, in : unsupported operand type(s) for |: \\'\\'GenericTypeAlias2[T1, T2]\\': str\\' and \\'T1: TypeVar\\' [unsupported-operands]'] +Line 71: Unexpected errors ['File "aliases_recursive.py", line 71, in : Invalid type annotation \\'list[str, int]\\' [invalid-annotation]', 'File "aliases_recursive.py", line 71, in : Invalid type annotation \\'GenericTypeAlias2[str, int]\\' [invalid-annotation]'] +Line 72: Unexpected errors ['File "aliases_recursive.py", line 72, in : Invalid type annotation \\'list[str, float]\\' [invalid-annotation]', 'File "aliases_recursive.py", line 72, in : Invalid type annotation \\'GenericTypeAlias2[str, float]\\' [invalid-annotation]'] +Line 73: Unexpected errors ['File "aliases_recursive.py", line 73, in : Invalid type annotation \\'list[str, int]\\' [invalid-annotation]', 'File "aliases_recursive.py", line 73, in : Invalid type annotation \\'GenericTypeAlias2[str, int]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/aliases_type_statement.toml b/conformance/results/pytype/aliases_type_statement.toml index 1b16e7f18..396332af6 100644 --- a/conformance/results/pytype/aliases_type_statement.toml +++ b/conformance/results/pytype/aliases_type_statement.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Does not support `type` statement. +notes = """Does not support `type` statement. """ output = """ SyntaxError: Type statement is only supported in Python 3.12 and greater (, line 8) """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/aliases_typealiastype.toml b/conformance/results/pytype/aliases_typealiastype.toml index ad477debc..8ea1a69d7 100644 --- a/conformance/results/pytype/aliases_typealiastype.toml +++ b/conformance/results/pytype/aliases_typealiastype.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Support for TypeAliasType is not implemented. +notes = """Support for TypeAliasType is not implemented. """ output = """ File "aliases_typealiastype.py", line 5, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -13,3 +12,13 @@ File "aliases_typealiastype.py", line 50, in : Name 'BadAlias4' is not d File "aliases_typealiastype.py", line 52, in : Name 'BadAlias5' is not defined [name-error] File "aliases_typealiastype.py", line 54, in : Name 'BadAlias7' is not defined [name-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 5: Unexpected errors ['File "aliases_typealiastype.py", line 5, in : typing.TypeVarTuple not supported yet [not-supported-yet]', 'File "aliases_typealiastype.py", line 5, in : Can\\'t find module \\'typing.TypeAliasType\\'. [import-error]'] +Line 11: Unexpected errors ['File "aliases_typealiastype.py", line 11, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 19: Unexpected errors ['File "aliases_typealiastype.py", line 19, in : Name \\'GoodAlias4\\' is not defined [name-error]'] +Line 22: Unexpected errors ['File "aliases_typealiastype.py", line 22, in : Name \\'GoodAlias5\\' is not defined [name-error]', 'File "aliases_typealiastype.py", line 22, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 50: Unexpected errors ['File "aliases_typealiastype.py", line 50, in : Name \\'BadAlias4\\' is not defined [name-error]'] +Line 52: Unexpected errors ['File "aliases_typealiastype.py", line 52, in : Name \\'BadAlias5\\' is not defined [name-error]'] +Line 54: Unexpected errors ['File "aliases_typealiastype.py", line 54, in : Name \\'BadAlias7\\' is not defined [name-error]'] +""" diff --git a/conformance/results/pytype/aliases_variance.toml b/conformance/results/pytype/aliases_variance.toml index 4d08ba023..a3f2501c7 100644 --- a/conformance/results/pytype/aliases_variance.toml +++ b/conformance/results/pytype/aliases_variance.toml @@ -1,8 +1,12 @@ conformant = "Unsupported" -notes = """ -Does not detect variance incompatibility. +notes = """Does not detect variance incompatibility. """ output = """ File "aliases_variance.py", line 9, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] File "aliases_variance.py", line 10, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 9: Unexpected errors ['File "aliases_variance.py", line 9, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 10: Unexpected errors ['File "aliases_variance.py", line 10, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/annotations_coroutines.toml b/conformance/results/pytype/annotations_coroutines.toml index 03c99b178..f6605b941 100644 --- a/conformance/results/pytype/annotations_coroutines.toml +++ b/conformance/results/pytype/annotations_coroutines.toml @@ -1,7 +1,10 @@ conformant = "Partial" -notes = """ -Does not evaluate correct type for async function. +notes = """Does not evaluate correct type for async function. """ output = """ File "annotations_coroutines.py", line 19, in : Callable[[int], str] [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Unexpected errors ['File "annotations_coroutines.py", line 19, in : Callable[[int], str] [assert-type]'] +""" diff --git a/conformance/results/pytype/annotations_forward_refs.toml b/conformance/results/pytype/annotations_forward_refs.toml index 9b5d1fd02..27514af0e 100644 --- a/conformance/results/pytype/annotations_forward_refs.toml +++ b/conformance/results/pytype/annotations_forward_refs.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject some illegal type expression forms when quoted. +notes = """Does not reject some illegal type expression forms when quoted. Incorrectly generates error for quoted type defined in class scope. Evaluates incorrect type for class variable annotated with quoted type expression. Does not treat triple-quoted forward reference annotation as implicitly parenthesized. @@ -28,3 +27,18 @@ File "annotations_forward_refs.py", line 89, in ClassD: Invalid type annotation File "annotations_forward_refs.py", line 93, in : Any [assert-type] File "annotations_forward_refs.py", line 100, in : unexpected indent [python-compiler-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['File "annotations_forward_refs.py", line 22, in : Name \\'ClassA\\' is not defined [name-error]'] +Line 23: Unexpected errors ['File "annotations_forward_refs.py", line 23, in : Name \\'ClassA\\' is not defined [name-error]'] +Line 24: Unexpected errors ['File "annotations_forward_refs.py", line 24, in : unsupported operand type(s) for |: \\'\\'ClassA\\': str\\' and \\'int: Type[int]\\' [unsupported-operands]'] +Line 25: Unexpected errors ['File "annotations_forward_refs.py", line 25, in : Missing parameter \\'y\\' in call to function int.__or__ [missing-parameter]'] +Line 40: Unexpected errors ['File "annotations_forward_refs.py", line 40, in : invalid syntax [python-compiler-error]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'{}\\' for p5 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'[int, str]\\' for p2 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'True\\' for p10 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'\\' for p15 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'\\' for p4 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'1\\' for p9 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'1\\' for p11 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'-1\\' for p12 [invalid-annotation]', 'File "annotations_forward_refs.py", line 40, in : Invalid type annotation \\'(int, str)\\' for p3 [invalid-annotation]'] +Line 66: Unexpected errors ['File "annotations_forward_refs.py", line 66, in ClassB: Name \\'ClassB\\' is not defined [name-error]'] +Line 80: Unexpected errors ['File "annotations_forward_refs.py", line 80, in ClassD: Name \\'ClassF\\' is not defined [name-error]'] +Line 82: Unexpected errors ['File "annotations_forward_refs.py", line 82, in ClassD: Invalid type annotation \\'\\' for str [invalid-annotation]'] +Line 87: Unexpected errors ['File "annotations_forward_refs.py", line 87, in ClassD: Invalid type annotation \\'\\' for x [invalid-annotation]'] +Line 89: Unexpected errors ['File "annotations_forward_refs.py", line 89, in ClassD: Invalid type annotation \\'\\' for y [invalid-annotation]'] +Line 93: Unexpected errors ['File "annotations_forward_refs.py", line 93, in : Any [assert-type]'] +Line 100: Unexpected errors ['File "annotations_forward_refs.py", line 100, in : unexpected indent [python-compiler-error]'] +""" diff --git a/conformance/results/pytype/annotations_generators.toml b/conformance/results/pytype/annotations_generators.toml index 7d57ccc94..582e9d198 100644 --- a/conformance/results/pytype/annotations_generators.toml +++ b/conformance/results/pytype/annotations_generators.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report invalid return type for generator when function implicitly returns None. +notes = """Does not report invalid return type for generator when function implicitly returns None. Reports invalid error when return type of generator is annotated as a compatible protocol. Does not report type violation in `yield from` statement. """ @@ -18,3 +17,17 @@ File "annotations_generators.py", line 118, in generator18: bad return type [bad File "annotations_generators.py", line 119, in generator18: bad return type [bad-return-type] File "annotations_generators.py", line 182, in : Callable[[], AsyncIterator[int]] [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 54: Unexpected errors ['File "annotations_generators.py", line 54, in generator2: bad return type [bad-return-type]'] +Line 57: Unexpected errors ['File "annotations_generators.py", line 57, in generator2: bad return type [bad-return-type]', 'File "annotations_generators.py", line 57, in generator2: bad return type [bad-return-type]'] +Line 66: Unexpected errors ['File "annotations_generators.py", line 66, in generator3: bad return type [bad-return-type]'] +Line 75: Unexpected errors ['File "annotations_generators.py", line 75, in generator5: bad return type [bad-return-type]'] +Line 86: Unexpected errors ['File "annotations_generators.py", line 86, in : Bad return type \\'int\\' for generator function generator8 [bad-yield-annotation]'] +Line 91: Unexpected errors ['File "annotations_generators.py", line 91, in : Bad return type \\'int\\' for async generator function generator9 [bad-yield-annotation]'] +Line 100: Unexpected errors ['File "annotations_generators.py", line 100, in : Bad return type \\'IntIterator\\' for generator function generator15 [bad-yield-annotation]'] +Line 109: Unexpected errors ['File "annotations_generators.py", line 109, in : Bad return type \\'AsyncIntIterator\\' for async generator function generator16 [bad-yield-annotation]'] +Line 118: Unexpected errors ['File "annotations_generators.py", line 118, in generator18: bad return type [bad-return-type]'] +Line 119: Unexpected errors ['File "annotations_generators.py", line 119, in generator18: bad return type [bad-return-type]'] +Line 182: Unexpected errors ['File "annotations_generators.py", line 182, in : Callable[[], AsyncIterator[int]] [assert-type]'] +""" diff --git a/conformance/results/pytype/annotations_methods.toml b/conformance/results/pytype/annotations_methods.toml index 889580f40..a4f22c64e 100644 --- a/conformance/results/pytype/annotations_methods.toml +++ b/conformance/results/pytype/annotations_methods.toml @@ -1,7 +1,10 @@ conformant = "Pass" -notes = """ -Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. +notes = """Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. """ output = """ File "annotations_methods.py", line 42, in : B [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 42: Unexpected errors ['File "annotations_methods.py", line 42, in : B [assert-type]'] +""" diff --git a/conformance/results/pytype/annotations_typeexpr.toml b/conformance/results/pytype/annotations_typeexpr.toml index 810e5f800..064fb03e0 100644 --- a/conformance/results/pytype/annotations_typeexpr.toml +++ b/conformance/results/pytype/annotations_typeexpr.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject call expressions in type annotation. +notes = """Does not reject call expressions in type annotation. Does not reject call lambda expression in type annotation. Does not reject list expression in type annotation. Does not reject ternary expression in type annotation. @@ -18,3 +17,7 @@ File "annotations_typeexpr.py", line 87, in : Invalid type annotation '1 File "annotations_typeexpr.py", line 87, in : Invalid type annotation '-1' for p12 [invalid-annotation] File "annotations_typeexpr.py", line 87, in : Invalid type annotation '(int, str)' for p3 [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 87: Unexpected errors ['File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'{}\\' for p5 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'[int, str]\\' for p2 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'True\\' for p10 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'\\' for p15 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'\\' for p4 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'3\\' for p9 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'1\\' for p11 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'-1\\' for p12 [invalid-annotation]', 'File "annotations_typeexpr.py", line 87, in : Invalid type annotation \\'(int, str)\\' for p3 [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/callables_annotation.toml b/conformance/results/pytype/callables_annotation.toml index 6f44d33cf..186f7d95a 100644 --- a/conformance/results/pytype/callables_annotation.toml +++ b/conformance/results/pytype/callables_annotation.toml @@ -13,3 +13,16 @@ File "callables_annotation.py", line 42, in : Invalid type annotation 'i File "callables_annotation.py", line 42, in : Invalid type annotation 'Callable[Any, int, int]' [invalid-annotation] File "callables_annotation.py", line 43, in : Invalid type annotation 'Ellipsis' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['File "callables_annotation.py", line 13, in func1: Function expects 2 arg(s), got 1 [wrong-arg-count]'] +Line 14: Unexpected errors ['File "callables_annotation.py", line 14, in func1: Function was called with the wrong arguments [wrong-arg-types]'] +Line 15: Unexpected errors ['File "callables_annotation.py", line 15, in func1: Function expects 2 arg(s), got 3 [wrong-arg-count]'] +Line 16: Unexpected errors ['File "callables_annotation.py", line 16, in func1: Invalid keyword arguments (a, b) to function [wrong-keyword-args]'] +Line 22: Unexpected errors ['File "callables_annotation.py", line 22, in func2: Function expects 0 arg(s), got 1 [wrong-arg-count]'] +Line 39: Unexpected errors ['File "callables_annotation.py", line 39, in : Invalid type annotation \\'int\\' [invalid-annotation]', 'File "callables_annotation.py", line 39, in : Invalid type annotation \\'Callable[Any]\\' [invalid-annotation]'] +Line 40: Unexpected errors ['File "callables_annotation.py", line 40, in : Invalid type annotation \\'int\\' [invalid-annotation]'] +Line 41: Unexpected errors ['File "callables_annotation.py", line 41, in : Invalid type annotation \\'[int]\\' [invalid-annotation]'] +Line 42: Unexpected errors ['File "callables_annotation.py", line 42, in : Invalid type annotation \\'int\\' [invalid-annotation]', 'File "callables_annotation.py", line 42, in : Invalid type annotation \\'Callable[Any, int, int]\\' [invalid-annotation]'] +Line 43: Unexpected errors ['File "callables_annotation.py", line 43, in : Invalid type annotation \\'Ellipsis\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/callables_kwargs.toml b/conformance/results/pytype/callables_kwargs.toml index d36179430..6bec6544c 100644 --- a/conformance/results/pytype/callables_kwargs.toml +++ b/conformance/results/pytype/callables_kwargs.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand Unpack in the context of **kwargs annotation. +notes = """Does not understand Unpack in the context of **kwargs annotation. """ output = """ File "callables_kwargs.py", line 10, in : typing.Unpack not supported yet [not-supported-yet] @@ -18,3 +17,20 @@ File "callables_kwargs.py", line 60, in func3: Function func1 was called with th File "callables_kwargs.py", line 61, in func3: Function func2 was called with the wrong arguments [wrong-arg-types] File "callables_kwargs.py", line 62, in func3: Function func2 was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['File "callables_kwargs.py", line 10, in : typing.Unpack not supported yet [not-supported-yet]'] +Line 24: Unexpected errors ['File "callables_kwargs.py", line 24, in func1: Unpack[TD2] [assert-type]'] +Line 30: Unexpected errors ['File "callables_kwargs.py", line 30, in func1: Unpack[TD2] [assert-type]'] +Line 33: Unexpected errors ['File "callables_kwargs.py", line 33, in func1: Unpack[TD2] [assert-type]'] +Line 39: Unexpected errors ['File "callables_kwargs.py", line 39, in func2: Dict[str, Unpack[TD1]] [assert-type]'] +Line 44: Unexpected errors ['File "callables_kwargs.py", line 44, in func3: Function func1 was called with the wrong arguments [wrong-arg-types]'] +Line 46: Unexpected errors ['File "callables_kwargs.py", line 46, in func3: Missing parameter \\'v2\\' in call to function TD2.__init__ [missing-parameter]'] +Line 48: Unexpected errors ['File "callables_kwargs.py", line 48, in func3: Function func1 was called with the wrong arguments [wrong-arg-types]'] +Line 49: Unexpected errors ['File "callables_kwargs.py", line 49, in func3: Function func1 expects 0 arg(s), got 3 [wrong-arg-count]'] +Line 55: Unexpected errors ['File "callables_kwargs.py", line 55, in func3: Function func1 was called with the wrong arguments [wrong-arg-types]'] +Line 58: Unexpected errors ['File "callables_kwargs.py", line 58, in func3: Function func1 was called with the wrong arguments [wrong-arg-types]'] +Line 60: Unexpected errors ['File "callables_kwargs.py", line 60, in func3: Function func1 was called with the wrong arguments [wrong-arg-types]'] +Line 61: Unexpected errors ['File "callables_kwargs.py", line 61, in func3: Function func2 was called with the wrong arguments [wrong-arg-types]'] +Line 62: Unexpected errors ['File "callables_kwargs.py", line 62, in func3: Function func2 was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/callables_protocol.toml b/conformance/results/pytype/callables_protocol.toml index 36eb1a414..d84fe1725 100644 --- a/conformance/results/pytype/callables_protocol.toml +++ b/conformance/results/pytype/callables_protocol.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not properly handle type compatibility checks with callback protocols. +notes = """Does not properly handle type compatibility checks with callback protocols. """ output = """ File "callables_protocol.py", line 9, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] @@ -13,3 +12,13 @@ Called from (traceback): File "callables_protocol.py", line 197, in : No attribute 'other_attribute2' on Proto9[Any, str] [attribute-error] File "callables_protocol.py", line 199, in : Function Proto9.__call__ was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 9: Unexpected errors ['File "callables_protocol.py", line 9, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +Line 10: Unexpected errors ['File "callables_protocol.py", line 10, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 121: Unexpected errors ['File "callables_protocol.py", line 121, in : Type annotation for cb6 does not match type of assignment [annotation-type-mismatch]'] +Line 173: Unexpected errors ['File "callables_protocol.py", line 173, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 188: Unexpected errors ['File "callables_protocol.py", line 188, in decorator1: bad return type [bad-return-type]'] +Line 197: Unexpected errors ['File "callables_protocol.py", line 197, in : No attribute \\'other_attribute2\\' on Proto9[Any, str] [attribute-error]'] +Line 199: Unexpected errors ['File "callables_protocol.py", line 199, in : Function Proto9.__call__ was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/classes_classvar.toml b/conformance/results/pytype/classes_classvar.toml index 9fb164f94..3f888aadd 100644 --- a/conformance/results/pytype/classes_classvar.toml +++ b/conformance/results/pytype/classes_classvar.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject use of TypeVar in ClassVar. +notes = """Does not reject use of TypeVar in ClassVar. Does not reject use of ParamSpec in ClassVar. Does not reject use of ClassVar as a generic type argument. Rejects initialization of ClassVar if no type argument is provided. @@ -25,3 +24,18 @@ File "classes_classvar.py", line 76, in : ClassVar [assert-type] File "classes_classvar.py", line 119, in ProtoA: Type annotation for z does not match type of assignment [annotation-type-mismatch] File "classes_classvar.py", line 129, in : Type annotation for a does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['File "classes_classvar.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 27: Unexpected errors ['File "classes_classvar.py", line 27, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 36: Unexpected errors ['File "classes_classvar.py", line 36, in ClassA: Invalid type annotation \\'ClassVar[int, str]\\' [invalid-annotation]'] +Line 37: Unexpected errors ['File "classes_classvar.py", line 37, in ClassA: class ClassVar is not indexable [not-indexable]'] +Line 38: Unexpected errors ['File "classes_classvar.py", line 38, in ClassA: Name \\'var\\' is not defined [name-error]'] +Line 50: Unexpected errors ['File "classes_classvar.py", line 50, in ClassA: Type annotation for bad8 does not match type of assignment [annotation-type-mismatch]'] +Line 52: Unexpected errors ['File "classes_classvar.py", line 52, in ClassA: Name \\'Final\\' is not defined [name-error]'] +Line 58: Unexpected errors ['File "classes_classvar.py", line 58, in ClassA: Type annotation for good4 does not match type of assignment [annotation-type-mismatch]'] +Line 66: Unexpected errors ['File "classes_classvar.py", line 66, in method2: bad return type [bad-return-type]'] +Line 76: Unexpected errors ['File "classes_classvar.py", line 76, in : ClassVar [assert-type]'] +Line 119: Unexpected errors ['File "classes_classvar.py", line 119, in ProtoA: Type annotation for z does not match type of assignment [annotation-type-mismatch]'] +Line 129: Unexpected errors ['File "classes_classvar.py", line 129, in : Type annotation for a does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/classes_override.toml b/conformance/results/pytype/classes_override.toml index 70a806e60..82a8bcd62 100644 --- a/conformance/results/pytype/classes_override.toml +++ b/conformance/results/pytype/classes_override.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not yet support the @override decorator. +notes = """Does not yet support the @override decorator. """ output = """ File "classes_override.py", line 7, in : typing.override not supported yet [not-supported-yet] @@ -11,3 +10,13 @@ File "classes_override.py", line 57, in ChildA: Attribute 'method4' not found on File "classes_override.py", line 66, in method4: bad return type [bad-return-type] File "classes_override.py", line 103, in ChildB: Attribute 'method1' not found on any parent class [override-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['File "classes_override.py", line 7, in : typing.override not supported yet [not-supported-yet]'] +Line 30: Unexpected errors ['File "classes_override.py", line 30, in method2: bad return type [bad-return-type]'] +Line 50: Unexpected errors ['File "classes_override.py", line 50, in method2: bad return type [bad-return-type]'] +Line 53: Unexpected errors ['File "classes_override.py", line 53, in ChildA: Attribute \\'method3\\' not found on any parent class [override-error]'] +Line 57: Unexpected errors ['File "classes_override.py", line 57, in ChildA: Attribute \\'method4\\' not found on any parent class [override-error]'] +Line 66: Unexpected errors ['File "classes_override.py", line 66, in method4: bad return type [bad-return-type]'] +Line 103: Unexpected errors ['File "classes_override.py", line 103, in ChildB: Attribute \\'method1\\' not found on any parent class [override-error]'] +""" diff --git a/conformance/results/pytype/dataclasses_descriptors.toml b/conformance/results/pytype/dataclasses_descriptors.toml index 333c85614..7b1bb1a89 100644 --- a/conformance/results/pytype/dataclasses_descriptors.toml +++ b/conformance/results/pytype/dataclasses_descriptors.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand descriptor objects in dataclass. +notes = """Does not understand descriptor objects in dataclass. """ output = """ File "dataclasses_descriptors.py", line 24, in __get__: bad return type [bad-return-type] @@ -30,3 +29,9 @@ Called from (traceback): line 61, in current file File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Unexpected errors ['File "dataclasses_descriptors.py", line 24, in __get__: bad return type [bad-return-type]', 'File "dataclasses_descriptors.py", line 24, in __get__: bad return type [bad-return-type]'] +Line 35: Unexpected errors ['File "dataclasses_descriptors.py", line 35, in : Function DC1.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 51: Unexpected errors ['File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type]', 'File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type]', 'File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type]', 'File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type]', 'File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type]', 'File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type]', 'File "dataclasses_descriptors.py", line 51, in __get__: bad return type [bad-return-type]'] +""" diff --git a/conformance/results/pytype/dataclasses_frozen.toml b/conformance/results/pytype/dataclasses_frozen.toml index 6f64c84f3..87b6f899f 100644 --- a/conformance/results/pytype/dataclasses_frozen.toml +++ b/conformance/results/pytype/dataclasses_frozen.toml @@ -1,9 +1,11 @@ conformant = "Unsupported" -notes = """ -Does not report assignment to field within frozen dataclass instance. +notes = """Does not report assignment to field within frozen dataclass instance. Does not reject frozen dataclass inherited from non-frozen dataclass. Does not reject non-frozen dataclass inherited from frozen dataclass. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/dataclasses_hash.toml b/conformance/results/pytype/dataclasses_hash.toml index 5d4788479..2517ea227 100644 --- a/conformance/results/pytype/dataclasses_hash.toml +++ b/conformance/results/pytype/dataclasses_hash.toml @@ -1,7 +1,9 @@ conformant = "Partial" -notes = """ -Does not report when dataclass is not compatible with Hashable protocol. +notes = """Does not report when dataclass is not compatible with Hashable protocol. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/dataclasses_inheritance.toml b/conformance/results/pytype/dataclasses_inheritance.toml index 042c3d571..16130ba9f 100644 --- a/conformance/results/pytype/dataclasses_inheritance.toml +++ b/conformance/results/pytype/dataclasses_inheritance.toml @@ -1,8 +1,10 @@ conformant = "Partial" -notes = """ -Does not reject ClassVar that is overridden by instance variable. +notes = """Does not reject ClassVar that is overridden by instance variable. Does not reject instance variable that is overridden by ClassVar. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/dataclasses_kwonly.toml b/conformance/results/pytype/dataclasses_kwonly.toml index c3b696e8a..02d60bbf7 100644 --- a/conformance/results/pytype/dataclasses_kwonly.toml +++ b/conformance/results/pytype/dataclasses_kwonly.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly reports error when kw_only field has default value. +notes = """Incorrectly reports error when kw_only field has default value. Incorrectly rejects kw_only field with default before positional field. """ output = """ @@ -12,3 +11,13 @@ File "dataclasses_kwonly.py", line 53, in : Missing parameter 'a' in cal File "dataclasses_kwonly.py", line 56, in : In method __init__, non-default argument c follows default argument [invalid-function-definition] File "dataclasses_kwonly.py", line 61, in : function DC4.__init__ got multiple values for keyword argument 'b' [duplicate-keyword-argument] """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['File "dataclasses_kwonly.py", line 23, in : Function DC1.__init__ expects 2 arg(s), got 3 [wrong-arg-count]'] +Line 38: Unexpected errors ['File "dataclasses_kwonly.py", line 38, in : Function DC2.__init__ expects 2 arg(s), got 3 [wrong-arg-count]'] +Line 47: Unexpected errors ['File "dataclasses_kwonly.py", line 47, in : Missing parameter \\'a\\' in call to function DC3.__init__ [missing-parameter]'] +Line 50: Unexpected errors ['File "dataclasses_kwonly.py", line 50, in : Missing parameter \\'a\\' in call to function DC3.__init__ [missing-parameter]'] +Line 53: Unexpected errors ['File "dataclasses_kwonly.py", line 53, in : Missing parameter \\'a\\' in call to function DC3.__init__ [missing-parameter]'] +Line 56: Unexpected errors ['File "dataclasses_kwonly.py", line 56, in : In method __init__, non-default argument c follows default argument [invalid-function-definition]'] +Line 61: Unexpected errors ['File "dataclasses_kwonly.py", line 61, in : function DC4.__init__ got multiple values for keyword argument \\'b\\' [duplicate-keyword-argument]'] +""" diff --git a/conformance/results/pytype/dataclasses_order.toml b/conformance/results/pytype/dataclasses_order.toml index 6f413dd76..8ec5e8eb9 100644 --- a/conformance/results/pytype/dataclasses_order.toml +++ b/conformance/results/pytype/dataclasses_order.toml @@ -1,7 +1,9 @@ conformant = "Partial" -notes = """ -Does not report type incompatibility with comparison operator. +notes = """Does not report type incompatibility with comparison operator. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/dataclasses_postinit.toml b/conformance/results/pytype/dataclasses_postinit.toml index 64c377cd2..98c0cbaf4 100644 --- a/conformance/results/pytype/dataclasses_postinit.toml +++ b/conformance/results/pytype/dataclasses_postinit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not validate `__post_init__` method. +notes = """Does not validate `__post_init__` method. Reports incorrect error for incompatible `__post_init__` method override. """ output = """ @@ -8,3 +7,9 @@ File "dataclasses_postinit.py", line 28, in : No attribute 'x' on DC1 [a File "dataclasses_postinit.py", line 29, in : No attribute 'y' on DC1 [attribute-error] File "dataclasses_postinit.py", line 54, in DC4: Overriding method signature mismatch [signature-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 28: Unexpected errors ['File "dataclasses_postinit.py", line 28, in : No attribute \\'x\\' on DC1 [attribute-error]'] +Line 29: Unexpected errors ['File "dataclasses_postinit.py", line 29, in : No attribute \\'y\\' on DC1 [attribute-error]'] +Line 54: Unexpected errors ['File "dataclasses_postinit.py", line 54, in DC4: Overriding method signature mismatch [signature-mismatch]'] +""" diff --git a/conformance/results/pytype/dataclasses_slots.toml b/conformance/results/pytype/dataclasses_slots.toml index f891c51ee..f7391eaa1 100644 --- a/conformance/results/pytype/dataclasses_slots.toml +++ b/conformance/results/pytype/dataclasses_slots.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report error when `slots=True` is used with `__slots__` definition. +notes = """Does not report error when `slots=True` is used with `__slots__` definition. Does not reject write to instance variable that is not defined in __slots__. Incorrectly reports error when accessing `__slots__` when `slots=True`. """ @@ -10,3 +9,10 @@ File "dataclasses_slots.py", line 58, in : No attribute '__slots__' on D File "dataclasses_slots.py", line 67, in : No attribute '__slots__' on Type[DC6] [attribute-error] File "dataclasses_slots.py", line 70, in : No attribute '__slots__' on DC6 [attribute-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 57: Unexpected errors ['File "dataclasses_slots.py", line 57, in : No attribute \\'__slots__\\' on Type[DC5] [attribute-error]'] +Line 58: Unexpected errors ['File "dataclasses_slots.py", line 58, in : No attribute \\'__slots__\\' on DC5 [attribute-error]'] +Line 67: Unexpected errors ['File "dataclasses_slots.py", line 67, in : No attribute \\'__slots__\\' on Type[DC6] [attribute-error]'] +Line 70: Unexpected errors ['File "dataclasses_slots.py", line 70, in : No attribute \\'__slots__\\' on DC6 [attribute-error]'] +""" diff --git a/conformance/results/pytype/dataclasses_transform_class.toml b/conformance/results/pytype/dataclasses_transform_class.toml index fa6e1c5d4..3452adad1 100644 --- a/conformance/results/pytype/dataclasses_transform_class.toml +++ b/conformance/results/pytype/dataclasses_transform_class.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ File "dataclasses_transform_class.py", line 23, in : Arguments to dataclass_transform not supported yet [not-supported-yet] @@ -9,3 +8,11 @@ File "dataclasses_transform_class.py", line 82, in : Arguments to datacl File "dataclasses_transform_class.py", line 103, in : Invalid keyword argument id to function GenericCustomer.__init__ [wrong-keyword-args] File "dataclasses_transform_class.py", line 106, in : Arguments to dataclass_transform not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Unexpected errors ['File "dataclasses_transform_class.py", line 23, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +Line 57: Unexpected errors ['File "dataclasses_transform_class.py", line 57, in : Invalid keyword argument other_name to function Customer1.__init__ [wrong-keyword-args]'] +Line 82: Unexpected errors ['File "dataclasses_transform_class.py", line 82, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +Line 103: Unexpected errors ['File "dataclasses_transform_class.py", line 103, in : Invalid keyword argument id to function GenericCustomer.__init__ [wrong-keyword-args]'] +Line 106: Unexpected errors ['File "dataclasses_transform_class.py", line 106, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/dataclasses_transform_field.toml b/conformance/results/pytype/dataclasses_transform_field.toml index 1717b4b86..84b05f8ef 100644 --- a/conformance/results/pytype/dataclasses_transform_field.toml +++ b/conformance/results/pytype/dataclasses_transform_field.toml @@ -1,8 +1,12 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ File "dataclasses_transform_field.py", line 48, in : Arguments to dataclass_transform not supported yet [not-supported-yet] File "dataclasses_transform_field.py", line 50, in create_model: bad return type [bad-return-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 48: Unexpected errors ['File "dataclasses_transform_field.py", line 48, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +Line 50: Unexpected errors ['File "dataclasses_transform_field.py", line 50, in create_model: bad return type [bad-return-type]'] +""" diff --git a/conformance/results/pytype/dataclasses_transform_func.toml b/conformance/results/pytype/dataclasses_transform_func.toml index fa502ea6d..082277312 100644 --- a/conformance/results/pytype/dataclasses_transform_func.toml +++ b/conformance/results/pytype/dataclasses_transform_func.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ File "dataclasses_transform_func.py", line 13, in : Arguments to dataclass_transform not supported yet [not-supported-yet] @@ -17,3 +16,16 @@ File "dataclasses_transform_func.py", line 67, in : Invalid keyword argu File "dataclasses_transform_func.py", line 71, in : Function Customer2.__init__ expects 1 arg(s), got 3 [wrong-arg-count] File "dataclasses_transform_func.py", line 76, in : Arguments to dataclass_transform not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['File "dataclasses_transform_func.py", line 13, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +Line 19: Unexpected errors ['File "dataclasses_transform_func.py", line 19, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +Line 30: Unexpected errors ['File "dataclasses_transform_func.py", line 30, in create_model: bad return type [bad-return-type]', 'File "dataclasses_transform_func.py", line 30, in create_model: bad return type [bad-return-type]'] +Line 50: Unexpected errors ['File "dataclasses_transform_func.py", line 50, in : Invalid keyword arguments (id, name) to function Customer1.__init__ [wrong-keyword-args]'] +Line 53: Unexpected errors ['File "dataclasses_transform_func.py", line 53, in : Function Customer1.__init__ expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 57: Unexpected errors ['File "dataclasses_transform_func.py", line 57, in : Type annotation for name does not match type of assignment [annotation-type-mismatch]'] +Line 65: Unexpected errors ['File "dataclasses_transform_func.py", line 65, in : Invalid keyword arguments (id, name, salary) to function Customer1.__init__ [wrong-keyword-args]'] +Line 67: Unexpected errors ['File "dataclasses_transform_func.py", line 67, in : Invalid keyword arguments (id, name) to function Customer2.__init__ [wrong-keyword-args]'] +Line 71: Unexpected errors ['File "dataclasses_transform_func.py", line 71, in : Function Customer2.__init__ expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 76: Unexpected errors ['File "dataclasses_transform_func.py", line 76, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/dataclasses_transform_meta.toml b/conformance/results/pytype/dataclasses_transform_meta.toml index 277f99648..4e36ae5e6 100644 --- a/conformance/results/pytype/dataclasses_transform_meta.toml +++ b/conformance/results/pytype/dataclasses_transform_meta.toml @@ -1,9 +1,14 @@ conformant = "Unsupported" -notes = """ -Does not understand @dataclass_transform. +notes = """Does not understand @dataclass_transform. """ output = """ File "dataclasses_transform_meta.py", line 21, in : Arguments to dataclass_transform not supported yet [not-supported-yet] File "dataclasses_transform_meta.py", line 57, in : Invalid keyword argument other_name to function Customer1.__init__ [wrong-keyword-args] File "dataclasses_transform_meta.py", line 83, in : Arguments to dataclass_transform not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['File "dataclasses_transform_meta.py", line 21, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +Line 57: Unexpected errors ['File "dataclasses_transform_meta.py", line 57, in : Invalid keyword argument other_name to function Customer1.__init__ [wrong-keyword-args]'] +Line 83: Unexpected errors ['File "dataclasses_transform_meta.py", line 83, in : Arguments to dataclass_transform not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/dataclasses_usage.toml b/conformance/results/pytype/dataclasses_usage.toml index 6d1862a6e..d24c45b79 100644 --- a/conformance/results/pytype/dataclasses_usage.toml +++ b/conformance/results/pytype/dataclasses_usage.toml @@ -14,3 +14,22 @@ File "dataclasses_usage.py", line 152, in __init__: Type annotation for x_square File "dataclasses_usage.py", line 165, in __init__: Type annotation for x_squared does not match type of assignment [annotation-type-mismatch] File "dataclasses_usage.py", line 179, in : Function DC13.__init__ expects 1 arg(s), got 2 [wrong-arg-count] """ +conformance_automated = "Fail" +errors_diff = """ +Line 62: Expected 1 errors +Line 68: Expected 1 errors +Line 74: Expected 1 errors +Line 51: Unexpected errors ['File "dataclasses_usage.py", line 51, in : Missing parameter \\'unit_price\\' in call to function InventoryItem.__init__ [missing-parameter]'] +Line 52: Unexpected errors ['File "dataclasses_usage.py", line 52, in : Function InventoryItem.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 53: Unexpected errors ['File "dataclasses_usage.py", line 53, in : Function InventoryItem.__init__ expects 3 arg(s), got 5 [wrong-arg-count]'] +Line 59: Unexpected errors ['File "dataclasses_usage.py", line 59, in : In method __init__, non-default argument b follows default argument [invalid-function-definition]'] +Line 65: Unexpected errors ['File "dataclasses_usage.py", line 65, in : In method __init__, non-default argument b follows default argument [invalid-function-definition]'] +Line 71: Unexpected errors ['File "dataclasses_usage.py", line 71, in : In method __init__, non-default argument b follows default argument [invalid-function-definition]'] +Line 84: Unexpected errors ['File "dataclasses_usage.py", line 84, in : Function DC4.__init__ expects 2 arg(s), got 3 [wrong-arg-count]'] +Line 89: Unexpected errors ['File "dataclasses_usage.py", line 89, in DC5: Type annotation for a does not match type of assignment [annotation-type-mismatch]'] +Line 127: Unexpected errors ['File "dataclasses_usage.py", line 127, in : Function DC7.__init__ expects 2 arg(s), got 3 [wrong-arg-count]'] +Line 130: Unexpected errors ['File "dataclasses_usage.py", line 130, in : Missing parameter \\'y\\' in call to function DC8.__init__ [missing-parameter]'] +Line 152: Unexpected errors ['File "dataclasses_usage.py", line 152, in __init__: Type annotation for x_squared does not match type of assignment [annotation-type-mismatch]'] +Line 165: Unexpected errors ['File "dataclasses_usage.py", line 165, in __init__: Type annotation for x_squared does not match type of assignment [annotation-type-mismatch]'] +Line 179: Unexpected errors ['File "dataclasses_usage.py", line 179, in : Function DC13.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +""" diff --git a/conformance/results/pytype/directives_assert_type.toml b/conformance/results/pytype/directives_assert_type.toml index 8e6771712..ddf57fb4d 100644 --- a/conformance/results/pytype/directives_assert_type.toml +++ b/conformance/results/pytype/directives_assert_type.toml @@ -6,3 +6,7 @@ File "directives_assert_type.py", line 31, in func1: Function assert_type expect File "directives_assert_type.py", line 32, in func1: str [assert-type] File "directives_assert_type.py", line 33, in func1: Function assert_type expects 2 arg(s), got 3 [wrong-arg-count] """ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Expected 1 errors +""" diff --git a/conformance/results/pytype/directives_cast.toml b/conformance/results/pytype/directives_cast.toml index 6d4bd1113..315bb0501 100644 --- a/conformance/results/pytype/directives_cast.toml +++ b/conformance/results/pytype/directives_cast.toml @@ -1,8 +1,12 @@ conformant = "Partial" -notes = """ -Does not reject a call to "cast" with additional arguments. +notes = """Does not reject a call to "cast" with additional arguments. """ output = """ File "directives_cast.py", line 15, in : Missing parameter 'typ' in call to function typing.cast [missing-parameter] File "directives_cast.py", line 16, in : Invalid type annotation '1' for typing.cast [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['File "directives_cast.py", line 15, in : Missing parameter \\'typ\\' in call to function typing.cast [missing-parameter]'] +Line 16: Unexpected errors ['File "directives_cast.py", line 16, in : Invalid type annotation \\'1\\' for typing.cast [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/directives_no_type_check.toml b/conformance/results/pytype/directives_no_type_check.toml index e0a238863..52d7cbf41 100644 --- a/conformance/results/pytype/directives_no_type_check.toml +++ b/conformance/results/pytype/directives_no_type_check.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not honor @no_type_check decorator. +notes = """Does not honor @no_type_check decorator. """ output = """ File "directives_no_type_check.py", line 16, in ClassA: Type annotation for x does not match type of assignment [annotation-type-mismatch] @@ -9,3 +8,11 @@ File "directives_no_type_check.py", line 22, in func1: bad return type [bad-retu File "directives_no_type_check.py", line 25, in : Function func1 was called with the wrong arguments [wrong-arg-types] File "directives_no_type_check.py", line 26, in : Missing parameter 'a' in call to function func1 [missing-parameter] """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['File "directives_no_type_check.py", line 16, in ClassA: Type annotation for x does not match type of assignment [annotation-type-mismatch]'] +Line 21: Unexpected errors ['File "directives_no_type_check.py", line 21, in func1: unsupported operand type(s) for +: int and str [unsupported-operands]'] +Line 22: Unexpected errors ['File "directives_no_type_check.py", line 22, in func1: bad return type [bad-return-type]'] +Line 25: Unexpected errors ['File "directives_no_type_check.py", line 25, in : Function func1 was called with the wrong arguments [wrong-arg-types]'] +Line 26: Unexpected errors ['File "directives_no_type_check.py", line 26, in : Missing parameter \\'a\\' in call to function func1 [missing-parameter]'] +""" diff --git a/conformance/results/pytype/directives_reveal_type.toml b/conformance/results/pytype/directives_reveal_type.toml index 814702713..2dd5c8005 100644 --- a/conformance/results/pytype/directives_reveal_type.toml +++ b/conformance/results/pytype/directives_reveal_type.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject call to reveal_type with zero arguments. +notes = """Does not reject call to reveal_type with zero arguments. Does not reject call to reveal_type with too many arguments. """ output = """ @@ -10,3 +9,11 @@ File "directives_reveal_type.py", line 16, in func1: Any [reveal-type] File "directives_reveal_type.py", line 17, in func1: ForwardReference [reveal-type] File "directives_reveal_type.py", line 20, in func1: Union[int, str] [reveal-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Expected 1 errors +Line 14: Unexpected errors ['File "directives_reveal_type.py", line 14, in func1: Union[int, str] [reveal-type]'] +Line 15: Unexpected errors ['File "directives_reveal_type.py", line 15, in func1: List[int] [reveal-type]'] +Line 16: Unexpected errors ['File "directives_reveal_type.py", line 16, in func1: Any [reveal-type]'] +Line 17: Unexpected errors ['File "directives_reveal_type.py", line 17, in func1: ForwardReference [reveal-type]'] +""" diff --git a/conformance/results/pytype/directives_type_checking.toml b/conformance/results/pytype/directives_type_checking.toml index ec7f31722..37aaae899 100644 --- a/conformance/results/pytype/directives_type_checking.toml +++ b/conformance/results/pytype/directives_type_checking.toml @@ -2,3 +2,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/directives_type_ignore.toml b/conformance/results/pytype/directives_type_ignore.toml index 73a04d460..eec63b8a8 100644 --- a/conformance/results/pytype/directives_type_ignore.toml +++ b/conformance/results/pytype/directives_type_ignore.toml @@ -1,8 +1,11 @@ conformant = "Partial" -notes = """ -Does not honor "# type: ignore" comment if comment includes additional text. +notes = """Does not honor "# type: ignore" comment if comment includes additional text. """ output = """ File "directives_type_ignore.py", line 11, in : Type annotation for y does not match type of assignment [annotation-type-mismatch] File "directives_type_ignore.py", line 11: Stray type comment: ignore - additional stuff [ignored-type-comment] """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['File "directives_type_ignore.py", line 11, in : Type annotation for y does not match type of assignment [annotation-type-mismatch]', 'File "directives_type_ignore.py", line 11: Stray type comment: ignore - additional stuff [ignored-type-comment]'] +""" diff --git a/conformance/results/pytype/directives_type_ignore_file1.toml b/conformance/results/pytype/directives_type_ignore_file1.toml index ec7f31722..37aaae899 100644 --- a/conformance/results/pytype/directives_type_ignore_file1.toml +++ b/conformance/results/pytype/directives_type_ignore_file1.toml @@ -2,3 +2,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/directives_type_ignore_file2.toml b/conformance/results/pytype/directives_type_ignore_file2.toml index adfad1dbe..9a7fd5e76 100644 --- a/conformance/results/pytype/directives_type_ignore_file2.toml +++ b/conformance/results/pytype/directives_type_ignore_file2.toml @@ -1,7 +1,10 @@ conformant = "Partial" -notes = """ -Does not ignore `# type: ignore` if it occurs after docstrings in the file. +notes = """Does not ignore `# type: ignore` if it occurs after docstrings in the file. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Expected 1 errors +""" diff --git a/conformance/results/pytype/directives_version_platform.toml b/conformance/results/pytype/directives_version_platform.toml index fc9aa3d20..c4a9b0e8e 100644 --- a/conformance/results/pytype/directives_version_platform.toml +++ b/conformance/results/pytype/directives_version_platform.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not understand three-element form of sys.version checks. +notes = """Does not understand three-element form of sys.version checks. Does not understand os.name checks. """ output = """ @@ -8,3 +7,9 @@ File "directives_version_platform.py", line 27, in : Type annotation for File "directives_version_platform.py", line 40, in : Type annotation for val7 does not match type of assignment [annotation-type-mismatch] File "directives_version_platform.py", line 45, in : Type annotation for val8 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Unexpected errors ['File "directives_version_platform.py", line 27, in : Type annotation for val3 does not match type of assignment [annotation-type-mismatch]'] +Line 40: Unexpected errors ['File "directives_version_platform.py", line 40, in : Type annotation for val7 does not match type of assignment [annotation-type-mismatch]'] +Line 45: Unexpected errors ['File "directives_version_platform.py", line 45, in : Type annotation for val8 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/generics_base_class.toml b/conformance/results/pytype/generics_base_class.toml index 1eefa2fd6..609ea67f8 100644 --- a/conformance/results/pytype/generics_base_class.toml +++ b/conformance/results/pytype/generics_base_class.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -False negative on passing SymbolTable to dict[str, list[object]]. +notes = """False negative on passing SymbolTable to dict[str, list[object]]. Does not reject illegal use of Generic. """ output = """ @@ -9,3 +8,10 @@ File "generics_base_class.py", line 49, in : Invalid type annotation 'Li File "generics_base_class.py", line 61, in : Invalid type annotation 'MyDict[int, int]' [invalid-annotation] File "generics_base_class.py", line 68, in : Invalid type annotation 'Generic' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Unexpected errors ['File "generics_base_class.py", line 29, in : Invalid type annotation \\'T\\' [invalid-annotation]'] +Line 49: Unexpected errors ['File "generics_base_class.py", line 49, in : Invalid type annotation \\'LinkedList[int, int]\\' [invalid-annotation]'] +Line 61: Unexpected errors ['File "generics_base_class.py", line 61, in : Invalid type annotation \\'MyDict[int, int]\\' [invalid-annotation]'] +Line 68: Unexpected errors ['File "generics_base_class.py", line 68, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/generics_basic.toml b/conformance/results/pytype/generics_basic.toml index aa0abd7c5..37029343b 100644 --- a/conformance/results/pytype/generics_basic.toml +++ b/conformance/results/pytype/generics_basic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -False positives in examples using constrained type variables. +notes = """False positives in examples using constrained type variables. False negative for generic metaclass. """ output = """ @@ -20,3 +19,18 @@ File "generics_basic.py", line 140, in test_my_map: unsupported operand type(s) File "generics_basic.py", line 141, in test_my_map: unsupported operand type(s) for item retrieval: MyMap2[int, str] and int [unsupported-operands] File "generics_basic.py", line 161, in test_my_iterable_any: Iterator[nothing] [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 31: Unexpected errors ['File "generics_basic.py", line 31, in concat: bad return type [bad-return-type]'] +Line 36: Unexpected errors ['File "generics_basic.py", line 36, in test_concat: Function concat was called with the wrong arguments [wrong-arg-types]'] +Line 37: Unexpected errors ['File "generics_basic.py", line 37, in test_concat: Function concat was called with the wrong arguments [wrong-arg-types]'] +Line 44: Unexpected errors ['File "generics_basic.py", line 44, in : Invalid TypeVar: the number of constraints must be 0 or more than 1 [invalid-typevar]'] +Line 48: Unexpected errors ['File "generics_basic.py", line 48, in : Invalid TypeVar: constraint cannot contain TypeVars [invalid-typevar]'] +Line 57: Unexpected errors ['File "generics_basic.py", line 57, in test_concat_subtype: MyStr [assert-type]'] +Line 58: Unexpected errors ['File "generics_basic.py", line 58, in test_concat_subtype: Function concat was called with the wrong arguments [wrong-arg-types]', 'File "generics_basic.py", line 58, in test_concat_subtype: Any [assert-type]'] +Line 59: Unexpected errors ['File "generics_basic.py", line 59, in test_concat_subtype: Function concat was called with the wrong arguments [wrong-arg-types]'] +Line 107: Unexpected errors ['File "generics_basic.py", line 107, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 140: Unexpected errors ['File "generics_basic.py", line 140, in test_my_map: unsupported operand type(s) for item retrieval: MyMap1[str, int] and int [unsupported-operands]'] +Line 141: Unexpected errors ['File "generics_basic.py", line 141, in test_my_map: unsupported operand type(s) for item retrieval: MyMap2[int, str] and int [unsupported-operands]'] +Line 161: Unexpected errors ['File "generics_basic.py", line 161, in test_my_iterable_any: Iterator[nothing] [assert-type]'] +""" diff --git a/conformance/results/pytype/generics_defaults.toml b/conformance/results/pytype/generics_defaults.toml index 812d5e505..49bb5b05c 100644 --- a/conformance/results/pytype/generics_defaults.toml +++ b/conformance/results/pytype/generics_defaults.toml @@ -50,3 +50,54 @@ File "generics_defaults.py", line 172, in : class Foo7 is not indexable File "generics_defaults.py", line 172, in : Callable[[Any], Self] [assert-type] File "generics_defaults.py", line 173, in : Any [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['File "generics_defaults.py", line 7, in : typing.Unpack not supported yet [not-supported-yet]'] +Line 8: Unexpected errors ['File "generics_defaults.py", line 8, in : typing_extensions.TypeVarTuple not supported yet [not-supported-yet]'] +Line 11: Unexpected errors ['File "generics_defaults.py", line 11, in : wrong arguments [invalid-typevar]'] +Line 12: Unexpected errors ['File "generics_defaults.py", line 12, in : wrong arguments [invalid-typevar]'] +Line 13: Unexpected errors ['File "generics_defaults.py", line 13, in : wrong arguments [invalid-typevar]'] +Line 25: Unexpected errors ['File "generics_defaults.py", line 25, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 29: Unexpected errors ['File "generics_defaults.py", line 29, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 32: Unexpected errors ['File "generics_defaults.py", line 32, in : class NoNonDefaults is not indexable [not-indexable]'] +Line 33: Unexpected errors ['File "generics_defaults.py", line 33, in : class NoNonDefaults is not indexable [not-indexable]'] +Line 34: Unexpected errors ['File "generics_defaults.py", line 34, in : class NoNonDefaults is not indexable [not-indexable]'] +Line 37: Unexpected errors ['File "generics_defaults.py", line 37, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 40: Unexpected errors ['File "generics_defaults.py", line 40, in : Invalid type annotation \\'OneDefault[float, bool]\\' [invalid-annotation]'] +Line 41: Unexpected errors ['File "generics_defaults.py", line 41, in : Invalid type annotation \\'OneDefault[float, bool]\\' [invalid-annotation]'] +Line 44: Unexpected errors ['File "generics_defaults.py", line 44, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 47: Unexpected errors ['File "generics_defaults.py", line 47, in : Invalid type annotation \\'AllTheDefaults[Any, Any, str, int, bool]\\' [invalid-annotation]'] +Line 49: Unexpected errors ['File "generics_defaults.py", line 49, in : Invalid type annotation \\'AllTheDefaults[int, complex, str, int, bool]\\' [invalid-annotation]'] +Line 52: Unexpected errors ['File "generics_defaults.py", line 52, in : Invalid type annotation \\'AllTheDefaults[int]\\' [invalid-annotation]'] +Line 55: Unexpected errors ['File "generics_defaults.py", line 55, in : Invalid type annotation \\'AllTheDefaults[int, complex, str, int, bool]\\' [invalid-annotation]'] +Line 58: Unexpected errors ['File "generics_defaults.py", line 58, in : Invalid type annotation \\'AllTheDefaults[int, complex, str]\\' [invalid-annotation]'] +Line 59: Unexpected errors ['File "generics_defaults.py", line 59, in : Invalid type annotation \\'AllTheDefaults[int, complex, str, int, bool]\\' [invalid-annotation]'] +Line 62: Unexpected errors ['File "generics_defaults.py", line 62, in : Invalid type annotation \\'AllTheDefaults[int, complex, str, int]\\' [invalid-annotation]'] +Line 63: Unexpected errors ['File "generics_defaults.py", line 63, in : Invalid type annotation \\'AllTheDefaults[int, complex, str, int, bool]\\' [invalid-annotation]'] +Line 66: Unexpected errors ['File "generics_defaults.py", line 66, in : Invalid type annotation \\'AllTheDefaults[int, complex, str, int, bool]\\' [invalid-annotation]'] +Line 67: Unexpected errors ['File "generics_defaults.py", line 67, in : Invalid type annotation \\'AllTheDefaults[int, complex, str, int, bool]\\' [invalid-annotation]'] +Line 75: Unexpected errors ['File "generics_defaults.py", line 75, in : wrong arguments [invalid-typevar]'] +Line 78: Unexpected errors ['File "generics_defaults.py", line 78, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 81: Unexpected errors ['File "generics_defaults.py", line 81, in : class Class_ParamSpec is not indexable [not-indexable]'] +Line 82: Unexpected errors ['File "generics_defaults.py", line 82, in : class Class_ParamSpec is not indexable [not-indexable]'] +Line 83: Unexpected errors ['File "generics_defaults.py", line 83, in : class Class_ParamSpec is not indexable [not-indexable]'] +Line 93: Unexpected errors ['File "generics_defaults.py", line 93, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 96: Unexpected errors ['File "generics_defaults.py", line 96, in : class Class_TypeVarTuple is not indexable [not-indexable]'] +Line 97: Unexpected errors ['File "generics_defaults.py", line 97, in : class Class_TypeVarTuple is not indexable [not-indexable]'] +Line 98: Unexpected errors ['File "generics_defaults.py", line 98, in : class Class_TypeVarTuple is not indexable [not-indexable]'] +Line 105: Unexpected errors ['File "generics_defaults.py", line 105, in : wrong arguments [invalid-typevar]'] +Line 106: Unexpected errors ['File "generics_defaults.py", line 106, in : wrong arguments [invalid-typevar]'] +Line 114: Unexpected errors ['File "generics_defaults.py", line 114, in : wrong arguments [invalid-typevar]'] +Line 115: Unexpected errors ['File "generics_defaults.py", line 115, in : wrong arguments [invalid-typevar]'] +Line 127: Unexpected errors ['File "generics_defaults.py", line 127, in : wrong arguments [invalid-typevar]'] +Line 133: Unexpected errors ['File "generics_defaults.py", line 133, in : Any [assert-type]'] +Line 141: Unexpected errors ['File "generics_defaults.py", line 141, in : wrong arguments [invalid-typevar]'] +Line 144: Unexpected errors ['File "generics_defaults.py", line 144, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 151: Unexpected errors ['File "generics_defaults.py", line 151, in : wrong arguments [invalid-typevar]'] +Line 154: Unexpected errors ['File "generics_defaults.py", line 154, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 157: Unexpected errors ['File "generics_defaults.py", line 157, in : class Foo6 is not indexable [not-indexable]'] +Line 158: Unexpected errors ['File "generics_defaults.py", line 158, in : class Foo6 is not indexable [not-indexable]'] +Line 165: Unexpected errors ['File "generics_defaults.py", line 165, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 172: Unexpected errors ['File "generics_defaults.py", line 172, in : class Foo7 is not indexable [not-indexable]', 'File "generics_defaults.py", line 172, in : Callable[[Any], Self] [assert-type]'] +Line 173: Unexpected errors ['File "generics_defaults.py", line 173, in : Any [assert-type]'] +""" diff --git a/conformance/results/pytype/generics_defaults_referential.toml b/conformance/results/pytype/generics_defaults_referential.toml index 37ea822b6..192bb1b99 100644 --- a/conformance/results/pytype/generics_defaults_referential.toml +++ b/conformance/results/pytype/generics_defaults_referential.toml @@ -34,3 +34,39 @@ File "generics_defaults_referential.py", line 104, in : Invalid type ann File "generics_defaults_referential.py", line 105, in : Invalid type annotation 'Bar[int, List[str]]' [invalid-annotation] File "generics_defaults_referential.py", line 106, in : Invalid type annotation 'Bar[int, str]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['File "generics_defaults_referential.py", line 14, in : wrong arguments [invalid-typevar]'] +Line 15: Unexpected errors ['File "generics_defaults_referential.py", line 15, in : wrong arguments [invalid-typevar]'] +Line 16: Unexpected errors ['File "generics_defaults_referential.py", line 16, in : wrong arguments [invalid-typevar]'] +Line 17: Unexpected errors ['File "generics_defaults_referential.py", line 17, in : wrong arguments [invalid-typevar]'] +Line 20: Unexpected errors ['File "generics_defaults_referential.py", line 20, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 23: Unexpected errors ['File "generics_defaults_referential.py", line 23, in : class slice is not indexable [not-indexable]'] +Line 24: Unexpected errors ['File "generics_defaults_referential.py", line 24, in : class slice is not indexable [not-indexable]'] +Line 25: Unexpected errors ['File "generics_defaults_referential.py", line 25, in : class slice is not indexable [not-indexable]'] +Line 26: Unexpected errors ['File "generics_defaults_referential.py", line 26, in : class slice is not indexable [not-indexable]'] +Line 28: Unexpected errors ['File "generics_defaults_referential.py", line 28, in : wrong arguments [invalid-typevar]'] +Line 31: Unexpected errors ['File "generics_defaults_referential.py", line 31, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 35: Unexpected errors ['File "generics_defaults_referential.py", line 35, in : class Foo is not indexable [not-indexable]'] +Line 36: Unexpected errors ['File "generics_defaults_referential.py", line 36, in : class Foo is not indexable [not-indexable]'] +Line 39: Unexpected errors ['File "generics_defaults_referential.py", line 39, in : class Foo is not indexable [not-indexable]'] +Line 47: Unexpected errors ['File "generics_defaults_referential.py", line 47, in : wrong arguments [invalid-typevar]'] +Line 50: Unexpected errors ['File "generics_defaults_referential.py", line 50, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 53: Unexpected errors ['File "generics_defaults_referential.py", line 53, in : wrong arguments [invalid-typevar]'] +Line 54: Unexpected errors ['File "generics_defaults_referential.py", line 54, in : wrong arguments [invalid-typevar]'] +Line 57: Unexpected errors ['File "generics_defaults_referential.py", line 57, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 64: Unexpected errors ['File "generics_defaults_referential.py", line 64, in Foo3: Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 70: Unexpected errors ['File "generics_defaults_referential.py", line 70, in : wrong arguments [invalid-typevar]'] +Line 71: Unexpected errors ['File "generics_defaults_referential.py", line 71, in : wrong arguments [invalid-typevar]'] +Line 72: Unexpected errors ['File "generics_defaults_referential.py", line 72, in : wrong arguments [invalid-typevar]'] +Line 78: Unexpected errors ['File "generics_defaults_referential.py", line 78, in : wrong arguments [invalid-typevar]'] +Line 83: Unexpected errors ['File "generics_defaults_referential.py", line 83, in : wrong arguments [invalid-typevar]'] +Line 84: Unexpected errors ['File "generics_defaults_referential.py", line 84, in : wrong arguments [invalid-typevar]'] +Line 95: Unexpected errors ['File "generics_defaults_referential.py", line 95, in : wrong arguments [invalid-typevar]'] +Line 98: Unexpected errors ['File "generics_defaults_referential.py", line 98, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 102: Unexpected errors ['File "generics_defaults_referential.py", line 102, in : Invalid type annotation \\'Bar[Any, list]\\' [invalid-annotation]'] +Line 103: Unexpected errors ['File "generics_defaults_referential.py", line 103, in : Invalid type annotation \\'Bar[int, List[int]]\\' [invalid-annotation]'] +Line 104: Unexpected errors ['File "generics_defaults_referential.py", line 104, in : Invalid type annotation \\'Bar[int, List[int]]\\' [invalid-annotation]'] +Line 105: Unexpected errors ['File "generics_defaults_referential.py", line 105, in : Invalid type annotation \\'Bar[int, List[str]]\\' [invalid-annotation]'] +Line 106: Unexpected errors ['File "generics_defaults_referential.py", line 106, in : Invalid type annotation \\'Bar[int, str]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/generics_defaults_specialization.toml b/conformance/results/pytype/generics_defaults_specialization.toml index 0d2bb4a7b..2579d20b0 100644 --- a/conformance/results/pytype/generics_defaults_specialization.toml +++ b/conformance/results/pytype/generics_defaults_specialization.toml @@ -17,3 +17,21 @@ File "generics_defaults_specialization.py", line 58, in : Invalid type a File "generics_defaults_specialization.py", line 65, in : class Baz is not indexable [not-indexable] File "generics_defaults_specialization.py", line 65, in : Invalid type annotation 'Baz[int, str]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['File "generics_defaults_specialization.py", line 15, in : wrong arguments [invalid-typevar]'] +Line 16: Unexpected errors ['File "generics_defaults_specialization.py", line 16, in : wrong arguments [invalid-typevar]'] +Line 25: Unexpected errors ['File "generics_defaults_specialization.py", line 25, in : Invalid type annotation \\'SomethingWithNoDefaults[int, Any][bool]\\' [invalid-annotation]'] +Line 26: Unexpected errors ['File "generics_defaults_specialization.py", line 26, in func1: SomethingWithNoDefaults[int, Any] [assert-type]'] +Line 27: Unexpected errors ['File "generics_defaults_specialization.py", line 27, in func1: SomethingWithNoDefaults[int, Any] [assert-type]'] +Line 30: Unexpected errors ['File "generics_defaults_specialization.py", line 30, in : Invalid type annotation \\'SomethingWithNoDefaults[int, Any][bool, int]\\' [invalid-annotation]'] +Line 38: Unexpected errors ['File "generics_defaults_specialization.py", line 38, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 42: Unexpected errors ['File "generics_defaults_specialization.py", line 42, in : Invalid type annotation \\'SubclassMe[int, Any]\\' [invalid-annotation]'] +Line 45: Unexpected errors ['File "generics_defaults_specialization.py", line 45, in : class Bar is not indexable [not-indexable]'] +Line 46: Unexpected errors ['File "generics_defaults_specialization.py", line 46, in : class Bar is not indexable [not-indexable]'] +Line 47: Unexpected errors ['File "generics_defaults_specialization.py", line 47, in : class Bar is not indexable [not-indexable]'] +Line 53: Unexpected errors ['File "generics_defaults_specialization.py", line 53, in : Any [assert-type]'] +Line 55: Unexpected errors ['File "generics_defaults_specialization.py", line 55, in : class Foo is not indexable [not-indexable]'] +Line 58: Unexpected errors ['File "generics_defaults_specialization.py", line 58, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 65: Unexpected errors ['File "generics_defaults_specialization.py", line 65, in : class Baz is not indexable [not-indexable]', 'File "generics_defaults_specialization.py", line 65, in : Invalid type annotation \\'Baz[int, str]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/generics_paramspec_basic.toml b/conformance/results/pytype/generics_paramspec_basic.toml index 89b0272ae..96b810ffe 100644 --- a/conformance/results/pytype/generics_paramspec_basic.toml +++ b/conformance/results/pytype/generics_paramspec_basic.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Does not support ParamSpec. +notes = """Does not support ParamSpec. """ output = """ AssertionError: """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_paramspec_components.toml b/conformance/results/pytype/generics_paramspec_components.toml index a9cd70809..0d5e90a35 100644 --- a/conformance/results/pytype/generics_paramspec_components.toml +++ b/conformance/results/pytype/generics_paramspec_components.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Does not support ParamSpec. +notes = """Does not support ParamSpec. """ output = """ NotImplementedError: ParamSpecArgs """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_paramspec_semantics.toml b/conformance/results/pytype/generics_paramspec_semantics.toml index 89b0272ae..96b810ffe 100644 --- a/conformance/results/pytype/generics_paramspec_semantics.toml +++ b/conformance/results/pytype/generics_paramspec_semantics.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Does not support ParamSpec. +notes = """Does not support ParamSpec. """ output = """ AssertionError: """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_paramspec_specialization.toml b/conformance/results/pytype/generics_paramspec_specialization.toml index 59ae8fe42..b171dfeae 100644 --- a/conformance/results/pytype/generics_paramspec_specialization.toml +++ b/conformance/results/pytype/generics_paramspec_specialization.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Rejects valid specialization of ParamSpec using list expression. +notes = """Rejects valid specialization of ParamSpec using list expression. Does not reject invalid specialization of class with both TypeVar and ParamSpec. Reports error for valid method call involving ParamSpec. """ @@ -18,3 +17,17 @@ File "generics_paramspec_specialization.py", line 60, in func31: Function expects 1 arg(s), got 3 [wrong-arg-count] File "generics_paramspec_specialization.py", line 62, in func31: Function expects 1 arg(s), got 3 [wrong-arg-count] """ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Unexpected errors ['File "generics_paramspec_specialization.py", line 33, in : Invalid type annotation \\'[int, bool]\\' [invalid-annotation]', 'File "generics_paramspec_specialization.py", line 33, in : Invalid type annotation \\'Ellipsis\\' [invalid-annotation]'] +Line 37: Unexpected errors ['File "generics_paramspec_specialization.py", line 37, in : Invalid type annotation \\'Ellipsis\\' [invalid-annotation]'] +Line 41: Unexpected errors ['File "generics_paramspec_specialization.py", line 41, in : Invalid type annotation \\'[]\\' [invalid-annotation]'] +Line 53: Unexpected errors ['File "generics_paramspec_specialization.py", line 53, in : Invalid type annotation \\'[int, str, bool]\\' [invalid-annotation]'] +Line 54: Unexpected errors ['File "generics_paramspec_specialization.py", line 54, in func30: Function expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 55: Unexpected errors ['File "generics_paramspec_specialization.py", line 55, in func30: Function expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 56: Unexpected errors ['File "generics_paramspec_specialization.py", line 56, in func30: Function expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 59: Unexpected errors ['File "generics_paramspec_specialization.py", line 59, in : Invalid type annotation \\'ClassC[int, str, bool]\\' [invalid-annotation]'] +Line 60: Unexpected errors ['File "generics_paramspec_specialization.py", line 60, in func31: Function expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 61: Unexpected errors ['File "generics_paramspec_specialization.py", line 61, in func31: Function expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 62: Unexpected errors ['File "generics_paramspec_specialization.py", line 62, in func31: Function expects 1 arg(s), got 3 [wrong-arg-count]'] +""" diff --git a/conformance/results/pytype/generics_scoping.toml b/conformance/results/pytype/generics_scoping.toml index b97f114df..312cd191e 100644 --- a/conformance/results/pytype/generics_scoping.toml +++ b/conformance/results/pytype/generics_scoping.toml @@ -24,3 +24,18 @@ File "generics_scoping.py", line 74, in AlsoBad: Invalid type annotation 'List[T File "generics_scoping.py", line 84, in : Invalid type annotation 'T' for global_var1 [invalid-annotation] File "generics_scoping.py", line 85, in : Invalid type annotation 'List[T]' for global_var2 [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 9: Unexpected errors ['File "generics_scoping.py", line 9, in fun_1: bad return type [bad-return-type]'] +Line 10: Unexpected errors ['File "generics_scoping.py", line 10, in fun_2: bad return type [bad-return-type]'] +Line 20: Unexpected errors ['File "generics_scoping.py", line 20, in meth_1: bad return type [bad-return-type]'] +Line 25: Unexpected errors ['File "generics_scoping.py", line 25, in : Function MyClass.meth_2 was called with the wrong arguments [wrong-arg-types]'] +Line 35: Unexpected errors ['File "generics_scoping.py", line 35, in method: bad return type [bad-return-type]', 'File "generics_scoping.py", line 35, in method: bad return type [bad-return-type]'] +Line 46: Unexpected errors ['File "generics_scoping.py", line 46, in fun_3: Invalid type annotation \\'List[S]\\' for z [invalid-annotation]'] +Line 50: Unexpected errors ['File "generics_scoping.py", line 50, in Bar: Invalid type annotation \\'List[S]\\' for an_attr [invalid-annotation]'] +Line 59: Unexpected errors ['File "generics_scoping.py", line 59, in fun_4: Invalid type annotation \\'T\\' [invalid-annotation]'] +Line 70: Unexpected errors ['File "generics_scoping.py", line 70, in : Invalid type annotation \\'Outer\\' [invalid-annotation]'] +Line 74: Unexpected errors ['File "generics_scoping.py", line 74, in AlsoBad: Invalid type annotation \\'List[T]\\' for x [invalid-annotation]'] +Line 84: Unexpected errors ['File "generics_scoping.py", line 84, in : Invalid type annotation \\'T\\' for global_var1 [invalid-annotation]'] +Line 85: Unexpected errors ['File "generics_scoping.py", line 85, in : Invalid type annotation \\'List[T]\\' for global_var2 [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/generics_self_advanced.toml b/conformance/results/pytype/generics_self_advanced.toml index 3906e49cb..eb6f59ffc 100644 --- a/conformance/results/pytype/generics_self_advanced.toml +++ b/conformance/results/pytype/generics_self_advanced.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ File "generics_self_advanced.py", line 12, in prop1: bad return type [bad-return-type] @@ -23,3 +22,17 @@ File "generics_self_advanced.py", line 43, in method3: List[ChildB] [assert-type File "generics_self_advanced.py", line 44, in method3: ChildB [assert-type] File "generics_self_advanced.py", line 45, in method3: ChildB [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['File "generics_self_advanced.py", line 12, in prop1: bad return type [bad-return-type]', 'File "generics_self_advanced.py", line 12, in prop1: bad return type [bad-return-type]'] +Line 19: Unexpected errors ['File "generics_self_advanced.py", line 19, in : ParentA [assert-type]'] +Line 29: Unexpected errors ['File "generics_self_advanced.py", line 29, in method1: bad return type [bad-return-type]', 'File "generics_self_advanced.py", line 29, in method1: bad return type [bad-return-type]'] +Line 35: Unexpected errors ['File "generics_self_advanced.py", line 35, in method2: ChildB [assert-type]'] +Line 36: Unexpected errors ['File "generics_self_advanced.py", line 36, in method2: List[ChildB] [assert-type]'] +Line 37: Unexpected errors ['File "generics_self_advanced.py", line 37, in method2: ChildB [assert-type]'] +Line 38: Unexpected errors ['File "generics_self_advanced.py", line 38, in method2: ChildB [assert-type]'] +Line 42: Unexpected errors ['File "generics_self_advanced.py", line 42, in method3: Type[ChildB] [assert-type]'] +Line 43: Unexpected errors ['File "generics_self_advanced.py", line 43, in method3: List[ChildB] [assert-type]'] +Line 44: Unexpected errors ['File "generics_self_advanced.py", line 44, in method3: ChildB [assert-type]'] +Line 45: Unexpected errors ['File "generics_self_advanced.py", line 45, in method3: ChildB [assert-type]'] +""" diff --git a/conformance/results/pytype/generics_self_attributes.toml b/conformance/results/pytype/generics_self_attributes.toml index 2b26e79aa..0aa6bc478 100644 --- a/conformance/results/pytype/generics_self_attributes.toml +++ b/conformance/results/pytype/generics_self_attributes.toml @@ -1,7 +1,10 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ File "generics_self_attributes.py", line 26, in : Function OrdinalLinkedList.__init__ was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Unexpected errors ['File "generics_self_attributes.py", line 26, in : Function OrdinalLinkedList.__init__ was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/generics_self_basic.toml b/conformance/results/pytype/generics_self_basic.toml index 2aa9da03f..812e5fa3b 100644 --- a/conformance/results/pytype/generics_self_basic.toml +++ b/conformance/results/pytype/generics_self_basic.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ File "generics_self_basic.py", line 13, in set_scale: Shape [assert-type] @@ -29,3 +28,12 @@ Called from (traceback): File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type] File "generics_self_basic.py", line 64, in Container: unsupported operand type(s) for item retrieval: 'Self: TypeVar' and 'int: Type[int]' [unsupported-operands] """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['File "generics_self_basic.py", line 13, in set_scale: Shape [assert-type]', 'File "generics_self_basic.py", line 13, in set_scale: Circle [assert-type]'] +Line 26: Unexpected errors ['File "generics_self_basic.py", line 26, in from_config: Type[Shape] [assert-type]', 'File "generics_self_basic.py", line 26, in from_config: Type[Circle] [assert-type]'] +Line 27: Unexpected errors ['File "generics_self_basic.py", line 27, in from_config: Function Shape.__init__ expects 1 arg(s), got 2 [wrong-arg-count]', 'File "generics_self_basic.py", line 27, in from_config: Function Circle.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 39: Unexpected errors ['File "generics_self_basic.py", line 39, in difference: Shape [assert-type]'] +Line 61: Unexpected errors ['File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type]', 'File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type]', 'File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type]'] +Line 64: Unexpected errors ['File "generics_self_basic.py", line 64, in Container: unsupported operand type(s) for item retrieval: \\'Self: TypeVar\\' and \\'int: Type[int]\\' [unsupported-operands]'] +""" diff --git a/conformance/results/pytype/generics_self_protocols.toml b/conformance/results/pytype/generics_self_protocols.toml index 33e96883f..ad5b1f4e1 100644 --- a/conformance/results/pytype/generics_self_protocols.toml +++ b/conformance/results/pytype/generics_self_protocols.toml @@ -1,7 +1,9 @@ conformant = "Partial" -notes = """ -Does not reject protocol compatibility due to method `Self` return type. +notes = """Does not reject protocol compatibility due to method `Self` return type. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_self_usage.toml b/conformance/results/pytype/generics_self_usage.toml index 499d38f38..084316991 100644 --- a/conformance/results/pytype/generics_self_usage.toml +++ b/conformance/results/pytype/generics_self_usage.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Self` type. +notes = """Does not understand `Self` type. """ output = """ File "generics_self_usage.py", line 58, in foo: Invalid type annotation 'Self' [invalid-annotation] @@ -16,3 +15,16 @@ File "generics_self_usage.py", line 116, in Base: Invalid type annotation 'Self' File "generics_self_usage.py", line 122, in __new__: bad return type [bad-return-type] File "generics_self_usage.py", line 126, in __mul__: bad return type [bad-return-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 58: Unexpected errors ['File "generics_self_usage.py", line 58, in foo: Invalid type annotation \\'Self\\' [invalid-annotation]'] +Line 73: Unexpected errors ['File "generics_self_usage.py", line 73, in : Invalid type annotation \\'Self\\' [invalid-annotation]'] +Line 76: Unexpected errors ['File "generics_self_usage.py", line 76, in : Invalid type annotation \\'Self\\' for bar [invalid-annotation]'] +Line 82: Unexpected errors ['File "generics_self_usage.py", line 82, in has_existing_self_annotation: bad return type [bad-return-type]'] +Line 86: Unexpected errors ['File "generics_self_usage.py", line 86, in return_concrete_type: bad return type [bad-return-type]'] +Line 103: Unexpected errors ['File "generics_self_usage.py", line 103, in : Invalid base class: Self [base-class-error]'] +Line 111: Unexpected errors ['File "generics_self_usage.py", line 111, in Base: Invalid type annotation \\'Self\\' [invalid-annotation]'] +Line 116: Unexpected errors ['File "generics_self_usage.py", line 116, in Base: Invalid type annotation \\'Self\\' [invalid-annotation]'] +Line 122: Unexpected errors ['File "generics_self_usage.py", line 122, in __new__: bad return type [bad-return-type]'] +Line 126: Unexpected errors ['File "generics_self_usage.py", line 126, in __mul__: bad return type [bad-return-type]'] +""" diff --git a/conformance/results/pytype/generics_syntax_compatibility.toml b/conformance/results/pytype/generics_syntax_compatibility.toml index 632ab2dde..b6654ec9a 100644 --- a/conformance/results/pytype/generics_syntax_compatibility.toml +++ b/conformance/results/pytype/generics_syntax_compatibility.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 14) """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_syntax_declarations.toml b/conformance/results/pytype/generics_syntax_declarations.toml index a0111998f..de0d25410 100644 --- a/conformance/results/pytype/generics_syntax_declarations.toml +++ b/conformance/results/pytype/generics_syntax_declarations.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 13) """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_syntax_infer_variance.toml b/conformance/results/pytype/generics_syntax_infer_variance.toml index 0351fc6ea..c55a88b7d 100644 --- a/conformance/results/pytype/generics_syntax_infer_variance.toml +++ b/conformance/results/pytype/generics_syntax_infer_variance.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 129) """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_syntax_scoping.toml b/conformance/results/pytype/generics_syntax_scoping.toml index 632ab2dde..b6654ec9a 100644 --- a/conformance/results/pytype/generics_syntax_scoping.toml +++ b/conformance/results/pytype/generics_syntax_scoping.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 14) """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_type_erasure.toml b/conformance/results/pytype/generics_type_erasure.toml index 889e84f4f..d2f4b6630 100644 --- a/conformance/results/pytype/generics_type_erasure.toml +++ b/conformance/results/pytype/generics_type_erasure.toml @@ -2,3 +2,6 @@ conformant = "Unsupported" output = """ NotImplementedError: ParameterizedClass """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/generics_typevartuple_args.toml b/conformance/results/pytype/generics_typevartuple_args.toml index 3b38b68ce..35ae8a567 100644 --- a/conformance/results/pytype/generics_typevartuple_args.toml +++ b/conformance/results/pytype/generics_typevartuple_args.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ File "generics_typevartuple_args.py", line 10, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -26,3 +25,20 @@ File "generics_typevartuple_args.py", line 62, in : Missing parameter 's File "generics_typevartuple_args.py", line 70, in : Invalid type annotation '' [invalid-annotation] File "generics_typevartuple_args.py", line 75, in : Function func4 was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['File "generics_typevartuple_args.py", line 10, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 13: Unexpected errors ['File "generics_typevartuple_args.py", line 13, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 16: Unexpected errors ['File "generics_typevartuple_args.py", line 16, in : No attribute \\'__iter__\\' on TypeVarTuple [attribute-error]', 'File "generics_typevartuple_args.py", line 16, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 17: Unexpected errors ['File "generics_typevartuple_args.py", line 17, in args_to_tuple: bad return type [bad-return-type]'] +Line 20: Unexpected errors ['File "generics_typevartuple_args.py", line 20, in : Tuple[Any] [assert-type]'] +Line 27: Unexpected errors ['File "generics_typevartuple_args.py", line 27, in : Missing parameter \\'self\\' in call to function tuple.__iter__ [missing-parameter]', 'File "generics_typevartuple_args.py", line 27, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_args.py", line 27, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 28: Unexpected errors ['File "generics_typevartuple_args.py", line 28, in exec_le: bad return type [bad-return-type]'] +Line 31: Unexpected errors ['File "generics_typevartuple_args.py", line 31, in : Tuple[Any] [assert-type]'] +Line 32: Unexpected errors ['File "generics_typevartuple_args.py", line 32, in : Tuple[Any] [assert-type]'] +Line 42: Unexpected errors ['File "generics_typevartuple_args.py", line 42, in : Missing parameter \\'self\\' in call to function tuple.__iter__ [missing-parameter]'] +Line 51: Unexpected errors ['File "generics_typevartuple_args.py", line 51, in : Missing parameter \\'self\\' in call to function tuple.__iter__ [missing-parameter]', 'File "generics_typevartuple_args.py", line 51, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 62: Unexpected errors ['File "generics_typevartuple_args.py", line 62, in : Missing parameter \\'self\\' in call to function tuple.__iter__ [missing-parameter]'] +Line 70: Unexpected errors ['File "generics_typevartuple_args.py", line 70, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 75: Unexpected errors ['File "generics_typevartuple_args.py", line 75, in : Function func4 was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/generics_typevartuple_basic.toml b/conformance/results/pytype/generics_typevartuple_basic.toml index c5bbfe638..99ed5e3da 100644 --- a/conformance/results/pytype/generics_typevartuple_basic.toml +++ b/conformance/results/pytype/generics_typevartuple_basic.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ File "generics_typevartuple_basic.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -52,3 +51,38 @@ File "generics_typevartuple_basic.py", line 97, in : class Array is not File "generics_typevartuple_basic.py", line 106, in : Invalid type annotation 'Generic' [invalid-annotation] File "generics_typevartuple_basic.py", line 106, in : Function list.extend was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['File "generics_typevartuple_basic.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 9: Unexpected errors ['File "generics_typevartuple_basic.py", line 9, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 12: Unexpected errors ['File "generics_typevartuple_basic.py", line 12, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 16: Unexpected errors ['File "generics_typevartuple_basic.py", line 16, in : No attribute \\'__iter__\\' on TypeVarTuple [attribute-error]', 'File "generics_typevartuple_basic.py", line 16, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 17: Unexpected errors ['File "generics_typevartuple_basic.py", line 17, in func1: bad return type [bad-return-type]'] +Line 20: Unexpected errors ['File "generics_typevartuple_basic.py", line 20, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 23: Unexpected errors ['File "generics_typevartuple_basic.py", line 23, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 24: Unexpected errors ['File "generics_typevartuple_basic.py", line 24, in Array: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 25: Unexpected errors ['File "generics_typevartuple_basic.py", line 25, in __init__: Invalid type annotation \\'tuple[*Shape,]\\' [invalid-annotation]'] +Line 27: Unexpected errors ['File "generics_typevartuple_basic.py", line 27, in Array: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 36: Unexpected errors ['File "generics_typevartuple_basic.py", line 36, in : class Array is not indexable [not-indexable]', 'File "generics_typevartuple_basic.py", line 36, in : Invalid type annotation \\'Array[Height, Width]\\' [invalid-annotation]', 'File "generics_typevartuple_basic.py", line 36, in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 37: Unexpected errors ['File "generics_typevartuple_basic.py", line 37, in : class Array is not indexable [not-indexable]', 'File "generics_typevartuple_basic.py", line 37, in : Invalid type annotation \\'Array[Batch, Height, Width]\\' [invalid-annotation]', 'File "generics_typevartuple_basic.py", line 37, in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 38: Unexpected errors ['File "generics_typevartuple_basic.py", line 38, in : class Array is not indexable [not-indexable]', 'File "generics_typevartuple_basic.py", line 38, in : Invalid type annotation \\'Array[Time, Batch, Height, Width]\\' [invalid-annotation]', 'File "generics_typevartuple_basic.py", line 38, in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 42: Unexpected errors ['File "generics_typevartuple_basic.py", line 42, in : class Array is not indexable [not-indexable]', 'File "generics_typevartuple_basic.py", line 42, in : Invalid type annotation \\'Array[Height, Width]\\' [invalid-annotation]', 'File "generics_typevartuple_basic.py", line 42, in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 43: Unexpected errors ['File "generics_typevartuple_basic.py", line 43, in : class Array is not indexable [not-indexable]', 'File "generics_typevartuple_basic.py", line 43, in : Invalid type annotation \\'Array[Batch, Height, Width]\\' [invalid-annotation]', 'File "generics_typevartuple_basic.py", line 43, in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 44: Unexpected errors ['File "generics_typevartuple_basic.py", line 44, in : class Array is not indexable [not-indexable]', 'File "generics_typevartuple_basic.py", line 44, in : Invalid type annotation \\'Array[Time, Batch, Height, Width]\\' [invalid-annotation]', 'File "generics_typevartuple_basic.py", line 44, in : Function Array.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 52: Unexpected errors ['File "generics_typevartuple_basic.py", line 52, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 53: Unexpected errors ['File "generics_typevartuple_basic.py", line 53, in ClassA: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 54: Unexpected errors ['File "generics_typevartuple_basic.py", line 54, in __init__: Invalid type annotation \\'tuple[*Shape,]\\' [invalid-annotation]'] +Line 56: Unexpected errors ['File "generics_typevartuple_basic.py", line 56, in ClassA: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 59: Unexpected errors ['File "generics_typevartuple_basic.py", line 59, in ClassA: Invalid type annotation \\'\\' for args [invalid-annotation]'] +Line 65: Unexpected errors ['File "generics_typevartuple_basic.py", line 65, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 66: Unexpected errors ['File "generics_typevartuple_basic.py", line 66, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 4 [wrong-arg-count]'] +Line 67: Unexpected errors ['File "generics_typevartuple_basic.py", line 67, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 3 [wrong-arg-count]'] +Line 75: Unexpected errors ['File "generics_typevartuple_basic.py", line 75, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 76: Unexpected errors ['File "generics_typevartuple_basic.py", line 76, in func2: bad return type [bad-return-type]'] +Line 84: Unexpected errors ['File "generics_typevartuple_basic.py", line 84, in : Tuple[Any] [assert-type]'] +Line 90: Unexpected errors ['File "generics_typevartuple_basic.py", line 90, in : Function func2 was called with the wrong arguments [wrong-arg-types]'] +Line 93: Unexpected errors ['File "generics_typevartuple_basic.py", line 93, in : class Array is not indexable [not-indexable]'] +Line 94: Unexpected errors ['File "generics_typevartuple_basic.py", line 94, in multiply: bad return type [bad-return-type]'] +Line 97: Unexpected errors ['File "generics_typevartuple_basic.py", line 97, in : class Array is not indexable [not-indexable]'] +Line 106: Unexpected errors ['File "generics_typevartuple_basic.py", line 106, in : Invalid type annotation \\'Generic\\' [invalid-annotation]', 'File "generics_typevartuple_basic.py", line 106, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/generics_typevartuple_callable.toml b/conformance/results/pytype/generics_typevartuple_callable.toml index 6f060caee..d6d162e93 100644 --- a/conformance/results/pytype/generics_typevartuple_callable.toml +++ b/conformance/results/pytype/generics_typevartuple_callable.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ File "generics_typevartuple_callable.py", line 10, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -28,3 +27,20 @@ Called from (traceback): line 49, in current file File "generics_typevartuple_callable.py", line 49, in : Tuple[Any] [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['File "generics_typevartuple_callable.py", line 10, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 12: Unexpected errors ['File "generics_typevartuple_callable.py", line 12, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 17: Unexpected errors ['File "generics_typevartuple_callable.py", line 17, in Process: Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_callable.py", line 17, in Process: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 25: Unexpected errors ['File "generics_typevartuple_callable.py", line 25, in : Function Process.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 26: Unexpected errors ['File "generics_typevartuple_callable.py", line 26, in : Function Process.__init__ was called with the wrong arguments [wrong-arg-types]'] +Line 29: Unexpected errors ['File "generics_typevartuple_callable.py", line 29, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_callable.py", line 29, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_callable.py", line 29, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 30: Unexpected errors ['File "generics_typevartuple_callable.py", line 30, in func2: bad return type [bad-return-type]'] +Line 34: Unexpected errors ['File "generics_typevartuple_callable.py", line 34, in callback1: bad return type [bad-return-type]'] +Line 38: Unexpected errors ['File "generics_typevartuple_callable.py", line 38, in callback2: bad return type [bad-return-type]'] +Line 41: Unexpected errors ['File "generics_typevartuple_callable.py", line 41, in : Function func2 was called with the wrong arguments [wrong-arg-types]', 'File "generics_typevartuple_callable.py", line 41, in : Any [assert-type]'] +Line 42: Unexpected errors ['File "generics_typevartuple_callable.py", line 42, in : Tuple[Any] [assert-type]'] +Line 45: Unexpected errors ['File "generics_typevartuple_callable.py", line 45, in : Missing parameter \\'self\\' in call to function tuple.__iter__ [missing-parameter]', 'File "generics_typevartuple_callable.py", line 45, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_callable.py", line 45, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 46: Unexpected errors ['File "generics_typevartuple_callable.py", line 46, in func3: bad return type [bad-return-type]'] +Line 49: Unexpected errors ['File "generics_typevartuple_callable.py", line 49, in : Tuple[Any] [assert-type]'] +""" diff --git a/conformance/results/pytype/generics_typevartuple_concat.toml b/conformance/results/pytype/generics_typevartuple_concat.toml index a30191228..d924b6acd 100644 --- a/conformance/results/pytype/generics_typevartuple_concat.toml +++ b/conformance/results/pytype/generics_typevartuple_concat.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ File "generics_typevartuple_concat.py", line 9, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -26,3 +25,25 @@ File "generics_typevartuple_concat.py", line 52, in : Any [assert-type] File "generics_typevartuple_concat.py", line 55, in : Invalid type annotation '' [invalid-annotation] File "generics_typevartuple_concat.py", line 55, in : Invalid type annotation '' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 9: Unexpected errors ['File "generics_typevartuple_concat.py", line 9, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 17: Unexpected errors ['File "generics_typevartuple_concat.py", line 17, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 18: Unexpected errors ['File "generics_typevartuple_concat.py", line 18, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 22: Unexpected errors ['File "generics_typevartuple_concat.py", line 22, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 26: Unexpected errors ['File "generics_typevartuple_concat.py", line 26, in : class Array is not indexable [not-indexable]'] +Line 27: Unexpected errors ['File "generics_typevartuple_concat.py", line 27, in add_batch_axis: bad return type [bad-return-type]'] +Line 30: Unexpected errors ['File "generics_typevartuple_concat.py", line 30, in : class Array is not indexable [not-indexable]'] +Line 31: Unexpected errors ['File "generics_typevartuple_concat.py", line 31, in del_batch_axis: bad return type [bad-return-type]'] +Line 34: Unexpected errors ['File "generics_typevartuple_concat.py", line 34, in : class Array is not indexable [not-indexable]'] +Line 35: Unexpected errors ['File "generics_typevartuple_concat.py", line 35, in add_batch_channels: bad return type [bad-return-type]'] +Line 38: Unexpected errors ['File "generics_typevartuple_concat.py", line 38, in : class Array is not indexable [not-indexable]'] +Line 40: Unexpected errors ['File "generics_typevartuple_concat.py", line 40, in func1: class Array is not indexable [not-indexable]'] +Line 42: Unexpected errors ['File "generics_typevartuple_concat.py", line 42, in func1: class Array is not indexable [not-indexable]'] +Line 44: Unexpected errors ['File "generics_typevartuple_concat.py", line 44, in func1: class Array is not indexable [not-indexable]'] +Line 47: Unexpected errors ['File "generics_typevartuple_concat.py", line 47, in : Invalid type annotation \\'T\\' [invalid-annotation]', 'File "generics_typevartuple_concat.py", line 47, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_concat.py", line 47, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 48: Unexpected errors ['File "generics_typevartuple_concat.py", line 48, in prefix_tuple: bad return type [bad-return-type]'] +Line 51: Unexpected errors ['File "generics_typevartuple_concat.py", line 51, in : Function prefix_tuple was called with the wrong arguments [wrong-arg-types]'] +Line 52: Unexpected errors ['File "generics_typevartuple_concat.py", line 52, in : Any [assert-type]'] +Line 55: Unexpected errors ['File "generics_typevartuple_concat.py", line 55, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_concat.py", line 55, in : Invalid type annotation \\'\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/generics_typevartuple_overloads.toml b/conformance/results/pytype/generics_typevartuple_overloads.toml index 8e6628393..25efdc59c 100644 --- a/conformance/results/pytype/generics_typevartuple_overloads.toml +++ b/conformance/results/pytype/generics_typevartuple_overloads.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ File "generics_typevartuple_overloads.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -13,3 +12,15 @@ File "generics_typevartuple_overloads.py", line 29, in : class Array is File "generics_typevartuple_overloads.py", line 30, in func1: class Array is not indexable [not-indexable] File "generics_typevartuple_overloads.py", line 31, in func1: class Array is not indexable [not-indexable] """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['File "generics_typevartuple_overloads.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 10: Unexpected errors ['File "generics_typevartuple_overloads.py", line 10, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 16: Unexpected errors ['File "generics_typevartuple_overloads.py", line 16, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 18: Unexpected errors ['File "generics_typevartuple_overloads.py", line 18, in Array: class Array is not indexable [not-indexable]'] +Line 22: Unexpected errors ['File "generics_typevartuple_overloads.py", line 22, in Array: class Array is not indexable [not-indexable]'] +Line 26: Unexpected errors ['File "generics_typevartuple_overloads.py", line 26, in transpose: bad return type [bad-return-type]'] +Line 29: Unexpected errors ['File "generics_typevartuple_overloads.py", line 29, in : class Array is not indexable [not-indexable]'] +Line 30: Unexpected errors ['File "generics_typevartuple_overloads.py", line 30, in func1: class Array is not indexable [not-indexable]'] +Line 31: Unexpected errors ['File "generics_typevartuple_overloads.py", line 31, in func1: class Array is not indexable [not-indexable]'] +""" diff --git a/conformance/results/pytype/generics_typevartuple_specialization.toml b/conformance/results/pytype/generics_typevartuple_specialization.toml index 7894d5946..ad5f59687 100644 --- a/conformance/results/pytype/generics_typevartuple_specialization.toml +++ b/conformance/results/pytype/generics_typevartuple_specialization.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ File "generics_typevartuple_specialization.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -79,3 +78,67 @@ File "generics_typevartuple_specialization.py", line 159, in func11: Invalid typ File "generics_typevartuple_specialization.py", line 162, in : Invalid type annotation '' [invalid-annotation] File "generics_typevartuple_specialization.py", line 163, in : Invalid type annotation 'Tuple[Any][]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['File "generics_typevartuple_specialization.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 10: Unexpected errors ['File "generics_typevartuple_specialization.py", line 10, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 16: Unexpected errors ['File "generics_typevartuple_specialization.py", line 16, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 24: Unexpected errors ['File "generics_typevartuple_specialization.py", line 24, in : class Array is not indexable [not-indexable]'] +Line 28: Unexpected errors ['File "generics_typevartuple_specialization.py", line 28, in : class Array is not indexable [not-indexable]'] +Line 33: Unexpected errors ['File "generics_typevartuple_specialization.py", line 33, in : class Array is not indexable [not-indexable]'] +Line 41: Unexpected errors ['File "generics_typevartuple_specialization.py", line 41, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 42: Unexpected errors ['File "generics_typevartuple_specialization.py", line 42, in : class Array is not indexable [not-indexable]'] +Line 45: Unexpected errors ['File "generics_typevartuple_specialization.py", line 45, in : Invalid type annotation \\'Tuple[str, Array][Height]\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 45, in : Invalid type annotation \\'Tuple[Any][float, bool]\\' [invalid-annotation]'] +Line 46: Unexpected errors ['File "generics_typevartuple_specialization.py", line 46, in func3: Tuple[Any] [assert-type]'] +Line 47: Unexpected errors ['File "generics_typevartuple_specialization.py", line 47, in func3: class Array is not indexable [not-indexable]'] +Line 51: Unexpected errors ['File "generics_typevartuple_specialization.py", line 51, in func4: Tuple[Any] [assert-type]'] +Line 55: Unexpected errors ['File "generics_typevartuple_specialization.py", line 55, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 59: Unexpected errors ['File "generics_typevartuple_specialization.py", line 59, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 63: Unexpected errors ['File "generics_typevartuple_specialization.py", line 63, in : class Array2 is not indexable [not-indexable]'] +Line 64: Unexpected errors ['File "generics_typevartuple_specialization.py", line 64, in : class Array2 is not indexable [not-indexable]'] +Line 67: Unexpected errors ['File "generics_typevartuple_specialization.py", line 67, in : class Array2 is not indexable [not-indexable]'] +Line 68: Unexpected errors ['File "generics_typevartuple_specialization.py", line 68, in func5_0: class Array2 is not indexable [not-indexable]'] +Line 69: Unexpected errors ['File "generics_typevartuple_specialization.py", line 69, in func5_0: class Array2 is not indexable [not-indexable]'] +Line 76: Unexpected errors ['File "generics_typevartuple_specialization.py", line 76, in : class Array2 is not indexable [not-indexable]'] +Line 80: Unexpected errors ['File "generics_typevartuple_specialization.py", line 80, in : class Array2 is not indexable [not-indexable]'] +Line 89: Unexpected errors ['File "generics_typevartuple_specialization.py", line 89, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 92: Unexpected errors ['File "generics_typevartuple_specialization.py", line 92, in : Invalid type annotation \\'Tuple[Any][str, int]\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 92, in : Invalid type annotation \\'Tuple[Any][float]\\' [invalid-annotation]'] +Line 93: Unexpected errors ['File "generics_typevartuple_specialization.py", line 93, in func6: Tuple[Any] [assert-type]'] +Line 94: Unexpected errors ['File "generics_typevartuple_specialization.py", line 94, in func6: Tuple[Any] [assert-type]'] +Line 95: Unexpected errors ['File "generics_typevartuple_specialization.py", line 95, in func6: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 98: Unexpected errors ['File "generics_typevartuple_specialization.py", line 98, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 99: Unexpected errors ['File "generics_typevartuple_specialization.py", line 99, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 101: Unexpected errors ['File "generics_typevartuple_specialization.py", line 101, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 102: Unexpected errors ['File "generics_typevartuple_specialization.py", line 102, in : Invalid type annotation \\'Tuple[Any][]\\' [invalid-annotation]'] +Line 103: Unexpected errors ['File "generics_typevartuple_specialization.py", line 103, in : Invalid type annotation \\'Tuple[Any][]\\' [invalid-annotation]'] +Line 109: Unexpected errors ['File "generics_typevartuple_specialization.py", line 109, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 110: Unexpected errors ['File "generics_typevartuple_specialization.py", line 110, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 117: Unexpected errors ['File "generics_typevartuple_specialization.py", line 117, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 118: Unexpected errors ['File "generics_typevartuple_specialization.py", line 118, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 119: Unexpected errors ['File "generics_typevartuple_specialization.py", line 119, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 120: Unexpected errors ['File "generics_typevartuple_specialization.py", line 120, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 121: Unexpected errors ['File "generics_typevartuple_specialization.py", line 121, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 121, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +Line 122: Unexpected errors ['File "generics_typevartuple_specialization.py", line 122, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 122, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +Line 125: Unexpected errors ['File "generics_typevartuple_specialization.py", line 125, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 127: Unexpected errors ['File "generics_typevartuple_specialization.py", line 127, in : Invalid type annotation \\'Tuple[Any][int]\\' [invalid-annotation]'] +Line 130: Unexpected errors ['File "generics_typevartuple_specialization.py", line 130, in : Invalid type annotation \\'Tuple[Any][]\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 130, in : Invalid type annotation \\'T2\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 130, in : Invalid type annotation \\'T1\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 130, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 131: Unexpected errors ['File "generics_typevartuple_specialization.py", line 131, in func7: bad return type [bad-return-type]'] +Line 134: Unexpected errors ['File "generics_typevartuple_specialization.py", line 134, in : Invalid type annotation \\'Tuple[Any][str, bool]\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 134, in : Invalid type annotation \\'Tuple[Any][str, bool, float]\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 134, in : Invalid type annotation \\'Tuple[Any][str, bool, float, int]\\' [invalid-annotation]'] +Line 135: Unexpected errors ['File "generics_typevartuple_specialization.py", line 135, in func8: Tuple[Tuple[Any], Any, Any] [assert-type]'] +Line 136: Unexpected errors ['File "generics_typevartuple_specialization.py", line 136, in func8: Tuple[Tuple[Any], Any, Any] [assert-type]'] +Line 137: Unexpected errors ['File "generics_typevartuple_specialization.py", line 137, in func8: Tuple[Tuple[Any], Any, Any] [assert-type]'] +Line 140: Unexpected errors ['File "generics_typevartuple_specialization.py", line 140, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 143: Unexpected errors ['File "generics_typevartuple_specialization.py", line 143, in : Invalid type annotation \\'Tuple[Any][]\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 143, in : Invalid type annotation \\'T3\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 143, in : Invalid type annotation \\'T2\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 143, in : Invalid type annotation \\'T1\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 143, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 144: Unexpected errors ['File "generics_typevartuple_specialization.py", line 144, in func9: bad return type [bad-return-type]'] +Line 147: Unexpected errors ['File "generics_typevartuple_specialization.py", line 147, in : Invalid type annotation \\'Tuple[Any][str, bool, float]\\' [invalid-annotation]', 'File "generics_typevartuple_specialization.py", line 147, in : Invalid type annotation \\'Tuple[Any][str, bool, float, int]\\' [invalid-annotation]'] +Line 148: Unexpected errors ['File "generics_typevartuple_specialization.py", line 148, in func10: Tuple[Tuple[Any], Any, Any, Any] [assert-type]'] +Line 149: Unexpected errors ['File "generics_typevartuple_specialization.py", line 149, in func10: Tuple[Tuple[Any], Any, Any, Any] [assert-type]'] +Line 152: Unexpected errors ['File "generics_typevartuple_specialization.py", line 152, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 153: Unexpected errors ['File "generics_typevartuple_specialization.py", line 153, in : Invalid type annotation \\'Tuple[Any][]\\' [invalid-annotation]'] +Line 156: Unexpected errors ['File "generics_typevartuple_specialization.py", line 156, in : Invalid type annotation \\'Tuple[Any][]\\' [invalid-annotation]'] +Line 157: Unexpected errors ['File "generics_typevartuple_specialization.py", line 157, in func11: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 158: Unexpected errors ['File "generics_typevartuple_specialization.py", line 158, in func11: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 159: Unexpected errors ['File "generics_typevartuple_specialization.py", line 159, in func11: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 162: Unexpected errors ['File "generics_typevartuple_specialization.py", line 162, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 163: Unexpected errors ['File "generics_typevartuple_specialization.py", line 163, in : Invalid type annotation \\'Tuple[Any][]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/generics_typevartuple_unpack.toml b/conformance/results/pytype/generics_typevartuple_unpack.toml index 5f59c2e26..da88ce469 100644 --- a/conformance/results/pytype/generics_typevartuple_unpack.toml +++ b/conformance/results/pytype/generics_typevartuple_unpack.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support TypeVarTuple. +notes = """Does not support TypeVarTuple. """ output = """ File "generics_typevartuple_unpack.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet] @@ -13,3 +12,15 @@ File "generics_typevartuple_unpack.py", line 36, in : class Array is not File "generics_typevartuple_unpack.py", line 40, in : class Array is not indexable [not-indexable] File "generics_typevartuple_unpack.py", line 44, in : class Array is not indexable [not-indexable] """ +conformance_automated = "Fail" +errors_diff = """ +Line 7: Unexpected errors ['File "generics_typevartuple_unpack.py", line 7, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 14: Unexpected errors ['File "generics_typevartuple_unpack.py", line 14, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 17: Unexpected errors ['File "generics_typevartuple_unpack.py", line 17, in : Invalid type annotation \\'Generic\\' [invalid-annotation]'] +Line 21: Unexpected errors ['File "generics_typevartuple_unpack.py", line 21, in : class Array is not indexable [not-indexable]'] +Line 26: Unexpected errors ['File "generics_typevartuple_unpack.py", line 26, in : class Array is not indexable [not-indexable]'] +Line 33: Unexpected errors ['File "generics_typevartuple_unpack.py", line 33, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 36: Unexpected errors ['File "generics_typevartuple_unpack.py", line 36, in : class Array is not indexable [not-indexable]'] +Line 40: Unexpected errors ['File "generics_typevartuple_unpack.py", line 40, in : class Array is not indexable [not-indexable]'] +Line 44: Unexpected errors ['File "generics_typevartuple_unpack.py", line 44, in : class Array is not indexable [not-indexable]'] +""" diff --git a/conformance/results/pytype/generics_upper_bound.toml b/conformance/results/pytype/generics_upper_bound.toml index cdb83b699..50120d0cb 100644 --- a/conformance/results/pytype/generics_upper_bound.toml +++ b/conformance/results/pytype/generics_upper_bound.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not properly support assert_type. +notes = """Does not properly support assert_type. """ output = """ File "generics_upper_bound.py", line 22, in : Invalid TypeVar: bound cannot contain TypeVars [invalid-typevar] @@ -10,3 +9,12 @@ File "generics_upper_bound.py", line 41, in : Union[list, set] [assert-t File "generics_upper_bound.py", line 43, in : Function longer was called with the wrong arguments [wrong-arg-types] File "generics_upper_bound.py", line 48, in : Invalid TypeVar: constraints and a bound are mutually exclusive [invalid-typevar] """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['File "generics_upper_bound.py", line 22, in : Invalid TypeVar: bound cannot contain TypeVars [invalid-typevar]'] +Line 35: Unexpected errors ['File "generics_upper_bound.py", line 35, in : list [assert-type]'] +Line 36: Unexpected errors ['File "generics_upper_bound.py", line 36, in : set [assert-type]'] +Line 41: Unexpected errors ['File "generics_upper_bound.py", line 41, in : Union[list, set] [assert-type]'] +Line 43: Unexpected errors ['File "generics_upper_bound.py", line 43, in : Function longer was called with the wrong arguments [wrong-arg-types]'] +Line 48: Unexpected errors ['File "generics_upper_bound.py", line 48, in : Invalid TypeVar: constraints and a bound are mutually exclusive [invalid-typevar]'] +""" diff --git a/conformance/results/pytype/generics_variance.toml b/conformance/results/pytype/generics_variance.toml index 4d2cb58d1..2be4fa9db 100644 --- a/conformance/results/pytype/generics_variance.toml +++ b/conformance/results/pytype/generics_variance.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support covariant or contravariant TypeVars. +notes = """Does not support covariant or contravariant TypeVars. """ output = """ File "generics_variance.py", line 14, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] @@ -10,3 +9,11 @@ File "generics_variance.py", line 19, in : argument "contravariant" to T File "generics_variance.py", line 27, in __iter__: bad return type [bad-return-type] File "generics_variance.py", line 52, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['File "generics_variance.py", line 14, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]', 'File "generics_variance.py", line 14, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +Line 18: Unexpected errors ['File "generics_variance.py", line 18, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 19: Unexpected errors ['File "generics_variance.py", line 19, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +Line 27: Unexpected errors ['File "generics_variance.py", line 27, in __iter__: bad return type [bad-return-type]'] +Line 52: Unexpected errors ['File "generics_variance.py", line 52, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/generics_variance_inference.toml b/conformance/results/pytype/generics_variance_inference.toml index 8de7a556d..e7e77180e 100644 --- a/conformance/results/pytype/generics_variance_inference.toml +++ b/conformance/results/pytype/generics_variance_inference.toml @@ -1,7 +1,9 @@ conformant = "Unsupported" -notes = """ -Type parameter syntax not yet support. +notes = """Type parameter syntax not yet support. """ output = """ SyntaxError: Type parameter lists are only supported in Python 3.12 and greater (, line 15) """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/historical_positional.toml b/conformance/results/pytype/historical_positional.toml index bc137a6ff..108f7df6b 100644 --- a/conformance/results/pytype/historical_positional.toml +++ b/conformance/results/pytype/historical_positional.toml @@ -1,8 +1,11 @@ -conformant="Partial" -notes = """ -Does not apply rules for pre-3.8 positional-only parameters in some cases. +conformant = "Partial" +notes = """Does not apply rules for pre-3.8 positional-only parameters in some cases. Does not reject positional-only parameter after non-positional-only parameter. """ output = """ File "historical_positional.py", line 43, in : Invalid keyword argument __x to function A.m1 [wrong-keyword-args] """ +conformance_automated = "Fail" +errors_diff = """ +Line 43: Unexpected errors ['File "historical_positional.py", line 43, in : Invalid keyword argument __x to function A.m1 [wrong-keyword-args]'] +""" diff --git a/conformance/results/pytype/literals_interactions.toml b/conformance/results/pytype/literals_interactions.toml index e1d3e8316..648c8790f 100644 --- a/conformance/results/pytype/literals_interactions.toml +++ b/conformance/results/pytype/literals_interactions.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly rejects some legal Literal annotations. +notes = """Incorrectly rejects some legal Literal annotations. Does not reject some illegal Literal annotations. Does not use Literal to distinguish overloads. Does not narrow based on `x is Literal` type guard pattern. @@ -25,3 +24,15 @@ File "literals_interactions.py", line 93, in parse_status1: Union[Status, str] [ File "literals_interactions.py", line 106, in parse_status2: Function expects_bad_status was called with the wrong arguments [wrong-arg-types] File "literals_interactions.py", line 109, in parse_status2: Function expects_pending_status was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['File "literals_interactions.py", line 11, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 46: Unexpected errors ['File "literals_interactions.py", line 46, in open: bad return type [bad-return-type]', 'File "literals_interactions.py", line 46, in open: bad return type [bad-return-type]', 'File "literals_interactions.py", line 46, in open: bad return type [bad-return-type]'] +Line 61: Unexpected errors ['File "literals_interactions.py", line 61, in __add__: bad return type [bad-return-type]'] +Line 64: Unexpected errors ['File "literals_interactions.py", line 64, in __matmul__: bad return type [bad-return-type]'] +Line 67: Unexpected errors ['File "literals_interactions.py", line 67, in transpose: bad return type [bad-return-type]'] +Line 72: Unexpected errors ['File "literals_interactions.py", line 72, in func2: Matrix[Any, int] [assert-type]'] +Line 93: Unexpected errors ['File "literals_interactions.py", line 93, in parse_status1: Union[Status, str] [assert-type]'] +Line 106: Unexpected errors ['File "literals_interactions.py", line 106, in parse_status2: Function expects_bad_status was called with the wrong arguments [wrong-arg-types]'] +Line 109: Unexpected errors ['File "literals_interactions.py", line 109, in parse_status2: Function expects_pending_status was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/literals_literalstring.toml b/conformance/results/pytype/literals_literalstring.toml index 0902aa477..273e0352e 100644 --- a/conformance/results/pytype/literals_literalstring.toml +++ b/conformance/results/pytype/literals_literalstring.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `LiteralString` special form. +notes = """Does not understand `LiteralString` special form. """ output = """ File "literals_literalstring.py", line 8, in : typing.LiteralString not supported yet [not-supported-yet] @@ -15,3 +14,15 @@ Called from (traceback): line 160, in current file File "literals_literalstring.py", line 162, in : bool [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['File "literals_literalstring.py", line 8, in : typing.LiteralString not supported yet [not-supported-yet]'] +Line 24: Unexpected errors ['File "literals_literalstring.py", line 24, in my_function: bad return type [bad-return-type]'] +Line 36: Unexpected errors ['File "literals_literalstring.py", line 36, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 37: Unexpected errors ['File "literals_literalstring.py", line 37, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 43: Unexpected errors ['File "literals_literalstring.py", line 43, in func1: Type annotation for x2 does not match type of assignment [annotation-type-mismatch]'] +Line 74: Unexpected errors ['File "literals_literalstring.py", line 74, in func2: Type annotation for x3 does not match type of assignment [annotation-type-mismatch]'] +Line 75: Unexpected errors ['File "literals_literalstring.py", line 75, in func2: Type annotation for x4 does not match type of assignment [annotation-type-mismatch]'] +Line 157: Unexpected errors ['File "literals_literalstring.py", line 157, in func8: bad return type [bad-return-type]'] +Line 162: Unexpected errors ['File "literals_literalstring.py", line 162, in : bool [assert-type]'] +""" diff --git a/conformance/results/pytype/literals_parameterizations.toml b/conformance/results/pytype/literals_parameterizations.toml index 68045e7e6..efa574bc1 100644 --- a/conformance/results/pytype/literals_parameterizations.toml +++ b/conformance/results/pytype/literals_parameterizations.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Literal` type annotation. +notes = """Does not understand `Literal` type annotation. """ output = """ File "literals_parameterizations.py", line 17, in : Invalid type annotation 'Literal' [invalid-annotation] @@ -20,3 +19,21 @@ File "literals_parameterizations.py", line 61, in : Invalid type annotat File "literals_parameterizations.py", line 61, in : Invalid type annotation 'Literal' [invalid-annotation] File "literals_parameterizations.py", line 65, in func2: Type annotation for x1 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Unexpected errors ['File "literals_parameterizations.py", line 17, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 18: Unexpected errors ['File "literals_parameterizations.py", line 18, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 19: Unexpected errors ['File "literals_parameterizations.py", line 19, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 33: Unexpected errors ['File "literals_parameterizations.py", line 33, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 35: Unexpected errors ['File "literals_parameterizations.py", line 35, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 42: Unexpected errors ['File "literals_parameterizations.py", line 42, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 43: Unexpected errors ['File "literals_parameterizations.py", line 43, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 44: Unexpected errors ['File "literals_parameterizations.py", line 44, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 47: Unexpected errors ['File "literals_parameterizations.py", line 47, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 48: Unexpected errors ['File "literals_parameterizations.py", line 48, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 50: Unexpected errors ['File "literals_parameterizations.py", line 50, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 51: Unexpected errors ['File "literals_parameterizations.py", line 51, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 53: Unexpected errors ['File "literals_parameterizations.py", line 53, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 61: Unexpected errors ['File "literals_parameterizations.py", line 61, in : Invalid type annotation \\'Literal[my_function]\\' [invalid-annotation]', 'File "literals_parameterizations.py", line 61, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 65: Unexpected errors ['File "literals_parameterizations.py", line 65, in func2: Type annotation for x1 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/literals_semantics.toml b/conformance/results/pytype/literals_semantics.toml index b259b85ba..590bb120b 100644 --- a/conformance/results/pytype/literals_semantics.toml +++ b/conformance/results/pytype/literals_semantics.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand `Literal` type annotation. +notes = """Does not understand `Literal` type annotation. """ output = """ File "literals_semantics.py", line 10, in : Type annotation for v2 does not match type of assignment [annotation-type-mismatch] @@ -11,3 +10,12 @@ File "literals_semantics.py", line 17, in func1: Invalid type annotation 'Litera File "literals_semantics.py", line 18, in func1: Invalid type annotation 'Literal[20]' [invalid-annotation] File "literals_semantics.py", line 19, in func1: Invalid type annotation 'Literal[20]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['File "literals_semantics.py", line 10, in : Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 12: Unexpected errors ['File "literals_semantics.py", line 12, in : Invalid type annotation \\'Literal\\' [invalid-annotation]', 'File "literals_semantics.py", line 12, in : Invalid type annotation \\'L[-3]\\' [invalid-annotation]'] +Line 16: Unexpected errors ['File "literals_semantics.py", line 16, in : Invalid type annotation \\'Literal\\' [invalid-annotation]'] +Line 17: Unexpected errors ['File "literals_semantics.py", line 17, in func1: Invalid type annotation \\'Literal[20]\\' [invalid-annotation]'] +Line 18: Unexpected errors ['File "literals_semantics.py", line 18, in func1: Invalid type annotation \\'Literal[20]\\' [invalid-annotation]'] +Line 19: Unexpected errors ['File "literals_semantics.py", line 19, in func1: Invalid type annotation \\'Literal[20]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/namedtuples_define_class.toml b/conformance/results/pytype/namedtuples_define_class.toml index 72487f698..17a7b8c5d 100644 --- a/conformance/results/pytype/namedtuples_define_class.toml +++ b/conformance/results/pytype/namedtuples_define_class.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly rejects valid index of named tuple instance when using a negative index. +notes = """Incorrectly rejects valid index of named tuple instance when using a negative index. Does not evaluate correct type for indexed named tuple instance with slice. Does not reject named tuple element with no default value after one with a default. Does not reject override of named tuple attribute in child class. @@ -21,3 +20,17 @@ File "namedtuples_define_class.py", line 48, in : Function Point.__new__ File "namedtuples_define_class.py", line 49, in : Invalid keyword argument other to function Point.__new__ [wrong-keyword-args] File "namedtuples_define_class.py", line 95, in : Any [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Unexpected errors ['File "namedtuples_define_class.py", line 27, in : Union[int, str] [assert-type]'] +Line 28: Unexpected errors ['File "namedtuples_define_class.py", line 28, in : Union[int, str] [assert-type]'] +Line 29: Unexpected errors ['File "namedtuples_define_class.py", line 29, in : Tuple[Union[int, str], ...] [assert-type]'] +Line 30: Unexpected errors ['File "namedtuples_define_class.py", line 30, in : Tuple[Union[int, str], ...] [assert-type]'] +Line 44: Unexpected errors ['File "namedtuples_define_class.py", line 44, in : Missing parameter \\'y\\' in call to function Point.__new__ [missing-parameter]'] +Line 45: Unexpected errors ['File "namedtuples_define_class.py", line 45, in : Missing parameter \\'y\\' in call to function Point.__new__ [missing-parameter]'] +Line 46: Unexpected errors ['File "namedtuples_define_class.py", line 46, in : Function Point.__new__ was called with the wrong arguments [wrong-arg-types]'] +Line 47: Unexpected errors ['File "namedtuples_define_class.py", line 47, in : Function Point.__new__ was called with the wrong arguments [wrong-arg-types]'] +Line 48: Unexpected errors ['File "namedtuples_define_class.py", line 48, in : Function Point.__new__ expects 3 arg(s), got 5 [wrong-arg-count]'] +Line 49: Unexpected errors ['File "namedtuples_define_class.py", line 49, in : Invalid keyword argument other to function Point.__new__ [wrong-keyword-args]'] +Line 95: Unexpected errors ['File "namedtuples_define_class.py", line 95, in : Any [assert-type]'] +""" diff --git a/conformance/results/pytype/namedtuples_define_functional.toml b/conformance/results/pytype/namedtuples_define_functional.toml index 94b643d3a..47f4f90a6 100644 --- a/conformance/results/pytype/namedtuples_define_functional.toml +++ b/conformance/results/pytype/namedtuples_define_functional.toml @@ -1,6 +1,5 @@ conformant = "Pass" -notes = """ -Does not handle illegal named tuple names the same as runtime. +notes = """Does not handle illegal named tuple names the same as runtime. Does not support defaults in functional form. """ output = """ @@ -17,3 +16,18 @@ File "namedtuples_define_functional.py", line 53, in : collections.named File "namedtuples_define_functional.py", line 54, in : collections.namedtuple argument 'def' is not a valid typename or field name. [invalid-namedtuple-arg] File "namedtuples_define_functional.py", line 63, in : Function collections.namedtuple was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Unexpected errors ['File "namedtuples_define_functional.py", line 16, in : Missing parameter \\'y\\' in call to function Point1.__new__ [missing-parameter]'] +Line 21: Unexpected errors ['File "namedtuples_define_functional.py", line 21, in : Missing parameter \\'x\\' in call to function Point2.__new__ [missing-parameter]'] +Line 26: Unexpected errors ['File "namedtuples_define_functional.py", line 26, in : Function Point3.__new__ expects 3 arg(s), got 4 [wrong-arg-count]'] +Line 31: Unexpected errors ['File "namedtuples_define_functional.py", line 31, in : Invalid keyword argument z to function Point4.__new__ [wrong-keyword-args]'] +Line 36: Unexpected errors ['File "namedtuples_define_functional.py", line 36, in : Function Point5.__new__ was called with the wrong arguments [wrong-arg-types]'] +Line 37: Unexpected errors ['File "namedtuples_define_functional.py", line 37, in : Function Point5.__new__ expects 3 arg(s), got 4 [wrong-arg-count]'] +Line 42: Unexpected errors ['File "namedtuples_define_functional.py", line 42, in : Function Point6.__new__ was called with the wrong arguments [wrong-arg-types]'] +Line 43: Unexpected errors ['File "namedtuples_define_functional.py", line 43, in : Function Point6.__new__ was called with the wrong arguments [wrong-arg-types]'] +Line 52: Unexpected errors ['File "namedtuples_define_functional.py", line 52, in : collections.namedtuple argument \\'a\\' is not a valid typename or field name. [invalid-namedtuple-arg]'] +Line 53: Unexpected errors ['File "namedtuples_define_functional.py", line 53, in : collections.namedtuple argument \\'def\\' is not a valid typename or field name. [invalid-namedtuple-arg]'] +Line 54: Unexpected errors ['File "namedtuples_define_functional.py", line 54, in : collections.namedtuple argument \\'def\\' is not a valid typename or field name. [invalid-namedtuple-arg]'] +Line 63: Unexpected errors ['File "namedtuples_define_functional.py", line 63, in : Function collections.namedtuple was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/namedtuples_type_compat.toml b/conformance/results/pytype/namedtuples_type_compat.toml index 503fa2cf8..d0e01d090 100644 --- a/conformance/results/pytype/namedtuples_type_compat.toml +++ b/conformance/results/pytype/namedtuples_type_compat.toml @@ -3,3 +3,8 @@ output = """ File "namedtuples_type_compat.py", line 22, in : Type annotation for v3 does not match type of assignment [annotation-type-mismatch] File "namedtuples_type_compat.py", line 23, in : Type annotation for v4 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Unexpected errors ['File "namedtuples_type_compat.py", line 22, in : Type annotation for v3 does not match type of assignment [annotation-type-mismatch]'] +Line 23: Unexpected errors ['File "namedtuples_type_compat.py", line 23, in : Type annotation for v4 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/namedtuples_usage.toml b/conformance/results/pytype/namedtuples_usage.toml index f4652ca71..20e37ab07 100644 --- a/conformance/results/pytype/namedtuples_usage.toml +++ b/conformance/results/pytype/namedtuples_usage.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Incorrectly rejects valid index of named tuple instance when using a negative index. +notes = """Incorrectly rejects valid index of named tuple instance when using a negative index. Does not report out-of-range index access with named tuple instance. Does not reject attempt to overwrite named tuple entry by name. Does not reject attempt to delete named tuple entry by name. @@ -13,3 +12,12 @@ File "namedtuples_usage.py", line 43, in : unsupported operand type(s) f File "namedtuples_usage.py", line 52, in : Cannot unpack 3 values into 2 variables [bad-unpacking] File "namedtuples_usage.py", line 53, in : Cannot unpack 3 values into 4 variables [bad-unpacking] """ +conformance_automated = "Fail" +errors_diff = """ +Line 31: Unexpected errors ['File "namedtuples_usage.py", line 31, in : Union[int, str] [assert-type]'] +Line 32: Unexpected errors ['File "namedtuples_usage.py", line 32, in : Union[int, str] [assert-type]'] +Line 41: Unexpected errors ['File "namedtuples_usage.py", line 41, in : unsupported operand type(s) for item assignment: Point [unsupported-operands]'] +Line 43: Unexpected errors ['File "namedtuples_usage.py", line 43, in : unsupported operand type(s) for item deletion: Point [unsupported-operands]'] +Line 52: Unexpected errors ['File "namedtuples_usage.py", line 52, in : Cannot unpack 3 values into 2 variables [bad-unpacking]'] +Line 53: Unexpected errors ['File "namedtuples_usage.py", line 53, in : Cannot unpack 3 values into 4 variables [bad-unpacking]'] +""" diff --git a/conformance/results/pytype/narrowing_typeguard.toml b/conformance/results/pytype/narrowing_typeguard.toml index fe97ab50d..74d156af5 100644 --- a/conformance/results/pytype/narrowing_typeguard.toml +++ b/conformance/results/pytype/narrowing_typeguard.toml @@ -1,8 +1,10 @@ conformant = "Partial" -notes = """ -Does not reject TypeGuard method with too few parameters. +notes = """Does not reject TypeGuard method with too few parameters. """ output = """ File "narrowing_typeguard.py", line 128, in : Function takes_callable_str was called with the wrong arguments [wrong-arg-types] File "narrowing_typeguard.py", line 148, in : Function takes_callable_str_proto was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/overloads_basic.toml b/conformance/results/pytype/overloads_basic.toml index 76f063a9b..4bcf4f492 100644 --- a/conformance/results/pytype/overloads_basic.toml +++ b/conformance/results/pytype/overloads_basic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject a function with a single @overload signature. +notes = """Does not reject a function with a single @overload signature. Does not reject a function with @overload signature but no implementation. """ output = """ @@ -8,3 +7,9 @@ File "overloads_basic.py", line 31, in __getitem__: bad return type [bad-return- File "overloads_basic.py", line 37, in : unsupported operand type(s) for item retrieval: Bytes and str [unsupported-operands] File "overloads_basic.py", line 58, in map: bad return type [bad-return-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 31: Unexpected errors ['File "overloads_basic.py", line 31, in __getitem__: bad return type [bad-return-type]'] +Line 37: Unexpected errors ['File "overloads_basic.py", line 37, in : unsupported operand type(s) for item retrieval: Bytes and str [unsupported-operands]'] +Line 58: Unexpected errors ['File "overloads_basic.py", line 58, in map: bad return type [bad-return-type]'] +""" diff --git a/conformance/results/pytype/protocols_class_objects.toml b/conformance/results/pytype/protocols_class_objects.toml index 4c9d97729..de81ed51e 100644 --- a/conformance/results/pytype/protocols_class_objects.toml +++ b/conformance/results/pytype/protocols_class_objects.toml @@ -1,9 +1,12 @@ conformant = "Partial" -notes = """ -Does not reject protocol class assigned to type[Proto]. +notes = """Does not reject protocol class assigned to type[Proto]. Incorrectly reports some class objects as incompatible with a protocol. Fails to report some class objects as incompatible with a protocol. """ output = """ File "protocols_class_objects.py", line 50, in method1: bad return type [bad-return-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 50: Unexpected errors ['File "protocols_class_objects.py", line 50, in method1: bad return type [bad-return-type]'] +""" diff --git a/conformance/results/pytype/protocols_definition.toml b/conformance/results/pytype/protocols_definition.toml index ce8403900..5217656d3 100644 --- a/conformance/results/pytype/protocols_definition.toml +++ b/conformance/results/pytype/protocols_definition.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Reports errors for protocol static method with "..." implementation. +notes = """Reports errors for protocol static method with "..." implementation. Does not report error when instance variable is set through "self" access in protocol class. Does not report protocol mismatch when concrete class has attribute with covariant type and protocol attribute is mutable. Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar. @@ -25,3 +24,14 @@ File "protocols_definition.py", line 159, in : Type annotation for v3_ba File "protocols_definition.py", line 218, in : Type annotation for v4_bad1 does not match type of assignment [annotation-type-mismatch] File "protocols_definition.py", line 219, in : Type annotation for v4_bad2 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Unexpected errors ['File "protocols_definition.py", line 30, in : Function close_all was called with the wrong arguments [wrong-arg-types]'] +Line 45: Unexpected errors ['File "protocols_definition.py", line 45, in third: bad return type [bad-return-type]'] +Line 114: Unexpected errors ['File "protocols_definition.py", line 114, in : Type annotation for v2_bad1 does not match type of assignment [annotation-type-mismatch]'] +Line 115: Unexpected errors ['File "protocols_definition.py", line 115, in : Type annotation for v2_bad2 does not match type of assignment [annotation-type-mismatch]'] +Line 156: Unexpected errors ['File "protocols_definition.py", line 156, in : Type annotation for v3_bad1 does not match type of assignment [annotation-type-mismatch]'] +Line 159: Unexpected errors ['File "protocols_definition.py", line 159, in : Type annotation for v3_bad4 does not match type of assignment [annotation-type-mismatch]'] +Line 218: Unexpected errors ['File "protocols_definition.py", line 218, in : Type annotation for v4_bad1 does not match type of assignment [annotation-type-mismatch]'] +Line 219: Unexpected errors ['File "protocols_definition.py", line 219, in : Type annotation for v4_bad2 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/protocols_explicit.toml b/conformance/results/pytype/protocols_explicit.toml index bfc2d179b..94c97b7b4 100644 --- a/conformance/results/pytype/protocols_explicit.toml +++ b/conformance/results/pytype/protocols_explicit.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Reports errors for protocol static method with "..." implementation. +notes = """Reports errors for protocol static method with "..." implementation. Does not report error when calling unimplemented protocol method from derived class. Does not report type incompatibility when assigning to attribute defined in protocol. Does not reject instantiation of class that derives from protocol but doesn't implement attribute. @@ -13,3 +12,9 @@ Called from (traceback): File "protocols_explicit.py", line 59, in : Can't instantiate Point with abstract methods intensity [not-instantiable] File "protocols_explicit.py", line 159, in : Can't instantiate Concrete7A with abstract methods method1 [not-instantiable] """ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Unexpected errors ['File "protocols_explicit.py", line 14, in draw: bad return type [bad-return-type]'] +Line 59: Unexpected errors ['File "protocols_explicit.py", line 59, in : Can\\'t instantiate Point with abstract methods intensity [not-instantiable]'] +Line 159: Unexpected errors ['File "protocols_explicit.py", line 159, in : Can\\'t instantiate Concrete7A with abstract methods method1 [not-instantiable]'] +""" diff --git a/conformance/results/pytype/protocols_generic.toml b/conformance/results/pytype/protocols_generic.toml index c44fe0b51..d9c3511c0 100644 --- a/conformance/results/pytype/protocols_generic.toml +++ b/conformance/results/pytype/protocols_generic.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not correctly enforce contravariance in protocol type compatibility tests. +notes = """Does not correctly enforce contravariance in protocol type compatibility tests. Does not correctly enforce invariance in protocol type compatibility tests. Does not detect protocol mismatch when method-scoped TypeVar is used in protocol. """ @@ -14,3 +13,14 @@ File "protocols_generic.py", line 65, in func2: Type annotation for v1 does not File "protocols_generic.py", line 75, in func3: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] File "protocols_generic.py", line 146, in : Type annotation for hp3 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['File "protocols_generic.py", line 12, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 13: Unexpected errors ['File "protocols_generic.py", line 13, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +Line 40: Unexpected errors ['File "protocols_generic.py", line 40, in : Type annotation for p2 does not match type of assignment [annotation-type-mismatch]'] +Line 44: Unexpected errors ['File "protocols_generic.py", line 44, in : Invalid type annotation \\'Proto2\\' [invalid-annotation]'] +Line 56: Unexpected errors ['File "protocols_generic.py", line 56, in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 65: Unexpected errors ['File "protocols_generic.py", line 65, in func2: Type annotation for v1 does not match type of assignment [annotation-type-mismatch]'] +Line 75: Unexpected errors ['File "protocols_generic.py", line 75, in func3: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 146: Unexpected errors ['File "protocols_generic.py", line 146, in : Type annotation for hp3 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/protocols_merging.toml b/conformance/results/pytype/protocols_merging.toml index 0d1bbd248..ddfd22952 100644 --- a/conformance/results/pytype/protocols_merging.toml +++ b/conformance/results/pytype/protocols_merging.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject a protocol class that derives from a non-protocol class. +notes = """Does not reject a protocol class that derives from a non-protocol class. Does not report attempt to instantiate abstract class downgraded from protocol class. """ output = """ @@ -10,3 +9,11 @@ File "protocols_merging.py", line 54, in : Type annotation for s8 does n File "protocols_merging.py", line 83, in : Can't instantiate SizedAndClosable4 with abstract methods close [not-instantiable] File "protocols_merging.py", line 84, in : Type annotation for y does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 52: Unexpected errors ['File "protocols_merging.py", line 52, in : Type annotation for s6 does not match type of assignment [annotation-type-mismatch]'] +Line 53: Unexpected errors ['File "protocols_merging.py", line 53, in : Type annotation for s7 does not match type of assignment [annotation-type-mismatch]'] +Line 54: Unexpected errors ['File "protocols_merging.py", line 54, in : Type annotation for s8 does not match type of assignment [annotation-type-mismatch]'] +Line 83: Unexpected errors ['File "protocols_merging.py", line 83, in : Can\\'t instantiate SizedAndClosable4 with abstract methods close [not-instantiable]'] +Line 84: Unexpected errors ['File "protocols_merging.py", line 84, in : Type annotation for y does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/protocols_modules.toml b/conformance/results/pytype/protocols_modules.toml index 89249cd23..e686e92f9 100644 --- a/conformance/results/pytype/protocols_modules.toml +++ b/conformance/results/pytype/protocols_modules.toml @@ -1,8 +1,12 @@ conformant = "Partial" -notes = """ -Does not report incompatibilities for protocol methods. +notes = """Does not report incompatibilities for protocol methods. """ output = """ File "protocols_modules.py", line 10, in : Can't find module '_protocols_modules1'. [import-error] File "protocols_modules.py", line 11, in : Can't find module '_protocols_modules2'. [import-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Unexpected errors ['File "protocols_modules.py", line 10, in : Can\\'t find module \\'_protocols_modules1\\'. [import-error]'] +Line 11: Unexpected errors ['File "protocols_modules.py", line 11, in : Can\\'t find module \\'_protocols_modules2\\'. [import-error]'] +""" diff --git a/conformance/results/pytype/protocols_recursive.toml b/conformance/results/pytype/protocols_recursive.toml index 3a3c68322..fa09ec56e 100644 --- a/conformance/results/pytype/protocols_recursive.toml +++ b/conformance/results/pytype/protocols_recursive.toml @@ -1,9 +1,14 @@ conformant = "Partial" -notes = """ -Incorrectly reports type error for some recursive protocols. +notes = """Incorrectly reports type error for some recursive protocols. """ output = """ File "protocols_recursive.py", line 11, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] File "protocols_recursive.py", line 12, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] File "protocols_recursive.py", line 81, in : Any [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['File "protocols_recursive.py", line 11, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 12: Unexpected errors ['File "protocols_recursive.py", line 12, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +Line 81: Unexpected errors ['File "protocols_recursive.py", line 81, in : Any [assert-type]'] +""" diff --git a/conformance/results/pytype/protocols_runtime_checkable.toml b/conformance/results/pytype/protocols_runtime_checkable.toml index 5623253f6..e3058ca0c 100644 --- a/conformance/results/pytype/protocols_runtime_checkable.toml +++ b/conformance/results/pytype/protocols_runtime_checkable.toml @@ -1,9 +1,11 @@ conformant = "Unsupported" -notes = """ -Does not reject isinstance or issubclass call for protocol that is not runtime_checkable. +notes = """Does not reject isinstance or issubclass call for protocol that is not runtime_checkable. Does not reject issubclass call for data protocol. Does not report unsafe overlap for runtime_checkable protocol. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/protocols_self.toml b/conformance/results/pytype/protocols_self.toml index c51fadbc8..1508cd7fd 100644 --- a/conformance/results/pytype/protocols_self.toml +++ b/conformance/results/pytype/protocols_self.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not properly handle Self type within a protocol. +notes = """Does not properly handle Self type within a protocol. """ output = """ File "protocols_self.py", line 36, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] @@ -8,3 +7,10 @@ File "protocols_self.py", line 37, in : argument "covariant" to TypeVar File "protocols_self.py", line 72, in : Type annotation for a2 does not match type of assignment [annotation-type-mismatch] File "protocols_self.py", line 73, in : Type annotation for b2 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Unexpected errors ['File "protocols_self.py", line 36, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 37: Unexpected errors ['File "protocols_self.py", line 37, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 72: Unexpected errors ['File "protocols_self.py", line 72, in : Type annotation for a2 does not match type of assignment [annotation-type-mismatch]'] +Line 73: Unexpected errors ['File "protocols_self.py", line 73, in : Type annotation for b2 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/protocols_subtyping.toml b/conformance/results/pytype/protocols_subtyping.toml index d97ec966d..dc8577ce2 100644 --- a/conformance/results/pytype/protocols_subtyping.toml +++ b/conformance/results/pytype/protocols_subtyping.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject attempt to instantiate protocol class. +notes = """Does not reject attempt to instantiate protocol class. Does not report some protocol type compatibility violations involving contravariance. """ output = """ @@ -9,3 +8,10 @@ File "protocols_subtyping.py", line 55, in func2: Type annotation for v2 does no File "protocols_subtyping.py", line 83, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] File "protocols_subtyping.py", line 84, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 38: Unexpected errors ['File "protocols_subtyping.py", line 38, in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 55: Unexpected errors ['File "protocols_subtyping.py", line 55, in func2: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 83: Unexpected errors ['File "protocols_subtyping.py", line 83, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 84: Unexpected errors ['File "protocols_subtyping.py", line 84, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/protocols_variance.toml b/conformance/results/pytype/protocols_variance.toml index f2402fc3d..52af8a24f 100644 --- a/conformance/results/pytype/protocols_variance.toml +++ b/conformance/results/pytype/protocols_variance.toml @@ -1,9 +1,14 @@ conformant = "Unsupported" -notes = """ -Does not detect incorrect TypeVar variance within generic protocols. +notes = """Does not detect incorrect TypeVar variance within generic protocols. """ output = """ File "protocols_variance.py", line 12, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] File "protocols_variance.py", line 13, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] File "protocols_variance.py", line 15, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['File "protocols_variance.py", line 12, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 13: Unexpected errors ['File "protocols_variance.py", line 13, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet]'] +Line 15: Unexpected errors ['File "protocols_variance.py", line 15, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/qualifiers_annotated.toml b/conformance/results/pytype/qualifiers_annotated.toml index 81ecee57c..5b45bfcf6 100644 --- a/conformance/results/pytype/qualifiers_annotated.toml +++ b/conformance/results/pytype/qualifiers_annotated.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject some illegal type expression forms used in Annotated. +notes = """Does not reject some illegal type expression forms used in Annotated. Does not report type incompatibility between Annotated and type[T]. Does not reject call of Annotated. Does not allow TypeVar to be used in type alias when wrapped with Annotated. @@ -18,3 +17,17 @@ File "qualifiers_annotated.py", line 64, in : Invalid type annotation 'A File "qualifiers_annotated.py", line 91, in : 'Annotated' object is not callable [not-callable] File "qualifiers_annotated.py", line 121, in : Invalid TypeVar: TypeVar('T') must be stored as 'T', not 'TA3' [invalid-typevar] """ +conformance_automated = "Fail" +errors_diff = """ +Line 43: Unexpected errors ['File "qualifiers_annotated.py", line 43, in : Invalid type annotation \\'[int, str]\\' for Bad1 [invalid-annotation]'] +Line 44: Unexpected errors ['File "qualifiers_annotated.py", line 44, in : Invalid type annotation \\'((int, str),)\\' for Bad2 [invalid-annotation]'] +Line 45: Unexpected errors ['File "qualifiers_annotated.py", line 45, in : Invalid type annotation \\'\\' for Bad3 [invalid-annotation]'] +Line 46: Unexpected errors ['File "qualifiers_annotated.py", line 46, in : Invalid type annotation "{\\'a\\': \\'b\\'}" for Bad4 [invalid-annotation]'] +Line 50: Unexpected errors ['File "qualifiers_annotated.py", line 50, in : Name \\'var1\\' is not defined [name-error]'] +Line 51: Unexpected errors ['File "qualifiers_annotated.py", line 51, in : Invalid type annotation \\'True\\' for Bad9 [invalid-annotation]'] +Line 52: Unexpected errors ['File "qualifiers_annotated.py", line 52, in : Invalid type annotation \\'1\\' for Bad10 [invalid-annotation]'] +Line 54: Unexpected errors ['File "qualifiers_annotated.py", line 54, in : Invalid type annotation \\'\\' for Bad12 [invalid-annotation]'] +Line 64: Unexpected errors ['File "qualifiers_annotated.py", line 64, in : Invalid type annotation \\'Annotated\\' [invalid-annotation]'] +Line 91: Unexpected errors ['File "qualifiers_annotated.py", line 91, in : \\'Annotated\\' object is not callable [not-callable]'] +Line 121: Unexpected errors ['File "qualifiers_annotated.py", line 121, in : Invalid TypeVar: TypeVar(\\'T\\') must be stored as \\'T\\', not \\'TA3\\' [invalid-typevar]'] +""" diff --git a/conformance/results/pytype/qualifiers_final_annotation.toml b/conformance/results/pytype/qualifiers_final_annotation.toml index 8a913a0bb..baf6253eb 100644 --- a/conformance/results/pytype/qualifiers_final_annotation.toml +++ b/conformance/results/pytype/qualifiers_final_annotation.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report Final variable with missing initialization. +notes = """Does not report Final variable with missing initialization. Does not reject Final instance variable declared outside of __init__ method. Does not reject modification of global variable declared Final. Does not reject modification of local variable declared Final. @@ -25,3 +24,20 @@ File "qualifiers_final_annotation.py", line 134, in : Invalid keyword ar File "qualifiers_final_annotation.py", line 135, in : Function N.__new__ was called with the wrong arguments [wrong-arg-types] File "qualifiers_final_annotation.py", line 145, in func2: Assigning to variable x, which was annotated with Final [final-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 18: Unexpected errors ['File "qualifiers_final_annotation.py", line 18, in : Invalid type annotation \\'Final[str, int]\\' [invalid-annotation]', 'File "qualifiers_final_annotation.py", line 18, in : Invalid type annotation \\'Final\\' [invalid-annotation]'] +Line 54: Unexpected errors ['File "qualifiers_final_annotation.py", line 54, in __init__: Assigning to attribute ID5, which was annotated with Final [final-error]'] +Line 65: Unexpected errors ['File "qualifiers_final_annotation.py", line 65, in method1: Assigning to attribute ID7, which was annotated with Final [final-error]'] +Line 67: Unexpected errors ['File "qualifiers_final_annotation.py", line 67, in method1: Assigning to attribute ID7, which was annotated with Final [final-error]'] +Line 71: Unexpected errors ['File "qualifiers_final_annotation.py", line 71, in : Assigning to variable RATE, which was annotated with Final [final-error]'] +Line 81: Unexpected errors ['File "qualifiers_final_annotation.py", line 81, in : Assigning to attribute DEFAULT_ID, which was annotated with Final [final-error]'] +Line 93: Unexpected errors ['File "qualifiers_final_annotation.py", line 93, in : Class ClassCChild overrides final class attribute BORDER_WIDTH, defined in base class ClassC [final-error]'] +Line 107: Unexpected errors ['File "qualifiers_final_annotation.py", line 107, in ClassD: Type annotation for VALUE2 does not match type of assignment [annotation-type-mismatch]', 'File "qualifiers_final_annotation.py", line 107, in ClassD: Invalid use of typing.Final [final-error]', 'File "qualifiers_final_annotation.py", line 107, in ClassD: Invalid type annotation \\'ClassVar[Final]\\' [invalid-annotation]'] +Line 108: Unexpected errors ['File "qualifiers_final_annotation.py", line 108, in ClassD: Type annotation for VALUE3 does not match type of assignment [annotation-type-mismatch]'] +Line 118: Unexpected errors ['File "qualifiers_final_annotation.py", line 118, in : Invalid use of typing.Final [final-error]', 'File "qualifiers_final_annotation.py", line 118, in : Invalid type annotation \\'list[Final[int]]\\' [invalid-annotation]'] +Line 121: Unexpected errors ['File "qualifiers_final_annotation.py", line 121, in : Invalid use of typing.Final [final-error]'] +Line 134: Unexpected errors ['File "qualifiers_final_annotation.py", line 134, in : Invalid keyword argument a to function N.__new__ [wrong-keyword-args]'] +Line 135: Unexpected errors ['File "qualifiers_final_annotation.py", line 135, in : Function N.__new__ was called with the wrong arguments [wrong-arg-types]'] +Line 145: Unexpected errors ['File "qualifiers_final_annotation.py", line 145, in func2: Assigning to variable x, which was annotated with Final [final-error]'] +""" diff --git a/conformance/results/pytype/qualifiers_final_decorator.toml b/conformance/results/pytype/qualifiers_final_decorator.toml index a566b0e9d..0adcdbca5 100644 --- a/conformance/results/pytype/qualifiers_final_decorator.toml +++ b/conformance/results/pytype/qualifiers_final_decorator.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report error for overloaded @final method defined in stub file. +notes = """Does not report error for overloaded @final method defined in stub file. Does not report error for overload that is marked @final when implementation is not. """ output = """ @@ -18,3 +17,16 @@ File "qualifiers_final_decorator.py", line 117, in : Class Derived5 over File "qualifiers_final_decorator.py", line 118, in Derived5: Overriding method signature mismatch [signature-mismatch] File "qualifiers_final_decorator.py", line 125, in : Cannot apply @final decorator to func1 [final-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['File "qualifiers_final_decorator.py", line 8, in : Couldn\\'t import pyi for \\'_qualifiers_final_decorator\\' [pyi-error]'] +Line 21: Unexpected errors ['File "qualifiers_final_decorator.py", line 21, in : Cannot subclass final class: Base1 [final-error]'] +Line 52: Unexpected errors ['File "qualifiers_final_decorator.py", line 52, in method4: bad return type [bad-return-type]'] +Line 55: Unexpected errors ['File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method4, defined in base class Base2 [final-error]', 'File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method3, defined in base class Base2 [final-error]', 'File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method2, defined in base class Base2 [final-error]', 'File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method1, defined in base class Base2 [final-error]'] +Line 76: Unexpected errors ['File "qualifiers_final_decorator.py", line 76, in method4: bad return type [bad-return-type]'] +Line 90: Unexpected errors ['File "qualifiers_final_decorator.py", line 90, in method: bad return type [bad-return-type]'] +Line 103: Unexpected errors ['File "qualifiers_final_decorator.py", line 103, in method: bad return type [bad-return-type]'] +Line 117: Unexpected errors ['File "qualifiers_final_decorator.py", line 117, in : Class Derived5 overrides final method method, defined in base class Base5_2 [final-error]'] +Line 118: Unexpected errors ['File "qualifiers_final_decorator.py", line 118, in Derived5: Overriding method signature mismatch [signature-mismatch]'] +Line 125: Unexpected errors ['File "qualifiers_final_decorator.py", line 125, in : Cannot apply @final decorator to func1 [final-error]'] +""" diff --git a/conformance/results/pytype/specialtypes_any.toml b/conformance/results/pytype/specialtypes_any.toml index ec7f31722..37aaae899 100644 --- a/conformance/results/pytype/specialtypes_any.toml +++ b/conformance/results/pytype/specialtypes_any.toml @@ -2,3 +2,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/specialtypes_never.toml b/conformance/results/pytype/specialtypes_never.toml index 1e24c8ed6..ef194d0fd 100644 --- a/conformance/results/pytype/specialtypes_never.toml +++ b/conformance/results/pytype/specialtypes_never.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not understand NoReturn or Never. +notes = """Does not understand NoReturn or Never. """ output = """ File "specialtypes_never.py", line 11, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] @@ -10,3 +9,12 @@ File "specialtypes_never.py", line 68, in func6: Type annotation for v2 does not File "specialtypes_never.py", line 69, in func6: Type annotation for v3 does not match type of assignment [annotation-type-mismatch] File "specialtypes_never.py", line 85, in func8: Type annotation for v3 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Unexpected errors ['File "specialtypes_never.py", line 11, in : argument "covariant" to TypeVar not supported yet [not-supported-yet]'] +Line 21: Unexpected errors ['File "specialtypes_never.py", line 21, in func1: bad return type [bad-return-type]'] +Line 67: Unexpected errors ['File "specialtypes_never.py", line 67, in func6: Type annotation for v1 does not match type of assignment [annotation-type-mismatch]'] +Line 68: Unexpected errors ['File "specialtypes_never.py", line 68, in func6: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 69: Unexpected errors ['File "specialtypes_never.py", line 69, in func6: Type annotation for v3 does not match type of assignment [annotation-type-mismatch]'] +Line 85: Unexpected errors ['File "specialtypes_never.py", line 85, in func8: Type annotation for v3 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/specialtypes_none.toml b/conformance/results/pytype/specialtypes_none.toml index 9419edd31..466fced6d 100644 --- a/conformance/results/pytype/specialtypes_none.toml +++ b/conformance/results/pytype/specialtypes_none.toml @@ -1,9 +1,13 @@ conformant = "Partial" -notes = """ -Does not detect type incompatibility between None and type[None]. +notes = """Does not detect type incompatibility between None and type[None]. Does not detect type incompatibility between None and incompatible protocol. """ output = """ File "specialtypes_none.py", line 21, in : Function func1 was called with the wrong arguments [wrong-arg-types] File "specialtypes_none.py", line 41, in : Function func2 was called with the wrong arguments [wrong-arg-types] """ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Unexpected errors ['File "specialtypes_none.py", line 21, in : Function func1 was called with the wrong arguments [wrong-arg-types]'] +Line 41: Unexpected errors ['File "specialtypes_none.py", line 41, in : Function func2 was called with the wrong arguments [wrong-arg-types]'] +""" diff --git a/conformance/results/pytype/specialtypes_promotions.toml b/conformance/results/pytype/specialtypes_promotions.toml index 91f796476..f6248019e 100644 --- a/conformance/results/pytype/specialtypes_promotions.toml +++ b/conformance/results/pytype/specialtypes_promotions.toml @@ -2,3 +2,7 @@ conformant = "Pass" output = """ File "specialtypes_promotions.py", line 13, in func1: No attribute 'numerator' on float [attribute-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Unexpected errors ['File "specialtypes_promotions.py", line 13, in func1: No attribute \\'numerator\\' on float [attribute-error]'] +""" diff --git a/conformance/results/pytype/specialtypes_type.toml b/conformance/results/pytype/specialtypes_type.toml index c6929df19..a506bdc40 100644 --- a/conformance/results/pytype/specialtypes_type.toml +++ b/conformance/results/pytype/specialtypes_type.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject Callable when passed to type[T]. +notes = """Does not reject Callable when passed to type[T]. Does not allow access to known attributes from object of type `type[Any]`. """ output = """ @@ -18,3 +17,19 @@ File "specialtypes_type.py", line 144, in : No attribute 'unknown' on Ty File "specialtypes_type.py", line 145, in : No attribute 'unknown' on Type[type] [attribute-error] File "specialtypes_type.py", line 146, in : No attribute 'unknown' on Type[type] [attribute-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 56: Unexpected errors ['File "specialtypes_type.py", line 56, in : Function func4 was called with the wrong arguments [wrong-arg-types]'] +Line 64: Unexpected errors ['File "specialtypes_type.py", line 64, in : Invalid type annotation \\'T\\' [invalid-annotation]'] +Line 76: Unexpected errors ['File "specialtypes_type.py", line 76, in : Invalid type annotation \\'type[int, str]\\' [invalid-annotation]'] +Line 98: Unexpected errors ['File "specialtypes_type.py", line 98, in func7: Any [assert-type]'] +Line 102: Unexpected errors ['File "specialtypes_type.py", line 102, in func7: Any [assert-type]'] +Line 106: Unexpected errors ['File "specialtypes_type.py", line 106, in func7: Any [assert-type]'] +Line 110: Unexpected errors ['File "specialtypes_type.py", line 110, in func7: Any [assert-type]'] +Line 117: Unexpected errors ['File "specialtypes_type.py", line 117, in func8: No attribute \\'unknown\\' on Type[object] [attribute-error]'] +Line 120: Unexpected errors ['File "specialtypes_type.py", line 120, in func8: No attribute \\'unknown\\' on Type[object] [attribute-error]'] +Line 143: Unexpected errors ['File "specialtypes_type.py", line 143, in : No attribute \\'unknown\\' on Type[type] [attribute-error]'] +Line 144: Unexpected errors ['File "specialtypes_type.py", line 144, in : No attribute \\'unknown\\' on Type[type] [attribute-error]'] +Line 145: Unexpected errors ['File "specialtypes_type.py", line 145, in : No attribute \\'unknown\\' on Type[type] [attribute-error]'] +Line 146: Unexpected errors ['File "specialtypes_type.py", line 146, in : No attribute \\'unknown\\' on Type[type] [attribute-error]'] +""" diff --git a/conformance/results/pytype/tuples_type_compat.toml b/conformance/results/pytype/tuples_type_compat.toml index 7fd04044e..2c36d6800 100644 --- a/conformance/results/pytype/tuples_type_compat.toml +++ b/conformance/results/pytype/tuples_type_compat.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not support unpacked tuple forms. +notes = """Does not support unpacked tuple forms. Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`. Does not support tuple narrowing based on `len()` type guard (optional). """ @@ -61,3 +60,46 @@ File "tuples_type_compat.py", line 174, in func9: Invalid type annotation 'tuple File "tuples_type_compat.py", line 175, in func9: Type annotation for t9 does not match type of assignment [annotation-type-mismatch] File "tuples_type_compat.py", line 175, in func9: Invalid type annotation 'tuple[*tuple[str, ...], str, str, str]' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['File "tuples_type_compat.py", line 15, in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 22: Unexpected errors ['File "tuples_type_compat.py", line 22, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 27: Unexpected errors ['File "tuples_type_compat.py", line 27, in func2: Invalid type annotation \\'tuple[int, *tuple[int, ...]]\\' [invalid-annotation]'] +Line 47: Unexpected errors ['File "tuples_type_compat.py", line 47, in func3: Invalid type annotation \\'tuple[int, *tuple[str, ...]]\\' [invalid-annotation]'] +Line 71: Unexpected errors ['File "tuples_type_compat.py", line 71, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 74: Unexpected errors ['File "tuples_type_compat.py", line 74, in func5: tuple [assert-type]'] +Line 78: Unexpected errors ['File "tuples_type_compat.py", line 78, in func5: tuple [assert-type]'] +Line 82: Unexpected errors ['File "tuples_type_compat.py", line 82, in func5: tuple [assert-type]'] +Line 91: Unexpected errors ['File "tuples_type_compat.py", line 91, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 115: Unexpected errors ['File "tuples_type_compat.py", line 115, in func7: Tuple[Union[int, str], Union[int, str]] [assert-type]'] +Line 117: Unexpected errors ['File "tuples_type_compat.py", line 117, in func7: Tuple[Union[int, str], Union[int, str]] [assert-type]'] +Line 134: Unexpected errors ['File "tuples_type_compat.py", line 134, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 139: Unexpected errors ['File "tuples_type_compat.py", line 139, in func8: Sequence [assert-type]'] +Line 140: Unexpected errors ['File "tuples_type_compat.py", line 140, in func8: Sequence [assert-type]'] +Line 143: Unexpected errors ['File "tuples_type_compat.py", line 143, in : Type annotation for t1 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 143, in : Invalid type annotation \\'tuple[int, *tuple[str]]\\' [invalid-annotation]', 'File "tuples_type_compat.py", line 143, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 144: Unexpected errors ['File "tuples_type_compat.py", line 144, in : Type annotation for t1 does not match type of assignment [annotation-type-mismatch]'] +Line 146: Unexpected errors ['File "tuples_type_compat.py", line 146, in : Invalid type annotation \\'tuple[int, *tuple[str, ...]]\\' [invalid-annotation]', 'File "tuples_type_compat.py", line 146, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 147: Unexpected errors ['File "tuples_type_compat.py", line 147, in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] +Line 148: Unexpected errors ['File "tuples_type_compat.py", line 148, in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] +Line 149: Unexpected errors ['File "tuples_type_compat.py", line 149, in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] +Line 150: Unexpected errors ['File "tuples_type_compat.py", line 150, in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] +Line 153: Unexpected errors ['File "tuples_type_compat.py", line 153, in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 153, in : Invalid type annotation \\'tuple[int, *tuple[str, ...], int]\\' [invalid-annotation]', 'File "tuples_type_compat.py", line 153, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 154: Unexpected errors ['File "tuples_type_compat.py", line 154, in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]'] +Line 155: Unexpected errors ['File "tuples_type_compat.py", line 155, in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]'] +Line 156: Unexpected errors ['File "tuples_type_compat.py", line 156, in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]'] +Line 157: Unexpected errors ['File "tuples_type_compat.py", line 157, in : Type annotation for t3 does not match type of assignment [annotation-type-mismatch]'] +Line 159: Unexpected errors ['File "tuples_type_compat.py", line 159, in : Invalid type annotation \\'tuple[*tuple[str, ...], int]\\' [invalid-annotation]', 'File "tuples_type_compat.py", line 159, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 160: Unexpected errors ['File "tuples_type_compat.py", line 160, in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch]'] +Line 161: Unexpected errors ['File "tuples_type_compat.py", line 161, in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch]'] +Line 162: Unexpected errors ['File "tuples_type_compat.py", line 162, in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch]'] +Line 163: Unexpected errors ['File "tuples_type_compat.py", line 163, in : Type annotation for t4 does not match type of assignment [annotation-type-mismatch]'] +Line 167: Unexpected errors ['File "tuples_type_compat.py", line 167, in func9: Type annotation for t1 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 167, in func9: Invalid type annotation \\'tuple[str, str, *tuple[int, ...]]\\' [invalid-annotation]'] +Line 168: Unexpected errors ['File "tuples_type_compat.py", line 168, in func9: Type annotation for t2 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 168, in func9: Invalid type annotation \\'tuple[str, str, *tuple[int]]\\' [invalid-annotation]'] +Line 169: Unexpected errors ['File "tuples_type_compat.py", line 169, in func9: Type annotation for t3 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 169, in func9: Invalid type annotation \\'tuple[str, *tuple[str, ...]]\\' [invalid-annotation]'] +Line 170: Unexpected errors ['File "tuples_type_compat.py", line 170, in func9: Type annotation for t4 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 170, in func9: Invalid type annotation \\'tuple[str, str, *tuple[str, ...]]\\' [invalid-annotation]'] +Line 171: Unexpected errors ['File "tuples_type_compat.py", line 171, in func9: Type annotation for t5 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 171, in func9: Invalid type annotation \\'tuple[str, str, str, *tuple[str, ...]]\\' [invalid-annotation]'] +Line 172: Unexpected errors ['File "tuples_type_compat.py", line 172, in func9: Type annotation for t6 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 172, in func9: Invalid type annotation \\'tuple[str, *tuple[int, ...], str]\\' [invalid-annotation]'] +Line 173: Unexpected errors ['File "tuples_type_compat.py", line 173, in func9: Type annotation for t7 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 173, in func9: Invalid type annotation \\'tuple[*tuple[str, ...], str]\\' [invalid-annotation]'] +Line 174: Unexpected errors ['File "tuples_type_compat.py", line 174, in func9: Type annotation for t8 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 174, in func9: Invalid type annotation \\'tuple[*tuple[str, ...], str]\\' [invalid-annotation]'] +Line 175: Unexpected errors ['File "tuples_type_compat.py", line 175, in func9: Type annotation for t9 does not match type of assignment [annotation-type-mismatch]', 'File "tuples_type_compat.py", line 175, in func9: Invalid type annotation \\'tuple[*tuple[str, ...], str, str, str]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/tuples_type_form.toml b/conformance/results/pytype/tuples_type_form.toml index 6d065c426..855956b84 100644 --- a/conformance/results/pytype/tuples_type_form.toml +++ b/conformance/results/pytype/tuples_type_form.toml @@ -14,3 +14,17 @@ File "tuples_type_form.py", line 43, in : Invalid type annotation 'Ellip File "tuples_type_form.py", line 44, in : Invalid type annotation '' [invalid-annotation] File "tuples_type_form.py", line 45, in : Invalid type annotation '' [invalid-annotation] """ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Unexpected errors ['File "tuples_type_form.py", line 12, in : Type annotation for t1 does not match type of assignment [annotation-type-mismatch]'] +Line 14: Unexpected errors ['File "tuples_type_form.py", line 14, in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] +Line 15: Unexpected errors ['File "tuples_type_form.py", line 15, in : Type annotation for t2 does not match type of assignment [annotation-type-mismatch]'] +Line 25: Unexpected errors ['File "tuples_type_form.py", line 25, in : Type annotation for t10 does not match type of assignment [annotation-type-mismatch]'] +Line 36: Unexpected errors ['File "tuples_type_form.py", line 36, in : Type annotation for t20 does not match type of assignment [annotation-type-mismatch]'] +Line 40: Unexpected errors ['File "tuples_type_form.py", line 40, in : Invalid type annotation \\'tuple[int, int, Any]\\' [invalid-annotation]'] +Line 41: Unexpected errors ['File "tuples_type_form.py", line 41, in : Invalid type annotation \\'Ellipsis\\' [invalid-annotation]'] +Line 42: Unexpected errors ['File "tuples_type_form.py", line 42, in : Invalid type annotation \\'tuple[Any, int]\\' [invalid-annotation]', 'File "tuples_type_form.py", line 42, in : Invalid type annotation \\'Ellipsis\\' [invalid-annotation]'] +Line 43: Unexpected errors ['File "tuples_type_form.py", line 43, in : Invalid type annotation \\'tuple[int, Any, int]\\' [invalid-annotation]', 'File "tuples_type_form.py", line 43, in : Invalid type annotation \\'Ellipsis\\' [invalid-annotation]'] +Line 44: Unexpected errors ['File "tuples_type_form.py", line 44, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 45: Unexpected errors ['File "tuples_type_form.py", line 45, in : Invalid type annotation \\'\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/tuples_unpacked.toml b/conformance/results/pytype/tuples_unpacked.toml index 8f2b5f9a5..728020bf9 100644 --- a/conformance/results/pytype/tuples_unpacked.toml +++ b/conformance/results/pytype/tuples_unpacked.toml @@ -1,6 +1,5 @@ conformant = "Unsupported" -notes = """ -Does not support `typing.Unpack`. +notes = """Does not support `typing.Unpack`. Does not support unpacked tuples within a tuple type form. """ output = """ @@ -28,3 +27,23 @@ File "tuples_unpacked.py", line 48, in : Invalid type annotation ': typing.Unpack not supported yet [not-supported-yet]', 'File "tuples_unpacked.py", line 13, in : typing.TypeVarTuple not supported yet [not-supported-yet]'] +Line 16: Unexpected errors ['File "tuples_unpacked.py", line 16, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 17: Unexpected errors ['File "tuples_unpacked.py", line 17, in func1: Tuple[Any] [assert-type]'] +Line 18: Unexpected errors ['File "tuples_unpacked.py", line 18, in func1: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 19: Unexpected errors ['File "tuples_unpacked.py", line 19, in func1: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 25: Unexpected errors ['File "tuples_unpacked.py", line 25, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 26: Unexpected errors ['File "tuples_unpacked.py", line 26, in func2: Invalid type annotation \\'\\' [invalid-annotation]'] +Line 31: Unexpected errors ['File "tuples_unpacked.py", line 31, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "tuples_unpacked.py", line 31, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +Line 32: Unexpected errors ['File "tuples_unpacked.py", line 32, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "tuples_unpacked.py", line 32, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +Line 37: Unexpected errors ['File "tuples_unpacked.py", line 37, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "tuples_unpacked.py", line 37, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +Line 38: Unexpected errors ['File "tuples_unpacked.py", line 38, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 39: Unexpected errors ['File "tuples_unpacked.py", line 39, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "tuples_unpacked.py", line 39, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +Line 40: Unexpected errors ['File "tuples_unpacked.py", line 40, in : Invalid type annotation \\'\\' [invalid-annotation]', 'File "tuples_unpacked.py", line 40, in : Function list.extend was called with the wrong arguments [wrong-arg-types]'] +Line 45: Unexpected errors ['File "tuples_unpacked.py", line 45, in : Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] +Line 48: Unexpected errors ['File "tuples_unpacked.py", line 48, in : Invalid type annotation \\'\\' [invalid-annotation]'] +Line 49: Unexpected errors ['File "tuples_unpacked.py", line 49, in func3: Invalid type annotation \\'tuple[*tuple[str], *Ts]\\' [invalid-annotation]'] +Line 50: Unexpected errors ['File "tuples_unpacked.py", line 50, in func3: Invalid type annotation \\'tuple[*tuple[str, ...], *Ts]\\' [invalid-annotation]'] +""" diff --git a/conformance/results/pytype/typeddicts_alt_syntax.toml b/conformance/results/pytype/typeddicts_alt_syntax.toml index 05148f215..2973e0b9f 100644 --- a/conformance/results/pytype/typeddicts_alt_syntax.toml +++ b/conformance/results/pytype/typeddicts_alt_syntax.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not reject use of variable as second argument to `TypedDict` call. +notes = """Does not reject use of variable as second argument to `TypedDict` call. Does not report when name of TypedDict doesn't match assigned identifier name. Does not support keyword-argument form of alternative syntax (deprecated in 3.11). """ @@ -8,3 +7,8 @@ output = """ File "typeddicts_alt_syntax.py", line 27, in : Function typing.TypedDict was called with the wrong arguments [wrong-arg-types] File "typeddicts_alt_syntax.py", line 41, in : Function typing.TypedDict expects 2 arg(s), got 3 [wrong-arg-count] """ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Unexpected errors ['File "typeddicts_alt_syntax.py", line 27, in : Function typing.TypedDict was called with the wrong arguments [wrong-arg-types]'] +Line 41: Unexpected errors ['File "typeddicts_alt_syntax.py", line 41, in : Function typing.TypedDict expects 2 arg(s), got 3 [wrong-arg-count]'] +""" diff --git a/conformance/results/pytype/typeddicts_class_syntax.toml b/conformance/results/pytype/typeddicts_class_syntax.toml index 87bb05039..e7b007485 100644 --- a/conformance/results/pytype/typeddicts_class_syntax.toml +++ b/conformance/results/pytype/typeddicts_class_syntax.toml @@ -1,9 +1,11 @@ conformant = "Partial" -notes = """ -Does not reject methods within TypedDict class. +notes = """Does not reject methods within TypedDict class. Does not report when metaclass is provided. Does not report when other keyword argument is provided. """ output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/typeddicts_final.toml b/conformance/results/pytype/typeddicts_final.toml index ec7f31722..37aaae899 100644 --- a/conformance/results/pytype/typeddicts_final.toml +++ b/conformance/results/pytype/typeddicts_final.toml @@ -2,3 +2,6 @@ conformant = "Pass" output = """ """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/typeddicts_inheritance.toml b/conformance/results/pytype/typeddicts_inheritance.toml index 04b0af00e..50a8d7bac 100644 --- a/conformance/results/pytype/typeddicts_inheritance.toml +++ b/conformance/results/pytype/typeddicts_inheritance.toml @@ -4,3 +4,9 @@ File "typeddicts_inheritance.py", line 44, in : Invalid base class: NonT File "typeddicts_inheritance.py", line 54, in : Invalid base class: X1 [base-class-error] File "typeddicts_inheritance.py", line 65, in : Invalid base class: Y2 [base-class-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 44: Unexpected errors ['File "typeddicts_inheritance.py", line 44, in : Invalid base class: NonTypedDict [base-class-error]'] +Line 54: Unexpected errors ['File "typeddicts_inheritance.py", line 54, in : Invalid base class: X1 [base-class-error]'] +Line 65: Unexpected errors ['File "typeddicts_inheritance.py", line 65, in : Invalid base class: Y2 [base-class-error]'] +""" diff --git a/conformance/results/pytype/typeddicts_operations.toml b/conformance/results/pytype/typeddicts_operations.toml index 7e8920bd4..d5cff5775 100644 --- a/conformance/results/pytype/typeddicts_operations.toml +++ b/conformance/results/pytype/typeddicts_operations.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report type violation with TypedDict value assignment. +notes = """Does not report type violation with TypedDict value assignment. Does not report reference to unknown key in TypedDict. Does not reject `clear` method on TypedDict with required keys. Does not reject delete operation for required key in TypedDict. @@ -12,3 +11,11 @@ File "typeddicts_operations.py", line 32, in : Type annotation for movie File "typeddicts_operations.py", line 37, in func1: Type annotation for movie does not match type of assignment [annotation-type-mismatch] File "typeddicts_operations.py", line 60, in : str [assert-type] """ +conformance_automated = "Fail" +errors_diff = """ +Line 28: Unexpected errors ['File "typeddicts_operations.py", line 28, in : Type annotation for movie does not match type of assignment [annotation-type-mismatch]'] +Line 29: Unexpected errors ['File "typeddicts_operations.py", line 29, in : Type annotation for movie does not match type of assignment [annotation-type-mismatch]'] +Line 32: Unexpected errors ['File "typeddicts_operations.py", line 32, in : Type annotation for movie does not match type of assignment [annotation-type-mismatch]'] +Line 37: Unexpected errors ['File "typeddicts_operations.py", line 37, in func1: Type annotation for movie does not match type of assignment [annotation-type-mismatch]'] +Line 60: Unexpected errors ['File "typeddicts_operations.py", line 60, in : str [assert-type]'] +""" diff --git a/conformance/results/pytype/typeddicts_readonly.toml b/conformance/results/pytype/typeddicts_readonly.toml index 2d317ed68..abe6efcce 100644 --- a/conformance/results/pytype/typeddicts_readonly.toml +++ b/conformance/results/pytype/typeddicts_readonly.toml @@ -2,3 +2,7 @@ conformant = "Unsupported" output = """ File "typeddicts_readonly.py", line 8, in : typing_extensions.ReadOnly not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['File "typeddicts_readonly.py", line 8, in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/typeddicts_readonly_consistency.toml b/conformance/results/pytype/typeddicts_readonly_consistency.toml index cf416bd0d..7ad6f392e 100644 --- a/conformance/results/pytype/typeddicts_readonly_consistency.toml +++ b/conformance/results/pytype/typeddicts_readonly_consistency.toml @@ -5,3 +5,10 @@ File "typeddicts_readonly_consistency.py", line 34, in func1: Type annotation fo File "typeddicts_readonly_consistency.py", line 35, in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch] File "typeddicts_readonly_consistency.py", line 40, in func1: Type annotation for v5 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['File "typeddicts_readonly_consistency.py", line 8, in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] +Line 34: Unexpected errors ['File "typeddicts_readonly_consistency.py", line 34, in func1: Type annotation for v1 does not match type of assignment [annotation-type-mismatch]'] +Line 35: Unexpected errors ['File "typeddicts_readonly_consistency.py", line 35, in func1: Type annotation for v2 does not match type of assignment [annotation-type-mismatch]'] +Line 40: Unexpected errors ['File "typeddicts_readonly_consistency.py", line 40, in func1: Type annotation for v5 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/typeddicts_readonly_inheritance.toml b/conformance/results/pytype/typeddicts_readonly_inheritance.toml index 23da3afe6..b7ad7675e 100644 --- a/conformance/results/pytype/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pytype/typeddicts_readonly_inheritance.toml @@ -18,3 +18,20 @@ File "typeddicts_readonly_inheritance.py", line 119, in : Invalid base c File "typeddicts_readonly_inheritance.py", line 132, in : Invalid base class: TD_B2 [base-class-error] File "typeddicts_readonly_inheritance.py", line 132, in : Invalid base class: TD_B2 [base-class-error] """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 8, in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] +Line 18: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 18, in : Invalid base class: NamedDict [base-class-error]'] +Line 47: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 47, in : Invalid base class: AlbumCollection [base-class-error]', 'File "typeddicts_readonly_inheritance.py", line 47, in : Invalid base class: AlbumCollection [base-class-error]'] +Line 61: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 61, in : Invalid base class: OptionalName [base-class-error]'] +Line 65: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 65, in : Type annotation for d does not match type of assignment [annotation-type-mismatch]'] +Line 75: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 75, in : Invalid base class: OptionalIdent [base-class-error]'] +Line 83: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 83, in : Type annotation for u does not match type of assignment [annotation-type-mismatch]'] +Line 84: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 84, in : Type annotation for u does not match type of assignment [annotation-type-mismatch]'] +Line 93: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 93, in : Invalid base class: F1 [base-class-error]'] +Line 97: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 97, in : Invalid base class: F1 [base-class-error]'] +Line 101: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 101, in : Invalid base class: F1 [base-class-error]'] +Line 105: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 105, in : Invalid base class: F1 [base-class-error]'] +Line 119: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 119, in : Invalid base class: TD_A2 [base-class-error]', 'File "typeddicts_readonly_inheritance.py", line 119, in : Invalid base class: TD_A2 [base-class-error]'] +Line 132: Unexpected errors ['File "typeddicts_readonly_inheritance.py", line 132, in : Invalid base class: TD_B2 [base-class-error]', 'File "typeddicts_readonly_inheritance.py", line 132, in : Invalid base class: TD_B2 [base-class-error]'] +""" diff --git a/conformance/results/pytype/typeddicts_readonly_kwargs.toml b/conformance/results/pytype/typeddicts_readonly_kwargs.toml index 3fee197b5..2f9cfba87 100644 --- a/conformance/results/pytype/typeddicts_readonly_kwargs.toml +++ b/conformance/results/pytype/typeddicts_readonly_kwargs.toml @@ -4,3 +4,9 @@ File "typeddicts_readonly_kwargs.py", line 8, in : typing.Unpack not sup File "typeddicts_readonly_kwargs.py", line 9, in : typing_extensions.ReadOnly not supported yet [not-supported-yet] File "typeddicts_readonly_kwargs.py", line 33, in impl: New container type for kwargs does not match type annotation [container-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 8: Unexpected errors ['File "typeddicts_readonly_kwargs.py", line 8, in : typing.Unpack not supported yet [not-supported-yet]'] +Line 9: Unexpected errors ['File "typeddicts_readonly_kwargs.py", line 9, in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] +Line 33: Unexpected errors ['File "typeddicts_readonly_kwargs.py", line 33, in impl: New container type for kwargs does not match type annotation [container-type-mismatch]'] +""" diff --git a/conformance/results/pytype/typeddicts_readonly_update.toml b/conformance/results/pytype/typeddicts_readonly_update.toml index 25da770c2..994c8371e 100644 --- a/conformance/results/pytype/typeddicts_readonly_update.toml +++ b/conformance/results/pytype/typeddicts_readonly_update.toml @@ -2,3 +2,7 @@ conformant = "Unsupported" output = """ File "typeddicts_readonly_update.py", line 9, in : typing_extensions.ReadOnly not supported yet [not-supported-yet] """ +conformance_automated = "Fail" +errors_diff = """ +Line 9: Unexpected errors ['File "typeddicts_readonly_update.py", line 9, in : typing_extensions.ReadOnly not supported yet [not-supported-yet]'] +""" diff --git a/conformance/results/pytype/typeddicts_required.toml b/conformance/results/pytype/typeddicts_required.toml index 382e2bd2c..c18c12c70 100644 --- a/conformance/results/pytype/typeddicts_required.toml +++ b/conformance/results/pytype/typeddicts_required.toml @@ -1,9 +1,11 @@ conformant = "Partial" -notes = """ -Does not reject use of `Required` in non-TypedDict class. +notes = """Does not reject use of `Required` in non-TypedDict class. Does not reject use of `Required` in function parameter annotation. Does not reject nested use of `Required` in type annotation. """ output = """ RecursionError: maximum recursion depth exceeded """ +conformance_automated = "Fail" +errors_diff = """ +""" diff --git a/conformance/results/pytype/typeddicts_type_consistency.toml b/conformance/results/pytype/typeddicts_type_consistency.toml index 86efafa70..a116917e2 100644 --- a/conformance/results/pytype/typeddicts_type_consistency.toml +++ b/conformance/results/pytype/typeddicts_type_consistency.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report some type violations for TypedDict type compatibility. +notes = """Does not report some type violations for TypedDict type compatibility. Incorrectly reports type violation in cases where there is none. Does not report type incompatibility between TypedDict and `dict[str, Any]`. """ @@ -10,3 +9,10 @@ File "typeddicts_type_consistency.py", line 65, in : Type annotation for File "typeddicts_type_consistency.py", line 69, in : Type annotation for a3_1 does not match type of assignment [annotation-type-mismatch] File "typeddicts_type_consistency.py", line 124, in : Type annotation for o2 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 62: Unexpected errors ['File "typeddicts_type_consistency.py", line 62, in : Type annotation for a3 does not match type of assignment [annotation-type-mismatch]'] +Line 65: Unexpected errors ['File "typeddicts_type_consistency.py", line 65, in : Type annotation for b3 does not match type of assignment [annotation-type-mismatch]'] +Line 69: Unexpected errors ['File "typeddicts_type_consistency.py", line 69, in : Type annotation for a3_1 does not match type of assignment [annotation-type-mismatch]'] +Line 124: Unexpected errors ['File "typeddicts_type_consistency.py", line 124, in : Type annotation for o2 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/typeddicts_usage.toml b/conformance/results/pytype/typeddicts_usage.toml index 1517b8fee..f0ce3423c 100644 --- a/conformance/results/pytype/typeddicts_usage.toml +++ b/conformance/results/pytype/typeddicts_usage.toml @@ -1,6 +1,5 @@ conformant = "Partial" -notes = """ -Does not report errant use of TypedDict in `isinstance` call. +notes = """Does not report errant use of TypedDict in `isinstance` call. Does not reject use of TypedDict as TypeVar bound. """ output = """ @@ -8,3 +7,7 @@ File "typeddicts_usage.py", line 23, in : TypedDict Movie does not conta File "typeddicts_usage.py", line 24, in : Type annotation for key year in TypedDict Movie does not match type of assignment [annotation-type-mismatch] File "typeddicts_usage.py", line 28, in : Type annotation for movie2 does not match type of assignment [annotation-type-mismatch] """ +conformance_automated = "Fail" +errors_diff = """ +Line 28: Unexpected errors ['File "typeddicts_usage.py", line 28, in : Type annotation for movie2 does not match type of assignment [annotation-type-mismatch]'] +""" diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml index abdc11b53..27e859d9b 100644 --- a/conformance/results/pytype/version.toml +++ b/conformance/results/pytype/version.toml @@ -1,2 +1,2 @@ version = "pytype 2024.03.19" -test_duration = 34.2 +test_duration = 44.7 diff --git a/conformance/results/results.html b/conformance/results/results.html index d60f104b4..c10ec5126 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -156,7 +156,7 @@

Python Type System Conformance Test Results

-
 
mypy 1.9.0
2.0sec
pyright 1.1.357
1.6sec
pyre 0.9.19
5.3sec
pytype 2024.03.19
34.2sec
Type annotations
     annotations_coroutinesPassPass
Partial

Does not evaluate correct type for async function.

Partial

Does not evaluate correct type for async function.

     annotations_forward_refs
Partial

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

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

Incorrectly generates error for quoted type defined in class scope.

Pass
Partial

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

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

Does not reject f-string in quoted type annotation.

Incorrectly generates error for quoted type defined in class scope.

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

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

Partial

Does not reject some illegal type expression forms when quoted.

Incorrectly generates error for quoted type defined in class scope.

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

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

     annotations_generators
Partial

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

Pass
Partial

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

Incorrectly evaluates type of call to async generator.

Partial

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

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

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

     annotations_methods
Pass*

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

Pass*

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

Pass*

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

Pass*

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

     annotations_typeexprPassPassPass
Partial

Does not reject call expressions in type annotation.

Does not reject call lambda expression in type annotation.

Does not reject list expression in type annotation.

Does not reject ternary expression in type annotation.

Does not reject f-string in type annotation.

Does not reject module in type annotation.

Special types in annotations
     specialtypes_anyPassPass
Partial

Does not treat missing type argument as Any in generic type.

Does not support Any as a base class.

Pass
     specialtypes_neverPassPass
Partial

Does not treat Never as compatible with all other types.

Unsupported

Does not understand NoReturn or Never.

     specialtypes_nonePassPass
Partial

Does not correctly handle type annotation type[None].

Partial

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

Does not detect type incompatibility between None and incompatible protocol.

     specialtypes_promotionsPassPass
Partial

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

Pass
     specialtypes_type
Partial

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

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

Pass
Partial

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

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

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

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

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

Partial

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

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

Generics
     generics_base_classPassPass
Partial

Does not reject illegal use of Generic.

Does not allow using generic in assert_type expression.

Partial

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

Does not reject illegal use of Generic.

     generics_basicPassPass
Partial

False positives in examples using constrained type variables.

False negative in custom map example.

False positive using `iter`.

False negative for generic metaclass.

Partial

False positives in examples using constrained type variables.

False negative for generic metaclass.

     generics_defaultsUnsupportedPassUnsupportedUnsupported
     generics_defaults_referentialUnsupportedPassUnsupportedUnsupported
     generics_defaults_specializationUnsupportedPassUnsupportedUnsupported
     generics_paramspec_basic
Partial

Does not reject ParamSpec when used "bare" in type alias definition.

Pass
Partial

Does not enforce name consistency for ParamSpec assigned to identifier.

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

Does not reject ParamSpec when used in various invalid locations.

Unsupported

Does not support ParamSpec.

     generics_paramspec_components
Partial

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

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

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

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

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

Pass
Partial

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

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

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

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

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

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

Unsupported

Does not support ParamSpec.

     generics_paramspec_semanticsPass
Pass*

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

Partial

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

Reports error for legitimate Callable type annotation that uses Concatenate.

Does not evaluate the correct type for call of Callable defined with Concatenate.

Unsupported

Does not support ParamSpec.

     generics_paramspec_specializationPassPass
Partial

Reports error for legitimate use of ParamSpec and Concatenate in function signature.

Reports error for legitimate specialization of generic class parameterized with ParamSpec.

Partial

Rejects valid specialization of ParamSpec using list expression.

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

Reports error for valid method call involving ParamSpec.

     generics_scoping
Partial

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

Pass
Partial

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

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

Pass
     generics_self_advanced
Partial

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

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

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

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

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_attributesPassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_basic
Partial

Does not properly handle constructor call through `cls` parameter.

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_protocolsPassPass
Partial

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

Partial

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

     generics_self_usagePassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_syntax_compatibility
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_declarations
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_scoping
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_type_erasure
Partial

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

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

Pass
Partial

Doesn't allow using Node[Any] in assert_type expression.

False negatives on instance attribute access on the type.

Unsupported
     generics_typevartuple_args
Partial

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

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_basic
Partial

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

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

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_callablePassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_concatPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_overloadsPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_specialization
Partial

Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided.

Rejects specialization of generic type alias defined as a tuple containing a TypeVar.

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

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_unpack
Partial

Does not reject multiple unpack operators in a tuple.

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_upper_boundPassPass
Partial

Does not reject use of upper bound with constrained TypeVar.

Pass*

Does not properly support assert_type.

     generics_variance
Partial

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

Pass
Partial

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

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

Unsupported

Does not support covariant or contravariant TypeVars.

     generics_variance_inference
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

Type qualifiers
     qualifiers_annotated
Partial

Does not allow ClassVar to be nested within Annotated.

Does not allow Final to be nested within Annotated.

Does not allow Required and NotRequired to be nested within Annotated.

Does not reject type[T] compatibility for type alias defined with Annotated.

Does not reject call of type alias defined with Annotated.

Pass
Partial

Does not reject Annotated with a single parameter.

Does not reject call of Annotated with no type arguments.

Partial

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

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

Does not reject call of Annotated.

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

     qualifiers_final_annotation
Partial

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

Does not allow conditional assignment of Final instance variable in __init__ method.

Does not allow redefinition of private class variable that is marked Final in parent class.

Does not report modification of local Final variable via "for" statement.

Pass
Partial

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

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

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

Partial

Does not report Final variable with missing initialization.

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

Does not reject modification of global variable declared Final.

Does not reject modification of local variable declared Final.

     qualifiers_final_decoratorPassPass
Partial

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

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

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

Partial

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

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

Class type compatibility
     classes_classvar
Partial

Internal error if TypeVarTuple is used in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Rejects ClassVar nested in Annotated.

Does not reject use of ClassVar in TypeAlias definition.

Does not infer type of ClassVar from assignment if no type is provided.

Pass
Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Rejects initialization of ClassVar if no type argument is provided.

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Does not reject assignment of ClassVar through instance of class.

     classes_override
Partial

Does not handle case where parent class derives from Any.

Pass
Unsupported

Does not yet support the @override decorator.

Unsupported

Does not yet support the @override decorator.

Type aliases
     aliases_explicit
Partial

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

Pass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_implicitPassPass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_newtypePassPass
Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

     aliases_recursivePassPass
Partial

Does not properly handle some recursive type aliases.

Does not properly handle specialization of generic recursive type aliases.

Partial

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

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

Does not detect cyclical references in recursive type alias definition.

     aliases_type_statement
Unsupported

Does not support `type` statement.

Pass
Unsupported

Does not support `type` statement.

Unsupported

Does not support `type` statement.

     aliases_typealiastype
Unsupported

Support for TypeAliasType is not implemented.

Pass
Unsupported

Support for TypeAliasType is not implemented.

Unsupported

Support for TypeAliasType is not implemented.

     aliases_variancePassPassPass
Unsupported

Does not detect variance incompatibility.

Literals
     literals_interactions
Partial

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

Pass
Partial

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

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

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

Partial

Incorrectly rejects some legal Literal annotations.

Does not reject some illegal Literal annotations.

Does not use Literal to distinguish overloads.

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

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

     literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

PassPass
Unsupported

Does not understand `LiteralString` special form.

     literals_parameterizations
Partial

Does not reject tuple within Literal.

Pass
Partial

Does not support type aliases in Literal type expression.

Does not support nested Literal type expression.

Does not reject unary + operator in Literal type expression.

Does not reject tuple in Literal type expression.

Does not reject "bare" Literal in type expression.

Unsupported

Does not understand `Literal` type annotation.

     literals_semanticsPassPass
Partial

Does not reject augmented operation that modifies literal value.

Unsupported

Does not understand `Literal` type annotation.

Protocols
     protocols_class_objectsPassPass
Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

     protocols_definition
Partial

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

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

Pass
Partial

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

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

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

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

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

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

Partial

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

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

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

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

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

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

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

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

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

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

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

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

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

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

     protocols_explicit
Pass*

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

Pass
Partial

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

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

Partial

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

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

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

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

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

     protocols_generic
Partial

Fails protocol matching when method-scoped TypeVar is used in protocol.

Pass
Partial

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

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

Partial

Does not correctly enforce contravariance in protocol type compatibility tests.

Does not correctly enforce invariance in protocol type compatibility tests.

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

     protocols_mergingPassPass
Partial

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

Partial

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

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

     protocols_modulesPassPass
Unsupported

Does not perform protocol checks for modules.

Partial

Does not report incompatibilities for protocol methods.

     protocols_recursivePassPassPass
Partial

Incorrectly reports type error for some recursive protocols.

     protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Pass
Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

     protocols_selfPassPassPass
Partial

Does not properly handle Self type within a protocol.

     protocols_subtypingPassPassPass
Partial

Does not reject attempt to instantiate protocol class.

Does not report some protocol type compatibility violations involving contravariance.

     protocols_variancePassPass
Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Callables
     callables_annotationPassPass
Partial

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

Does not reject illegal form `Callable[[...], int]`.

Pass
     callables_kwargsPassPass
Unsupported

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

Unsupported

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

     callables_protocolPassPass
Partial

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

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

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

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

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

Unsupported

Does not properly handle type compatibility checks with callback protocols.

Overloads
     overloads_basicPassPass
Partial

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

Partial

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

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

Dataclasses
     dataclasses_descriptors
Partial

Does not correctly evaluate type of descriptor access.

Pass
Partial

Incorrectly generates error when calling constructor of dataclass with descriptor.

Unsupported

Does not understand descriptor objects in dataclass.

     dataclasses_frozenPassPass
Partial

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

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

Unsupported

Does not report assignment to field within frozen dataclass instance.

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

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

     dataclasses_hash
Partial

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

Pass
Partial

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

Partial

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

     dataclasses_inheritancePassPass
Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

     dataclasses_kwonly
Partial

Incorrectly rejects kw_only field with default before positional field.

PassPass
Partial

Incorrectly reports error when kw_only field has default value.

Incorrectly rejects kw_only field with default before positional field.

     dataclasses_orderPassPass
Partial

Does not report type incompatibility with comparison operator.

Partial

Does not report type incompatibility with comparison operator.

     dataclasses_postinitPassPass
Unsupported

Does not perform validation of `__post_init__` method.

Does not reject access of `InitVar` from object.

Partial

Does not validate `__post_init__` method.

Reports incorrect error for incompatible `__post_init__` method override.

     dataclasses_slots
Partial

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

Pass
Partial

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

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

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

Partial

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

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

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

     dataclasses_transform_classPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_field
Partial

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_func
Partial

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

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_metaPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_usagePassPass
Partial

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

Incorrectly reports error with InitVar that has default value.

Pass
Typed dictionaries
     typeddicts_alt_syntax
Pass*

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

Pass
Partial

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

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

Partial

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

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

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

     typeddicts_class_syntaxPassPass
Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

Does not support generic TypedDict class.

Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

     typeddicts_finalPassPass
Partial

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

Pass
     typeddicts_inheritancePassPass
Partial

Does not reject TypedDict class that inherits from non-TypedDict class.

Pass
     typeddicts_operationsPassPassPass
Partial

Does not report type violation with TypedDict value assignment.

Does not report reference to unknown key in TypedDict.

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

Does not reject delete operation for required key in TypedDict.

     typeddicts_readonlyUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_consistencyUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_inheritanceUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_kwargsUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_updateUnsupportedPassUnsupportedUnsupported
     typeddicts_required
Partial

Does not support nesting of `Annotated` and `Required` or `NotRequired`.

Pass
Partial

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

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

Does not support recursive TypedDict definitions.

Partial

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

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

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

     typeddicts_type_consistencyPassPass
Partial

Does not reject assignment of TypedDict with missing key.

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

Does not properly handle nested TypedDicts.

Partial

Does not report some type violations for TypedDict type compatibility.

Incorrectly reports type violation in cases where there is none.

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

     typeddicts_usagePassPass
Partial

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

Does not reject use of TypedDict as TypeVar bound.

Partial

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

Does not reject use of TypedDict as TypeVar bound.

Tuples
     tuples_type_compat
Partial

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

Incorrectly narrows tuple based on sequence patterns.

Pass
Partial

Does not support some unpacked tuple forms.

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

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

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

Partial

Does not support unpacked tuple forms.

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

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

     tuples_type_formPassPass
Partial

Does not reject some invalid tuple forms involving ellipsis.

Pass
     tuples_unpacked
Partial

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

Pass
Partial

Rejects some legal tuple type forms involving unpack.

Does not reject some illegal tuple type forms involving unpack.

Unsupported

Does not support `typing.Unpack`.

Does not support unpacked tuples within a tuple type form.

Named tuples
     namedtuples_define_class
Partial

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

Pass
Partial

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

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

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

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

Does not reject attempt to use NamedTuple with multiple inheritance.

Partial

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

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

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

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

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

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

Does not reject attempt to use NamedTuple with multiple inheritance.

     namedtuples_define_functional
Pass*

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

Pass
Pass*

Does not reject duplicate field names in functional form.

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

Does not support defaults in functional form.

Pass*

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

Does not support defaults in functional form.

     namedtuples_type_compatPassPass
Partial

Rejects valid type compatibility between named tuple and tuple.

Pass
     namedtuples_usage
Partial

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

Pass
Partial

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

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

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

Incorrectly handles subclasses of named tuples that add more attributes.

Partial

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

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

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

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

Type narrowing
     narrowing_typeguardPassPass
Partial

Does not support `tuple` in `assert_type` call.

Does not reject TypeGuard method with too few parameters.

Partial

Does not reject TypeGuard method with too few parameters.

Type checker directives
     directives_assert_typePassPass
Unsupported

Does not understand "assert_type".

Pass
     directives_castPassPassPass
Partial

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

     directives_no_type_check
Partial

Does not honor `@no_type_check` class decorator.

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

Pass*

Does not honor `@no_type_check` class decorator.

Pass*

Does not honor @no_type_check decorator.

Pass*

Does not honor @no_type_check decorator.

     directives_reveal_typePassPass
Unsupported

Does not understand reveal_type call.

Partial

Does not reject call to reveal_type with zero arguments.

Does not reject call to reveal_type with too many arguments.

     directives_type_checkingPassPassPassPass
     directives_type_ignore
Partial

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

PassPass
Partial

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

     directives_type_ignore_file1PassPass
Unsupported

Does not support file-level `#type: ignore` comment.

Pass
     directives_type_ignore_file2PassPassPass
Partial

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

     directives_version_platform
Pass*

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

Does not understand os.name checks.

Pass
Partial

Does not support sys.platform checks.

Does not support os.name checks.

Pass*

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

Does not understand os.name checks.

Historical and deprecated features
     historical_positional
Partial

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

Treats keyword-only parameter as positional-only.

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

Pass
Partial

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

Treats keyword-only parameter as positional-only.

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

Partial

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

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

+
 
mypy 1.9.0
1.4sec
pyright 1.1.357
1.7sec
pyre 0.9.19
6.4sec
pytype 2024.03.19
44.7sec
Type annotations
     annotations_coroutinesPassPass
Partial

Does not evaluate correct type for async function.

Partial

Does not evaluate correct type for async function.

     annotations_forward_refs
Partial

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

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

Incorrectly generates error for quoted type defined in class scope.

Pass
Partial

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

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

Does not reject f-string in quoted type annotation.

Incorrectly generates error for quoted type defined in class scope.

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

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

Partial

Does not reject some illegal type expression forms when quoted.

Incorrectly generates error for quoted type defined in class scope.

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

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

     annotations_generators
Partial

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

Pass
Partial

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

Incorrectly evaluates type of call to async generator.

Partial

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

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

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

     annotations_methods
Pass*

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

Pass*

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

Pass*

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

Pass*

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

     annotations_typeexprPassPassPass
Partial

Does not reject call expressions in type annotation.

Does not reject call lambda expression in type annotation.

Does not reject list expression in type annotation.

Does not reject ternary expression in type annotation.

Does not reject f-string in type annotation.

Does not reject module in type annotation.

Special types in annotations
     specialtypes_anyPassPass
Partial

Does not treat missing type argument as Any in generic type.

Does not support Any as a base class.

Pass
     specialtypes_neverPassPass
Partial

Does not treat Never as compatible with all other types.

Unsupported

Does not understand NoReturn or Never.

     specialtypes_nonePassPass
Partial

Does not correctly handle type annotation type[None].

Partial

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

Does not detect type incompatibility between None and incompatible protocol.

     specialtypes_promotionsPassPass
Partial

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

Pass
     specialtypes_type
Partial

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

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

Pass
Partial

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

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

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

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

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

Partial

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

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

Generics
     generics_base_classPassPass
Partial

Does not reject illegal use of Generic.

Does not allow using generic in assert_type expression.

Partial

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

Does not reject illegal use of Generic.

     generics_basicPassPass
Partial

False positives in examples using constrained type variables.

False negative in custom map example.

False positive using `iter`.

False negative for generic metaclass.

Partial

False positives in examples using constrained type variables.

False negative for generic metaclass.

     generics_defaultsUnsupportedPassUnsupportedUnsupported
     generics_defaults_referentialUnsupportedPassUnsupportedUnsupported
     generics_defaults_specializationUnsupportedPassUnsupportedUnsupported
     generics_paramspec_basic
Partial

Does not reject ParamSpec when used "bare" in type alias definition.

Pass
Partial

Does not enforce name consistency for ParamSpec assigned to identifier.

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

Does not reject ParamSpec when used in various invalid locations.

Unsupported

Does not support ParamSpec.

     generics_paramspec_components
Partial

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

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

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

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

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

Pass
Partial

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

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

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

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

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

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

Unsupported

Does not support ParamSpec.

     generics_paramspec_semanticsPass
Pass*

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

Partial

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

Reports error for legitimate Callable type annotation that uses Concatenate.

Does not evaluate the correct type for call of Callable defined with Concatenate.

Unsupported

Does not support ParamSpec.

     generics_paramspec_specializationPassPass
Partial

Reports error for legitimate use of ParamSpec and Concatenate in function signature.

Reports error for legitimate specialization of generic class parameterized with ParamSpec.

Partial

Rejects valid specialization of ParamSpec using list expression.

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

Reports error for valid method call involving ParamSpec.

     generics_scoping
Partial

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

Pass
Partial

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

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

Pass
     generics_self_advanced
Partial

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

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

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

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

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_attributesPassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_basic
Partial

Does not properly handle constructor call through `cls` parameter.

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_protocolsPassPass
Partial

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

Partial

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

     generics_self_usagePassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_syntax_compatibility
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_declarations
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_scoping
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_type_erasure
Partial

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

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

Pass
Partial

Doesn't allow using Node[Any] in assert_type expression.

False negatives on instance attribute access on the type.

Unsupported
     generics_typevartuple_args
Partial

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

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_basic
Partial

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

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

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_callablePassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_concatPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_overloadsPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_specialization
Partial

Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided.

Rejects specialization of generic type alias defined as a tuple containing a TypeVar.

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

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_unpack
Partial

Does not reject multiple unpack operators in a tuple.

Pass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_upper_boundPassPass
Partial

Does not reject use of upper bound with constrained TypeVar.

Pass*

Does not properly support assert_type.

     generics_variance
Partial

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

Pass
Partial

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

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

Unsupported

Does not support covariant or contravariant TypeVars.

     generics_variance_inference
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

Type qualifiers
     qualifiers_annotated
Partial

Does not allow ClassVar to be nested within Annotated.

Does not allow Final to be nested within Annotated.

Does not allow Required and NotRequired to be nested within Annotated.

Does not reject type[T] compatibility for type alias defined with Annotated.

Does not reject call of type alias defined with Annotated.

Pass
Partial

Does not reject Annotated with a single parameter.

Does not reject call of Annotated with no type arguments.

Partial

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

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

Does not reject call of Annotated.

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

     qualifiers_final_annotation
Partial

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

Does not allow conditional assignment of Final instance variable in __init__ method.

Does not allow redefinition of private class variable that is marked Final in parent class.

Does not report modification of local Final variable via "for" statement.

Pass
Partial

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

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

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

Partial

Does not report Final variable with missing initialization.

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

Does not reject modification of global variable declared Final.

Does not reject modification of local variable declared Final.

     qualifiers_final_decoratorPassPass
Partial

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

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

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

Partial

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

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

Class type compatibility
     classes_classvar
Partial

Internal error if TypeVarTuple is used in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Rejects ClassVar nested in Annotated.

Does not reject use of ClassVar in TypeAlias definition.

Does not infer type of ClassVar from assignment if no type is provided.

Pass
Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Rejects initialization of ClassVar if no type argument is provided.

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Does not reject assignment of ClassVar through instance of class.

     classes_override
Partial

Does not handle case where parent class derives from Any.

Pass
Unsupported

Does not yet support the @override decorator.

Unsupported

Does not yet support the @override decorator.

Type aliases
     aliases_explicit
Partial

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

Pass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_implicitPassPass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_newtypePassPass
Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

     aliases_recursivePassPass
Partial

Does not properly handle some recursive type aliases.

Does not properly handle specialization of generic recursive type aliases.

Partial

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

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

Does not detect cyclical references in recursive type alias definition.

     aliases_type_statement
Unsupported

Does not support `type` statement.

Pass
Unsupported

Does not support `type` statement.

Unsupported

Does not support `type` statement.

     aliases_typealiastype
Unsupported

Support for TypeAliasType is not implemented.

Pass
Unsupported

Support for TypeAliasType is not implemented.

Unsupported

Support for TypeAliasType is not implemented.

     aliases_variancePassPassPass
Unsupported

Does not detect variance incompatibility.

Literals
     literals_interactions
Partial

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

Pass
Partial

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

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

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

Partial

Incorrectly rejects some legal Literal annotations.

Does not reject some illegal Literal annotations.

Does not use Literal to distinguish overloads.

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

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

     literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

PassPass
Unsupported

Does not understand `LiteralString` special form.

     literals_parameterizations
Partial

Does not reject tuple within Literal.

Pass
Partial

Does not support type aliases in Literal type expression.

Does not support nested Literal type expression.

Does not reject unary + operator in Literal type expression.

Does not reject tuple in Literal type expression.

Does not reject "bare" Literal in type expression.

Unsupported

Does not understand `Literal` type annotation.

     literals_semanticsPassPass
Partial

Does not reject augmented operation that modifies literal value.

Unsupported

Does not understand `Literal` type annotation.

Protocols
     protocols_class_objectsPassPass
Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

     protocols_definition
Partial

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

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

Pass
Partial

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

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

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

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

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

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

Partial

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

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

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

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

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

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

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

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

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

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

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

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

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

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

     protocols_explicit
Pass*

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

Pass
Partial

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

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

Partial

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

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

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

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

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

     protocols_generic
Partial

Fails protocol matching when method-scoped TypeVar is used in protocol.

Pass
Partial

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

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

Partial

Does not correctly enforce contravariance in protocol type compatibility tests.

Does not correctly enforce invariance in protocol type compatibility tests.

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

     protocols_mergingPassPass
Partial

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

Partial

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

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

     protocols_modulesPassPass
Unsupported

Does not perform protocol checks for modules.

Partial

Does not report incompatibilities for protocol methods.

     protocols_recursivePassPassPass
Partial

Incorrectly reports type error for some recursive protocols.

     protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Pass
Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

     protocols_selfPassPassPass
Partial

Does not properly handle Self type within a protocol.

     protocols_subtypingPassPassPass
Partial

Does not reject attempt to instantiate protocol class.

Does not report some protocol type compatibility violations involving contravariance.

     protocols_variancePassPass
Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Callables
     callables_annotationPassPass
Partial

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

Does not reject illegal form `Callable[[...], int]`.

Pass
     callables_kwargsPassPass
Unsupported

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

Unsupported

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

     callables_protocolPassPass
Partial

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

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

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

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

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

Unsupported

Does not properly handle type compatibility checks with callback protocols.

Overloads
     overloads_basicPassPass
Partial

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

Partial

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

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

Dataclasses
     dataclasses_descriptors
Partial

Does not correctly evaluate type of descriptor access.

Pass
Partial

Incorrectly generates error when calling constructor of dataclass with descriptor.

Unsupported

Does not understand descriptor objects in dataclass.

     dataclasses_frozenPassPass
Partial

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

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

Unsupported

Does not report assignment to field within frozen dataclass instance.

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

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

     dataclasses_hash
Partial

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

Pass
Partial

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

Partial

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

     dataclasses_inheritancePassPass
Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

     dataclasses_kwonly
Partial

Incorrectly rejects kw_only field with default before positional field.

PassPass
Partial

Incorrectly reports error when kw_only field has default value.

Incorrectly rejects kw_only field with default before positional field.

     dataclasses_orderPassPass
Partial

Does not report type incompatibility with comparison operator.

Partial

Does not report type incompatibility with comparison operator.

     dataclasses_postinitPassPass
Unsupported

Does not perform validation of `__post_init__` method.

Does not reject access of `InitVar` from object.

Partial

Does not validate `__post_init__` method.

Reports incorrect error for incompatible `__post_init__` method override.

     dataclasses_slots
Partial

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

Pass
Partial

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

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

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

Partial

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

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

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

     dataclasses_transform_classPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_field
Partial

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_func
Partial

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

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_metaPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_usagePassPass
Partial

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

Incorrectly reports error with InitVar that has default value.

Pass
Typed dictionaries
     typeddicts_alt_syntax
Pass*

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

Pass
Partial

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

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

Partial

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

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

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

     typeddicts_class_syntaxPassPass
Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

Does not support generic TypedDict class.

Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

     typeddicts_finalPassPass
Partial

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

Pass
     typeddicts_inheritancePassPass
Partial

Does not reject TypedDict class that inherits from non-TypedDict class.

Pass
     typeddicts_operationsPassPassPass
Partial

Does not report type violation with TypedDict value assignment.

Does not report reference to unknown key in TypedDict.

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

Does not reject delete operation for required key in TypedDict.

     typeddicts_readonlyUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_consistencyUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_inheritanceUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_kwargsUnsupportedPassUnsupportedUnsupported
     typeddicts_readonly_updateUnsupportedPassUnsupportedUnsupported
     typeddicts_required
Partial

Does not support nesting of `Annotated` and `Required` or `NotRequired`.

Pass
Partial

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

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

Does not support recursive TypedDict definitions.

Partial

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

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

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

     typeddicts_type_consistencyPassPass
Partial

Does not reject assignment of TypedDict with missing key.

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

Does not properly handle nested TypedDicts.

Partial

Does not report some type violations for TypedDict type compatibility.

Incorrectly reports type violation in cases where there is none.

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

     typeddicts_usagePassPass
Partial

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

Does not reject use of TypedDict as TypeVar bound.

Partial

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

Does not reject use of TypedDict as TypeVar bound.

Tuples
     tuples_type_compat
Partial

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

Incorrectly narrows tuple based on sequence patterns.

Pass
Partial

Does not support some unpacked tuple forms.

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

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

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

Partial

Does not support unpacked tuple forms.

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

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

     tuples_type_formPassPass
Partial

Does not reject some invalid tuple forms involving ellipsis.

Pass
     tuples_unpacked
Partial

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

Pass
Partial

Rejects some legal tuple type forms involving unpack.

Does not reject some illegal tuple type forms involving unpack.

Unsupported

Does not support `typing.Unpack`.

Does not support unpacked tuples within a tuple type form.

Named tuples
     namedtuples_define_class
Partial

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

Pass
Partial

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

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

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

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

Does not reject attempt to use NamedTuple with multiple inheritance.

Partial

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

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

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

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

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

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

Does not reject attempt to use NamedTuple with multiple inheritance.

     namedtuples_define_functional
Pass*

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

Pass
Pass*

Does not reject duplicate field names in functional form.

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

Does not support defaults in functional form.

Pass*

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

Does not support defaults in functional form.

     namedtuples_type_compatPassPass
Partial

Rejects valid type compatibility between named tuple and tuple.

Pass
     namedtuples_usage
Partial

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

Pass
Partial

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

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

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

Incorrectly handles subclasses of named tuples that add more attributes.

Partial

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

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

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

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

Type narrowing
     narrowing_typeguardPassPass
Partial

Does not support `tuple` in `assert_type` call.

Does not reject TypeGuard method with too few parameters.

Partial

Does not reject TypeGuard method with too few parameters.

Type checker directives
     directives_assert_typePassPass
Unsupported

Does not understand "assert_type".

Pass
     directives_castPassPassPass
Partial

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

     directives_no_type_check
Partial

Does not honor `@no_type_check` class decorator.

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

Pass*

Does not honor `@no_type_check` class decorator.

Pass*

Does not honor @no_type_check decorator.

Pass*

Does not honor @no_type_check decorator.

     directives_reveal_typePassPass
Unsupported

Does not understand reveal_type call.

Partial

Does not reject call to reveal_type with zero arguments.

Does not reject call to reveal_type with too many arguments.

     directives_type_checkingPassPassPassPass
     directives_type_ignore
Partial

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

PassPass
Partial

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

     directives_type_ignore_file1PassPass
Unsupported

Does not support file-level `#type: ignore` comment.

Pass
     directives_type_ignore_file2PassPassPass
Partial

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

     directives_version_platform
Pass*

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

Does not understand os.name checks.

Pass
Partial

Does not support sys.platform checks.

Does not support os.name checks.

Pass*

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

Does not understand os.name checks.

Historical and deprecated features
     historical_positional
Partial

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

Treats keyword-only parameter as positional-only.

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

Pass
Partial

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

Treats keyword-only parameter as positional-only.

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

Partial

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

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