From 385de7d6e9af609f7b9a61aa58f6dddc2cd7ba69 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 29 Aug 2025 18:28:21 +0200 Subject: [PATCH 1/2] Use the zuban executable --- conformance/results/pyright/version.toml | 2 +- conformance/results/results.html | 4 ++-- conformance/results/zuban/version.toml | 2 +- conformance/src/type_checker.py | 9 +++++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index ec4415b1..60d8230b 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1 +1 @@ -version = "pyright 1.1.403" +version = "pyright 1.1.404" diff --git a/conformance/results/results.html b/conformance/results/results.html index f62bd786..dc9f244a 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -160,11 +160,11 @@

Python Type System Conformance Test Results

 
mypy 1.17.1
-
pyright 1.1.403
+
pyright 1.1.404
pyre 0.9.25
-
zuban 0.0.19
+
zuban 0.0.20
diff --git a/conformance/results/zuban/version.toml b/conformance/results/zuban/version.toml index 9f28f9ef..a4131817 100644 --- a/conformance/results/zuban/version.toml +++ b/conformance/results/zuban/version.toml @@ -1 +1 @@ -version = "zuban 0.0.19" +version = "zuban 0.0.20" diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 12e16cde..5dd44082 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -296,19 +296,20 @@ def install(self) -> bool: return False def get_version(self) -> str: - proc = run(["zmypy", "--version"], stdout=PIPE, text=True) - return proc.stdout.strip().replace("zmypy", "zuban") + proc = run(["zuban", "--version"], stdout=PIPE, text=True) + return proc.stdout.strip() def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: command = [ - "zmypy", + "zuban", + "check", ".", "--disable-error-code", "empty-body", "--enable-error-code", "deprecated", "--no-warn-unreachable", - "--no-mypy-compatible", + "--hide-error-codes", ] proc = run(command, stdout=PIPE, text=True, encoding="utf-8") lines = proc.stdout.split("\n") From 7d7705276750307ba674e390c1a02b7789a0ecc9 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 29 Aug 2025 18:30:52 +0200 Subject: [PATCH 2/2] Add error codes to the zuban type checker --- .../results/zuban/aliases_explicit.toml | 42 +-- .../results/zuban/aliases_implicit.toml | 44 ++-- .../results/zuban/aliases_newtype.toml | 28 +- .../results/zuban/aliases_recursive.toml | 24 +- .../results/zuban/aliases_type_statement.toml | 54 ++-- .../results/zuban/aliases_typealiastype.toml | 46 ++-- .../results/zuban/aliases_variance.toml | 8 +- .../zuban/annotations_forward_refs.toml | 60 ++--- .../results/zuban/annotations_generators.toml | 22 +- .../results/zuban/annotations_methods.toml | 2 +- .../results/zuban/annotations_typeexpr.toml | 30 +-- .../results/zuban/callables_annotation.toml | 36 +-- .../results/zuban/callables_kwargs.toml | 36 +-- .../results/zuban/callables_protocol.toml | 34 +-- .../results/zuban/callables_subtyping.toml | 64 ++--- .../results/zuban/classes_classvar.toml | 36 +-- .../results/zuban/classes_override.toml | 10 +- .../results/zuban/constructors_call_init.toml | 6 +- .../zuban/constructors_call_metaclass.toml | 16 +- .../results/zuban/constructors_call_new.toml | 38 +-- .../results/zuban/constructors_call_type.toml | 12 +- .../results/zuban/constructors_callable.toml | 70 ++--- .../results/zuban/dataclasses_final.toml | 20 +- .../results/zuban/dataclasses_frozen.toml | 8 +- .../zuban/dataclasses_inheritance.toml | 4 +- .../results/zuban/dataclasses_kwonly.toml | 6 +- .../results/zuban/dataclasses_match_args.toml | 2 +- .../results/zuban/dataclasses_order.toml | 2 +- .../results/zuban/dataclasses_postinit.toml | 8 +- .../results/zuban/dataclasses_slots.toml | 8 +- .../zuban/dataclasses_transform_class.toml | 12 +- .../dataclasses_transform_converter.toml | 80 +++--- .../zuban/dataclasses_transform_field.toml | 4 +- .../zuban/dataclasses_transform_func.toml | 12 +- .../zuban/dataclasses_transform_meta.toml | 12 +- .../results/zuban/dataclasses_usage.toml | 22 +- .../results/zuban/directives_assert_type.toml | 12 +- .../results/zuban/directives_cast.toml | 6 +- .../zuban/directives_no_type_check.toml | 4 +- .../results/zuban/directives_reveal_type.toml | 4 +- .../results/zuban/directives_type_ignore.toml | 8 +- .../zuban/directives_type_ignore_file2.toml | 2 +- .../zuban/directives_version_platform.toml | 8 +- .../results/zuban/enums_behaviors.toml | 6 +- .../results/zuban/enums_definition.toml | 2 +- .../results/zuban/enums_expansion.toml | 6 +- .../results/zuban/enums_member_names.toml | 2 +- .../results/zuban/enums_member_values.toml | 8 +- conformance/results/zuban/enums_members.toml | 28 +- .../results/zuban/generics_base_class.toml | 16 +- conformance/results/zuban/generics_basic.toml | 26 +- .../results/zuban/generics_defaults.toml | 22 +- .../zuban/generics_defaults_referential.toml | 14 +- .../generics_defaults_specialization.toml | 4 +- .../zuban/generics_paramspec_basic.toml | 18 +- .../zuban/generics_paramspec_components.toml | 44 ++-- .../zuban/generics_paramspec_semantics.toml | 20 +- .../generics_paramspec_specialization.toml | 10 +- .../results/zuban/generics_scoping.toml | 24 +- .../results/zuban/generics_self_advanced.toml | 8 +- .../zuban/generics_self_attributes.toml | 4 +- .../results/zuban/generics_self_basic.toml | 6 +- .../zuban/generics_self_protocols.toml | 4 +- .../results/zuban/generics_self_usage.toml | 22 +- .../zuban/generics_syntax_compatibility.toml | 4 +- .../zuban/generics_syntax_declarations.toml | 20 +- .../zuban/generics_syntax_infer_variance.toml | 116 ++++----- .../zuban/generics_syntax_scoping.toml | 52 ++-- .../results/zuban/generics_type_erasure.toml | 22 +- .../zuban/generics_typevartuple_args.toml | 16 +- .../zuban/generics_typevartuple_basic.toml | 34 +-- .../zuban/generics_typevartuple_callable.toml | 2 +- .../generics_typevartuple_specialization.toml | 14 +- .../zuban/generics_typevartuple_unpack.toml | 2 +- .../results/zuban/generics_upper_bound.toml | 6 +- .../results/zuban/generics_variance.toml | 14 +- .../zuban/generics_variance_inference.toml | 46 ++-- .../results/zuban/historical_positional.toml | 8 +- .../results/zuban/literals_interactions.toml | 16 +- .../results/zuban/literals_literalstring.toml | 18 +- .../zuban/literals_parameterizations.toml | 34 +-- .../results/zuban/literals_semantics.toml | 8 +- .../zuban/namedtuples_define_class.toml | 22 +- .../zuban/namedtuples_define_functional.toml | 24 +- .../zuban/namedtuples_type_compat.toml | 4 +- .../results/zuban/namedtuples_usage.toml | 16 +- .../results/zuban/narrowing_typeguard.toml | 8 +- .../results/zuban/narrowing_typeis.toml | 18 +- .../results/zuban/overloads_basic.toml | 2 +- .../results/zuban/overloads_consistency.toml | 4 +- .../results/zuban/overloads_definitions.toml | 24 +- .../zuban/overloads_definitions_stub.toml | 16 +- .../results/zuban/overloads_evaluation.toml | 50 ++-- .../zuban/protocols_class_objects.toml | 16 +- .../results/zuban/protocols_definition.toml | 38 +-- .../results/zuban/protocols_explicit.toml | 10 +- .../results/zuban/protocols_generic.toml | 18 +- .../results/zuban/protocols_merging.toml | 12 +- .../results/zuban/protocols_modules.toml | 6 +- .../zuban/protocols_runtime_checkable.toml | 6 +- .../results/zuban/protocols_subtyping.toml | 14 +- .../results/zuban/protocols_variance.toml | 18 +- .../results/zuban/qualifiers_annotated.toml | 40 +-- .../zuban/qualifiers_final_annotation.toml | 58 ++--- .../zuban/qualifiers_final_decorator.toml | 22 +- .../results/zuban/specialtypes_never.toml | 6 +- .../results/zuban/specialtypes_none.toml | 6 +- .../zuban/specialtypes_promotions.toml | 2 +- .../results/zuban/specialtypes_type.toml | 18 +- .../results/zuban/tuples_type_compat.toml | 54 ++-- .../results/zuban/tuples_type_form.toml | 22 +- .../results/zuban/tuples_unpacked.toml | 10 +- .../results/zuban/typeddicts_alt_syntax.toml | 10 +- .../zuban/typeddicts_class_syntax.toml | 10 +- .../results/zuban/typeddicts_extra_items.toml | 244 +++++++++--------- .../results/zuban/typeddicts_inheritance.toml | 6 +- .../results/zuban/typeddicts_operations.toml | 22 +- .../results/zuban/typeddicts_readonly.toml | 12 +- .../typeddicts_readonly_consistency.toml | 14 +- .../typeddicts_readonly_inheritance.toml | 46 ++-- .../zuban/typeddicts_readonly_kwargs.toml | 2 +- .../results/zuban/typeddicts_required.toml | 8 +- .../zuban/typeddicts_type_consistency.toml | 22 +- .../results/zuban/typeddicts_usage.toml | 12 +- conformance/src/type_checker.py | 1 - 125 files changed, 1330 insertions(+), 1331 deletions(-) diff --git a/conformance/results/zuban/aliases_explicit.toml b/conformance/results/zuban/aliases_explicit.toml index 3f056707..655fb926 100644 --- a/conformance/results/zuban/aliases_explicit.toml +++ b/conformance/results/zuban/aliases_explicit.toml @@ -2,28 +2,28 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -aliases_explicit.py:67: error: Bad number of arguments for type alias, expected 0, given 1 -aliases_explicit.py:68: error: Bad number of arguments for type alias, expected 0, given 1 -aliases_explicit.py:69: error: Bad number of arguments for type alias, expected 1, given 2 -aliases_explicit.py:70: error: Bad number of arguments for type alias, expected 1, given 2 -aliases_explicit.py:71: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" -aliases_explicit.py:79: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:80: error: Bracketed expression "[...]" is not valid as a type +aliases_explicit.py:67: error: Bad number of arguments for type alias, expected 0, given 1 [misc] +aliases_explicit.py:68: error: Bad number of arguments for type alias, expected 0, given 1 [misc] +aliases_explicit.py:69: error: Bad number of arguments for type alias, expected 1, given 2 [misc] +aliases_explicit.py:70: error: Bad number of arguments for type alias, expected 1, given 2 [misc] +aliases_explicit.py:71: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" [misc] +aliases_explicit.py:79: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:80: error: Bracketed expression "[...]" is not valid as a type [valid-type] aliases_explicit.py:80: note: Did you mean "List[...]"? -aliases_explicit.py:81: error: Syntax error in type annotation +aliases_explicit.py:81: error: Syntax error in type annotation [valid-type] aliases_explicit.py:81: note: Suggestion: Is there a spurious trailing comma? -aliases_explicit.py:82: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:83: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:84: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:85: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:86: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:87: error: Variable "aliases_explicit.var1" is not valid as a type +aliases_explicit.py:82: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:83: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:84: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:85: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:86: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:87: error: Variable "aliases_explicit.var1" is not valid as a type [valid-type] aliases_explicit.py:87: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_explicit.py:88: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:89: error: Invalid type: try using Literal[1] instead? -aliases_explicit.py:90: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:91: error: Invalid type alias: expression is not a valid type -aliases_explicit.py:100: error: Bad number of arguments for type alias, expected 0, given 1 -aliases_explicit.py:101: error: "" not callable -aliases_explicit.py:102: error: Bad number of arguments for type alias, expected 0, given 1 +aliases_explicit.py:88: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:89: error: Invalid type: try using Literal[1] instead? [valid-type] +aliases_explicit.py:90: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:91: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:100: error: Bad number of arguments for type alias, expected 0, given 1 [misc] +aliases_explicit.py:101: error: "" not callable [operator] +aliases_explicit.py:102: error: Bad number of arguments for type alias, expected 0, given 1 [misc] """ diff --git a/conformance/results/zuban/aliases_implicit.toml b/conformance/results/zuban/aliases_implicit.toml index 000b3d75..39572ce2 100644 --- a/conformance/results/zuban/aliases_implicit.toml +++ b/conformance/results/zuban/aliases_implicit.toml @@ -2,40 +2,40 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -aliases_implicit.py:76: error: Bad number of arguments for type alias, expected 0, given 1 -aliases_implicit.py:77: error: Bad number of arguments for type alias, expected 0, given 1 -aliases_implicit.py:78: error: Bad number of arguments for type alias, expected 1, given 2 -aliases_implicit.py:79: error: Bad number of arguments for type alias, expected 1, given 2 -aliases_implicit.py:80: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" -aliases_implicit.py:81: error: Type argument "str" of "GoodTypeAlias12" must be a subtype of "float" -aliases_implicit.py:106: error: Variable "aliases_implicit.BadTypeAlias1" is not valid as a type +aliases_implicit.py:76: error: Bad number of arguments for type alias, expected 0, given 1 [misc] +aliases_implicit.py:77: error: Bad number of arguments for type alias, expected 0, given 1 [misc] +aliases_implicit.py:78: error: Bad number of arguments for type alias, expected 1, given 2 [misc] +aliases_implicit.py:79: error: Bad number of arguments for type alias, expected 1, given 2 [misc] +aliases_implicit.py:80: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" [misc] +aliases_implicit.py:81: error: Type argument "str" of "GoodTypeAlias12" must be a subtype of "float" [type-var] +aliases_implicit.py:106: error: Variable "aliases_implicit.BadTypeAlias1" is not valid as a type [valid-type] aliases_implicit.py:106: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:107: error: Variable "aliases_implicit.BadTypeAlias2" is not valid as a type +aliases_implicit.py:107: error: Variable "aliases_implicit.BadTypeAlias2" is not valid as a type [valid-type] aliases_implicit.py:107: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:108: error: Variable "aliases_implicit.BadTypeAlias3" is not valid as a type +aliases_implicit.py:108: error: Variable "aliases_implicit.BadTypeAlias3" is not valid as a type [valid-type] aliases_implicit.py:108: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:109: error: Variable "aliases_implicit.BadTypeAlias4" is not valid as a type +aliases_implicit.py:109: error: Variable "aliases_implicit.BadTypeAlias4" is not valid as a type [valid-type] aliases_implicit.py:109: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:110: error: Variable "aliases_implicit.BadTypeAlias5" is not valid as a type +aliases_implicit.py:110: error: Variable "aliases_implicit.BadTypeAlias5" is not valid as a type [valid-type] aliases_implicit.py:110: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:111: error: Variable "aliases_implicit.BadTypeAlias6" is not valid as a type +aliases_implicit.py:111: error: Variable "aliases_implicit.BadTypeAlias6" is not valid as a type [valid-type] aliases_implicit.py:111: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:112: error: Variable "aliases_implicit.BadTypeAlias7" is not valid as a type +aliases_implicit.py:112: error: Variable "aliases_implicit.BadTypeAlias7" is not valid as a type [valid-type] aliases_implicit.py:112: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:113: error: Variable "aliases_implicit.BadTypeAlias8" is not valid as a type +aliases_implicit.py:113: error: Variable "aliases_implicit.BadTypeAlias8" is not valid as a type [valid-type] aliases_implicit.py:113: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:114: error: Variable "aliases_implicit.var1" is not valid as a type +aliases_implicit.py:114: error: Variable "aliases_implicit.var1" is not valid as a type [valid-type] aliases_implicit.py:114: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:115: error: Variable "aliases_implicit.BadTypeAlias10" is not valid as a type +aliases_implicit.py:115: error: Variable "aliases_implicit.BadTypeAlias10" is not valid as a type [valid-type] aliases_implicit.py:115: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:116: error: Variable "aliases_implicit.BadTypeAlias11" is not valid as a type +aliases_implicit.py:116: error: Variable "aliases_implicit.BadTypeAlias11" is not valid as a type [valid-type] aliases_implicit.py:116: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:117: error: Variable "aliases_implicit.BadTypeAlias12" is not valid as a type +aliases_implicit.py:117: error: Variable "aliases_implicit.BadTypeAlias12" is not valid as a type [valid-type] aliases_implicit.py:117: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:118: error: Variable "aliases_implicit.BadTypeAlias13" is not valid as a type +aliases_implicit.py:118: error: Variable "aliases_implicit.BadTypeAlias13" is not valid as a type [valid-type] aliases_implicit.py:118: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:119: error: Variable "aliases_implicit.BadTypeAlias14" is not valid as a type +aliases_implicit.py:119: error: Variable "aliases_implicit.BadTypeAlias14" is not valid as a type [valid-type] aliases_implicit.py:119: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_implicit.py:133: error: "UnionType" not callable -aliases_implicit.py:135: error: Bad number of arguments for type alias, expected 0, given 1 +aliases_implicit.py:133: error: "UnionType" not callable [operator] +aliases_implicit.py:135: error: Bad number of arguments for type alias, expected 0, given 1 [misc] """ diff --git a/conformance/results/zuban/aliases_newtype.toml b/conformance/results/zuban/aliases_newtype.toml index 2500008d..ed7a88d5 100644 --- a/conformance/results/zuban/aliases_newtype.toml +++ b/conformance/results/zuban/aliases_newtype.toml @@ -2,20 +2,20 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -aliases_newtype.py:11: error: Argument 1 to "UserId" has incompatible type "str"; expected "int" -aliases_newtype.py:12: error: Incompatible types in assignment (expression has type "int", variable has type "UserId") -aliases_newtype.py:18: error: Incompatible types in assignment (expression has type "Type[UserId]", variable has type "Type[Any]") -aliases_newtype.py:23: error: Cannot use isinstance() with NewType type -aliases_newtype.py:26: error: Cannot subclass "NewType" -aliases_newtype.py:35: error: String argument 1 "BadName" to NewType(...) does not match variable name "GoodName" -aliases_newtype.py:41: error: Bad number of arguments for type alias, expected 0, given 1 -aliases_newtype.py:47: error: Argument 2 to NewType(...) must be subclassable (got "int | str") -aliases_newtype.py:50: error: Type variable "aliases_newtype.T" is unbound +aliases_newtype.py:11: error: Argument 1 to "UserId" has incompatible type "str"; expected "int" [arg-type] +aliases_newtype.py:12: error: Incompatible types in assignment (expression has type "int", variable has type "UserId") [assignment] +aliases_newtype.py:18: error: Incompatible types in assignment (expression has type "Type[UserId]", variable has type "Type[Any]") [assignment] +aliases_newtype.py:23: error: Cannot use isinstance() with NewType type [misc] +aliases_newtype.py:26: error: Cannot subclass "NewType" [misc] +aliases_newtype.py:35: error: String argument 1 "BadName" to NewType(...) does not match variable name "GoodName" [misc] +aliases_newtype.py:41: error: Bad number of arguments for type alias, expected 0, given 1 [misc] +aliases_newtype.py:47: error: Argument 2 to NewType(...) must be subclassable (got "int | str") [valid-newtype] +aliases_newtype.py:50: error: Type variable "aliases_newtype.T" is unbound [misc] aliases_newtype.py:50: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) aliases_newtype.py:50: note: (Hint: Use "T" in function signature to bind "T" inside a function) -aliases_newtype.py:52: error: NewType cannot be used with protocol classes -aliases_newtype.py:54: error: Argument 2 to NewType(...) must be subclassable (got "Literal[7]") -aliases_newtype.py:61: error: Argument 2 to NewType(...) must be subclassable (got "TD1") -aliases_newtype.py:63: error: NewType(...) expects exactly two positional arguments -aliases_newtype.py:65: error: Argument 2 to NewType(...) must be subclassable (got "Any") +aliases_newtype.py:52: error: NewType cannot be used with protocol classes [misc] +aliases_newtype.py:54: error: Argument 2 to NewType(...) must be subclassable (got "Literal[7]") [valid-newtype] +aliases_newtype.py:61: error: Argument 2 to NewType(...) must be subclassable (got "TD1") [valid-newtype] +aliases_newtype.py:63: error: NewType(...) expects exactly two positional arguments [call-arg] +aliases_newtype.py:65: error: Argument 2 to NewType(...) must be subclassable (got "Any") [valid-newtype] """ diff --git a/conformance/results/zuban/aliases_recursive.toml b/conformance/results/zuban/aliases_recursive.toml index daf88ae2..151d0978 100644 --- a/conformance/results/zuban/aliases_recursive.toml +++ b/conformance/results/zuban/aliases_recursive.toml @@ -2,16 +2,16 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -aliases_recursive.py:19: error: Dict entry 1 has incompatible type "str": "complex"; expected "str": "None | int | str | float | list[Json] | dict[str, Json]" -aliases_recursive.py:20: error: List item 1 has incompatible type "complex"; expected "None | int | str | float | list[Json] | dict[str, Json]" -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 "str | int | tuple[RecursiveTuple, ...]") -aliases_recursive.py:39: error: Name "t6" already defined on line 38 -aliases_recursive.py:39: error: Incompatible types in assignment (expression has type "tuple[int, list[int]]", variable has type "str | int | tuple[RecursiveTuple, ...]") -aliases_recursive.py:50: error: Dict entry 0 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, str | int | Mapping[str, RecursiveMapping]]" -aliases_recursive.py:51: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, str | int | Mapping[str, RecursiveMapping]]" -aliases_recursive.py:52: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, str | int | Mapping[str, RecursiveMapping]]" -aliases_recursive.py:63: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias1[str] | str" -aliases_recursive.py:69: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias2[str, int] | str | int" -aliases_recursive.py:72: error: Invalid recursive alias: a union item of itself -aliases_recursive.py:75: error: Invalid recursive alias: a union item of itself +aliases_recursive.py:19: error: Dict entry 1 has incompatible type "str": "complex"; expected "str": "None | int | str | float | list[Json] | dict[str, Json]" [dict-item] +aliases_recursive.py:20: error: List item 1 has incompatible type "complex"; expected "None | int | str | float | list[Json] | dict[str, Json]" [list-item] +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 "str | int | tuple[RecursiveTuple, ...]") [assignment] +aliases_recursive.py:39: error: Name "t6" already defined on line 38 [no-redef] +aliases_recursive.py:39: error: Incompatible types in assignment (expression has type "tuple[int, list[int]]", variable has type "str | int | tuple[RecursiveTuple, ...]") [assignment] +aliases_recursive.py:50: error: Dict entry 0 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, str | int | Mapping[str, RecursiveMapping]]" [dict-item] +aliases_recursive.py:51: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, str | int | Mapping[str, RecursiveMapping]]" [dict-item] +aliases_recursive.py:52: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, str | int | Mapping[str, RecursiveMapping]]" [dict-item] +aliases_recursive.py:63: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias1[str] | str" [list-item] +aliases_recursive.py:69: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias2[str, int] | str | int" [list-item] +aliases_recursive.py:72: error: Invalid recursive alias: a union item of itself [misc] +aliases_recursive.py:75: error: Invalid recursive alias: a union item of itself [misc] """ diff --git a/conformance/results/zuban/aliases_type_statement.toml b/conformance/results/zuban/aliases_type_statement.toml index 02494e07..85111674 100644 --- a/conformance/results/zuban/aliases_type_statement.toml +++ b/conformance/results/zuban/aliases_type_statement.toml @@ -2,34 +2,34 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -aliases_type_statement.py:17: error: "TypeAliasType" has no attribute "bit_count" -aliases_type_statement.py:19: error: "TypeAliasType" not callable -aliases_type_statement.py:23: error: "TypeAliasType" has no attribute "other_attrib" -aliases_type_statement.py:26: error: Type alias defined using "type" statement not valid as base class -aliases_type_statement.py:31: error: Argument 2 to "isinstance" has incompatible type "TypeAliasType"; expected "Type[Any] | UnionType | tuple[_ClassInfo, ...]" -aliases_type_statement.py:37: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:38: error: Bracketed expression "[...]" is not valid as a type +aliases_type_statement.py:17: error: "TypeAliasType" has no attribute "bit_count" [attr-defined] +aliases_type_statement.py:19: error: "TypeAliasType" not callable [operator] +aliases_type_statement.py:23: error: "TypeAliasType" has no attribute "other_attrib" [attr-defined] +aliases_type_statement.py:26: error: Type alias defined using "type" statement not valid as base class [misc] +aliases_type_statement.py:31: error: Argument 2 to "isinstance" has incompatible type "TypeAliasType"; expected "Type[Any] | UnionType | tuple[_ClassInfo, ...]" [arg-type] +aliases_type_statement.py:37: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:38: error: Bracketed expression "[...]" is not valid as a type [valid-type] aliases_type_statement.py:38: note: Did you mean "List[...]"? -aliases_type_statement.py:39: error: Syntax error in type annotation +aliases_type_statement.py:39: error: Syntax error in type annotation [valid-type] aliases_type_statement.py:39: note: Suggestion: Is there a spurious trailing comma? -aliases_type_statement.py:40: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:41: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:42: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:43: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:44: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:45: error: Variable "aliases_type_statement.var1" is not valid as a type +aliases_type_statement.py:40: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:41: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:42: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:43: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:44: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:45: error: Variable "aliases_type_statement.var1" is not valid as a type [valid-type] aliases_type_statement.py:45: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_type_statement.py:46: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:47: error: Invalid type: try using Literal[1] instead? -aliases_type_statement.py:48: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:49: error: Invalid type alias: expression is not a valid type -aliases_type_statement.py:52: error: Name "BadTypeAlias14" already defined on line 51 -aliases_type_statement.py:56: error: Type alias not allowed in function -aliases_type_statement.py:62: error: All type parameters should be declared ("V" not declared) -aliases_type_statement.py:67: error: All type parameters should be declared ("T1" not declared) -aliases_type_statement.py:77: error: Type argument "str" of "RecursiveTypeAlias2" must be a subtype of "int" -aliases_type_statement.py:79: error: Type argument "int" of "RecursiveTypeAlias2" must be a subtype of "str" -aliases_type_statement.py:82: error: Invalid recursive alias: a union item of itself -aliases_type_statement.py:84: error: Invalid recursive alias: a union item of itself -aliases_type_statement.py:88: error: Invalid recursive alias: a union item of itself +aliases_type_statement.py:46: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:47: error: Invalid type: try using Literal[1] instead? [valid-type] +aliases_type_statement.py:48: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:49: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:52: error: Name "BadTypeAlias14" already defined on line 51 [no-redef] +aliases_type_statement.py:56: error: Type alias not allowed in function [misc] +aliases_type_statement.py:62: error: All type parameters should be declared ("V" not declared) [misc] +aliases_type_statement.py:67: error: All type parameters should be declared ("T1" not declared) [misc] +aliases_type_statement.py:77: error: Type argument "str" of "RecursiveTypeAlias2" must be a subtype of "int" [type-var] +aliases_type_statement.py:79: error: Type argument "int" of "RecursiveTypeAlias2" must be a subtype of "str" [type-var] +aliases_type_statement.py:82: error: Invalid recursive alias: a union item of itself [misc] +aliases_type_statement.py:84: error: Invalid recursive alias: a union item of itself [misc] +aliases_type_statement.py:88: error: Invalid recursive alias: a union item of itself [misc] """ diff --git a/conformance/results/zuban/aliases_typealiastype.toml b/conformance/results/zuban/aliases_typealiastype.toml index 99edcc60..88fb5f8a 100644 --- a/conformance/results/zuban/aliases_typealiastype.toml +++ b/conformance/results/zuban/aliases_typealiastype.toml @@ -6,33 +6,33 @@ Incorrectly allows type_params= to be an arbitrary tuple. conformance_automated = "Fail" errors_diff = """ Line 45: Expected 1 errors -Line 27: Unexpected errors ['aliases_typealiastype.py:27: error: Can\\'t use bound type variable "T" to define generic alias'] +Line 27: Unexpected errors ['aliases_typealiastype.py:27: error: Can\\'t use bound type variable "T" to define generic alias [misc]'] """ output = """ -aliases_typealiastype.py:27: error: Can't use bound type variable "T" to define generic alias -aliases_typealiastype.py:32: error: "TypeAliasType" has no attribute "other_attrib" -aliases_typealiastype.py:40: error: Type argument "int" of "GoodAlias5" must be a subtype of "str" -aliases_typealiastype.py:43: error: All type parameters should be declared ("S" not declared) -aliases_typealiastype.py:44: error: All type parameters should be declared ("S" not declared) -aliases_typealiastype.py:46: error: Invalid recursive alias: a union item of itself -aliases_typealiastype.py:47: error: Invalid recursive alias: a union item of itself -aliases_typealiastype.py:48: error: Variable "aliases_typealiastype.BadAlias7" is not valid as a type +aliases_typealiastype.py:27: error: Can't use bound type variable "T" to define generic alias [misc] +aliases_typealiastype.py:32: error: "TypeAliasType" has no attribute "other_attrib" [attr-defined] +aliases_typealiastype.py:40: error: Type argument "int" of "GoodAlias5" must be a subtype of "str" [type-var] +aliases_typealiastype.py:43: error: All type parameters should be declared ("S" not declared) [misc] +aliases_typealiastype.py:44: error: All type parameters should be declared ("S" not declared) [misc] +aliases_typealiastype.py:46: error: Invalid recursive alias: a union item of itself [misc] +aliases_typealiastype.py:47: error: Invalid recursive alias: a union item of itself [misc] +aliases_typealiastype.py:48: error: Variable "aliases_typealiastype.BadAlias7" is not valid as a type [valid-type] aliases_typealiastype.py:48: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_typealiastype.py:52: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:53: error: Bracketed expression "[...]" is not valid as a type +aliases_typealiastype.py:52: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:53: error: Bracketed expression "[...]" is not valid as a type [valid-type] aliases_typealiastype.py:53: note: Did you mean "List[...]"? -aliases_typealiastype.py:54: error: Syntax error in type annotation +aliases_typealiastype.py:54: error: Syntax error in type annotation [valid-type] aliases_typealiastype.py:54: note: Suggestion: Is there a spurious trailing comma? -aliases_typealiastype.py:55: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:56: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:57: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:58: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:59: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:60: error: Variable "aliases_typealiastype.var1" is not valid as a type +aliases_typealiastype.py:55: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:56: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:57: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:58: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:59: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:60: error: Variable "aliases_typealiastype.var1" is not valid as a type [valid-type] aliases_typealiastype.py:60: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -aliases_typealiastype.py:61: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:62: error: Invalid type: try using Literal[1] instead? -aliases_typealiastype.py:63: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:64: error: Invalid type alias: expression is not a valid type -aliases_typealiastype.py:66: error: Name "BadAlias21" is used before definition +aliases_typealiastype.py:61: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:62: error: Invalid type: try using Literal[1] instead? [valid-type] +aliases_typealiastype.py:63: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:64: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:66: error: Name "BadAlias21" is used before definition [used-before-def] """ diff --git a/conformance/results/zuban/aliases_variance.toml b/conformance/results/zuban/aliases_variance.toml index 461ba7dc..8d4c8f1f 100644 --- a/conformance/results/zuban/aliases_variance.toml +++ b/conformance/results/zuban/aliases_variance.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -aliases_variance.py:24: error: Variance of TypeVar "T_co" incompatible with variance in parent type -aliases_variance.py:28: error: Variance of TypeVar "T_co" incompatible with variance in parent type -aliases_variance.py:32: error: Variance of TypeVar "T_co" incompatible with variance in parent type -aliases_variance.py:44: error: Variance of TypeVar "T_contra" incompatible with variance in parent type +aliases_variance.py:24: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var] +aliases_variance.py:28: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var] +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] """ diff --git a/conformance/results/zuban/annotations_forward_refs.toml b/conformance/results/zuban/annotations_forward_refs.toml index 8fcc1516..eda32687 100644 --- a/conformance/results/zuban/annotations_forward_refs.toml +++ b/conformance/results/zuban/annotations_forward_refs.toml @@ -11,42 +11,42 @@ Line 23: Expected 1 errors Line 24: Expected 1 errors Line 25: Expected 1 errors Line 66: Expected 1 errors -Line 82: Unexpected errors ['annotations_forward_refs.py:82: error: Name "str" is not defined'] -Line 87: Unexpected errors ['annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type'] -Line 95: Unexpected errors ['annotations_forward_refs.py:95: error: Expression is of type "Any", not "str"'] -Line 96: Unexpected errors ['annotations_forward_refs.py:96: error: Expression is of type "Any", not "int"'] -Line 104: Unexpected errors ['annotations_forward_refs.py:104: error: invalid syntax'] -Line 105: Unexpected errors ['annotations_forward_refs.py:105: error: invalid syntax', 'annotations_forward_refs.py:105: error: invalid syntax'] +Line 82: Unexpected errors ['annotations_forward_refs.py:82: error: Name "str" 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 95: Unexpected errors ['annotations_forward_refs.py:95: error: Expression is of type "Any", not "str" [misc]'] +Line 96: Unexpected errors ['annotations_forward_refs.py:96: error: Expression is of type "Any", not "int" [misc]'] +Line 104: Unexpected errors ['annotations_forward_refs.py:104: error: invalid syntax [syntax]'] +Line 105: Unexpected errors ['annotations_forward_refs.py:105: error: invalid syntax [syntax]', 'annotations_forward_refs.py:105: error: invalid syntax [syntax]'] """ output = """ -annotations_forward_refs.py:41: error: Invalid type comment or annotation -annotations_forward_refs.py:42: error: Bracketed expression "[...]" is not valid as a type +annotations_forward_refs.py:41: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:42: error: Bracketed expression "[...]" is not valid as a type [valid-type] annotations_forward_refs.py:42: note: Did you mean "List[...]"? -annotations_forward_refs.py:43: error: Syntax error in type annotation +annotations_forward_refs.py:43: error: Syntax error in type annotation [valid-type] annotations_forward_refs.py:43: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn) -annotations_forward_refs.py:44: error: Invalid type comment or annotation -annotations_forward_refs.py:45: error: Invalid type comment or annotation -annotations_forward_refs.py:46: error: Invalid type comment or annotation -annotations_forward_refs.py:47: error: Invalid type comment or annotation -annotations_forward_refs.py:48: error: Invalid type comment or annotation -annotations_forward_refs.py:49: error: Variable "annotations_forward_refs.var1" is not valid as a type +annotations_forward_refs.py:44: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:45: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:46: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:47: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:48: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:49: error: Variable "annotations_forward_refs.var1" is not valid as a type [valid-type] annotations_forward_refs.py:49: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -annotations_forward_refs.py:50: error: Invalid type comment or annotation -annotations_forward_refs.py:51: error: Invalid type: try using Literal[1] instead? -annotations_forward_refs.py:52: error: Invalid type comment or annotation -annotations_forward_refs.py:53: error: Invalid type comment or annotation -annotations_forward_refs.py:54: error: Invalid type comment or annotation -annotations_forward_refs.py:55: error: Module "types" is not valid as a type +annotations_forward_refs.py:50: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:51: error: Invalid type: try using Literal[1] instead? [valid-type] +annotations_forward_refs.py:52: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:53: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:54: error: Invalid type comment or annotation [valid-type] +annotations_forward_refs.py:55: error: Module "types" is not valid as a type [valid-type] annotations_forward_refs.py:55: note: Perhaps you meant to use a protocol matching the module structure? -annotations_forward_refs.py:80: error: Name "ClassF" is not defined -annotations_forward_refs.py:82: error: Name "str" is not defined -annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type +annotations_forward_refs.py:80: error: Name "ClassF" is not defined [name-defined] +annotations_forward_refs.py:82: error: Name "str" is not defined [name-defined] +annotations_forward_refs.py:87: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type] annotations_forward_refs.py:87: note: Perhaps you need "Callable[...]" or a callback protocol? -annotations_forward_refs.py:89: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type +annotations_forward_refs.py:89: error: Function "annotations_forward_refs.ClassD.int" is not valid as a type [valid-type] annotations_forward_refs.py:89: note: Perhaps you need "Callable[...]" or a callback protocol? -annotations_forward_refs.py:95: error: Expression is of type "Any", not "str" -annotations_forward_refs.py:96: error: Expression is of type "Any", not "int" -annotations_forward_refs.py:104: error: invalid syntax -annotations_forward_refs.py:105: error: invalid syntax -annotations_forward_refs.py:105: error: invalid syntax +annotations_forward_refs.py:95: error: Expression is of type "Any", not "str" [misc] +annotations_forward_refs.py:96: error: Expression is of type "Any", not "int" [misc] +annotations_forward_refs.py:104: error: invalid syntax [syntax] +annotations_forward_refs.py:105: error: invalid syntax [syntax] +annotations_forward_refs.py:105: error: invalid syntax [syntax] """ diff --git a/conformance/results/zuban/annotations_generators.toml b/conformance/results/zuban/annotations_generators.toml index fa4ba756..21bd6260 100644 --- a/conformance/results/zuban/annotations_generators.toml +++ b/conformance/results/zuban/annotations_generators.toml @@ -2,15 +2,15 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -annotations_generators.py:51: error: Missing return statement -annotations_generators.py:54: error: Incompatible return value type (got "bool", expected "C") -annotations_generators.py:57: error: Incompatible types in "yield" (actual type "int", expected type "A") -annotations_generators.py:66: error: Incompatible types in "yield" (actual type "int", expected type "A") -annotations_generators.py:71: error: No return value expected -annotations_generators.py:75: error: Incompatible types in "yield" (actual type "B", expected type "A") -annotations_generators.py:86: error: The return type of a generator function should be "Generator" or one of its supertypes -annotations_generators.py:91: error: The return type of an async generator function should be "AsyncGenerator" or one of its supertypes -annotations_generators.py:118: error: Incompatible types in "yield from" (actual type "A", expected type "B") -annotations_generators.py:119: error: Incompatible types in "yield from" (actual type "int", expected type "B") -annotations_generators.py:135: error: Incompatible send types in yield from (actual type "int", expected type "str") +annotations_generators.py:51: error: Missing return statement [return] +annotations_generators.py:54: error: Incompatible return value type (got "bool", expected "C") [return-value] +annotations_generators.py:57: error: Incompatible types in "yield" (actual type "int", expected type "A") [misc] +annotations_generators.py:66: error: Incompatible types in "yield" (actual type "int", expected type "A") [misc] +annotations_generators.py:71: error: No return value expected [return-value] +annotations_generators.py:75: error: Incompatible types in "yield" (actual type "B", expected type "A") [misc] +annotations_generators.py:86: error: The return type of a generator function should be "Generator" or one of its supertypes [misc] +annotations_generators.py:91: error: The return type of an async generator function should be "AsyncGenerator" or one of its supertypes [misc] +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] +annotations_generators.py:135: error: Incompatible send types in yield from (actual type "int", expected type "str") [misc] """ diff --git a/conformance/results/zuban/annotations_methods.toml b/conformance/results/zuban/annotations_methods.toml index bd95236e..bd200481 100644 --- a/conformance/results/zuban/annotations_methods.toml +++ b/conformance/results/zuban/annotations_methods.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -annotations_methods.py:42: error: Expression is of type "B", not "A" +annotations_methods.py:42: error: Expression is of type "B", not "A" [misc] """ diff --git a/conformance/results/zuban/annotations_typeexpr.toml b/conformance/results/zuban/annotations_typeexpr.toml index 3ac4eea1..dbd9f1b5 100644 --- a/conformance/results/zuban/annotations_typeexpr.toml +++ b/conformance/results/zuban/annotations_typeexpr.toml @@ -2,23 +2,23 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -annotations_typeexpr.py:88: error: Invalid type comment or annotation -annotations_typeexpr.py:89: error: Bracketed expression "[...]" is not valid as a type +annotations_typeexpr.py:88: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:89: error: Bracketed expression "[...]" is not valid as a type [valid-type] annotations_typeexpr.py:89: note: Did you mean "List[...]"? -annotations_typeexpr.py:90: error: Syntax error in type annotation +annotations_typeexpr.py:90: error: Syntax error in type annotation [valid-type] annotations_typeexpr.py:90: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn) -annotations_typeexpr.py:91: error: Invalid type comment or annotation -annotations_typeexpr.py:92: error: Invalid type comment or annotation -annotations_typeexpr.py:93: error: Invalid type comment or annotation -annotations_typeexpr.py:94: error: Invalid type comment or annotation -annotations_typeexpr.py:95: error: Invalid type comment or annotation -annotations_typeexpr.py:96: error: Variable "annotations_typeexpr.var1" is not valid as a type +annotations_typeexpr.py:91: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:92: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:93: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:94: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:95: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:96: error: Variable "annotations_typeexpr.var1" is not valid as a type [valid-type] annotations_typeexpr.py:96: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -annotations_typeexpr.py:97: error: Invalid type comment or annotation -annotations_typeexpr.py:98: error: Invalid type: try using Literal[1] instead? -annotations_typeexpr.py:99: error: Invalid type comment or annotation -annotations_typeexpr.py:100: error: Invalid type comment or annotation -annotations_typeexpr.py:101: error: Invalid type comment or annotation -annotations_typeexpr.py:102: error: Module "types" is not valid as a type +annotations_typeexpr.py:97: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:98: error: Invalid type: try using Literal[1] instead? [valid-type] +annotations_typeexpr.py:99: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:100: error: Invalid type comment or annotation [valid-type] +annotations_typeexpr.py:101: error: Invalid type comment or annotation [valid-type] +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? """ diff --git a/conformance/results/zuban/callables_annotation.toml b/conformance/results/zuban/callables_annotation.toml index 5f7ccb0f..c365d70f 100644 --- a/conformance/results/zuban/callables_annotation.toml +++ b/conformance/results/zuban/callables_annotation.toml @@ -6,31 +6,31 @@ Does not treat "*args: Any, **kargs: Any" as "..." when separated by keyword par conformance_automated = "Fail" errors_diff = """ Line 159: Expected 1 errors -Line 157: Unexpected errors ['callables_annotation.py:157: error: Incompatible types in assignment (expression has type "Proto7", variable has type "Proto6")'] +Line 157: Unexpected errors ['callables_annotation.py:157: error: Incompatible types in assignment (expression has type "Proto7", variable has type "Proto6") [assignment]'] """ output = """ -callables_annotation.py:25: error: Too few arguments -callables_annotation.py:26: error: Argument 2 has incompatible type "int"; expected "str" -callables_annotation.py:27: error: Too many arguments -callables_annotation.py:29: error: Unexpected keyword argument "a" -callables_annotation.py:29: error: Unexpected keyword argument "b" -callables_annotation.py:35: error: Too many arguments -callables_annotation.py:55: error: Please use "Callable[[], ]" or "Callable" -callables_annotation.py:56: error: The first argument to Callable must be a list of types, parameter specification, or "..." +callables_annotation.py:25: error: Too few arguments [call-arg] +callables_annotation.py:26: error: Argument 2 has incompatible type "int"; expected "str" [arg-type] +callables_annotation.py:27: error: Too many arguments [call-arg] +callables_annotation.py:29: error: Unexpected keyword argument "a" [call-arg] +callables_annotation.py:29: error: Unexpected keyword argument "b" [call-arg] +callables_annotation.py:35: error: Too many arguments [call-arg] +callables_annotation.py:55: error: Please use "Callable[[], ]" or "Callable" [misc] +callables_annotation.py:56: error: The first argument to Callable must be a list of types, parameter specification, or "..." [misc] callables_annotation.py:56: note: See https://mypy.readthedocs.io/en/stable/kinds_of_types.html#callable-types-and-lambdas -callables_annotation.py:57: error: Bracketed expression "[...]" is not valid as a type +callables_annotation.py:57: error: Bracketed expression "[...]" is not valid as a type [valid-type] callables_annotation.py:57: note: Did you mean "List[...]"? -callables_annotation.py:58: error: Please use "Callable[[], ]" or "Callable" -callables_annotation.py:59: error: Unexpected "..." -callables_annotation.py:91: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") -callables_annotation.py:93: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(int, 'a')], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") -callables_annotation.py:157: error: Incompatible types in assignment (expression has type "Proto7", variable has type "Proto6") +callables_annotation.py:58: error: Please use "Callable[[], ]" or "Callable" [misc] +callables_annotation.py:59: error: Unexpected "..." [valid-type] +callables_annotation.py:91: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") [assignment] +callables_annotation.py:93: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(int, 'a')], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") [assignment] +callables_annotation.py:157: error: Incompatible types in assignment (expression has type "Proto7", variable has type "Proto6") [assignment] callables_annotation.py:157: note: Following member(s) of "Proto7" have conflicts: callables_annotation.py:157: note: Expected: callables_annotation.py:157: note: def __call__(self, int, /, *args: Any, k: str, **kwargs: Any) -> None callables_annotation.py:157: note: Got: callables_annotation.py:157: note: def __call__(self, float, /, b: int, *, k: str, m: str) -> None -callables_annotation.py:172: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") -callables_annotation.py:187: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "Callable[[str, VarArg(Any), KwArg(Any)], str]") -callables_annotation.py:189: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "Callable[[str, VarArg(Any), KwArg(Any)], str]") +callables_annotation.py:172: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") [assignment] +callables_annotation.py:187: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "Callable[[str, VarArg(Any), KwArg(Any)], str]") [assignment] +callables_annotation.py:189: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "Callable[[str, VarArg(Any), KwArg(Any)], str]") [assignment] """ diff --git a/conformance/results/zuban/callables_kwargs.toml b/conformance/results/zuban/callables_kwargs.toml index 4e330810..f0549f1d 100644 --- a/conformance/results/zuban/callables_kwargs.toml +++ b/conformance/results/zuban/callables_kwargs.toml @@ -2,22 +2,22 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -callables_kwargs.py:46: error: Missing named argument "v1" for "func1" -callables_kwargs.py:46: error: Missing named argument "v3" for "func1" -callables_kwargs.py:51: error: Unexpected keyword argument "v4" for "func1" -callables_kwargs.py:52: error: Too many positional arguments for "func1" -callables_kwargs.py:58: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" -callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, int | str]"; expected "int" -callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, int | str]"; expected "str" -callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, int | str]"; expected "str" -callables_kwargs.py:63: error: "func1" gets multiple values for keyword argument "v1" -callables_kwargs.py:64: error: Argument 1 to "func2" has incompatible type "int"; expected "str" -callables_kwargs.py:64: error: "func2" gets multiple values for keyword argument "v3" -callables_kwargs.py:65: error: "func2" gets multiple values for keyword argument "v1" -callables_kwargs.py:101: error: Incompatible types in assignment (expression has type "Callable[[**Unpack[TD2]], None]", variable has type "TDProtocol3") -callables_kwargs.py:102: error: Incompatible types in assignment (expression has type "Callable[[**Unpack[TD2]], None]", variable has type "TDProtocol4") -callables_kwargs.py:103: error: Incompatible types in assignment (expression has type "Callable[[**Unpack[TD2]], None]", variable has type "TDProtocol5") -callables_kwargs.py:111: error: Overlap between argument names and ** TypedDict items: "v1" -callables_kwargs.py:122: error: Unpack item in ** argument must be a TypedDict -callables_kwargs.py:134: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(int, 'v1'), NamedArg(str, 'v3'), DefaultNamedArg(str, 'v2')], None]", variable has type "TDProtocol6") +callables_kwargs.py:46: error: Missing named argument "v1" for "func1" [call-arg] +callables_kwargs.py:46: error: Missing named argument "v3" for "func1" [call-arg] +callables_kwargs.py:51: error: Unexpected keyword argument "v4" for "func1" [call-arg] +callables_kwargs.py:52: error: Too many positional arguments for "func1" [call-arg] +callables_kwargs.py:58: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" [arg-type] +callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, int | str]"; expected "int" [arg-type] +callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, int | str]"; expected "str" [arg-type] +callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, int | str]"; expected "str" [arg-type] +callables_kwargs.py:63: error: "func1" gets multiple values for keyword argument "v1" [call-arg] +callables_kwargs.py:64: error: Argument 1 to "func2" has incompatible type "int"; expected "str" [arg-type] +callables_kwargs.py:64: error: "func2" gets multiple values for keyword argument "v3" [call-arg] +callables_kwargs.py:65: error: "func2" gets multiple values for keyword argument "v1" [call-arg] +callables_kwargs.py:101: error: Incompatible types in assignment (expression has type "Callable[[**Unpack[TD2]], None]", variable has type "TDProtocol3") [assignment] +callables_kwargs.py:102: error: Incompatible types in assignment (expression has type "Callable[[**Unpack[TD2]], None]", variable has type "TDProtocol4") [assignment] +callables_kwargs.py:103: error: Incompatible types in assignment (expression has type "Callable[[**Unpack[TD2]], None]", variable has type "TDProtocol5") [assignment] +callables_kwargs.py:111: error: Overlap between argument names and ** TypedDict items: "v1" [misc] +callables_kwargs.py:122: error: Unpack item in ** argument must be a TypedDict [misc] +callables_kwargs.py:134: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(int, 'v1'), NamedArg(str, 'v3'), DefaultNamedArg(str, 'v2')], None]", variable has type "TDProtocol6") [assignment] """ diff --git a/conformance/results/zuban/callables_protocol.toml b/conformance/results/zuban/callables_protocol.toml index dad94dc5..c4aff31c 100644 --- a/conformance/results/zuban/callables_protocol.toml +++ b/conformance/results/zuban/callables_protocol.toml @@ -2,23 +2,23 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -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") -callables_protocol.py:36: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes)], list[bytes]]", variable has type "Proto1") -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") -callables_protocol.py:67: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes)], None]", variable has type "Proto2") -callables_protocol.py:68: error: Incompatible types in assignment (expression has type "Callable[[VarArg(str), KwArg(str)], None]", variable has type "Proto2") -callables_protocol.py:69: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes), KwArg(bytes)], None]", variable has type "Proto2") -callables_protocol.py:70: error: Incompatible types in assignment (expression has type "Callable[[KwArg(str)], None]", variable has type "Proto2") -callables_protocol.py:97: error: Incompatible types in assignment (expression has type "Callable[[int], None]", variable has type "Proto4") +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] +callables_protocol.py:36: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes)], list[bytes]]", variable has type "Proto1") [assignment] +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] +callables_protocol.py:67: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes)], None]", variable has type "Proto2") [assignment] +callables_protocol.py:68: error: Incompatible types in assignment (expression has type "Callable[[VarArg(str), KwArg(str)], None]", variable has type "Proto2") [assignment] +callables_protocol.py:69: error: Incompatible types in assignment (expression has type "Callable[[VarArg(bytes), KwArg(bytes)], None]", variable has type "Proto2") [assignment] +callables_protocol.py:70: error: Incompatible types in assignment (expression has type "Callable[[KwArg(str)], None]", variable has type "Proto2") [assignment] +callables_protocol.py:97: error: Incompatible types in assignment (expression has type "Callable[[int], None]", variable has type "Proto4") [assignment] callables_protocol.py:97: note: "Callable[[int], None]" is missing following "Proto4" protocol member: callables_protocol.py:97: note: other_attribute -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") -callables_protocol.py:169: error: Incompatible types in assignment (expression has type "Callable[[int], Any]", variable has type "Proto8") -callables_protocol.py:186: error: Incompatible types in assignment (expression has type "str", variable has type "int") -callables_protocol.py:187: error: "Proto9[P, R]" has no attribute "xxx" -callables_protocol.py:197: error: "Proto9[[x: int], str]" has no attribute "other_attribute2" -callables_protocol.py:238: error: Incompatible types in assignment (expression has type "Callable[[int, str], Any]", variable has type "Proto11") -callables_protocol.py:260: error: Incompatible types in assignment (expression has type "Callable[[VarArg(Any), NamedArg(Any, 'kwarg0')], None]", variable has type "Proto12") -callables_protocol.py:284: error: Incompatible types in assignment (expression has type "Callable[[str], str]", variable has type "Proto13_Default") -callables_protocol.py:311: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(str, 'path')], str]", variable has type "Proto14_Default") +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] +callables_protocol.py:169: error: Incompatible types in assignment (expression has type "Callable[[int], Any]", variable has type "Proto8") [assignment] +callables_protocol.py:186: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +callables_protocol.py:187: error: "Proto9[P, R]" has no attribute "xxx" [attr-defined] +callables_protocol.py:197: error: "Proto9[[x: int], str]" has no attribute "other_attribute2" [attr-defined] +callables_protocol.py:238: error: Incompatible types in assignment (expression has type "Callable[[int, str], Any]", variable has type "Proto11") [assignment] +callables_protocol.py:260: error: Incompatible types in assignment (expression has type "Callable[[VarArg(Any), NamedArg(Any, 'kwarg0')], None]", variable has type "Proto12") [assignment] +callables_protocol.py:284: error: Incompatible types in assignment (expression has type "Callable[[str], str]", variable has type "Proto13_Default") [assignment] +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/zuban/callables_subtyping.toml b/conformance/results/zuban/callables_subtyping.toml index ff4f9566..81e71c80 100644 --- a/conformance/results/zuban/callables_subtyping.toml +++ b/conformance/results/zuban/callables_subtyping.toml @@ -2,183 +2,183 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -callables_subtyping.py:26: error: Incompatible types in assignment (expression has type "Callable[[int], int]", variable has type "Callable[[float], float]") -callables_subtyping.py:29: error: Incompatible types in assignment (expression has type "Callable[[float], float]", variable has type "Callable[[int], int]") -callables_subtyping.py:51: error: Incompatible types in assignment (expression has type "PosOnly2", variable has type "Standard2") +callables_subtyping.py:26: error: Incompatible types in assignment (expression has type "Callable[[int], int]", variable has type "Callable[[float], float]") [assignment] +callables_subtyping.py:29: error: Incompatible types in assignment (expression has type "Callable[[float], float]", variable has type "Callable[[int], int]") [assignment] +callables_subtyping.py:51: error: Incompatible types in assignment (expression has type "PosOnly2", variable has type "Standard2") [assignment] callables_subtyping.py:51: note: Following member(s) of "PosOnly2" have conflicts: callables_subtyping.py:51: note: Expected: callables_subtyping.py:51: note: def __call__(self, a: int, b: int) -> None callables_subtyping.py:51: note: Got: callables_subtyping.py:51: note: def __call__(self, int, int, /) -> None -callables_subtyping.py:52: error: Incompatible types in assignment (expression has type "KwOnly2", variable has type "Standard2") +callables_subtyping.py:52: error: Incompatible types in assignment (expression has type "KwOnly2", variable has type "Standard2") [assignment] callables_subtyping.py:52: note: Following member(s) of "KwOnly2" have conflicts: callables_subtyping.py:52: note: Expected: callables_subtyping.py:52: note: def __call__(self, a: int, b: int) -> None callables_subtyping.py:52: note: Got: callables_subtyping.py:52: note: def __call__(self, *, b: int, a: int) -> None -callables_subtyping.py:55: error: Incompatible types in assignment (expression has type "KwOnly2", variable has type "PosOnly2") +callables_subtyping.py:55: error: Incompatible types in assignment (expression has type "KwOnly2", variable has type "PosOnly2") [assignment] callables_subtyping.py:55: note: Following member(s) of "KwOnly2" have conflicts: callables_subtyping.py:55: note: Expected: callables_subtyping.py:55: note: def __call__(self, int, int, /) -> None callables_subtyping.py:55: note: Got: callables_subtyping.py:55: note: def __call__(self, *, b: int, a: int) -> None -callables_subtyping.py:58: error: Incompatible types in assignment (expression has type "PosOnly2", variable has type "KwOnly2") +callables_subtyping.py:58: error: Incompatible types in assignment (expression has type "PosOnly2", variable has type "KwOnly2") [assignment] callables_subtyping.py:58: note: Following member(s) of "PosOnly2" have conflicts: callables_subtyping.py:58: note: Expected: callables_subtyping.py:58: note: def __call__(self, *, b: int, a: int) -> None callables_subtyping.py:58: note: Got: callables_subtyping.py:58: note: def __call__(self, int, int, /) -> None -callables_subtyping.py:82: error: Incompatible types in assignment (expression has type "NoArgs3", variable has type "IntArgs3") +callables_subtyping.py:82: error: Incompatible types in assignment (expression has type "NoArgs3", variable has type "IntArgs3") [assignment] callables_subtyping.py:82: note: Following member(s) of "NoArgs3" have conflicts: callables_subtyping.py:82: note: Expected: callables_subtyping.py:82: note: def __call__(self, *args: int) -> None callables_subtyping.py:82: note: Got: callables_subtyping.py:82: note: def __call__(self) -> None -callables_subtyping.py:85: error: Incompatible types in assignment (expression has type "NoArgs3", variable has type "FloatArgs3") +callables_subtyping.py:85: error: Incompatible types in assignment (expression has type "NoArgs3", variable has type "FloatArgs3") [assignment] callables_subtyping.py:85: note: Following member(s) of "NoArgs3" have conflicts: callables_subtyping.py:85: note: Expected: callables_subtyping.py:85: note: def __call__(self, *args: float) -> None callables_subtyping.py:85: note: Got: callables_subtyping.py:85: note: def __call__(self) -> None -callables_subtyping.py:86: error: Incompatible types in assignment (expression has type "IntArgs3", variable has type "FloatArgs3") +callables_subtyping.py:86: error: Incompatible types in assignment (expression has type "IntArgs3", variable has type "FloatArgs3") [assignment] callables_subtyping.py:86: note: Following member(s) of "IntArgs3" have conflicts: callables_subtyping.py:86: note: Expected: callables_subtyping.py:86: note: def __call__(self, *args: float) -> None callables_subtyping.py:86: note: Got: callables_subtyping.py:86: note: def __call__(self, *args: int) -> None -callables_subtyping.py:116: error: Incompatible types in assignment (expression has type "IntArgs4", variable has type "PosOnly4") +callables_subtyping.py:116: error: Incompatible types in assignment (expression has type "IntArgs4", variable has type "PosOnly4") [assignment] callables_subtyping.py:116: note: Following member(s) of "IntArgs4" have conflicts: callables_subtyping.py:116: note: Expected: callables_subtyping.py:116: note: def __call__(self, int, str, /) -> None callables_subtyping.py:116: note: Got: callables_subtyping.py:116: note: def __call__(self, *args: int) -> None -callables_subtyping.py:119: error: Incompatible types in assignment (expression has type "StrArgs4", variable has type "IntStrArgs4") +callables_subtyping.py:119: error: Incompatible types in assignment (expression has type "StrArgs4", variable has type "IntStrArgs4") [assignment] callables_subtyping.py:119: note: Following member(s) of "StrArgs4" have conflicts: callables_subtyping.py:119: note: Expected: callables_subtyping.py:119: note: def __call__(self, *args: int | str) -> None callables_subtyping.py:119: note: Got: callables_subtyping.py:119: note: def __call__(self, int, /, *args: str) -> None -callables_subtyping.py:120: error: Incompatible types in assignment (expression has type "IntArgs4", variable has type "IntStrArgs4") +callables_subtyping.py:120: error: Incompatible types in assignment (expression has type "IntArgs4", variable has type "IntStrArgs4") [assignment] callables_subtyping.py:120: note: Following member(s) of "IntArgs4" have conflicts: callables_subtyping.py:120: note: Expected: callables_subtyping.py:120: note: def __call__(self, *args: int | str) -> None callables_subtyping.py:120: note: Got: callables_subtyping.py:120: note: def __call__(self, *args: int) -> None -callables_subtyping.py:122: error: Incompatible types in assignment (expression has type "IntArgs4", variable has type "StrArgs4") +callables_subtyping.py:122: error: Incompatible types in assignment (expression has type "IntArgs4", variable has type "StrArgs4") [assignment] callables_subtyping.py:122: note: Following member(s) of "IntArgs4" have conflicts: callables_subtyping.py:122: note: Expected: callables_subtyping.py:122: note: def __call__(self, int, /, *args: str) -> None callables_subtyping.py:122: note: Got: callables_subtyping.py:122: note: def __call__(self, *args: int) -> None -callables_subtyping.py:124: error: Incompatible types in assignment (expression has type "StrArgs4", variable has type "IntArgs4") +callables_subtyping.py:124: error: Incompatible types in assignment (expression has type "StrArgs4", variable has type "IntArgs4") [assignment] callables_subtyping.py:124: note: Following member(s) of "StrArgs4" have conflicts: callables_subtyping.py:124: note: Expected: callables_subtyping.py:124: note: def __call__(self, *args: int) -> None callables_subtyping.py:124: note: Got: callables_subtyping.py:124: note: def __call__(self, int, /, *args: str) -> None -callables_subtyping.py:125: error: Incompatible types in assignment (expression has type "IntStrArgs4", variable has type "Standard4") +callables_subtyping.py:125: error: Incompatible types in assignment (expression has type "IntStrArgs4", variable has type "Standard4") [assignment] callables_subtyping.py:125: note: Following member(s) of "IntStrArgs4" have conflicts: callables_subtyping.py:125: note: Expected: callables_subtyping.py:125: note: def __call__(self, a: int, b: str) -> None callables_subtyping.py:125: note: Got: callables_subtyping.py:125: note: def __call__(self, *args: int | str) -> None -callables_subtyping.py:126: error: Incompatible types in assignment (expression has type "StrArgs4", variable has type "Standard4") +callables_subtyping.py:126: error: Incompatible types in assignment (expression has type "StrArgs4", variable has type "Standard4") [assignment] callables_subtyping.py:126: note: Following member(s) of "StrArgs4" have conflicts: callables_subtyping.py:126: note: Expected: callables_subtyping.py:126: note: def __call__(self, a: int, b: str) -> None callables_subtyping.py:126: note: Got: callables_subtyping.py:126: note: def __call__(self, int, /, *args: str) -> None -callables_subtyping.py:151: error: Incompatible types in assignment (expression has type "NoKwargs5", variable has type "IntKwargs5") +callables_subtyping.py:151: error: Incompatible types in assignment (expression has type "NoKwargs5", variable has type "IntKwargs5") [assignment] callables_subtyping.py:151: note: Following member(s) of "NoKwargs5" have conflicts: callables_subtyping.py:151: note: Expected: callables_subtyping.py:151: note: def __call__(self, **kwargs: int) -> None callables_subtyping.py:151: note: Got: callables_subtyping.py:151: note: def __call__(self) -> None -callables_subtyping.py:154: error: Incompatible types in assignment (expression has type "NoKwargs5", variable has type "FloatKwargs5") +callables_subtyping.py:154: error: Incompatible types in assignment (expression has type "NoKwargs5", variable has type "FloatKwargs5") [assignment] callables_subtyping.py:154: note: Following member(s) of "NoKwargs5" have conflicts: callables_subtyping.py:154: note: Expected: callables_subtyping.py:154: note: def __call__(self, **kwargs: float) -> None callables_subtyping.py:154: note: Got: callables_subtyping.py:154: note: def __call__(self) -> None -callables_subtyping.py:155: error: Incompatible types in assignment (expression has type "IntKwargs5", variable has type "FloatKwargs5") +callables_subtyping.py:155: error: Incompatible types in assignment (expression has type "IntKwargs5", variable has type "FloatKwargs5") [assignment] callables_subtyping.py:155: note: Following member(s) of "IntKwargs5" have conflicts: callables_subtyping.py:155: note: Expected: callables_subtyping.py:155: note: def __call__(self, **kwargs: float) -> None callables_subtyping.py:155: note: Got: callables_subtyping.py:155: note: def __call__(self, **kwargs: int) -> None -callables_subtyping.py:187: error: Incompatible types in assignment (expression has type "IntKwargs6", variable has type "KwOnly6") +callables_subtyping.py:187: error: Incompatible types in assignment (expression has type "IntKwargs6", variable has type "KwOnly6") [assignment] callables_subtyping.py:187: note: Following member(s) of "IntKwargs6" have conflicts: callables_subtyping.py:187: note: Expected: callables_subtyping.py:187: note: def __call__(self, *, a: int, b: str) -> None callables_subtyping.py:187: note: Got: callables_subtyping.py:187: note: def __call__(self, **kwargs: int) -> None -callables_subtyping.py:190: error: Incompatible types in assignment (expression has type "StrKwargs6", variable has type "IntStrKwargs6") +callables_subtyping.py:190: error: Incompatible types in assignment (expression has type "StrKwargs6", variable has type "IntStrKwargs6") [assignment] callables_subtyping.py:190: note: Following member(s) of "StrKwargs6" have conflicts: callables_subtyping.py:190: note: Expected: callables_subtyping.py:190: note: def __call__(self, **kwargs: int | str) -> None callables_subtyping.py:190: note: Got: callables_subtyping.py:190: note: def __call__(self, *, a: int, **kwargs: str) -> None -callables_subtyping.py:191: error: Incompatible types in assignment (expression has type "IntKwargs6", variable has type "IntStrKwargs6") +callables_subtyping.py:191: error: Incompatible types in assignment (expression has type "IntKwargs6", variable has type "IntStrKwargs6") [assignment] callables_subtyping.py:191: note: Following member(s) of "IntKwargs6" have conflicts: callables_subtyping.py:191: note: Expected: callables_subtyping.py:191: note: def __call__(self, **kwargs: int | str) -> None callables_subtyping.py:191: note: Got: callables_subtyping.py:191: note: def __call__(self, **kwargs: int) -> None -callables_subtyping.py:193: error: Incompatible types in assignment (expression has type "IntKwargs6", variable has type "StrKwargs6") +callables_subtyping.py:193: error: Incompatible types in assignment (expression has type "IntKwargs6", variable has type "StrKwargs6") [assignment] callables_subtyping.py:193: note: Following member(s) of "IntKwargs6" have conflicts: callables_subtyping.py:193: note: Expected: callables_subtyping.py:193: note: def __call__(self, *, a: int, **kwargs: str) -> None callables_subtyping.py:193: note: Got: callables_subtyping.py:193: note: def __call__(self, **kwargs: int) -> None -callables_subtyping.py:195: error: Incompatible types in assignment (expression has type "StrKwargs6", variable has type "IntKwargs6") +callables_subtyping.py:195: error: Incompatible types in assignment (expression has type "StrKwargs6", variable has type "IntKwargs6") [assignment] callables_subtyping.py:195: note: Following member(s) of "StrKwargs6" have conflicts: callables_subtyping.py:195: note: Expected: callables_subtyping.py:195: note: def __call__(self, **kwargs: int) -> None callables_subtyping.py:195: note: Got: callables_subtyping.py:195: note: def __call__(self, *, a: int, **kwargs: str) -> None -callables_subtyping.py:196: error: Incompatible types in assignment (expression has type "IntStrKwargs6", variable has type "Standard6") +callables_subtyping.py:196: error: Incompatible types in assignment (expression has type "IntStrKwargs6", variable has type "Standard6") [assignment] callables_subtyping.py:196: note: Following member(s) of "IntStrKwargs6" have conflicts: callables_subtyping.py:196: note: Expected: callables_subtyping.py:196: note: def __call__(self, a: int, b: str) -> None callables_subtyping.py:196: note: Got: callables_subtyping.py:196: note: def __call__(self, **kwargs: int | str) -> None -callables_subtyping.py:197: error: Incompatible types in assignment (expression has type "StrKwargs6", variable has type "Standard6") +callables_subtyping.py:197: error: Incompatible types in assignment (expression has type "StrKwargs6", variable has type "Standard6") [assignment] callables_subtyping.py:197: note: Following member(s) of "StrKwargs6" have conflicts: callables_subtyping.py:197: note: Expected: callables_subtyping.py:197: note: def __call__(self, a: int, b: str) -> None callables_subtyping.py:197: note: Got: callables_subtyping.py:197: note: def __call__(self, *, a: int, **kwargs: str) -> None -callables_subtyping.py:236: error: Incompatible types in assignment (expression has type "NoDefaultArg8", variable has type "DefaultArg8") +callables_subtyping.py:236: error: Incompatible types in assignment (expression has type "NoDefaultArg8", variable has type "DefaultArg8") [assignment] callables_subtyping.py:236: note: Following member(s) of "NoDefaultArg8" have conflicts: callables_subtyping.py:236: note: Expected: callables_subtyping.py:236: note: def __call__(self, x: int = ...) -> None callables_subtyping.py:236: note: Got: callables_subtyping.py:236: note: def __call__(self, x: int) -> None -callables_subtyping.py:237: error: Incompatible types in assignment (expression has type "NoX8", variable has type "DefaultArg8") +callables_subtyping.py:237: error: Incompatible types in assignment (expression has type "NoX8", variable has type "DefaultArg8") [assignment] callables_subtyping.py:237: note: Following member(s) of "NoX8" have conflicts: callables_subtyping.py:237: note: Expected: callables_subtyping.py:237: note: def __call__(self, x: int = ...) -> None callables_subtyping.py:237: note: Got: callables_subtyping.py:237: note: def __call__(self) -> None -callables_subtyping.py:240: error: Incompatible types in assignment (expression has type "NoX8", variable has type "NoDefaultArg8") +callables_subtyping.py:240: error: Incompatible types in assignment (expression has type "NoX8", variable has type "NoDefaultArg8") [assignment] callables_subtyping.py:240: note: Following member(s) of "NoX8" have conflicts: callables_subtyping.py:240: note: Expected: callables_subtyping.py:240: note: def __call__(self, x: int) -> None callables_subtyping.py:240: note: Got: callables_subtyping.py:240: note: def __call__(self) -> None -callables_subtyping.py:243: error: Incompatible types in assignment (expression has type "NoDefaultArg8", variable has type "NoX8") +callables_subtyping.py:243: error: Incompatible types in assignment (expression has type "NoDefaultArg8", variable has type "NoX8") [assignment] callables_subtyping.py:243: note: Following member(s) of "NoDefaultArg8" have conflicts: callables_subtyping.py:243: note: Expected: callables_subtyping.py:243: note: def __call__(self) -> None callables_subtyping.py:243: note: Got: callables_subtyping.py:243: note: def __call__(self, x: int) -> None -callables_subtyping.py:273: error: Incompatible types in assignment (expression has type "Overloaded9", variable has type "FloatArg9") +callables_subtyping.py:273: error: Incompatible types in assignment (expression has type "Overloaded9", variable has type "FloatArg9") [assignment] callables_subtyping.py:273: note: Following member(s) of "Overloaded9" have conflicts: callables_subtyping.py:273: note: Expected: callables_subtyping.py:273: note: def __call__(self: FloatArg9, x: float) -> float callables_subtyping.py:273: note: Got: callables_subtyping.py:273: note: def __call__(*args: Any, **kwds: Any) -> Any -callables_subtyping.py:297: error: Incompatible types in assignment (expression has type "StrArg10", variable has type "Overloaded10") +callables_subtyping.py:297: error: Incompatible types in assignment (expression has type "StrArg10", variable has type "Overloaded10") [assignment] callables_subtyping.py:297: note: Following member(s) of "StrArg10" have conflicts: callables_subtyping.py:297: note: Expected: callables_subtyping.py:297: note: def __call__(*args: Any, **kwds: Any) -> Any diff --git a/conformance/results/zuban/classes_classvar.toml b/conformance/results/zuban/classes_classvar.toml index 88e7b0a9..47ee309f 100644 --- a/conformance/results/zuban/classes_classvar.toml +++ b/conformance/results/zuban/classes_classvar.toml @@ -2,24 +2,24 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -classes_classvar.py:38: error: ClassVar[...] must have at most one type argument -classes_classvar.py:39: error: Invalid type: try using Literal[3] instead? -classes_classvar.py:40: error: Name "var" is not defined -classes_classvar.py:45: error: ClassVar cannot contain type variables -classes_classvar.py:46: error: ClassVar cannot contain type variables -classes_classvar.py:47: error: ClassVar cannot contain type variables -classes_classvar.py:52: error: Incompatible types in assignment (expression has type "dict[Never, Never]", variable has type "list[str]") -classes_classvar.py:54: error: Variable should not be annotated with both ClassVar and Final -classes_classvar.py:55: error: Invalid Type: ClassVar nested inside other type -classes_classvar.py:66: error: Type in ClassVar[...] can only be omitted if there is an initializer -classes_classvar.py:69: error: ClassVar can only be used for assignments in class body -classes_classvar.py:70: error: ClassVar can only be used for assignments in class body -classes_classvar.py:71: error: ClassVar can only be used for assignments in class body -classes_classvar.py:73: error: ClassVar can only be used for assignments in class body -classes_classvar.py:77: error: ClassVar can only be used for assignments in class body -classes_classvar.py:78: error: ClassVar can only be used for assignments in class body -classes_classvar.py:111: error: Cannot assign to class variable "stats" via instance -classes_classvar.py:140: error: Incompatible types in assignment (expression has type "ProtoAImpl", variable has type "ProtoA") +classes_classvar.py:38: error: ClassVar[...] must have at most one type argument [misc] +classes_classvar.py:39: error: Invalid type: try using Literal[3] instead? [valid-type] +classes_classvar.py:40: error: Name "var" is not defined [name-defined] +classes_classvar.py:45: error: ClassVar cannot contain type variables [misc] +classes_classvar.py:46: error: ClassVar cannot contain type variables [misc] +classes_classvar.py:47: error: ClassVar cannot contain type variables [misc] +classes_classvar.py:52: error: Incompatible types in assignment (expression has type "dict[Never, Never]", variable has type "list[str]") [assignment] +classes_classvar.py:54: error: Variable should not be annotated with both ClassVar and Final [misc] +classes_classvar.py:55: error: Invalid Type: ClassVar nested inside other type [misc] +classes_classvar.py:66: error: Type in ClassVar[...] can only be omitted if there is an initializer [misc] +classes_classvar.py:69: error: ClassVar can only be used for assignments in class body [misc] +classes_classvar.py:70: error: ClassVar can only be used for assignments in class body [misc] +classes_classvar.py:71: error: ClassVar can only be used for assignments in class body [misc] +classes_classvar.py:73: error: ClassVar can only be used for assignments in class body [misc] +classes_classvar.py:77: error: ClassVar can only be used for assignments in class body [misc] +classes_classvar.py:78: error: ClassVar can only be used for assignments in class body [misc] +classes_classvar.py:111: error: Cannot assign to class variable "stats" via instance [misc] +classes_classvar.py:140: error: Incompatible types in assignment (expression has type "ProtoAImpl", variable has type "ProtoA") [assignment] classes_classvar.py:140: note: Protocol member ProtoA.x expected class variable, got instance variable classes_classvar.py:140: note: Protocol member ProtoA.y expected class variable, got instance variable classes_classvar.py:140: note: "ProtoAImpl" is missing following "ProtoA" protocol member: diff --git a/conformance/results/zuban/classes_override.toml b/conformance/results/zuban/classes_override.toml index cd420c0b..6bc2112c 100644 --- a/conformance/results/zuban/classes_override.toml +++ b/conformance/results/zuban/classes_override.toml @@ -2,9 +2,9 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -classes_override.py:53: error: Method "method3" is marked as an override, but no base method was found with this name -classes_override.py:56: error: Method "method4" is marked as an override, but no base method was found with this name -classes_override.py:79: error: Method "static_method1" is marked as an override, but no base method was found with this name -classes_override.py:84: error: Method "class_method1" is marked as an override, but no base method was found with this name -classes_override.py:89: error: Method "property1" is marked as an override, but no base method was found with this name +classes_override.py:53: error: Method "method3" is marked as an override, but no base method was found with this name [misc] +classes_override.py:56: error: Method "method4" is marked as an override, but no base method was found with this name [misc] +classes_override.py:79: error: Method "static_method1" is marked as an override, but no base method was found with this name [misc] +classes_override.py:84: error: Method "class_method1" is marked as an override, but no base method was found with this name [misc] +classes_override.py:89: error: Method "property1" is marked as an override, but no base method was found with this name [misc] """ diff --git a/conformance/results/zuban/constructors_call_init.toml b/conformance/results/zuban/constructors_call_init.toml index 1f5db590..e488f058 100644 --- a/conformance/results/zuban/constructors_call_init.toml +++ b/conformance/results/zuban/constructors_call_init.toml @@ -9,7 +9,7 @@ Line 56: Expected 1 errors Line 107: Expected 1 errors """ output = """ -constructors_call_init.py:21: error: Argument 1 to "Class1" has incompatible type "float"; expected "int" -constructors_call_init.py:42: error: Argument 1 to "Class3" has incompatible type "Class2[Never]"; expected "Self | None" -constructors_call_init.py:130: error: Too many arguments for "Class11" +constructors_call_init.py:21: error: Argument 1 to "Class1" has incompatible type "float"; expected "int" [arg-type] +constructors_call_init.py:42: error: Argument 1 to "Class3" has incompatible type "Class2[Never]"; expected "Self | None" [arg-type] +constructors_call_init.py:130: error: Too many arguments for "Class11" [call-arg] """ diff --git a/conformance/results/zuban/constructors_call_metaclass.toml b/conformance/results/zuban/constructors_call_metaclass.toml index 87caf96a..c15a19e3 100644 --- a/conformance/results/zuban/constructors_call_metaclass.toml +++ b/conformance/results/zuban/constructors_call_metaclass.toml @@ -5,14 +5,14 @@ Does not skip evaluation of __new__ and __init__ if custom metaclass call return """ conformance_automated = "Fail" errors_diff = """ -Line 23: Unexpected errors ['constructors_call_metaclass.py:23: error: Expression is of type "Class1", not "Never"', 'constructors_call_metaclass.py:23: error: Missing positional argument "x" in call to "Class1"'] -Line 36: Unexpected errors ['constructors_call_metaclass.py:36: error: Expression is of type "Class2", not "int | Meta2"', 'constructors_call_metaclass.py:36: error: Missing positional argument "x" in call to "Class2"'] +Line 23: Unexpected errors ['constructors_call_metaclass.py:23: error: Expression is of type "Class1", not "Never" [misc]', 'constructors_call_metaclass.py:23: error: Missing positional argument "x" in call to "Class1" [call-arg]'] +Line 36: Unexpected errors ['constructors_call_metaclass.py:36: error: Expression is of type "Class2", not "int | Meta2" [misc]', 'constructors_call_metaclass.py:36: error: Missing positional argument "x" in call to "Class2" [call-arg]'] """ output = """ -constructors_call_metaclass.py:23: error: Expression is of type "Class1", not "Never" -constructors_call_metaclass.py:23: error: Missing positional argument "x" in call to "Class1" -constructors_call_metaclass.py:36: error: Expression is of type "Class2", not "int | Meta2" -constructors_call_metaclass.py:36: error: Missing positional argument "x" in call to "Class2" -constructors_call_metaclass.py:51: error: Missing positional argument "x" in call to "Class3" -constructors_call_metaclass.py:65: error: Missing positional argument "x" in call to "Class4" +constructors_call_metaclass.py:23: error: Expression is of type "Class1", not "Never" [misc] +constructors_call_metaclass.py:23: error: Missing positional argument "x" in call to "Class1" [call-arg] +constructors_call_metaclass.py:36: error: Expression is of type "Class2", not "int | Meta2" [misc] +constructors_call_metaclass.py:36: error: Missing positional argument "x" in call to "Class2" [call-arg] +constructors_call_metaclass.py:51: error: Missing positional argument "x" in call to "Class3" [call-arg] +constructors_call_metaclass.py:65: error: Missing positional argument "x" in call to "Class4" [call-arg] """ diff --git a/conformance/results/zuban/constructors_call_new.toml b/conformance/results/zuban/constructors_call_new.toml index 22f9a6d9..3c94ad4e 100644 --- a/conformance/results/zuban/constructors_call_new.toml +++ b/conformance/results/zuban/constructors_call_new.toml @@ -7,25 +7,25 @@ Does not report errors during binding to cls parameter of __new__ method. conformance_automated = "Fail" errors_diff = """ Line 145: Expected 1 errors -Line 40: Unexpected errors ['constructors_call_new.py:40: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class3")'] -Line 49: Unexpected errors ['constructors_call_new.py:49: error: Expression is of type "Class3", not "int"', 'constructors_call_new.py:49: error: Missing positional argument "x" in call to "Class3"'] -Line 57: Unexpected errors ['constructors_call_new.py:57: error: "__new__" must return a class instance (got "Class4 | Any")'] -Line 64: Unexpected errors ['constructors_call_new.py:64: error: Expression is of type "Class4", not "Class4 | Any"', 'constructors_call_new.py:64: error: Missing positional argument "x" in call to "Class4"'] -Line 76: Unexpected errors ['constructors_call_new.py:76: error: Expression is of type "Class5", not "Never"', 'constructors_call_new.py:76: error: Missing positional argument "x" in call to "Class5"'] -Line 82: Unexpected errors ['constructors_call_new.py:82: error: "__new__" must return a class instance (got "int | Class6")'] -Line 89: Unexpected errors ['constructors_call_new.py:89: error: Expression is of type "Class6", not "int | Class6"', 'constructors_call_new.py:89: error: Missing positional argument "x" in call to "Class6"'] +Line 40: Unexpected errors ['constructors_call_new.py:40: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class3") [misc]'] +Line 49: Unexpected errors ['constructors_call_new.py:49: error: Expression is of type "Class3", not "int" [misc]', 'constructors_call_new.py:49: error: Missing positional argument "x" in call to "Class3" [call-arg]'] +Line 57: Unexpected errors ['constructors_call_new.py:57: error: "__new__" must return a class instance (got "Class4 | Any") [misc]'] +Line 64: Unexpected errors ['constructors_call_new.py:64: error: Expression is of type "Class4", not "Class4 | Any" [misc]', 'constructors_call_new.py:64: error: Missing positional argument "x" in call to "Class4" [call-arg]'] +Line 76: Unexpected errors ['constructors_call_new.py:76: error: Expression is of type "Class5", not "Never" [misc]', 'constructors_call_new.py:76: error: Missing positional argument "x" in call to "Class5" [call-arg]'] +Line 82: Unexpected errors ['constructors_call_new.py:82: error: "__new__" must return a class instance (got "int | Class6") [misc]'] +Line 89: Unexpected errors ['constructors_call_new.py:89: error: Expression is of type "Class6", not "int | Class6" [misc]', 'constructors_call_new.py:89: error: Missing positional argument "x" in call to "Class6" [call-arg]'] """ output = """ -constructors_call_new.py:21: error: Argument 1 to "Class1" has incompatible type "float"; expected "int" -constructors_call_new.py:40: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class3") -constructors_call_new.py:49: error: Expression is of type "Class3", not "int" -constructors_call_new.py:49: error: Missing positional argument "x" in call to "Class3" -constructors_call_new.py:57: error: "__new__" must return a class instance (got "Class4 | Any") -constructors_call_new.py:64: error: Expression is of type "Class4", not "Class4 | Any" -constructors_call_new.py:64: error: Missing positional argument "x" in call to "Class4" -constructors_call_new.py:76: error: Expression is of type "Class5", not "Never" -constructors_call_new.py:76: error: Missing positional argument "x" in call to "Class5" -constructors_call_new.py:82: error: "__new__" must return a class instance (got "int | Class6") -constructors_call_new.py:89: error: Expression is of type "Class6", not "int | Class6" -constructors_call_new.py:89: error: Missing positional argument "x" in call to "Class6" +constructors_call_new.py:21: error: Argument 1 to "Class1" has incompatible type "float"; expected "int" [arg-type] +constructors_call_new.py:40: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class3") [misc] +constructors_call_new.py:49: error: Expression is of type "Class3", not "int" [misc] +constructors_call_new.py:49: error: Missing positional argument "x" in call to "Class3" [call-arg] +constructors_call_new.py:57: error: "__new__" must return a class instance (got "Class4 | Any") [misc] +constructors_call_new.py:64: error: Expression is of type "Class4", not "Class4 | Any" [misc] +constructors_call_new.py:64: error: Missing positional argument "x" in call to "Class4" [call-arg] +constructors_call_new.py:76: error: Expression is of type "Class5", not "Never" [misc] +constructors_call_new.py:76: error: Missing positional argument "x" in call to "Class5" [call-arg] +constructors_call_new.py:82: error: "__new__" must return a class instance (got "int | Class6") [misc] +constructors_call_new.py:89: error: Expression is of type "Class6", not "int | Class6" [misc] +constructors_call_new.py:89: error: Missing positional argument "x" in call to "Class6" [call-arg] """ diff --git a/conformance/results/zuban/constructors_call_type.toml b/conformance/results/zuban/constructors_call_type.toml index 27868a83..7ba57376 100644 --- a/conformance/results/zuban/constructors_call_type.toml +++ b/conformance/results/zuban/constructors_call_type.toml @@ -8,10 +8,10 @@ Line 30: Expected 1 errors Line 72: Expected 1 errors """ output = """ -constructors_call_type.py:40: error: Missing positional arguments "x", "y" in call to "Class2" -constructors_call_type.py:50: error: Missing positional arguments "x", "y" in call to "Class3" -constructors_call_type.py:59: error: Too many arguments for "Class4" -constructors_call_type.py:64: error: Too many arguments for "object" -constructors_call_type.py:81: error: Missing positional argument "y" in call to "Class2" -constructors_call_type.py:82: error: Argument 2 to "Class2" has incompatible type "int"; expected "str" +constructors_call_type.py:40: error: Missing positional arguments "x", "y" in call to "Class2" [call-arg] +constructors_call_type.py:50: error: Missing positional arguments "x", "y" in call to "Class3" [call-arg] +constructors_call_type.py:59: error: Too many arguments for "Class4" [call-arg] +constructors_call_type.py:64: error: Too many arguments for "object" [call-arg] +constructors_call_type.py:81: error: Missing positional argument "y" in call to "Class2" [call-arg] +constructors_call_type.py:82: error: Argument 2 to "Class2" has incompatible type "int"; expected "str" [arg-type] """ diff --git a/conformance/results/zuban/constructors_callable.toml b/conformance/results/zuban/constructors_callable.toml index 2bbc76b3..98e51560 100644 --- a/conformance/results/zuban/constructors_callable.toml +++ b/conformance/results/zuban/constructors_callable.toml @@ -9,51 +9,51 @@ conformance_automated = "Fail" errors_diff = """ Line 127: Expected 1 errors Line 144: Expected 1 errors -Line 73: Unexpected errors ['constructors_callable.py:73: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4")'] -Line 100: Unexpected errors ['constructors_callable.py:100: error: Expression is of type "Class5", not "Never"'] -Line 105: Unexpected errors ['constructors_callable.py:105: error: Expression is of type "Class5", not "Never"'] -Line 116: Unexpected errors ['constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6")'] -Line 126: Unexpected errors ['constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy"', 'constructors_callable.py:126: error: Missing positional argument "x" in call'] -Line 143: Unexpected errors ['constructors_callable.py:143: error: Expression is of type "Class6Any", not "Any"', 'constructors_callable.py:143: error: Missing positional argument "x" in call'] -Line 160: Unexpected errors ['constructors_callable.py:160: error: Need type annotation for "r7"'] -Line 164: Unexpected errors ['constructors_callable.py:164: error: Expression is of type "Class7[Any]", not "Class7[int]"'] -Line 165: Unexpected errors ['constructors_callable.py:165: error: Expression is of type "Class7[Any]", not "Class7[str]"', 'constructors_callable.py:165: error: Argument 1 has incompatible type "str"; expected "int"'] -Line 194: Unexpected errors ['constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T"', 'constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T"'] +Line 73: Unexpected errors ['constructors_callable.py:73: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") [misc]'] +Line 100: Unexpected errors ['constructors_callable.py:100: error: Expression is of type "Class5", not "Never" [misc]'] +Line 105: Unexpected errors ['constructors_callable.py:105: error: Expression is of type "Class5", not "Never" [misc]'] +Line 116: Unexpected errors ['constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc]'] +Line 126: Unexpected errors ['constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy" [misc]', 'constructors_callable.py:126: error: Missing positional argument "x" in call [call-arg]'] +Line 143: Unexpected errors ['constructors_callable.py:143: error: Expression is of type "Class6Any", not "Any" [misc]', 'constructors_callable.py:143: error: Missing positional argument "x" in call [call-arg]'] +Line 160: Unexpected errors ['constructors_callable.py:160: error: Need type annotation for "r7" [var-annotated]'] +Line 164: Unexpected errors ['constructors_callable.py:164: error: Expression is of type "Class7[Any]", not "Class7[int]" [misc]'] +Line 165: Unexpected errors ['constructors_callable.py:165: error: Expression is of type "Class7[Any]", not "Class7[str]" [misc]', 'constructors_callable.py:165: error: Argument 1 has incompatible type "str"; expected "int" [arg-type]'] +Line 194: Unexpected errors ['constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T" [list-item]', 'constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T" [list-item]'] """ output = """ constructors_callable.py:36: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class1" -constructors_callable.py:38: error: Missing positional argument "x" in call -constructors_callable.py:39: error: Unexpected keyword argument "y" +constructors_callable.py:38: error: Missing positional argument "x" in call [call-arg] +constructors_callable.py:39: error: Unexpected keyword argument "y" [call-arg] constructors_callable.py:49: note: Revealed type is "def () -> constructors_callable.Class2" -constructors_callable.py:51: error: Too many arguments +constructors_callable.py:51: error: Too many arguments [call-arg] constructors_callable.py:63: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class3" -constructors_callable.py:65: error: Missing positional argument "x" in call -constructors_callable.py:66: error: Unexpected keyword argument "y" -constructors_callable.py:67: error: Too many arguments -constructors_callable.py:73: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") +constructors_callable.py:65: error: Missing positional argument "x" in call [call-arg] +constructors_callable.py:66: error: Unexpected keyword argument "y" [call-arg] +constructors_callable.py:67: error: Too many arguments [call-arg] +constructors_callable.py:73: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") [misc] constructors_callable.py:77: note: Revealed type is "def (x: builtins.int) -> builtins.int" -constructors_callable.py:79: error: Missing positional argument "x" in call -constructors_callable.py:80: error: Unexpected keyword argument "y" +constructors_callable.py:79: error: Missing positional argument "x" in call [call-arg] +constructors_callable.py:80: error: Unexpected keyword argument "y" [call-arg] constructors_callable.py:97: note: Revealed type is "def (*args: Any, **kwargs: Any) -> constructors_callable.Class5" -constructors_callable.py:100: error: Expression is of type "Class5", not "Never" -constructors_callable.py:105: error: Expression is of type "Class5", not "Never" -constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") +constructors_callable.py:100: error: Expression is of type "Class5", not "Never" [misc] +constructors_callable.py:105: error: Expression is of type "Class5", not "Never" [misc] +constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc] constructors_callable.py:125: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6" -constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy" -constructors_callable.py:126: error: Missing positional argument "x" in call +constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy" [misc] +constructors_callable.py:126: error: Missing positional argument "x" in call [call-arg] constructors_callable.py:142: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6Any" -constructors_callable.py:143: error: Expression is of type "Class6Any", not "Any" -constructors_callable.py:143: error: Missing positional argument "x" in call -constructors_callable.py:160: error: Need type annotation for "r7" +constructors_callable.py:143: error: Expression is of type "Class6Any", not "Any" [misc] +constructors_callable.py:143: error: Missing positional argument "x" in call [call-arg] +constructors_callable.py:160: error: Need type annotation for "r7" [var-annotated] constructors_callable.py:162: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class7[Any]" -constructors_callable.py:164: error: Expression is of type "Class7[Any]", not "Class7[int]" -constructors_callable.py:165: error: Expression is of type "Class7[Any]", not "Class7[str]" -constructors_callable.py:165: error: Argument 1 has incompatible type "str"; expected "int" +constructors_callable.py:164: error: Expression is of type "Class7[Any]", not "Class7[int]" [misc] +constructors_callable.py:165: error: Expression is of type "Class7[Any]", not "Class7[str]" [misc] +constructors_callable.py:165: error: Argument 1 has incompatible type "str"; expected "int" [arg-type] constructors_callable.py:182: note: Revealed type is "def [T] (x: builtins.list[T], y: builtins.list[T]) -> constructors_callable.Class8[T]" -constructors_callable.py:184: error: List item 0 has incompatible type "str"; expected "int" +constructors_callable.py:184: error: List item 0 has incompatible type "str"; expected "int" [list-item] constructors_callable.py:193: note: Revealed type is "def (x: builtins.list[T], y: builtins.list[T]) -> constructors_callable.Class9" -constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T" -constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T" -constructors_callable.py:195: error: List item 0 has incompatible type "int"; expected "T" -constructors_callable.py:195: error: List item 0 has incompatible type "str"; expected "T" +constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T" [list-item] +constructors_callable.py:194: error: List item 0 has incompatible type "str"; expected "T" [list-item] +constructors_callable.py:195: error: List item 0 has incompatible type "int"; expected "T" [list-item] +constructors_callable.py:195: error: List item 0 has incompatible type "str"; expected "T" [list-item] """ diff --git a/conformance/results/zuban/dataclasses_final.toml b/conformance/results/zuban/dataclasses_final.toml index 637d07db..bbe33fd0 100644 --- a/conformance/results/zuban/dataclasses_final.toml +++ b/conformance/results/zuban/dataclasses_final.toml @@ -6,16 +6,16 @@ Doesn't support Final nested inside ClassVar. conformance_automated = "Fail" errors_diff = """ Line 27: Expected 1 errors -Line 16: Unexpected errors ['dataclasses_final.py:16: error: Final name must be initialized with a value'] -Line 18: Unexpected errors ['dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation'] -Line 24: Unexpected errors ['dataclasses_final.py:24: error: Expression is of type "Any", not "int"'] +Line 16: Unexpected errors ['dataclasses_final.py:16: error: Final name must be initialized with a value [misc]'] +Line 18: Unexpected errors ['dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation [misc]'] +Line 24: Unexpected errors ['dataclasses_final.py:24: error: Expression is of type "Any", not "int" [misc]'] """ output = """ -dataclasses_final.py:16: error: Final name must be initialized with a value -dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation -dataclasses_final.py:24: error: Expression is of type "Any", not "int" -dataclasses_final.py:35: error: Cannot assign to final attribute "final_no_default" -dataclasses_final.py:36: error: Cannot assign to final attribute "final_with_default" -dataclasses_final.py:37: error: Cannot assign to final attribute "final_no_default" -dataclasses_final.py:38: error: Cannot assign to final attribute "final_with_default" +dataclasses_final.py:16: error: Final name must be initialized with a value [misc] +dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation [misc] +dataclasses_final.py:24: error: Expression is of type "Any", not "int" [misc] +dataclasses_final.py:35: error: Cannot assign to final attribute "final_no_default" [misc] +dataclasses_final.py:36: error: Cannot assign to final attribute "final_with_default" [misc] +dataclasses_final.py:37: error: Cannot assign to final attribute "final_no_default" [misc] +dataclasses_final.py:38: error: Cannot assign to final attribute "final_with_default" [misc] """ diff --git a/conformance/results/zuban/dataclasses_frozen.toml b/conformance/results/zuban/dataclasses_frozen.toml index bd41573c..81262e63 100644 --- a/conformance/results/zuban/dataclasses_frozen.toml +++ b/conformance/results/zuban/dataclasses_frozen.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_frozen.py:16: error: Property "a" defined in "DC1" is read-only -dataclasses_frozen.py:17: error: Property "b" defined in "DC1" is read-only -dataclasses_frozen.py:23: error: Non-frozen dataclass cannot inherit from a frozen dataclass -dataclasses_frozen.py:33: error: Frozen dataclass cannot inherit from a non-frozen dataclass +dataclasses_frozen.py:16: error: Property "a" defined in "DC1" is read-only [misc] +dataclasses_frozen.py:17: error: Property "b" defined in "DC1" is read-only [misc] +dataclasses_frozen.py:23: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc] +dataclasses_frozen.py:33: error: Frozen dataclass cannot inherit from a non-frozen dataclass [misc] """ diff --git a/conformance/results/zuban/dataclasses_inheritance.toml b/conformance/results/zuban/dataclasses_inheritance.toml index 8ca15412..3baad3e3 100644 --- a/conformance/results/zuban/dataclasses_inheritance.toml +++ b/conformance/results/zuban/dataclasses_inheritance.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_inheritance.py:62: error: Cannot override instance variable (previously declared on base class "DC6") with class variable -dataclasses_inheritance.py:66: error: Cannot override class variable (previously declared on base class "DC6") with instance variable +dataclasses_inheritance.py:62: error: Cannot override instance variable (previously declared on base class "DC6") with class variable [misc] +dataclasses_inheritance.py:66: error: Cannot override class variable (previously declared on base class "DC6") with instance variable [misc] """ diff --git a/conformance/results/zuban/dataclasses_kwonly.toml b/conformance/results/zuban/dataclasses_kwonly.toml index 9037fe42..88c32379 100644 --- a/conformance/results/zuban/dataclasses_kwonly.toml +++ b/conformance/results/zuban/dataclasses_kwonly.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_kwonly.py:23: error: Too many positional arguments for "DC1" -dataclasses_kwonly.py:38: error: Too many positional arguments for "DC2" -dataclasses_kwonly.py:53: error: Too many positional arguments for "DC3" +dataclasses_kwonly.py:23: error: Too many positional arguments for "DC1" [call-arg] +dataclasses_kwonly.py:38: error: Too many positional arguments for "DC2" [call-arg] +dataclasses_kwonly.py:53: error: Too many positional arguments for "DC3" [call-arg] """ diff --git a/conformance/results/zuban/dataclasses_match_args.toml b/conformance/results/zuban/dataclasses_match_args.toml index 28af5c88..9a707d05 100644 --- a/conformance/results/zuban/dataclasses_match_args.toml +++ b/conformance/results/zuban/dataclasses_match_args.toml @@ -3,5 +3,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_match_args.py:42: error: "Type[DC4]" has no attribute "__match_args__" +dataclasses_match_args.py:42: error: "Type[DC4]" has no attribute "__match_args__" [attr-defined] """ diff --git a/conformance/results/zuban/dataclasses_order.toml b/conformance/results/zuban/dataclasses_order.toml index 52acf197..712ba3e1 100644 --- a/conformance/results/zuban/dataclasses_order.toml +++ b/conformance/results/zuban/dataclasses_order.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_order.py:50: error: Unsupported operand types for < ("DC1" and "DC2") +dataclasses_order.py:50: error: Unsupported operand types for < ("DC1" and "DC2") [operator] """ diff --git a/conformance/results/zuban/dataclasses_postinit.toml b/conformance/results/zuban/dataclasses_postinit.toml index 2f08fcab..cd08f520 100644 --- a/conformance/results/zuban/dataclasses_postinit.toml +++ b/conformance/results/zuban/dataclasses_postinit.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_postinit.py:19: error: Argument 2 of "__post_init__" is incompatible with supertype "dataclass"; supertype defines the argument type as "str" -dataclasses_postinit.py:28: error: "DC1" has no attribute "x" -dataclasses_postinit.py:29: error: "DC1" has no attribute "y" -dataclasses_postinit.py:36: error: Signature of "__post_init__" incompatible with supertype "dataclass" +dataclasses_postinit.py:19: error: Argument 2 of "__post_init__" is incompatible with supertype "dataclass"; supertype defines the argument type as "str" [override] +dataclasses_postinit.py:28: error: "DC1" has no attribute "x" [attr-defined] +dataclasses_postinit.py:29: error: "DC1" has no attribute "y" [attr-defined] +dataclasses_postinit.py:36: error: Signature of "__post_init__" incompatible with supertype "dataclass" [override] dataclasses_postinit.py:36: note: Superclass: dataclasses_postinit.py:36: note: def __post_init__(self, x: int, y: str) -> None dataclasses_postinit.py:36: note: Subclass: diff --git a/conformance/results/zuban/dataclasses_slots.toml b/conformance/results/zuban/dataclasses_slots.toml index 9c236711..9d9413f9 100644 --- a/conformance/results/zuban/dataclasses_slots.toml +++ b/conformance/results/zuban/dataclasses_slots.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 25: Expected 1 errors """ output = """ -dataclasses_slots.py:11: error: "DC1" both defines "__slots__" and is used with "slots=True" -dataclasses_slots.py:38: error: Trying to assign name "y" that is not in "__slots__" of type "dataclasses_slots.DC3" -dataclasses_slots.py:66: error: "Type[DC6]" has no attribute "__slots__" -dataclasses_slots.py:69: error: "DC6" has no attribute "__slots__" +dataclasses_slots.py:11: error: "DC1" both defines "__slots__" and is used with "slots=True" [misc] +dataclasses_slots.py:38: error: Trying to assign name "y" that is not in "__slots__" of type "dataclasses_slots.DC3" [misc] +dataclasses_slots.py:66: error: "Type[DC6]" has no attribute "__slots__" [attr-defined] +dataclasses_slots.py:69: error: "DC6" has no attribute "__slots__" [attr-defined] """ diff --git a/conformance/results/zuban/dataclasses_transform_class.toml b/conformance/results/zuban/dataclasses_transform_class.toml index 8aeb303e..e007f590 100644 --- a/conformance/results/zuban/dataclasses_transform_class.toml +++ b/conformance/results/zuban/dataclasses_transform_class.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_transform_class.py:51: error: Non-frozen dataclass cannot inherit from a frozen dataclass -dataclasses_transform_class.py:63: error: Property "id" defined in "Customer1" is read-only -dataclasses_transform_class.py:66: error: Too many positional arguments for "Customer1" -dataclasses_transform_class.py:72: error: Unsupported left operand type for < ("Customer1") -dataclasses_transform_class.py:82: error: Too many positional arguments for "Customer2" -dataclasses_transform_class.py:122: error: Property "id" defined in "Customer3" is read-only +dataclasses_transform_class.py:51: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc] +dataclasses_transform_class.py:63: error: Property "id" defined in "Customer1" is read-only [misc] +dataclasses_transform_class.py:66: error: Too many positional arguments for "Customer1" [call-arg] +dataclasses_transform_class.py:72: error: Unsupported left operand type for < ("Customer1") [operator] +dataclasses_transform_class.py:82: error: Too many positional arguments for "Customer2" [call-arg] +dataclasses_transform_class.py:122: error: Property "id" defined in "Customer3" is read-only [misc] """ diff --git a/conformance/results/zuban/dataclasses_transform_converter.toml b/conformance/results/zuban/dataclasses_transform_converter.toml index 32952f2a..6e1b3c83 100644 --- a/conformance/results/zuban/dataclasses_transform_converter.toml +++ b/conformance/results/zuban/dataclasses_transform_converter.toml @@ -5,46 +5,46 @@ Converter parameter not yet supported. conformance_automated = "Fail" errors_diff = """ Line 118: Expected 1 errors -Line 104: Unexpected errors ['dataclasses_transform_converter.py:104: error: Incompatible callable argument with type vars'] -Line 112: Unexpected errors ['dataclasses_transform_converter.py:112: error: Argument 1 to "DC2" has incompatible type "str"; expected "int"', 'dataclasses_transform_converter.py:112: error: Argument 2 to "DC2" has incompatible type "str"; expected "int"', 'dataclasses_transform_converter.py:112: error: Argument 3 to "DC2" has incompatible type "str"; expected "int"', 'dataclasses_transform_converter.py:112: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass"', 'dataclasses_transform_converter.py:112: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int"'] -Line 114: Unexpected errors ['dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "int")'] -Line 115: Unexpected errors ['dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass")'] -Line 116: Unexpected errors ['dataclasses_transform_converter.py:116: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass")'] -Line 121: Unexpected errors ['dataclasses_transform_converter.py:121: error: Argument 1 to "DC2" has incompatible type "str"; expected "int"', 'dataclasses_transform_converter.py:121: error: Argument 2 to "DC2" has incompatible type "str"; expected "int"', 'dataclasses_transform_converter.py:121: error: Argument 3 to "DC2" has incompatible type "str"; expected "int"', 'dataclasses_transform_converter.py:121: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass"', 'dataclasses_transform_converter.py:121: error: Argument 5 to "DC2" has incompatible type "str"; expected "int"', 'dataclasses_transform_converter.py:121: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]"'] +Line 104: Unexpected errors ['dataclasses_transform_converter.py:104: error: Incompatible callable argument with type vars [arg-type]'] +Line 112: Unexpected errors ['dataclasses_transform_converter.py:112: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]'] +Line 114: Unexpected errors ['dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]'] +Line 115: Unexpected errors ['dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass") [assignment]'] +Line 116: Unexpected errors ['dataclasses_transform_converter.py:116: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass") [assignment]'] +Line 121: Unexpected errors ['dataclasses_transform_converter.py:121: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 5 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]" [arg-type]'] """ output = """ -dataclasses_transform_converter.py:48: error: Argument "converter" to "model_field" has incompatible type "Callable[[], int]"; expected "Callable[[Never], int]" -dataclasses_transform_converter.py:49: error: Argument "converter" to "model_field" has incompatible type "Callable[[NamedArg(int, 'x')], int]"; expected "Callable[[Never], int]" -dataclasses_transform_converter.py:104: error: Incompatible callable argument with type vars -dataclasses_transform_converter.py:107: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:107: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:107: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" -dataclasses_transform_converter.py:107: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" -dataclasses_transform_converter.py:108: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:108: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:108: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:108: error: Argument 4 to "DC2" has incompatible type "int"; expected "ConverterClass" -dataclasses_transform_converter.py:108: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" -dataclasses_transform_converter.py:109: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:109: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:109: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:109: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" -dataclasses_transform_converter.py:109: error: Argument 5 to "DC2" has incompatible type "complex"; expected "int" -dataclasses_transform_converter.py:112: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:112: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:112: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:112: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" -dataclasses_transform_converter.py:112: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" -dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "int") -dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass") -dataclasses_transform_converter.py:116: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass") -dataclasses_transform_converter.py:119: error: Incompatible types in assignment (expression has type "int", variable has type "ConverterClass") -dataclasses_transform_converter.py:121: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:121: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:121: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:121: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" -dataclasses_transform_converter.py:121: error: Argument 5 to "DC2" has incompatible type "str"; expected "int" -dataclasses_transform_converter.py:121: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]" -dataclasses_transform_converter.py:130: error: Argument "default" to "model_field" has incompatible type "int"; expected "str | None" -dataclasses_transform_converter.py:133: error: Argument "default_factory" to "model_field" has incompatible type "Type[int]"; expected "Callable[[], str] | None" +dataclasses_transform_converter.py:48: error: Argument "converter" to "model_field" has incompatible type "Callable[[], int]"; expected "Callable[[Never], int]" [arg-type] +dataclasses_transform_converter.py:49: error: Argument "converter" to "model_field" has incompatible type "Callable[[NamedArg(int, 'x')], int]"; expected "Callable[[Never], int]" [arg-type] +dataclasses_transform_converter.py:104: error: Incompatible callable argument with type vars [arg-type] +dataclasses_transform_converter.py:107: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:107: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:107: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type] +dataclasses_transform_converter.py:107: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type] +dataclasses_transform_converter.py:108: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:108: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:108: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:108: error: Argument 4 to "DC2" has incompatible type "int"; expected "ConverterClass" [arg-type] +dataclasses_transform_converter.py:108: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type] +dataclasses_transform_converter.py:109: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:109: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:109: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:109: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type] +dataclasses_transform_converter.py:109: error: Argument 5 to "DC2" has incompatible type "complex"; expected "int" [arg-type] +dataclasses_transform_converter.py:112: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:112: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:112: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:112: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type] +dataclasses_transform_converter.py:112: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type] +dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass") [assignment] +dataclasses_transform_converter.py:116: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass") [assignment] +dataclasses_transform_converter.py:119: error: Incompatible types in assignment (expression has type "int", variable has type "ConverterClass") [assignment] +dataclasses_transform_converter.py:121: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:121: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:121: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:121: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type] +dataclasses_transform_converter.py:121: error: Argument 5 to "DC2" has incompatible type "str"; expected "int" [arg-type] +dataclasses_transform_converter.py:121: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]" [arg-type] +dataclasses_transform_converter.py:130: error: Argument "default" to "model_field" has incompatible type "int"; expected "str | None" [arg-type] +dataclasses_transform_converter.py:133: error: Argument "default_factory" to "model_field" has incompatible type "Type[int]"; expected "Callable[[], str] | None" [arg-type] """ diff --git a/conformance/results/zuban/dataclasses_transform_field.toml b/conformance/results/zuban/dataclasses_transform_field.toml index 26b9ea8c..90f98c55 100644 --- a/conformance/results/zuban/dataclasses_transform_field.toml +++ b/conformance/results/zuban/dataclasses_transform_field.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_transform_field.py:64: error: Unexpected keyword argument "id" for "CustomerModel1" -dataclasses_transform_field.py:75: error: Too many positional arguments for "CustomerModel2" +dataclasses_transform_field.py:64: error: Unexpected keyword argument "id" for "CustomerModel1" [call-arg] +dataclasses_transform_field.py:75: error: Too many positional arguments for "CustomerModel2" [call-arg] """ diff --git a/conformance/results/zuban/dataclasses_transform_func.toml b/conformance/results/zuban/dataclasses_transform_func.toml index 9bd8738f..4ebe3538 100644 --- a/conformance/results/zuban/dataclasses_transform_func.toml +++ b/conformance/results/zuban/dataclasses_transform_func.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_transform_func.py:56: error: Incompatible types in assignment (expression has type "int", variable has type "str") -dataclasses_transform_func.py:60: error: Unsupported left operand type for < ("Customer1") -dataclasses_transform_func.py:64: error: Unexpected keyword argument "salary" for "Customer1" -dataclasses_transform_func.py:70: error: Too many positional arguments for "Customer2" -dataclasses_transform_func.py:89: error: Non-frozen dataclass cannot inherit from a frozen dataclass -dataclasses_transform_func.py:96: error: Property "id" defined in "Customer3" is read-only +dataclasses_transform_func.py:56: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] +dataclasses_transform_func.py:60: error: Unsupported left operand type for < ("Customer1") [operator] +dataclasses_transform_func.py:64: error: Unexpected keyword argument "salary" for "Customer1" [call-arg] +dataclasses_transform_func.py:70: error: Too many positional arguments for "Customer2" [call-arg] +dataclasses_transform_func.py:89: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc] +dataclasses_transform_func.py:96: error: Property "id" defined in "Customer3" is read-only [misc] """ diff --git a/conformance/results/zuban/dataclasses_transform_meta.toml b/conformance/results/zuban/dataclasses_transform_meta.toml index 91a673e7..f19fbfd8 100644 --- a/conformance/results/zuban/dataclasses_transform_meta.toml +++ b/conformance/results/zuban/dataclasses_transform_meta.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_transform_meta.py:51: error: Non-frozen dataclass cannot inherit from a frozen dataclass -dataclasses_transform_meta.py:63: error: Property "id" defined in "Customer1" is read-only -dataclasses_transform_meta.py:66: error: Too many positional arguments for "Customer1" -dataclasses_transform_meta.py:73: error: Unsupported left operand type for < ("Customer1") -dataclasses_transform_meta.py:83: error: Too many positional arguments for "Customer2" -dataclasses_transform_meta.py:103: error: Property "id" defined in "Customer3" is read-only +dataclasses_transform_meta.py:51: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc] +dataclasses_transform_meta.py:63: error: Property "id" defined in "Customer1" is read-only [misc] +dataclasses_transform_meta.py:66: error: Too many positional arguments for "Customer1" [call-arg] +dataclasses_transform_meta.py:73: error: Unsupported left operand type for < ("Customer1") [operator] +dataclasses_transform_meta.py:83: error: Too many positional arguments for "Customer2" [call-arg] +dataclasses_transform_meta.py:103: error: Property "id" defined in "Customer3" is read-only [misc] """ diff --git a/conformance/results/zuban/dataclasses_usage.toml b/conformance/results/zuban/dataclasses_usage.toml index 657b3029..42fae589 100644 --- a/conformance/results/zuban/dataclasses_usage.toml +++ b/conformance/results/zuban/dataclasses_usage.toml @@ -2,15 +2,15 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -dataclasses_usage.py:50: error: Missing positional argument "unit_price" in call to "InventoryItem" -dataclasses_usage.py:51: error: Argument 2 to "InventoryItem" has incompatible type "str"; expected "float" -dataclasses_usage.py:52: error: Too many arguments for "InventoryItem" -dataclasses_usage.py:61: error: Attributes without a default cannot follow attributes with one -dataclasses_usage.py:67: error: Attributes without a default cannot follow attributes with one -dataclasses_usage.py:73: error: Attributes without a default cannot follow attributes with one -dataclasses_usage.py:83: error: Too many arguments for "DC4" -dataclasses_usage.py:88: error: Argument "default_factory" to "field" has incompatible type "Type[str]"; expected "Callable[[], int]" -dataclasses_usage.py:127: error: Too many arguments for "DC7" -dataclasses_usage.py:130: error: Missing positional argument "y" in call to "DC8" -dataclasses_usage.py:179: error: Too many arguments for "DC13" +dataclasses_usage.py:50: error: Missing positional argument "unit_price" in call to "InventoryItem" [call-arg] +dataclasses_usage.py:51: error: Argument 2 to "InventoryItem" has incompatible type "str"; expected "float" [arg-type] +dataclasses_usage.py:52: error: Too many arguments for "InventoryItem" [call-arg] +dataclasses_usage.py:61: error: Attributes without a default cannot follow attributes with one [misc] +dataclasses_usage.py:67: error: Attributes without a default cannot follow attributes with one [misc] +dataclasses_usage.py:73: error: Attributes without a default cannot follow attributes with one [misc] +dataclasses_usage.py:83: error: Too many arguments for "DC4" [call-arg] +dataclasses_usage.py:88: error: Argument "default_factory" to "field" has incompatible type "Type[str]"; expected "Callable[[], int]" [arg-type] +dataclasses_usage.py:127: error: Too many arguments for "DC7" [call-arg] +dataclasses_usage.py:130: error: Missing positional argument "y" in call to "DC8" [call-arg] +dataclasses_usage.py:179: error: Too many arguments for "DC13" [call-arg] """ diff --git a/conformance/results/zuban/directives_assert_type.toml b/conformance/results/zuban/directives_assert_type.toml index cb5f42c9..15ed60cb 100644 --- a/conformance/results/zuban/directives_assert_type.toml +++ b/conformance/results/zuban/directives_assert_type.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -directives_assert_type.py:27: error: Expression is of type "int | str", not "int" -directives_assert_type.py:28: error: Expression is of type "Any", not "int" -directives_assert_type.py:29: error: Expression is of type "Literal[4]", not "int" -directives_assert_type.py:31: error: "assert_type" expects 2 arguments -directives_assert_type.py:32: error: Expression is of type "Literal['']", not "int" -directives_assert_type.py:33: error: "assert_type" expects 2 arguments +directives_assert_type.py:27: error: Expression is of type "int | str", not "int" [misc] +directives_assert_type.py:28: error: Expression is of type "Any", not "int" [misc] +directives_assert_type.py:29: error: Expression is of type "Literal[4]", not "int" [misc] +directives_assert_type.py:31: error: "assert_type" expects 2 arguments [call-arg] +directives_assert_type.py:32: error: Expression is of type "Literal['']", not "int" [misc] +directives_assert_type.py:33: error: "assert_type" expects 2 arguments [call-arg] """ diff --git a/conformance/results/zuban/directives_cast.toml b/conformance/results/zuban/directives_cast.toml index 2929dc71..5f062456 100644 --- a/conformance/results/zuban/directives_cast.toml +++ b/conformance/results/zuban/directives_cast.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -directives_cast.py:15: error: "cast" expects 2 arguments -directives_cast.py:16: error: Invalid type: try using Literal[1] instead? -directives_cast.py:17: error: "cast" expects 2 arguments +directives_cast.py:15: error: "cast" expects 2 arguments [call-arg] +directives_cast.py:16: error: Invalid type: try using Literal[1] instead? [valid-type] +directives_cast.py:17: error: "cast" expects 2 arguments [call-arg] """ diff --git a/conformance/results/zuban/directives_no_type_check.toml b/conformance/results/zuban/directives_no_type_check.toml index ffa3b903..722db58b 100644 --- a/conformance/results/zuban/directives_no_type_check.toml +++ b/conformance/results/zuban/directives_no_type_check.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -directives_no_type_check.py:15: error: Incompatible types in assignment (expression has type "str", variable has type "int") -directives_no_type_check.py:32: error: Missing positional arguments "a", "b" in call to "func1" +directives_no_type_check.py:15: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +directives_no_type_check.py:32: error: Missing positional arguments "a", "b" in call to "func1" [call-arg] """ diff --git a/conformance/results/zuban/directives_reveal_type.toml b/conformance/results/zuban/directives_reveal_type.toml index ca00eb92..753a0a2a 100644 --- a/conformance/results/zuban/directives_reveal_type.toml +++ b/conformance/results/zuban/directives_reveal_type.toml @@ -6,6 +6,6 @@ directives_reveal_type.py:14: note: Revealed type is "builtins.int | builtins.st directives_reveal_type.py:15: note: Revealed type is "builtins.list[builtins.int]" directives_reveal_type.py:16: note: Revealed type is "Any" directives_reveal_type.py:17: note: Revealed type is "directives_reveal_type.ForwardReference" -directives_reveal_type.py:19: error: Too few arguments for "reveal_type" -directives_reveal_type.py:20: error: Too many arguments for "reveal_type" +directives_reveal_type.py:19: error: Too few arguments for "reveal_type" [call-arg] +directives_reveal_type.py:20: error: Too many arguments for "reveal_type" [call-arg] """ diff --git a/conformance/results/zuban/directives_type_ignore.toml b/conformance/results/zuban/directives_type_ignore.toml index 4de75bae..7f7a32e7 100644 --- a/conformance/results/zuban/directives_type_ignore.toml +++ b/conformance/results/zuban/directives_type_ignore.toml @@ -4,11 +4,11 @@ Does not honor "# type: ignore" comment if comment includes additional text. """ conformance_automated = "Fail" errors_diff = """ -Line 11: Unexpected errors ['directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int")'] -Line 14: Unexpected errors ['directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int")'] +Line 11: Unexpected errors ['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]'] """ output = """ -directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") -directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") +directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +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 """ diff --git a/conformance/results/zuban/directives_type_ignore_file2.toml b/conformance/results/zuban/directives_type_ignore_file2.toml index 8a3521e9..afe027f9 100644 --- a/conformance/results/zuban/directives_type_ignore_file2.toml +++ b/conformance/results/zuban/directives_type_ignore_file2.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -directives_type_ignore_file2.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") +directives_type_ignore_file2.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] """ diff --git a/conformance/results/zuban/directives_version_platform.toml b/conformance/results/zuban/directives_version_platform.toml index 01082d4b..dd33e2be 100644 --- a/conformance/results/zuban/directives_version_platform.toml +++ b/conformance/results/zuban/directives_version_platform.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -directives_version_platform.py:19: error: Incompatible types in assignment (expression has type "str", variable has type "int") -directives_version_platform.py:27: error: Incompatible types in assignment (expression has type "str", variable has type "int") -directives_version_platform.py:40: error: Incompatible types in assignment (expression has type "str", variable has type "int") -directives_version_platform.py:45: error: Incompatible types in assignment (expression has type "str", variable has type "int") +directives_version_platform.py:19: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +directives_version_platform.py:27: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +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] """ diff --git a/conformance/results/zuban/enums_behaviors.toml b/conformance/results/zuban/enums_behaviors.toml index 1328d68a..cf90125a 100644 --- a/conformance/results/zuban/enums_behaviors.toml +++ b/conformance/results/zuban/enums_behaviors.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -enums_behaviors.py:28: error: Expression is of type "Color", not "Literal[Color.RED]" -enums_behaviors.py:32: error: Expression is of type "Color", not "Literal[Color.BLUE]" -enums_behaviors.py:44: error: Cannot extend enum with existing members: "Shape" +enums_behaviors.py:28: error: Expression is of type "Color", not "Literal[Color.RED]" [misc] +enums_behaviors.py:32: error: Expression is of type "Color", not "Literal[Color.BLUE]" [misc] +enums_behaviors.py:44: error: Cannot extend enum with existing members: "Shape" [misc] """ diff --git a/conformance/results/zuban/enums_definition.toml b/conformance/results/zuban/enums_definition.toml index 5fd9eb7c..a98bcdae 100644 --- a/conformance/results/zuban/enums_definition.toml +++ b/conformance/results/zuban/enums_definition.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -enums_definition.py:24: error: Too many arguments for Enum() +enums_definition.py:24: error: Too many arguments for Enum() [call-arg] """ diff --git a/conformance/results/zuban/enums_expansion.toml b/conformance/results/zuban/enums_expansion.toml index aac06a24..44138b03 100644 --- a/conformance/results/zuban/enums_expansion.toml +++ b/conformance/results/zuban/enums_expansion.toml @@ -5,9 +5,9 @@ Improperly applies narrowing to Flag subclass. conformance_automated = "Fail" errors_diff = """ Line 53: Expected 1 errors -Line 52: Unexpected errors ['enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags"'] +Line 52: Unexpected errors ['enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [misc]'] """ output = """ -enums_expansion.py:35: error: Expression is of type "Color", not "Never" -enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" +enums_expansion.py:35: error: Expression is of type "Color", not "Never" [misc] +enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [misc] """ diff --git a/conformance/results/zuban/enums_member_names.toml b/conformance/results/zuban/enums_member_names.toml index 7026fbd7..f22302d4 100644 --- a/conformance/results/zuban/enums_member_names.toml +++ b/conformance/results/zuban/enums_member_names.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -enums_member_names.py:30: error: Expression is of type "str", not "Literal['RED', 'BLUE', 'GREEN']" +enums_member_names.py:30: error: Expression is of type "str", not "Literal['RED', 'BLUE', 'GREEN']" [misc] """ diff --git a/conformance/results/zuban/enums_member_values.toml b/conformance/results/zuban/enums_member_values.toml index 0898b966..95ead33c 100644 --- a/conformance/results/zuban/enums_member_values.toml +++ b/conformance/results/zuban/enums_member_values.toml @@ -7,8 +7,8 @@ errors_diff = """ Line 78: Expected 1 errors """ output = """ -enums_member_values.py:54: error: Expression is of type "tuple[Literal[1], float, float]", not "Literal[1]" -enums_member_values.py:68: error: Expression is of type "int", not "Literal[1]" -enums_member_values.py:85: error: Incompatible types in assignment (expression has type "int", variable has type "str") -enums_member_values.py:96: error: Expression is of type "EllipsisType", not "int" +enums_member_values.py:54: error: Expression is of type "tuple[Literal[1], float, float]", not "Literal[1]" [misc] +enums_member_values.py:68: error: Expression is of type "int", not "Literal[1]" [misc] +enums_member_values.py:85: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] +enums_member_values.py:96: error: Expression is of type "EllipsisType", not "int" [misc] """ diff --git a/conformance/results/zuban/enums_members.toml b/conformance/results/zuban/enums_members.toml index a9c41a46..991c40eb 100644 --- a/conformance/results/zuban/enums_members.toml +++ b/conformance/results/zuban/enums_members.toml @@ -9,22 +9,22 @@ errors_diff = """ Line 82: Expected 1 errors Line 83: Expected 1 errors Line 116: Expected 1 errors -Line 35: Unexpected errors ['enums_members.py:35: error: Expression is of type "Literal[Pet2.genus]", not "str"'] -Line 36: Unexpected errors ['enums_members.py:36: error: Expression is of type "Literal[Pet2.species]", not "str"'] -Line 100: Unexpected errors ['enums_members.py:100: error: Expression is of type "Literal[TrafficLight.AMBER]", not "Literal[TrafficLight.YELLOW]"'] -Line 117: Unexpected errors ['enums_members.py:117: error: Parameter 1 of Literal[...] is invalid'] +Line 35: Unexpected errors ['enums_members.py:35: error: Expression is of type "Literal[Pet2.genus]", not "str" [misc]'] +Line 36: Unexpected errors ['enums_members.py:36: error: Expression is of type "Literal[Pet2.species]", not "str" [misc]'] +Line 100: Unexpected errors ['enums_members.py:100: error: Expression is of type "Literal[TrafficLight.AMBER]", not "Literal[TrafficLight.YELLOW]" [misc]'] +Line 117: Unexpected errors ['enums_members.py:117: error: Parameter 1 of Literal[...] is invalid [valid-type]'] """ output = """ -enums_members.py:35: error: Expression is of type "Literal[Pet2.genus]", not "str" -enums_members.py:36: error: Expression is of type "Literal[Pet2.species]", not "str" -enums_members.py:50: error: Enum members must be left unannotated +enums_members.py:35: error: Expression is of type "Literal[Pet2.genus]", not "str" [misc] +enums_members.py:36: error: Expression is of type "Literal[Pet2.species]", not "str" [misc] +enums_members.py:50: error: Enum members must be left unannotated [misc] enums_members.py:50: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members -enums_members.py:84: error: Parameter 1 of Literal[...] is invalid -enums_members.py:85: error: Parameter 1 of Literal[...] is invalid -enums_members.py:100: error: Expression is of type "Literal[TrafficLight.AMBER]", not "Literal[TrafficLight.YELLOW]" -enums_members.py:117: error: Parameter 1 of Literal[...] is invalid +enums_members.py:84: error: Parameter 1 of Literal[...] is invalid [valid-type] +enums_members.py:85: error: Parameter 1 of Literal[...] is invalid [valid-type] +enums_members.py:100: error: Expression is of type "Literal[TrafficLight.AMBER]", not "Literal[TrafficLight.YELLOW]" [misc] +enums_members.py:117: error: Parameter 1 of Literal[...] is invalid [valid-type] enums_members.py:128: note: Revealed type is "builtins.int" -enums_members.py:129: error: Parameter 1 of Literal[...] is invalid -enums_members.py:146: error: Expression is of type "Literal[Pet5.DOG]", not "int" -enums_members.py:147: error: Expression is of type "Literal[Pet5.FISH]", not "int" +enums_members.py:129: error: Parameter 1 of Literal[...] is invalid [valid-type] +enums_members.py:146: error: Expression is of type "Literal[Pet5.DOG]", not "int" [misc] +enums_members.py:147: error: Expression is of type "Literal[Pet5.FISH]", not "int" [misc] """ diff --git a/conformance/results/zuban/generics_base_class.toml b/conformance/results/zuban/generics_base_class.toml index 486fb5e8..81a4e00e 100644 --- a/conformance/results/zuban/generics_base_class.toml +++ b/conformance/results/zuban/generics_base_class.toml @@ -5,14 +5,14 @@ Does not detect inconsistent type variable ordering in multi-inheritance. conformance_automated = "Fail" errors_diff = """ Line 98: Expected 1 errors -Line 38: Unexpected errors ['generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "Type[Iterable]"'] +Line 38: Unexpected errors ['generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "Type[Iterable]" [misc]'] """ output = """ -generics_base_class.py:26: error: Argument 1 to "takes_dict_incorrect" has incompatible type "SymbolTable"; expected "dict[str, list[object]]" -generics_base_class.py:29: error: Invalid type -generics_base_class.py:30: error: Invalid type -generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "Type[Iterable]" -generics_base_class.py:49: error: "LinkedList" expects 1 type argument, but 2 given -generics_base_class.py:61: error: "MyDict" expects 1 type argument, but 2 given -generics_base_class.py:68: error: Duplicate type variables in Generic[...] or Protocol[...] +generics_base_class.py:26: error: Argument 1 to "takes_dict_incorrect" has incompatible type "SymbolTable"; expected "dict[str, list[object]]" [arg-type] +generics_base_class.py:29: error: Invalid type [valid-type] +generics_base_class.py:30: error: Invalid type [valid-type] +generics_base_class.py:38: error: Can only assign concrete classes to a variable of type "Type[Iterable]" [misc] +generics_base_class.py:49: error: "LinkedList" expects 1 type argument, but 2 given [type-arg] +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] """ diff --git a/conformance/results/zuban/generics_basic.toml b/conformance/results/zuban/generics_basic.toml index db0b02d3..707f3c78 100644 --- a/conformance/results/zuban/generics_basic.toml +++ b/conformance/results/zuban/generics_basic.toml @@ -2,17 +2,17 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_basic.py:40: error: Argument 2 to "concat" has incompatible type "bytes"; expected "str" -generics_basic.py:41: error: Argument 2 to "concat" has incompatible type "str"; expected "bytes" -generics_basic.py:49: error: Type variable must have at least two constrained types -generics_basic.py:55: error: TypeVar constraint type cannot be parametrized by type variables -generics_basic.py:69: error: Argument 2 to "concat" has incompatible type "bytes"; expected "str" -generics_basic.py:121: error: Duplicate type variables in Generic[...] or Protocol[...] -generics_basic.py:157: error: Invalid index type "int" for "MyMap1[str, int]"; expected type "str" -generics_basic.py:158: error: Invalid index type "int" for "MyMap2[int, str]"; expected type "str" -generics_basic.py:162: error: Free type variable expected in Generic[...] -generics_basic.py:163: error: Free type variable expected in Protocol[...] -generics_basic.py:171: error: If Generic[...] or Protocol[...] is present it should list all type variables -generics_basic.py:172: error: If Generic[...] or Protocol[...] is present it should list all type variables -generics_basic.py:208: error: Invalid metaclass "GenericMeta[T]" +generics_basic.py:40: error: Argument 2 to "concat" has incompatible type "bytes"; expected "str" [arg-type] +generics_basic.py:41: error: Argument 2 to "concat" has incompatible type "str"; expected "bytes" [arg-type] +generics_basic.py:49: error: Type variable must have at least two constrained types [misc] +generics_basic.py:55: error: TypeVar constraint type cannot be parametrized by type variables [misc] +generics_basic.py:69: error: Argument 2 to "concat" has incompatible type "bytes"; expected "str" [arg-type] +generics_basic.py:121: error: Duplicate type variables in Generic[...] or Protocol[...] [misc] +generics_basic.py:157: error: Invalid index type "int" for "MyMap1[str, int]"; expected type "str" [index] +generics_basic.py:158: error: Invalid index type "int" for "MyMap2[int, str]"; expected type "str" [index] +generics_basic.py:162: error: Free type variable expected in Generic[...] [misc] +generics_basic.py:163: error: Free type variable expected in Protocol[...] [misc] +generics_basic.py:171: error: If Generic[...] or Protocol[...] is present it should list all type variables [misc] +generics_basic.py:172: error: If Generic[...] or Protocol[...] is present it should list all type variables [misc] +generics_basic.py:208: error: Invalid metaclass "GenericMeta[T]" [misc] """ diff --git a/conformance/results/zuban/generics_defaults.toml b/conformance/results/zuban/generics_defaults.toml index f5465474..63d7f7d8 100644 --- a/conformance/results/zuban/generics_defaults.toml +++ b/conformance/results/zuban/generics_defaults.toml @@ -7,17 +7,17 @@ ParamSpec after TypeVarTuple is not always handled correctly conformance_automated = "Fail" errors_diff = """ Line 141: Expected 1 errors -Line 154: Unexpected errors ['generics_defaults.py:154: error: Expression is of type "Type[Foo6[int, [*Any, **Any]]]", not "Type[Foo6[int, str, [float, bool]]]"', 'generics_defaults.py:154: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str"'] -Line 169: Unexpected errors ['generics_defaults.py:169: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]"'] -Line 170: Unexpected errors ['generics_defaults.py:170: error: Access to generic instance variables via class is ambiguous'] +Line 154: Unexpected errors ['generics_defaults.py:154: error: Expression is of type "Type[Foo6[int, [*Any, **Any]]]", not "Type[Foo6[int, str, [float, bool]]]" [misc]', 'generics_defaults.py:154: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]'] +Line 169: Unexpected errors ['generics_defaults.py:169: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [misc]'] +Line 170: Unexpected errors ['generics_defaults.py:170: error: Access to generic instance variables via class is ambiguous [misc]'] """ output = """ -generics_defaults.py:24: error: "T" cannot appear after "DefaultStrT" in type parameter list because it has no default type -generics_defaults.py:50: error: "AllTheDefaults" expects between 2 and 5 type arguments, but 1 given -generics_defaults.py:107: error: TypeVar default must be a subtype of the bound type -generics_defaults.py:114: error: TypeVar default must be one of the constraint types -generics_defaults.py:154: error: Expression is of type "Type[Foo6[int, [*Any, **Any]]]", not "Type[Foo6[int, str, [float, bool]]]" -generics_defaults.py:154: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" -generics_defaults.py:169: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" -generics_defaults.py:170: error: Access to generic instance variables via class is ambiguous +generics_defaults.py:24: error: "T" cannot appear after "DefaultStrT" in type parameter list because it has no default type [misc] +generics_defaults.py:50: error: "AllTheDefaults" expects between 2 and 5 type arguments, but 1 given [type-arg] +generics_defaults.py:107: error: TypeVar default must be a subtype of the bound type [misc] +generics_defaults.py:114: error: TypeVar default must be one of the constraint types [misc] +generics_defaults.py:154: error: Expression is of type "Type[Foo6[int, [*Any, **Any]]]", not "Type[Foo6[int, str, [float, bool]]]" [misc] +generics_defaults.py:154: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc] +generics_defaults.py:169: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [misc] +generics_defaults.py:170: error: Access to generic instance variables via class is ambiguous [misc] """ diff --git a/conformance/results/zuban/generics_defaults_referential.toml b/conformance/results/zuban/generics_defaults_referential.toml index f5dc2636..874e3211 100644 --- a/conformance/results/zuban/generics_defaults_referential.toml +++ b/conformance/results/zuban/generics_defaults_referential.toml @@ -2,11 +2,11 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_defaults_referential.py:36: error: Argument 2 to "Foo" has incompatible type "str"; expected "int" -generics_defaults_referential.py:37: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" -generics_defaults_referential.py:53: error: Type parameter "Start2T" has a default type that refers to one or more type variables that are out of scope -generics_defaults_referential.py:60: error: Type parameter "S2" has a default type that refers to one or more type variables that are out of scope -generics_defaults_referential.py:68: error: TypeVar default must be a subtype of the bound type -generics_defaults_referential.py:74: error: TypeVar default must be one of the constraint types -generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types +generics_defaults_referential.py:36: error: Argument 2 to "Foo" has incompatible type "str"; expected "int" [arg-type] +generics_defaults_referential.py:37: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type] +generics_defaults_referential.py:53: error: Type parameter "Start2T" has a default type that refers to one or more type variables that are out of scope [misc] +generics_defaults_referential.py:60: error: Type parameter "S2" has a default type that refers to one or more type variables that are out of scope [misc] +generics_defaults_referential.py:68: error: TypeVar default must be a subtype of the bound type [misc] +generics_defaults_referential.py:74: error: TypeVar default must be one of the constraint types [misc] +generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types [misc] """ diff --git a/conformance/results/zuban/generics_defaults_specialization.toml b/conformance/results/zuban/generics_defaults_specialization.toml index 29f44e4f..5b68604f 100644 --- a/conformance/results/zuban/generics_defaults_specialization.toml +++ b/conformance/results/zuban/generics_defaults_specialization.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_defaults_specialization.py:30: error: Bad number of arguments for type alias, expected between 0 and 1, given 2 -generics_defaults_specialization.py:55: error: "Foo" expects no type arguments, but 1 given +generics_defaults_specialization.py:30: error: Bad number of arguments for type alias, expected between 0 and 1, given 2 [misc] +generics_defaults_specialization.py:55: error: "Foo" expects no type arguments, but 1 given [type-arg] """ diff --git a/conformance/results/zuban/generics_paramspec_basic.toml b/conformance/results/zuban/generics_paramspec_basic.toml index 97048c7b..4d3ada23 100644 --- a/conformance/results/zuban/generics_paramspec_basic.toml +++ b/conformance/results/zuban/generics_paramspec_basic.toml @@ -2,21 +2,21 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_paramspec_basic.py:10: error: String argument 1 "NotIt" to ParamSpec(...) does not match variable name "WrongName" -generics_paramspec_basic.py:15: error: Invalid location for ParamSpec "P" +generics_paramspec_basic.py:10: error: String argument 1 "NotIt" to ParamSpec(...) does not match variable name "WrongName" [misc] +generics_paramspec_basic.py:15: error: Invalid location for ParamSpec "P" [valid-type] generics_paramspec_basic.py:15: note: You can use ParamSpec as the first argument to Callable, e.g., "Callable[P, int]" -generics_paramspec_basic.py:23: error: Invalid location for ParamSpec "P" +generics_paramspec_basic.py:23: error: Invalid location for ParamSpec "P" [valid-type] generics_paramspec_basic.py:23: note: You can use ParamSpec as the first argument to Callable, e.g., "Callable[P, int]" -generics_paramspec_basic.py:23: error: Invalid location for ParamSpec "P" +generics_paramspec_basic.py:23: error: Invalid location for ParamSpec "P" [valid-type] generics_paramspec_basic.py:23: note: You can use ParamSpec as the first argument to Callable, e.g., "Callable[P, int]" -generics_paramspec_basic.py:27: error: Invalid location for Concatenate +generics_paramspec_basic.py:27: error: Invalid location for Concatenate [valid-type] generics_paramspec_basic.py:27: note: You can use Concatenate as the first argument to Callable -generics_paramspec_basic.py:31: error: Invalid location for ParamSpec "P" +generics_paramspec_basic.py:31: error: Invalid location for ParamSpec "P" [valid-type] generics_paramspec_basic.py:31: note: You can use ParamSpec as the first argument to Callable, e.g., "Callable[P, int]" -generics_paramspec_basic.py:35: error: Invalid location for ParamSpec "P" +generics_paramspec_basic.py:35: error: Invalid location for ParamSpec "P" [valid-type] generics_paramspec_basic.py:35: note: You can use ParamSpec as the first argument to Callable, e.g., "Callable[P, int]" -generics_paramspec_basic.py:39: error: Invalid location for ParamSpec "P" +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]" -generics_paramspec_basic.py:39: error: Invalid location for ParamSpec "P" +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]" """ diff --git a/conformance/results/zuban/generics_paramspec_components.toml b/conformance/results/zuban/generics_paramspec_components.toml index 5c8e9bfe..0e1fa004 100644 --- a/conformance/results/zuban/generics_paramspec_components.toml +++ b/conformance/results/zuban/generics_paramspec_components.toml @@ -2,26 +2,26 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_paramspec_components.py:17: error: Use "P.args" for variadic "*" parameter -generics_paramspec_components.py:17: error: Use "P.kwargs" for variadic "**" parameter -generics_paramspec_components.py:20: error: ParamSpec components are not allowed here -generics_paramspec_components.py:23: error: Use "P.kwargs" for variadic "**" parameter -generics_paramspec_components.py:26: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" -generics_paramspec_components.py:30: error: ParamSpec "P" is unbound -generics_paramspec_components.py:35: error: ParamSpec components are not allowed here -generics_paramspec_components.py:36: error: ParamSpec components are not allowed here -generics_paramspec_components.py:38: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" -generics_paramspec_components.py:41: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" -generics_paramspec_components.py:49: error: Argument 1 has incompatible type "*P.kwargs"; expected "P.args" -generics_paramspec_components.py:49: error: Argument after ** must be a mapping, not "P.args" -generics_paramspec_components.py:51: error: Argument 1 has incompatible type "int"; expected "P.args" -generics_paramspec_components.py:60: error: Arguments not allowed after ParamSpec.args -generics_paramspec_components.py:70: error: Too few arguments -generics_paramspec_components.py:70: error: ParamSpec arguments must be of types "*P.args, **P.kwargs" -generics_paramspec_components.py:70: error: Argument 3 has incompatible type "**P.kwargs"; expected "P.kwargs" -generics_paramspec_components.py:72: error: Too few arguments -generics_paramspec_components.py:83: error: Argument "x" to "foo" has incompatible type "int"; expected "P.args" -generics_paramspec_components.py:83: error: Argument 2 to "foo" has incompatible type "*P.args"; expected "int" -generics_paramspec_components.py:98: error: Argument 2 to "twice" has incompatible type "str"; expected "int" -generics_paramspec_components.py:98: error: Argument 3 to "twice" has incompatible type "int"; expected "str" +generics_paramspec_components.py:17: error: Use "P.args" for variadic "*" parameter [misc] +generics_paramspec_components.py:17: error: Use "P.kwargs" for variadic "**" parameter [misc] +generics_paramspec_components.py:20: error: ParamSpec components are not allowed here [misc] +generics_paramspec_components.py:23: error: Use "P.kwargs" for variadic "**" parameter [misc] +generics_paramspec_components.py:26: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" [misc] +generics_paramspec_components.py:30: error: ParamSpec "P" is unbound [misc] +generics_paramspec_components.py:35: error: ParamSpec components are not allowed here [misc] +generics_paramspec_components.py:36: error: ParamSpec components are not allowed here [misc] +generics_paramspec_components.py:38: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" [misc] +generics_paramspec_components.py:41: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" [misc] +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 after ** must be a mapping, not "P.args" [arg-type] +generics_paramspec_components.py:51: error: Argument 1 has incompatible type "int"; expected "P.args" [arg-type] +generics_paramspec_components.py:60: error: Arguments not allowed after ParamSpec.args [misc] +generics_paramspec_components.py:70: error: Too few arguments [call-arg] +generics_paramspec_components.py:70: error: ParamSpec arguments must be of types "*P.args, **P.kwargs" [misc] +generics_paramspec_components.py:70: error: Argument 3 has incompatible type "**P.kwargs"; expected "P.kwargs" [arg-type] +generics_paramspec_components.py:72: error: Too few arguments [call-arg] +generics_paramspec_components.py:83: error: Argument "x" to "foo" has incompatible type "int"; expected "P.args" [arg-type] +generics_paramspec_components.py:83: error: Argument 2 to "foo" has incompatible type "*P.args"; expected "int" [arg-type] +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/zuban/generics_paramspec_semantics.toml b/conformance/results/zuban/generics_paramspec_semantics.toml index d25400dc..f6fe67e4 100644 --- a/conformance/results/zuban/generics_paramspec_semantics.toml +++ b/conformance/results/zuban/generics_paramspec_semantics.toml @@ -2,14 +2,14 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_paramspec_semantics.py:26: error: Unexpected keyword argument "a" -generics_paramspec_semantics.py:26: error: Unexpected keyword argument "b" -generics_paramspec_semantics.py:27: error: Argument 2 has incompatible type "str"; expected "bool" -generics_paramspec_semantics.py:61: error: Argument 2 to "func1" has incompatible type "Callable[[NamedArg(int, 'y')], int]"; expected "Callable[[NamedArg(int, 'x')], int]" -generics_paramspec_semantics.py:98: error: Argument 1 has incompatible type "int"; expected "str" -generics_paramspec_semantics.py:108: error: Argument 1 has incompatible type "int"; expected "bool" -generics_paramspec_semantics.py:120: error: Argument 1 has incompatible type "int"; expected "str" -generics_paramspec_semantics.py:127: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[str], int]"; expected "Callable[[int], int]" -generics_paramspec_semantics.py:132: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[NamedArg(int, 'x')], int]"; expected "Callable[[int, Never], int]" -generics_paramspec_semantics.py:137: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[KwArg(int)], int]"; expected "Callable[[int, Never], int]" +generics_paramspec_semantics.py:26: error: Unexpected keyword argument "a" [call-arg] +generics_paramspec_semantics.py:26: error: Unexpected keyword argument "b" [call-arg] +generics_paramspec_semantics.py:27: error: Argument 2 has incompatible type "str"; expected "bool" [arg-type] +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] +generics_paramspec_semantics.py:98: error: Argument 1 has incompatible type "int"; expected "str" [arg-type] +generics_paramspec_semantics.py:108: error: Argument 1 has incompatible type "int"; expected "bool" [arg-type] +generics_paramspec_semantics.py:120: error: Argument 1 has incompatible type "int"; expected "str" [arg-type] +generics_paramspec_semantics.py:127: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[str], int]"; expected "Callable[[int], int]" [arg-type] +generics_paramspec_semantics.py:132: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[NamedArg(int, 'x')], int]"; expected "Callable[[int, Never], int]" [arg-type] +generics_paramspec_semantics.py:137: error: Argument 1 to "expects_int_first" has incompatible type "Callable[[KwArg(int)], int]"; expected "Callable[[int, Never], int]" [arg-type] """ diff --git a/conformance/results/zuban/generics_paramspec_specialization.toml b/conformance/results/zuban/generics_paramspec_specialization.toml index aa32f55b..70ea88cc 100644 --- a/conformance/results/zuban/generics_paramspec_specialization.toml +++ b/conformance/results/zuban/generics_paramspec_specialization.toml @@ -2,9 +2,9 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_paramspec_specialization.py:44: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" -generics_paramspec_specialization.py:54: error: Argument 1 has incompatible type "str"; expected "int" -generics_paramspec_specialization.py:55: error: Argument 3 has incompatible type "str"; expected "bool" -generics_paramspec_specialization.py:60: error: Argument 1 has incompatible type "str"; expected "int" -generics_paramspec_specialization.py:61: error: Argument 3 has incompatible type "str"; expected "bool" +generics_paramspec_specialization.py:44: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" [misc] +generics_paramspec_specialization.py:54: error: Argument 1 has incompatible type "str"; expected "int" [arg-type] +generics_paramspec_specialization.py:55: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type] +generics_paramspec_specialization.py:60: error: Argument 1 has incompatible type "str"; expected "int" [arg-type] +generics_paramspec_specialization.py:61: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type] """ diff --git a/conformance/results/zuban/generics_scoping.toml b/conformance/results/zuban/generics_scoping.toml index 4d20365f..19c63482 100644 --- a/conformance/results/zuban/generics_scoping.toml +++ b/conformance/results/zuban/generics_scoping.toml @@ -4,28 +4,28 @@ False negative on generic class nested within generic class with same type varia """ conformance_automated = "Fail" errors_diff = """ -Line 80: Unexpected errors ['generics_scoping.py:80: error: Type variable "T" is bound by an outer class'] +Line 80: Unexpected errors ['generics_scoping.py:80: error: Type variable "T" is bound by an outer class [misc]'] """ output = """ -generics_scoping.py:29: error: Argument 1 to "meth_2" of "MyClass" has incompatible type "str"; expected "int" -generics_scoping.py:50: error: Type variable "generics_scoping.S" is unbound +generics_scoping.py:29: error: Argument 1 to "meth_2" of "MyClass" has incompatible type "str"; expected "int" [arg-type] +generics_scoping.py:50: error: Type variable "generics_scoping.S" is unbound [misc] generics_scoping.py:50: note: (Hint: Use "Generic[S]" or "Protocol[S]" base class to bind "S" inside a class) generics_scoping.py:50: note: (Hint: Use "S" in function signature to bind "S" inside a function) -generics_scoping.py:54: error: Type variable "generics_scoping.S" is unbound +generics_scoping.py:54: error: Type variable "generics_scoping.S" is unbound [misc] generics_scoping.py:54: note: (Hint: Use "Generic[S]" or "Protocol[S]" base class to bind "S" inside a class) generics_scoping.py:54: note: (Hint: Use "S" in function signature to bind "S" inside a function) -generics_scoping.py:65: error: Free type variable expected in Generic[...] -generics_scoping.py:75: error: Type variable "T" is bound by an outer class -generics_scoping.py:78: error: Type variable "T" is bound by an outer class -generics_scoping.py:80: error: Type variable "T" is bound by an outer class -generics_scoping.py:87: error: Can't use bound type variable "T" to define generic alias -generics_scoping.py:94: error: Type variable "generics_scoping.T" is unbound +generics_scoping.py:65: error: Free type variable expected in Generic[...] [misc] +generics_scoping.py:75: error: Type variable "T" is bound by an outer class [misc] +generics_scoping.py:78: error: Type variable "T" is bound by an outer class [misc] +generics_scoping.py:80: error: Type variable "T" is bound by an outer class [misc] +generics_scoping.py:87: error: Can't use bound type variable "T" to define generic alias [misc] +generics_scoping.py:94: error: Type variable "generics_scoping.T" is unbound [misc] generics_scoping.py:94: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) generics_scoping.py:94: note: (Hint: Use "T" in function signature to bind "T" inside a function) -generics_scoping.py:95: error: Type variable "generics_scoping.T" is unbound +generics_scoping.py:95: error: Type variable "generics_scoping.T" is unbound [misc] generics_scoping.py:95: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) generics_scoping.py:95: note: (Hint: Use "T" in function signature to bind "T" inside a function) -generics_scoping.py:96: error: Type variable "generics_scoping.T" is unbound +generics_scoping.py:96: error: Type variable "generics_scoping.T" is unbound [misc] generics_scoping.py:96: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) generics_scoping.py:96: note: (Hint: Use "T" in function signature to bind "T" inside a function) """ diff --git a/conformance/results/zuban/generics_self_advanced.toml b/conformance/results/zuban/generics_self_advanced.toml index ddd4e1d2..16e410b4 100644 --- a/conformance/results/zuban/generics_self_advanced.toml +++ b/conformance/results/zuban/generics_self_advanced.toml @@ -4,10 +4,10 @@ True positive: Writing to a variable that contains Self (with a class) should er """ conformance_automated = "Fail" errors_diff = """ -Line 43: Unexpected errors ['generics_self_advanced.py:43: error: Access to generic instance variables via class is ambiguous'] -Line 44: Unexpected errors ['generics_self_advanced.py:44: error: Access to generic instance variables via class is ambiguous'] +Line 43: Unexpected errors ['generics_self_advanced.py:43: error: Access to generic instance variables via class is ambiguous [misc]'] +Line 44: Unexpected errors ['generics_self_advanced.py:44: error: Access to generic instance variables via class is ambiguous [misc]'] """ output = """ -generics_self_advanced.py:43: error: Access to generic instance variables via class is ambiguous -generics_self_advanced.py:44: error: Access to generic instance variables via class is ambiguous +generics_self_advanced.py:43: error: Access to generic instance variables via class is ambiguous [misc] +generics_self_advanced.py:44: error: Access to generic instance variables via class is ambiguous [misc] """ diff --git a/conformance/results/zuban/generics_self_attributes.toml b/conformance/results/zuban/generics_self_attributes.toml index 1c95e98a..449b88a3 100644 --- a/conformance/results/zuban/generics_self_attributes.toml +++ b/conformance/results/zuban/generics_self_attributes.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_self_attributes.py:26: error: Argument "next" to "OrdinalLinkedList" has incompatible type "LinkedList[int]"; expected "OrdinalLinkedList | None" -generics_self_attributes.py:32: error: Incompatible types in assignment (expression has type "LinkedList[int]", variable has type "OrdinalLinkedList | None") +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] """ diff --git a/conformance/results/zuban/generics_self_basic.toml b/conformance/results/zuban/generics_self_basic.toml index 60e1b62b..7bb339c7 100644 --- a/conformance/results/zuban/generics_self_basic.toml +++ b/conformance/results/zuban/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_self_basic.py:20: error: Incompatible return value type (got "Shape", expected "Self") -generics_self_basic.py:33: error: Incompatible return value type (got "Shape", expected "Self") -generics_self_basic.py:67: error: Self type cannot have type arguments +generics_self_basic.py:20: error: Incompatible return value type (got "Shape", expected "Self") [return-value] +generics_self_basic.py:33: error: Incompatible return value type (got "Shape", expected "Self") [return-value] +generics_self_basic.py:67: error: Self type cannot have type arguments [valid-type] """ diff --git a/conformance/results/zuban/generics_self_protocols.toml b/conformance/results/zuban/generics_self_protocols.toml index b62c2166..7d25923b 100644 --- a/conformance/results/zuban/generics_self_protocols.toml +++ b/conformance/results/zuban/generics_self_protocols.toml @@ -2,13 +2,13 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_self_protocols.py:61: error: Argument 1 to "accepts_shape" has incompatible type "BadReturnType"; expected "ShapeProtocol" +generics_self_protocols.py:61: error: Argument 1 to "accepts_shape" has incompatible type "BadReturnType"; expected "ShapeProtocol" [arg-type] generics_self_protocols.py:61: note: Following member(s) of "BadReturnType" have conflicts: generics_self_protocols.py:61: note: Expected: generics_self_protocols.py:61: note: def [Self: BadReturnType] set_scale(self, scale: float) -> Self generics_self_protocols.py:61: note: Got: generics_self_protocols.py:61: note: def set_scale(self, scale: float) -> int -generics_self_protocols.py:64: error: Argument 1 to "accepts_shape" has incompatible type "ReturnDifferentClass"; expected "ShapeProtocol" +generics_self_protocols.py:64: error: Argument 1 to "accepts_shape" has incompatible type "ReturnDifferentClass"; expected "ShapeProtocol" [arg-type] generics_self_protocols.py:64: note: Following member(s) of "ReturnDifferentClass" have conflicts: generics_self_protocols.py:64: note: Expected: generics_self_protocols.py:64: note: def [Self: ReturnDifferentClass] set_scale(self, scale: float) -> Self diff --git a/conformance/results/zuban/generics_self_usage.toml b/conformance/results/zuban/generics_self_usage.toml index b3c5b50f..eae8958d 100644 --- a/conformance/results/zuban/generics_self_usage.toml +++ b/conformance/results/zuban/generics_self_usage.toml @@ -6,17 +6,17 @@ errors_diff = """ Line 82: Expected 1 errors Line 111: Expected 1 errors Line 116: Expected 1 errors -Line 50: Unexpected errors ['generics_self_usage.py:50: error: Incompatible types in assignment (expression has type "Callable[[CallableAttribute], int]", variable has type "Callable[[Self], int]")'] +Line 50: Unexpected errors ['generics_self_usage.py:50: error: Incompatible types in assignment (expression has type "Callable[[CallableAttribute], int]", variable has type "Callable[[Self], int]") [assignment]'] """ output = """ -generics_self_usage.py:50: error: Incompatible types in assignment (expression has type "Callable[[CallableAttribute], int]", variable has type "Callable[[Self], int]") -generics_self_usage.py:73: error: Self type is only allowed in annotations within class definition -generics_self_usage.py:73: error: Self type is only allowed in annotations within class definition -generics_self_usage.py:76: error: Self type is only allowed in annotations within class definition -generics_self_usage.py:86: error: Incompatible return value type (got "Foo3", expected "Self") -generics_self_usage.py:101: error: Self type is only allowed in annotations within class definition -generics_self_usage.py:103: error: Self type is only allowed in annotations within class definition -generics_self_usage.py:106: error: Self type cannot be used in type alias target -generics_self_usage.py:121: error: Self type cannot be used in a metaclass -generics_self_usage.py:125: error: Self type cannot be used in a metaclass +generics_self_usage.py:50: error: Incompatible types in assignment (expression has type "Callable[[CallableAttribute], int]", variable has type "Callable[[Self], int]") [assignment] +generics_self_usage.py:73: error: Self type is only allowed in annotations within class definition [misc] +generics_self_usage.py:73: error: Self type is only allowed in annotations within class definition [misc] +generics_self_usage.py:76: error: Self type is only allowed in annotations within class definition [misc] +generics_self_usage.py:86: error: Incompatible return value type (got "Foo3", expected "Self") [return-value] +generics_self_usage.py:101: error: Self type is only allowed in annotations within class definition [misc] +generics_self_usage.py:103: 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] +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] """ diff --git a/conformance/results/zuban/generics_syntax_compatibility.toml b/conformance/results/zuban/generics_syntax_compatibility.toml index 77ec435b..9eb19efc 100644 --- a/conformance/results/zuban/generics_syntax_compatibility.toml +++ b/conformance/results/zuban/generics_syntax_compatibility.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_syntax_compatibility.py:14: error: All type parameters should be declared ("K" not declared) -generics_syntax_compatibility.py:26: error: All type parameters should be declared ("K" not declared) +generics_syntax_compatibility.py:14: error: All type parameters should be declared ("K" not declared) [misc] +generics_syntax_compatibility.py:26: error: All type parameters should be declared ("K" not declared) [misc] """ diff --git a/conformance/results/zuban/generics_syntax_declarations.toml b/conformance/results/zuban/generics_syntax_declarations.toml index c497a443..90b4c151 100644 --- a/conformance/results/zuban/generics_syntax_declarations.toml +++ b/conformance/results/zuban/generics_syntax_declarations.toml @@ -2,16 +2,16 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_syntax_declarations.py:17: error: Generic[...] base class is redundant -generics_syntax_declarations.py:25: error: No arguments expected for "Protocol" base class -generics_syntax_declarations.py:32: error: "T" has no attribute "is_integer" -generics_syntax_declarations.py:44: error: "V" may not be used, because it's defined in an outer class -generics_syntax_declarations.py:48: error: Bracketed expression "[...]" is not valid as a type +generics_syntax_declarations.py:17: error: Generic[...] base class is redundant [misc] +generics_syntax_declarations.py:25: error: No arguments expected for "Protocol" base class [misc] +generics_syntax_declarations.py:32: error: "T" has no attribute "is_integer" [attr-defined] +generics_syntax_declarations.py:44: error: "V" may not be used, because it's defined in an outer class [misc] +generics_syntax_declarations.py:48: error: Bracketed expression "[...]" is not valid as a type [valid-type] generics_syntax_declarations.py:48: note: Did you mean "List[...]"? -generics_syntax_declarations.py:60: error: Type variable must have at least two constrained types -generics_syntax_declarations.py:64: error: Type variable must have at least two constrained types -generics_syntax_declarations.py:71: error: Variable "generics_syntax_declarations.t1" is not valid as a type +generics_syntax_declarations.py:60: error: Type variable must have at least two constrained types [misc] +generics_syntax_declarations.py:64: error: Type variable must have at least two constrained types [misc] +generics_syntax_declarations.py:71: error: Variable "generics_syntax_declarations.t1" is not valid as a type [valid-type] generics_syntax_declarations.py:71: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -generics_syntax_declarations.py:75: error: Invalid type: try using Literal[3] instead? -generics_syntax_declarations.py:79: error: Name "S" is not defined +generics_syntax_declarations.py:75: error: Invalid type: try using Literal[3] instead? [valid-type] +generics_syntax_declarations.py:79: error: Name "S" is not defined [name-defined] """ diff --git a/conformance/results/zuban/generics_syntax_infer_variance.toml b/conformance/results/zuban/generics_syntax_infer_variance.toml index cf981f5e..338d876e 100644 --- a/conformance/results/zuban/generics_syntax_infer_variance.toml +++ b/conformance/results/zuban/generics_syntax_infer_variance.toml @@ -4,64 +4,64 @@ Type parameter syntax not yet support. """ conformance_automated = "Fail" errors_diff = """ -Line 11: Unexpected errors ['generics_syntax_infer_variance.py:11: error: Unexpected argument to "TypeVar()": "infer_variance"'] -Line 12: Unexpected errors ['generics_syntax_infer_variance.py:12: error: Unexpected argument to "TypeVar()": "infer_variance"'] -Line 13: Unexpected errors ['generics_syntax_infer_variance.py:13: error: Unexpected argument to "TypeVar()": "infer_variance"'] -Line 28: Unexpected errors ['generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given', 'generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given'] -Line 36: Unexpected errors ['generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given', 'generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given'] -Line 41: Unexpected errors ['generics_syntax_infer_variance.py:41: error: "ShouldBeCovariant2" expects no type arguments, but 1 given'] -Line 45: Unexpected errors ['generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given', 'generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given'] -Line 74: Unexpected errors ['generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given', 'generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given'] -Line 85: Unexpected errors ['generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given', 'generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given'] -Line 156: Unexpected errors ['generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given', 'generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given'] +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 28: Unexpected errors ['generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg]'] +Line 36: Unexpected errors ['generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg]'] +Line 41: Unexpected errors ['generics_syntax_infer_variance.py:41: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg]'] +Line 45: Unexpected errors ['generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg]'] +Line 74: Unexpected errors ['generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg]'] +Line 85: Unexpected errors ['generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg]'] +Line 156: Unexpected errors ['generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg]', 'generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg]'] """ output = """ -generics_syntax_infer_variance.py:11: error: Unexpected argument to "TypeVar()": "infer_variance" -generics_syntax_infer_variance.py:12: error: Unexpected argument to "TypeVar()": "infer_variance" -generics_syntax_infer_variance.py:13: error: Unexpected argument to "TypeVar()": "infer_variance" -generics_syntax_infer_variance.py:15: error: Unexpected argument to "TypeVar()": "infer_variance" -generics_syntax_infer_variance.py:17: error: Unexpected argument to "TypeVar()": "infer_variance" -generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:29: error: "ShouldBeCovariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:29: error: "ShouldBeCovariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:37: error: "ShouldBeCovariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:37: error: "ShouldBeCovariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:41: error: "ShouldBeCovariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:46: error: "ShouldBeCovariant3" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:46: error: "ShouldBeCovariant3" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:75: error: "ShouldBeCovariant5" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:75: error: "ShouldBeCovariant5" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:86: error: "ShouldBeCovariant6" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:86: error: "ShouldBeCovariant6" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:102: error: "ShouldBeInvariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:102: error: "ShouldBeInvariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:103: error: "ShouldBeInvariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:103: error: "ShouldBeInvariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:117: error: "ShouldBeInvariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:117: error: "ShouldBeInvariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:118: error: "ShouldBeInvariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:118: error: "ShouldBeInvariant2" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:125: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:125: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:126: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:126: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:127: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:127: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:128: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:128: error: "ShouldBeInvariant3" expects no type arguments, but 2 given -generics_syntax_infer_variance.py:136: error: Incompatible types in assignment (expression has type "ShouldBeInvariant4[int]", variable has type "ShouldBeInvariant4[float]") -generics_syntax_infer_variance.py:144: error: Incompatible types in assignment (expression has type "ShouldBeInvariant5[int]", variable has type "ShouldBeInvariant5[float]") -generics_syntax_infer_variance.py:155: error: "ShouldBeContravariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:155: error: "ShouldBeContravariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given -generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given +generics_syntax_infer_variance.py:11: error: Unexpected argument to "TypeVar()": "infer_variance" [misc] +generics_syntax_infer_variance.py:12: error: Unexpected argument to "TypeVar()": "infer_variance" [misc] +generics_syntax_infer_variance.py:13: error: Unexpected argument to "TypeVar()": "infer_variance" [misc] +generics_syntax_infer_variance.py:15: error: Unexpected argument to "TypeVar()": "infer_variance" [misc] +generics_syntax_infer_variance.py:17: error: Unexpected argument to "TypeVar()": "infer_variance" [misc] +generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:28: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:29: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:29: error: "ShouldBeCovariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:36: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:37: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:37: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:41: error: "ShouldBeCovariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:45: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:46: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:46: error: "ShouldBeCovariant3" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:74: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:75: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:75: error: "ShouldBeCovariant5" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:85: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:86: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:86: error: "ShouldBeCovariant6" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:102: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:102: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:103: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:103: error: "ShouldBeInvariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:117: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:117: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:118: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:118: error: "ShouldBeInvariant2" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:125: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:125: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:126: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:126: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:127: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:127: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:128: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:128: error: "ShouldBeInvariant3" expects no type arguments, but 2 given [type-arg] +generics_syntax_infer_variance.py:136: error: Incompatible types in assignment (expression has type "ShouldBeInvariant4[int]", variable has type "ShouldBeInvariant4[float]") [assignment] +generics_syntax_infer_variance.py:144: error: Incompatible types in assignment (expression has type "ShouldBeInvariant5[int]", variable has type "ShouldBeInvariant5[float]") [assignment] +generics_syntax_infer_variance.py:155: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:155: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg] +generics_syntax_infer_variance.py:156: error: "ShouldBeContravariant1" expects no type arguments, but 1 given [type-arg] """ diff --git a/conformance/results/zuban/generics_syntax_scoping.toml b/conformance/results/zuban/generics_syntax_scoping.toml index d00420b4..3d864b80 100644 --- a/conformance/results/zuban/generics_syntax_scoping.toml +++ b/conformance/results/zuban/generics_syntax_scoping.toml @@ -7,37 +7,37 @@ errors_diff = """ Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors -Line 31: Unexpected errors ['generics_syntax_scoping.py:31: error: Type variable "generics_syntax_scoping.T" is unbound'] -Line 56: Unexpected errors ['generics_syntax_scoping.py:56: error: Name "S" already defined on line 55'] -Line 62: Unexpected errors ['generics_syntax_scoping.py:62: error: Expression is of type "TypeVar", not "str"'] -Line 88: Unexpected errors ['generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "Type[ClassE]"; expected "Callable[Never, Never]"'] -Line 90: Unexpected errors ['generics_syntax_scoping.py:90: error: Name "T" already defined on line 89'] -Line 106: Unexpected errors ['generics_syntax_scoping.py:106: error: Name "T" already defined on line 105'] -Line 108: Unexpected errors ['generics_syntax_scoping.py:108: error: Expression is of type "TypeVar", not "int"'] -Line 116: Unexpected errors ['generics_syntax_scoping.py:116: error: Expression is of type "int", not "TypeVar"'] -Line 121: Unexpected errors ['generics_syntax_scoping.py:121: error: Expression is of type "TypeVar", not "complex"'] -Line 124: Unexpected errors ['generics_syntax_scoping.py:124: error: Expression is of type "TypeVar", not "complex"'] +Line 31: Unexpected errors ['generics_syntax_scoping.py:31: error: Type variable "generics_syntax_scoping.T" is unbound [misc]'] +Line 56: Unexpected errors ['generics_syntax_scoping.py:56: error: Name "S" already defined on line 55 [no-redef]'] +Line 62: Unexpected errors ['generics_syntax_scoping.py:62: error: Expression is of type "TypeVar", not "str" [misc]'] +Line 88: Unexpected errors ['generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "Type[ClassE]"; expected "Callable[Never, Never]" [arg-type]'] +Line 90: Unexpected errors ['generics_syntax_scoping.py:90: error: Name "T" already defined on line 89 [no-redef]'] +Line 106: Unexpected errors ['generics_syntax_scoping.py:106: error: Name "T" already defined on line 105 [no-redef]'] +Line 108: Unexpected errors ['generics_syntax_scoping.py:108: error: Expression is of type "TypeVar", not "int" [misc]'] +Line 116: Unexpected errors ['generics_syntax_scoping.py:116: error: Expression is of type "int", not "TypeVar" [misc]'] +Line 121: Unexpected errors ['generics_syntax_scoping.py:121: error: Expression is of type "TypeVar", not "complex" [misc]'] +Line 124: Unexpected errors ['generics_syntax_scoping.py:124: error: Expression is of type "TypeVar", not "complex" [misc]'] """ output = """ -generics_syntax_scoping.py:14: error: Variable "generics_syntax_scoping.S" is not valid as a type +generics_syntax_scoping.py:14: error: Variable "generics_syntax_scoping.S" is not valid as a type [valid-type] generics_syntax_scoping.py:14: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -generics_syntax_scoping.py:18: error: Variable "generics_syntax_scoping.T" is not valid as a type +generics_syntax_scoping.py:18: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type] generics_syntax_scoping.py:18: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -generics_syntax_scoping.py:31: error: Type variable "generics_syntax_scoping.T" is unbound +generics_syntax_scoping.py:31: error: Type variable "generics_syntax_scoping.T" is unbound [misc] generics_syntax_scoping.py:31: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) generics_syntax_scoping.py:31: note: (Hint: Use "T" in function signature to bind "T" inside a function) -generics_syntax_scoping.py:35: error: Name "T" is used before definition -generics_syntax_scoping.py:44: error: Argument 1 has incompatible type "Type[ClassD]"; expected "Callable[Never, Never]" -generics_syntax_scoping.py:44: error: Name "T" is used before definition -generics_syntax_scoping.py:44: error: Variable "generics_syntax_scoping.T" is not valid as a type +generics_syntax_scoping.py:35: error: Name "T" is used before definition [used-before-def] +generics_syntax_scoping.py:44: error: Argument 1 has incompatible type "Type[ClassD]"; expected "Callable[Never, Never]" [arg-type] +generics_syntax_scoping.py:44: error: Name "T" is used before definition [used-before-def] +generics_syntax_scoping.py:44: error: Variable "generics_syntax_scoping.T" is not valid as a type [valid-type] generics_syntax_scoping.py:44: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -generics_syntax_scoping.py:56: error: Name "S" already defined on line 55 -generics_syntax_scoping.py:62: error: Expression is of type "TypeVar", not "str" -generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "Type[ClassE]"; expected "Callable[Never, Never]" -generics_syntax_scoping.py:90: error: Name "T" already defined on line 89 -generics_syntax_scoping.py:106: error: Name "T" already defined on line 105 -generics_syntax_scoping.py:108: error: Expression is of type "TypeVar", not "int" -generics_syntax_scoping.py:116: error: Expression is of type "int", not "TypeVar" -generics_syntax_scoping.py:121: error: Expression is of type "TypeVar", not "complex" -generics_syntax_scoping.py:124: error: Expression is of type "TypeVar", not "complex" +generics_syntax_scoping.py:56: error: Name "S" already defined on line 55 [no-redef] +generics_syntax_scoping.py:62: error: Expression is of type "TypeVar", not "str" [misc] +generics_syntax_scoping.py:88: error: Argument 1 has incompatible type "Type[ClassE]"; expected "Callable[Never, Never]" [arg-type] +generics_syntax_scoping.py:90: error: Name "T" already defined on line 89 [no-redef] +generics_syntax_scoping.py:106: error: Name "T" already defined on line 105 [no-redef] +generics_syntax_scoping.py:108: error: Expression is of type "TypeVar", not "int" [misc] +generics_syntax_scoping.py:116: error: Expression is of type "int", not "TypeVar" [misc] +generics_syntax_scoping.py:121: error: Expression is of type "TypeVar", not "complex" [misc] +generics_syntax_scoping.py:124: error: Expression is of type "TypeVar", not "complex" [misc] """ diff --git a/conformance/results/zuban/generics_type_erasure.toml b/conformance/results/zuban/generics_type_erasure.toml index 01da1286..403b62d0 100644 --- a/conformance/results/zuban/generics_type_erasure.toml +++ b/conformance/results/zuban/generics_type_erasure.toml @@ -4,17 +4,17 @@ True positive: Undefined type vars should be inferred as Never not Any (avoiding """ conformance_automated = "Fail" errors_diff = """ -Line 19: Unexpected errors ['generics_type_erasure.py:19: error: Expression is of type "Node[Never]", not "Node[Any]"'] -Line 22: Unexpected errors ['generics_type_erasure.py:22: error: Expression is of type "Never", not "Any"'] +Line 19: Unexpected errors ['generics_type_erasure.py:19: error: Expression is of type "Node[Never]", not "Node[Any]" [misc]'] +Line 22: Unexpected errors ['generics_type_erasure.py:22: error: Expression is of type "Never", not "Any" [misc]'] """ output = """ -generics_type_erasure.py:19: error: Expression is of type "Node[Never]", not "Node[Any]" -generics_type_erasure.py:22: error: Expression is of type "Never", not "Any" -generics_type_erasure.py:38: error: Argument 1 to "Node" has incompatible type "str"; expected "int | None" -generics_type_erasure.py:40: error: Argument 1 to "Node" has incompatible type "int"; expected "str | None" -generics_type_erasure.py:42: error: Access to generic instance variables via class is ambiguous -generics_type_erasure.py:43: error: Access to generic instance variables via class is ambiguous -generics_type_erasure.py:44: error: Access to generic instance variables via class is ambiguous -generics_type_erasure.py:45: error: Access to generic instance variables via class is ambiguous -generics_type_erasure.py:46: error: Access to generic instance variables via class is ambiguous +generics_type_erasure.py:19: error: Expression is of type "Node[Never]", not "Node[Any]" [misc] +generics_type_erasure.py:22: error: Expression is of type "Never", not "Any" [misc] +generics_type_erasure.py:38: error: Argument 1 to "Node" has incompatible type "str"; expected "int | None" [arg-type] +generics_type_erasure.py:40: error: Argument 1 to "Node" has incompatible type "int"; expected "str | None" [arg-type] +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] +generics_type_erasure.py:44: error: Access to generic instance variables via class is ambiguous [misc] +generics_type_erasure.py:45: error: Access to generic instance variables via class is ambiguous [misc] +generics_type_erasure.py:46: error: Access to generic instance variables via class is ambiguous [misc] """ diff --git a/conformance/results/zuban/generics_typevartuple_args.toml b/conformance/results/zuban/generics_typevartuple_args.toml index 1253bce9..e3d4632d 100644 --- a/conformance/results/zuban/generics_typevartuple_args.toml +++ b/conformance/results/zuban/generics_typevartuple_args.toml @@ -8,12 +8,12 @@ Line 75: Expected 1 errors Line 76: Expected 1 errors """ output = """ -generics_typevartuple_args.py:33: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" -generics_typevartuple_args.py:34: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" -generics_typevartuple_args.py:48: error: Argument 2 to "func1" has incompatible type "str"; expected "int" -generics_typevartuple_args.py:57: error: Argument 2 to "func2" has incompatible type "int"; expected "str" -generics_typevartuple_args.py:58: error: Too few arguments for "func2" -generics_typevartuple_args.py:59: error: Too few arguments for "func2" -generics_typevartuple_args.py:59: error: Argument 1 to "func2" has incompatible type "str"; expected "int" -generics_typevartuple_args.py:67: error: Too few arguments for "func3" +generics_typevartuple_args.py:33: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type] +generics_typevartuple_args.py:34: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type] +generics_typevartuple_args.py:48: error: Argument 2 to "func1" has incompatible type "str"; expected "int" [arg-type] +generics_typevartuple_args.py:57: error: Argument 2 to "func2" has incompatible type "int"; expected "str" [arg-type] +generics_typevartuple_args.py:58: error: Too few arguments for "func2" [call-arg] +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] +generics_typevartuple_args.py:67: error: Too few arguments for "func3" [call-arg] """ diff --git a/conformance/results/zuban/generics_typevartuple_basic.toml b/conformance/results/zuban/generics_typevartuple_basic.toml index 300c70d5..50dd49ad 100644 --- a/conformance/results/zuban/generics_typevartuple_basic.toml +++ b/conformance/results/zuban/generics_typevartuple_basic.toml @@ -9,23 +9,23 @@ Line 89: Expected 1 errors Line 90: Expected 1 errors Line 99: Expected 1 errors Line 100: Expected 1 errors -Line 54: Unexpected errors ['generics_typevartuple_basic.py:54: error: Incompatible types in assignment (expression has type "tuple[Any]", variable has type "tuple[Unpack[Shape]]")'] -Line 57: Unexpected errors ['generics_typevartuple_basic.py:57: error: Incompatible return value type (got "tuple[Unpack[Shape]]", expected "tuple[Any]")'] -Line 84: Unexpected errors ['generics_typevartuple_basic.py:84: error: Expression is of type "tuple[Literal[0, 1]]", not "tuple[int]"'] +Line 54: Unexpected errors ['generics_typevartuple_basic.py:54: error: Incompatible types in assignment (expression has type "tuple[Any]", variable has type "tuple[Unpack[Shape]]") [assignment]'] +Line 57: Unexpected errors ['generics_typevartuple_basic.py:57: error: Incompatible return value type (got "tuple[Unpack[Shape]]", expected "tuple[Any]") [return-value]'] +Line 84: Unexpected errors ['generics_typevartuple_basic.py:84: error: Expression is of type "tuple[Literal[0, 1]]", not "tuple[int]" [misc]'] """ output = """ -generics_typevartuple_basic.py:42: error: Argument 1 to "Array" has incompatible type "Height"; expected "tuple[Height, Width]" -generics_typevartuple_basic.py:43: error: Argument 1 to "Array" has incompatible type "tuple[Batch, Width]"; expected "tuple[Batch, Height, Width]" -generics_typevartuple_basic.py:45: error: Argument 1 to "Array" has incompatible type "tuple[Time, Batch, Width, Height]"; expected "tuple[Time, Batch, Height, Width]" -generics_typevartuple_basic.py:52: error: Free type variable expected in Generic[...] -generics_typevartuple_basic.py:53: error: TypeVarTuple "Shape" is only valid with an unpack -generics_typevartuple_basic.py:54: error: Incompatible types in assignment (expression has type "tuple[Any]", variable has type "tuple[Unpack[Shape]]") -generics_typevartuple_basic.py:56: error: TypeVarTuple "Shape" is only valid with an unpack -generics_typevartuple_basic.py:57: error: Incompatible return value type (got "tuple[Unpack[Shape]]", expected "tuple[Any]") -generics_typevartuple_basic.py:59: error: TypeVarTuple "Shape" is only valid with an unpack -generics_typevartuple_basic.py:65: error: Unexpected keyword argument "covariant" for "TypeVarTuple" -generics_typevartuple_basic.py:66: error: Too many positional arguments for "TypeVarTuple" -generics_typevartuple_basic.py:67: error: Unexpected keyword argument "bound" for "TypeVarTuple" -generics_typevartuple_basic.py:84: error: Expression is of type "tuple[Literal[0, 1]]", not "tuple[int]" -generics_typevartuple_basic.py:106: error: Can only use one type var tuple in a class def +generics_typevartuple_basic.py:42: error: Argument 1 to "Array" has incompatible type "Height"; expected "tuple[Height, Width]" [arg-type] +generics_typevartuple_basic.py:43: error: Argument 1 to "Array" has incompatible type "tuple[Batch, Width]"; expected "tuple[Batch, Height, Width]" [arg-type] +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] +generics_typevartuple_basic.py:52: error: Free type variable expected in Generic[...] [misc] +generics_typevartuple_basic.py:53: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type] +generics_typevartuple_basic.py:54: error: Incompatible types in assignment (expression has type "tuple[Any]", variable has type "tuple[Unpack[Shape]]") [assignment] +generics_typevartuple_basic.py:56: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type] +generics_typevartuple_basic.py:57: error: Incompatible return value type (got "tuple[Unpack[Shape]]", expected "tuple[Any]") [return-value] +generics_typevartuple_basic.py:59: error: TypeVarTuple "Shape" is only valid with an unpack [valid-type] +generics_typevartuple_basic.py:65: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [call-arg] +generics_typevartuple_basic.py:66: error: Too many positional arguments for "TypeVarTuple" [call-arg] +generics_typevartuple_basic.py:67: error: Unexpected keyword argument "bound" for "TypeVarTuple" [call-arg] +generics_typevartuple_basic.py:84: error: Expression is of type "tuple[Literal[0, 1]]", not "tuple[int]" [misc] +generics_typevartuple_basic.py:106: error: Can only use one type var tuple in a class def [misc] """ diff --git a/conformance/results/zuban/generics_typevartuple_callable.toml b/conformance/results/zuban/generics_typevartuple_callable.toml index 6692b4b4..d18ba3c5 100644 --- a/conformance/results/zuban/generics_typevartuple_callable.toml +++ b/conformance/results/zuban/generics_typevartuple_callable.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" +generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type] """ diff --git a/conformance/results/zuban/generics_typevartuple_specialization.toml b/conformance/results/zuban/generics_typevartuple_specialization.toml index 0ace1caa..e7148e56 100644 --- a/conformance/results/zuban/generics_typevartuple_specialization.toml +++ b/conformance/results/zuban/generics_typevartuple_specialization.toml @@ -2,11 +2,11 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_typevartuple_specialization.py:109: error: Unpack is only valid in a variadic position -generics_typevartuple_specialization.py:109: error: TypeVarTuple "Ts" is unbound -generics_typevartuple_specialization.py:110: error: Unpack is only valid in a variadic position -generics_typevartuple_specialization.py:121: error: More than one Unpack in a type is not allowed -generics_typevartuple_specialization.py:122: error: More than one Unpack in a type is not allowed -generics_typevartuple_specialization.py:127: error: Bad number of arguments for type alias, expected at least 2, given 2 -generics_typevartuple_specialization.py:163: error: TypeVarTuple cannot be split +generics_typevartuple_specialization.py:109: error: Unpack is only valid in a variadic position [misc] +generics_typevartuple_specialization.py:109: error: TypeVarTuple "Ts" is unbound [misc] +generics_typevartuple_specialization.py:110: error: Unpack is only valid in a variadic position [misc] +generics_typevartuple_specialization.py:121: error: More than one Unpack in a type is not allowed [misc] +generics_typevartuple_specialization.py:122: error: More than one Unpack in a type is not allowed [misc] +generics_typevartuple_specialization.py:127: error: Bad number of arguments for type alias, expected at least 2, given 2 [misc] +generics_typevartuple_specialization.py:163: error: TypeVarTuple cannot be split [misc] """ diff --git a/conformance/results/zuban/generics_typevartuple_unpack.toml b/conformance/results/zuban/generics_typevartuple_unpack.toml index 4f43a523..5f2652dd 100644 --- a/conformance/results/zuban/generics_typevartuple_unpack.toml +++ b/conformance/results/zuban/generics_typevartuple_unpack.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_typevartuple_unpack.py:30: error: Argument 1 to "process_batch_channels" has incompatible type "Array[Batch]"; expected "Array[Batch, Unpack[Tuple[Any, ...]], Channels]" +generics_typevartuple_unpack.py:30: error: Argument 1 to "process_batch_channels" has incompatible type "Array[Batch]"; expected "Array[Batch, Unpack[Tuple[Any, ...]], Channels]" [arg-type] """ diff --git a/conformance/results/zuban/generics_upper_bound.toml b/conformance/results/zuban/generics_upper_bound.toml index 60e86bba..c1b62c74 100644 --- a/conformance/results/zuban/generics_upper_bound.toml +++ b/conformance/results/zuban/generics_upper_bound.toml @@ -7,7 +7,7 @@ errors_diff = """ Line 24: Expected 1 errors """ output = """ -generics_upper_bound.py:51: error: Value of type variable "ST" of "longer" cannot be "int" -generics_upper_bound.py:51: error: Value of type variable "ST" of "longer" cannot be "int" -generics_upper_bound.py:56: error: TypeVar cannot have both values and an upper bound +generics_upper_bound.py:51: error: Value of type variable "ST" of "longer" cannot be "int" [type-var] +generics_upper_bound.py:51: error: Value of type variable "ST" of "longer" cannot be "int" [type-var] +generics_upper_bound.py:56: error: TypeVar cannot have both values and an upper bound [misc] """ diff --git a/conformance/results/zuban/generics_variance.toml b/conformance/results/zuban/generics_variance.toml index a363a837..b051fcdb 100644 --- a/conformance/results/zuban/generics_variance.toml +++ b/conformance/results/zuban/generics_variance.toml @@ -12,11 +12,11 @@ Lines 141, 142: Expected error (tag 'CoContra_Child5') Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') """ output = """ -generics_variance.py:14: error: TypeVar cannot be both covariant and contravariant -generics_variance.py:77: error: Variance of TypeVar "T_co" incompatible with variance in parent type -generics_variance.py:81: error: Variance of TypeVar "T_contra" incompatible with variance in parent type -generics_variance.py:93: error: Variance of TypeVar "T_contra" incompatible with variance in parent type -generics_variance.py:105: error: Variance of TypeVar "T_co" incompatible with variance in parent type -generics_variance.py:126: error: Variance of TypeVar "T_co" incompatible with variance in parent type -generics_variance.py:132: error: Variance of TypeVar "T_contra" incompatible with variance in parent type +generics_variance.py:14: error: TypeVar cannot be both covariant and contravariant [misc] +generics_variance.py:77: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var] +generics_variance.py:81: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var] +generics_variance.py:93: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var] +generics_variance.py:105: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var] +generics_variance.py:126: error: Variance of TypeVar "T_co" incompatible with variance in parent type [type-var] +generics_variance.py:132: error: Variance of TypeVar "T_contra" incompatible with variance in parent type [type-var] """ diff --git a/conformance/results/zuban/generics_variance_inference.toml b/conformance/results/zuban/generics_variance_inference.toml index 1ffa25b3..722cb173 100644 --- a/conformance/results/zuban/generics_variance_inference.toml +++ b/conformance/results/zuban/generics_variance_inference.toml @@ -2,27 +2,27 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -generics_variance_inference.py:24: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[int, int, int]") -generics_variance_inference.py:25: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[float, float, int]") -generics_variance_inference.py:28: error: Incompatible types in assignment (expression has type "ClassA[int, float, float]", variable has type "ClassA[int, int, int]") -generics_variance_inference.py:41: error: Incompatible types in assignment (expression has type "ShouldBeCovariant1[float]", variable has type "ShouldBeCovariant1[int]") -generics_variance_inference.py:49: error: Incompatible types in assignment (expression has type "ShouldBeCovariant2[float]", variable has type "ShouldBeCovariant2[int]") -generics_variance_inference.py:58: error: Incompatible types in assignment (expression has type "ShouldBeCovariant3[float]", variable has type "ShouldBeCovariant3[int]") -generics_variance_inference.py:67: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[float]", variable has type "ShouldBeCovariant4[int]") -generics_variance_inference.py:80: error: Incompatible types in assignment (expression has type "ShouldBeCovariant5[float]", variable has type "ShouldBeCovariant5[int]") -generics_variance_inference.py:96: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[int]", variable has type "ShouldBeInvariant1[float]") -generics_variance_inference.py:97: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[float]", variable has type "ShouldBeInvariant1[int]") -generics_variance_inference.py:111: error: Incompatible types in assignment (expression has type "ShouldBeInvariant2[int]", variable has type "ShouldBeInvariant2[float]") -generics_variance_inference.py:112: error: Incompatible types in assignment (expression has type "ShouldBeInvariant2[float]", variable has type "ShouldBeInvariant2[int]") -generics_variance_inference.py:119: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[int, str]", variable has type "ShouldBeInvariant3[float, str]") -generics_variance_inference.py:120: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[float, str]", variable has type "ShouldBeInvariant3[int, str]") -generics_variance_inference.py:121: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[str, int]", variable has type "ShouldBeInvariant3[str, float]") -generics_variance_inference.py:122: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[str, float]", variable has type "ShouldBeInvariant3[str, int]") -generics_variance_inference.py:130: error: Incompatible types in assignment (expression has type "ShouldBeInvariant4[int]", variable has type "ShouldBeInvariant4[float]") -generics_variance_inference.py:138: error: Incompatible types in assignment (expression has type "ShouldBeInvariant5[int]", variable has type "ShouldBeInvariant5[float]") -generics_variance_inference.py:149: error: Incompatible types in assignment (expression has type "ShouldBeContravariant1[int]", variable has type "ShouldBeContravariant1[float]") -generics_variance_inference.py:169: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[float]", variable has type "ShouldBeInvariant6[int]") -generics_variance_inference.py:170: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[int]", variable has type "ShouldBeInvariant6[float]") -generics_variance_inference.py:181: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[float]", variable has type "ShouldBeCovariant6[int]") -generics_variance_inference.py:194: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[int]", variable has type "ShouldBeContravariant2[float]") +generics_variance_inference.py:24: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[int, int, int]") [assignment] +generics_variance_inference.py:25: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[float, float, int]") [assignment] +generics_variance_inference.py:28: error: Incompatible types in assignment (expression has type "ClassA[int, float, float]", variable has type "ClassA[int, int, int]") [assignment] +generics_variance_inference.py:41: error: Incompatible types in assignment (expression has type "ShouldBeCovariant1[float]", variable has type "ShouldBeCovariant1[int]") [assignment] +generics_variance_inference.py:49: error: Incompatible types in assignment (expression has type "ShouldBeCovariant2[float]", variable has type "ShouldBeCovariant2[int]") [assignment] +generics_variance_inference.py:58: error: Incompatible types in assignment (expression has type "ShouldBeCovariant3[float]", variable has type "ShouldBeCovariant3[int]") [assignment] +generics_variance_inference.py:67: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[float]", variable has type "ShouldBeCovariant4[int]") [assignment] +generics_variance_inference.py:80: error: Incompatible types in assignment (expression has type "ShouldBeCovariant5[float]", variable has type "ShouldBeCovariant5[int]") [assignment] +generics_variance_inference.py:96: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[int]", variable has type "ShouldBeInvariant1[float]") [assignment] +generics_variance_inference.py:97: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[float]", variable has type "ShouldBeInvariant1[int]") [assignment] +generics_variance_inference.py:111: error: Incompatible types in assignment (expression has type "ShouldBeInvariant2[int]", variable has type "ShouldBeInvariant2[float]") [assignment] +generics_variance_inference.py:112: error: Incompatible types in assignment (expression has type "ShouldBeInvariant2[float]", variable has type "ShouldBeInvariant2[int]") [assignment] +generics_variance_inference.py:119: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[int, str]", variable has type "ShouldBeInvariant3[float, str]") [assignment] +generics_variance_inference.py:120: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[float, str]", variable has type "ShouldBeInvariant3[int, str]") [assignment] +generics_variance_inference.py:121: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[str, int]", variable has type "ShouldBeInvariant3[str, float]") [assignment] +generics_variance_inference.py:122: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[str, float]", variable has type "ShouldBeInvariant3[str, int]") [assignment] +generics_variance_inference.py:130: error: Incompatible types in assignment (expression has type "ShouldBeInvariant4[int]", variable has type "ShouldBeInvariant4[float]") [assignment] +generics_variance_inference.py:138: error: Incompatible types in assignment (expression has type "ShouldBeInvariant5[int]", variable has type "ShouldBeInvariant5[float]") [assignment] +generics_variance_inference.py:149: error: Incompatible types in assignment (expression has type "ShouldBeContravariant1[int]", variable has type "ShouldBeContravariant1[float]") [assignment] +generics_variance_inference.py:169: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[float]", variable has type "ShouldBeInvariant6[int]") [assignment] +generics_variance_inference.py:170: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[int]", variable has type "ShouldBeInvariant6[float]") [assignment] +generics_variance_inference.py:181: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[float]", variable has type "ShouldBeCovariant6[int]") [assignment] +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/zuban/historical_positional.toml b/conformance/results/zuban/historical_positional.toml index 50a395d0..5d588846 100644 --- a/conformance/results/zuban/historical_positional.toml +++ b/conformance/results/zuban/historical_positional.toml @@ -8,10 +8,10 @@ conformance_automated = "Fail" errors_diff = """ Line 26: Expected 1 errors Line 38: Expected 1 errors -Line 53: Unexpected errors ['historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4"'] +Line 53: Unexpected errors ['historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4" [call-arg]'] """ output = """ -historical_positional.py:18: error: Unexpected keyword argument "__x" for "f1" -historical_positional.py:43: error: Unexpected keyword argument "__x" for "m1" of "A" -historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4" +historical_positional.py:18: error: Unexpected keyword argument "__x" for "f1" [call-arg] +historical_positional.py:43: error: Unexpected keyword argument "__x" for "m1" of "A" [call-arg] +historical_positional.py:53: error: Unexpected keyword argument "__y" for "f4" [call-arg] """ diff --git a/conformance/results/zuban/literals_interactions.toml b/conformance/results/zuban/literals_interactions.toml index 8beb65e7..40c6f282 100644 --- a/conformance/results/zuban/literals_interactions.toml +++ b/conformance/results/zuban/literals_interactions.toml @@ -4,14 +4,14 @@ Does not narrow type of `x` with `x in Literal` type guard pattern. """ conformance_automated = "Fail" errors_diff = """ -Line 106: Unexpected errors ['literals_interactions.py:106: error: Argument 1 to "expects_bad_status" has incompatible type "str"; expected "Literal[\\'MALFORMED\\', \\'ABORTED\\']"'] -Line 109: Unexpected errors ['literals_interactions.py:109: error: Argument 1 to "expects_pending_status" has incompatible type "str"; expected "Literal[\\'PENDING\\']"'] +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]'] """ output = """ -literals_interactions.py:15: error: Tuple index out of range -literals_interactions.py:16: error: Tuple index out of range -literals_interactions.py:17: error: Tuple index out of range -literals_interactions.py:18: error: Tuple index out of range -literals_interactions.py:106: error: Argument 1 to "expects_bad_status" has incompatible type "str"; expected "Literal['MALFORMED', 'ABORTED']" -literals_interactions.py:109: error: Argument 1 to "expects_pending_status" has incompatible type "str"; expected "Literal['PENDING']" +literals_interactions.py:15: error: Tuple index out of range [misc] +literals_interactions.py:16: error: Tuple index out of range [misc] +literals_interactions.py:17: error: Tuple index out of range [misc] +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] """ diff --git a/conformance/results/zuban/literals_literalstring.toml b/conformance/results/zuban/literals_literalstring.toml index fbc6b507..c223e5f6 100644 --- a/conformance/results/zuban/literals_literalstring.toml +++ b/conformance/results/zuban/literals_literalstring.toml @@ -8,15 +8,15 @@ Line 66: Expected 1 errors Line 120: Expected 1 errors Line 134: Expected 1 errors Line 171: Expected 1 errors -Line 157: Unexpected errors ["literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader"] -Line 167: Unexpected errors ['literals_literalstring.py:167: error: Expression is of type "B", not "A"'] +Line 157: Unexpected errors ["literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [overload-cannot-match]"] +Line 167: Unexpected errors ['literals_literalstring.py:167: error: Expression is of type "B", not "A" [misc]'] """ output = """ -literals_literalstring.py:36: error: Parameter 2 of Literal[...] is invalid -literals_literalstring.py:37: error: Parameter 1 of Literal[...] is invalid -literals_literalstring.py:43: error: Incompatible types in assignment (expression has type "Literal['two']", variable has type "Literal['']") -literals_literalstring.py:74: error: Incompatible types in assignment (expression has type "int", variable has type "str") -literals_literalstring.py:75: error: Incompatible types in assignment (expression has type "bytes", variable has type "str") -literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader -literals_literalstring.py:167: error: Expression is of type "B", not "A" +literals_literalstring.py:36: error: Parameter 2 of Literal[...] is invalid [valid-type] +literals_literalstring.py:37: error: Parameter 1 of Literal[...] is invalid [valid-type] +literals_literalstring.py:43: error: Incompatible types in assignment (expression has type "Literal['two']", variable has type "Literal['']") [assignment] +literals_literalstring.py:74: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] +literals_literalstring.py:75: error: Incompatible types in assignment (expression has type "bytes", variable has type "str") [assignment] +literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [overload-cannot-match] +literals_literalstring.py:167: error: Expression is of type "B", not "A" [misc] """ diff --git a/conformance/results/zuban/literals_parameterizations.toml b/conformance/results/zuban/literals_parameterizations.toml index 06c6df1b..fd128510 100644 --- a/conformance/results/zuban/literals_parameterizations.toml +++ b/conformance/results/zuban/literals_parameterizations.toml @@ -2,23 +2,23 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -literals_parameterizations.py:41: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:42: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:43: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:44: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:45: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:46: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:47: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:48: error: Parameter 1 of Literal[...] is invalid -literals_parameterizations.py:49: error: Parameter 1 of Literal[...] is invalid -literals_parameterizations.py:50: error: Type variable "literals_parameterizations.T" is unbound +literals_parameterizations.py:41: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:42: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:43: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:44: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:45: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:46: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:47: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:48: error: Parameter 1 of Literal[...] is invalid [valid-type] +literals_parameterizations.py:49: error: Parameter 1 of Literal[...] is invalid [valid-type] +literals_parameterizations.py:50: error: Type variable "literals_parameterizations.T" is unbound [misc] literals_parameterizations.py:50: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) literals_parameterizations.py:50: note: (Hint: Use "T" in function signature to bind "T" inside a function) -literals_parameterizations.py:51: error: Parameter 1 of Literal[...] cannot be of type "float" -literals_parameterizations.py:52: error: Parameter 1 of Literal[...] cannot be of type "Any" -literals_parameterizations.py:53: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:56: error: Invalid type: Literal[...] cannot contain arbitrary expressions -literals_parameterizations.py:60: error: Literal[...] must have at least one parameter -literals_parameterizations.py:61: error: Parameter 1 of Literal[...] is invalid -literals_parameterizations.py:65: error: Incompatible types in assignment (expression has type "Literal[Color.RED]", variable has type "Literal['Color.RED']") +literals_parameterizations.py:51: error: Parameter 1 of Literal[...] cannot be of type "float" [valid-type] +literals_parameterizations.py:52: error: Parameter 1 of Literal[...] cannot be of type "Any" [valid-type] +literals_parameterizations.py:53: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:56: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:60: error: Literal[...] must have at least one parameter [valid-type] +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] """ diff --git a/conformance/results/zuban/literals_semantics.toml b/conformance/results/zuban/literals_semantics.toml index 053b2add..ccd8e842 100644 --- a/conformance/results/zuban/literals_semantics.toml +++ b/conformance/results/zuban/literals_semantics.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -literals_semantics.py:10: error: Incompatible types in assignment (expression has type "Literal[4]", variable has type "Literal[3]") -literals_semantics.py:24: error: Incompatible types in assignment (expression has type "Literal[0]", variable has type "Literal[False]") -literals_semantics.py:25: error: Incompatible types in assignment (expression has type "Literal[False]", variable has type "Literal[0]") -literals_semantics.py:33: error: Incompatible types in assignment (expression has type "int", variable has type "Literal[3, 4, 5]") +literals_semantics.py:10: error: Incompatible types in assignment (expression has type "Literal[4]", variable has type "Literal[3]") [assignment] +literals_semantics.py:24: error: Incompatible types in assignment (expression has type "Literal[0]", variable has type "Literal[False]") [assignment] +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] """ diff --git a/conformance/results/zuban/namedtuples_define_class.toml b/conformance/results/zuban/namedtuples_define_class.toml index 22fde13a..397c708f 100644 --- a/conformance/results/zuban/namedtuples_define_class.toml +++ b/conformance/results/zuban/namedtuples_define_class.toml @@ -7,15 +7,15 @@ errors_diff = """ Line 79: Expected 1 errors """ output = """ -namedtuples_define_class.py:32: error: Tuple index out of range -namedtuples_define_class.py:33: error: Tuple index out of range -namedtuples_define_class.py:44: error: Missing positional argument "y" in call to "Point" -namedtuples_define_class.py:45: error: Missing positional argument "y" in call to "Point" -namedtuples_define_class.py:46: error: Argument 2 to "Point" has incompatible type "str"; expected "int" -namedtuples_define_class.py:47: error: Argument "units" to "Point" has incompatible type "int"; expected "str" -namedtuples_define_class.py:48: error: Too many arguments for "Point" -namedtuples_define_class.py:49: error: Unexpected keyword argument "other" for "Point" -namedtuples_define_class.py:59: error: Non-default NamedTuple fields cannot follow default fields -namedtuples_define_class.py:98: error: Argument 2 to "Property" has incompatible type "float"; expected "str" -namedtuples_define_class.py:105: error: NamedTuple should be a single base +namedtuples_define_class.py:32: error: Tuple index out of range [misc] +namedtuples_define_class.py:33: error: Tuple index out of range [misc] +namedtuples_define_class.py:44: error: Missing positional argument "y" in call to "Point" [call-arg] +namedtuples_define_class.py:45: error: Missing positional argument "y" in call to "Point" [call-arg] +namedtuples_define_class.py:46: error: Argument 2 to "Point" has incompatible type "str"; expected "int" [arg-type] +namedtuples_define_class.py:47: error: Argument "units" to "Point" has incompatible type "int"; expected "str" [arg-type] +namedtuples_define_class.py:48: error: Too many arguments for "Point" [call-arg] +namedtuples_define_class.py:49: error: Unexpected keyword argument "other" for "Point" [call-arg] +namedtuples_define_class.py:59: error: Non-default NamedTuple fields cannot follow default fields [misc] +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] """ diff --git a/conformance/results/zuban/namedtuples_define_functional.toml b/conformance/results/zuban/namedtuples_define_functional.toml index 3c304569..5a604166 100644 --- a/conformance/results/zuban/namedtuples_define_functional.toml +++ b/conformance/results/zuban/namedtuples_define_functional.toml @@ -2,16 +2,16 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -namedtuples_define_functional.py:16: error: Missing positional argument "y" in call to "Point1" -namedtuples_define_functional.py:21: error: Missing positional arguments "x", "y" in call to "Point2" -namedtuples_define_functional.py:26: error: Too many arguments for "Point3" -namedtuples_define_functional.py:31: error: Unexpected keyword argument "z" for "Point4" -namedtuples_define_functional.py:36: error: Argument 2 to "Point5" has incompatible type "str"; expected "int" -namedtuples_define_functional.py:37: error: Too many arguments for "Point5" -namedtuples_define_functional.py:42: error: Argument 2 to "Point6" has incompatible type "str"; expected "int" -namedtuples_define_functional.py:43: error: Argument "x" to "Point6" has incompatible type "float"; expected "int" -namedtuples_define_functional.py:52: error: "namedtuple()" has duplicate field name "a" -namedtuples_define_functional.py:53: error: "namedtuple()" field name "def" is a keyword -namedtuples_define_functional.py:54: error: "namedtuple()" field name "def" is a keyword -namedtuples_define_functional.py:66: error: Missing positional argument "a" in call to "NT5" +namedtuples_define_functional.py:16: error: Missing positional argument "y" in call to "Point1" [call-arg] +namedtuples_define_functional.py:21: error: Missing positional arguments "x", "y" in call to "Point2" [call-arg] +namedtuples_define_functional.py:26: error: Too many arguments for "Point3" [call-arg] +namedtuples_define_functional.py:31: error: Unexpected keyword argument "z" for "Point4" [call-arg] +namedtuples_define_functional.py:36: error: Argument 2 to "Point5" has incompatible type "str"; expected "int" [arg-type] +namedtuples_define_functional.py:37: error: Too many arguments for "Point5" [call-arg] +namedtuples_define_functional.py:42: error: Argument 2 to "Point6" has incompatible type "str"; expected "int" [arg-type] +namedtuples_define_functional.py:43: error: Argument "x" to "Point6" has incompatible type "float"; expected "int" [arg-type] +namedtuples_define_functional.py:52: error: "namedtuple()" has duplicate field name "a" [misc] +namedtuples_define_functional.py:53: error: "namedtuple()" field name "def" is a keyword [misc] +namedtuples_define_functional.py:54: error: "namedtuple()" field name "def" is a keyword [misc] +namedtuples_define_functional.py:66: error: Missing positional argument "a" in call to "NT5" [call-arg] """ diff --git a/conformance/results/zuban/namedtuples_type_compat.toml b/conformance/results/zuban/namedtuples_type_compat.toml index 958d58be..bddb6fd7 100644 --- a/conformance/results/zuban/namedtuples_type_compat.toml +++ b/conformance/results/zuban/namedtuples_type_compat.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -namedtuples_type_compat.py:22: error: Incompatible types in assignment (expression has type "Point", variable has type "tuple[int, int]") -namedtuples_type_compat.py:23: error: Incompatible types in assignment (expression has type "Point", variable has type "tuple[int, str, str]") +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] """ diff --git a/conformance/results/zuban/namedtuples_usage.toml b/conformance/results/zuban/namedtuples_usage.toml index 1de5df04..75ebf0e0 100644 --- a/conformance/results/zuban/namedtuples_usage.toml +++ b/conformance/results/zuban/namedtuples_usage.toml @@ -2,12 +2,12 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -namedtuples_usage.py:34: error: Tuple index out of range -namedtuples_usage.py:35: error: Tuple index out of range -namedtuples_usage.py:40: error: Property "x" defined in "Point" is read-only -namedtuples_usage.py:41: error: Unsupported target for indexed assignment ("Point") -namedtuples_usage.py:42: error: NamedTuple attributes cannot be deleted -namedtuples_usage.py:43: error: "Point" has no attribute "__delitem__" -namedtuples_usage.py:52: error: Too many values to unpack (2 expected, 3 provided) -namedtuples_usage.py:53: error: Need more than 3 values to unpack (4 expected) +namedtuples_usage.py:34: error: Tuple index out of range [misc] +namedtuples_usage.py:35: error: Tuple index out of range [misc] +namedtuples_usage.py:40: error: Property "x" defined in "Point" is read-only [misc] +namedtuples_usage.py:41: error: Unsupported target for indexed assignment ("Point") [index] +namedtuples_usage.py:42: error: NamedTuple attributes cannot be deleted [misc] +namedtuples_usage.py:43: error: "Point" has no attribute "__delitem__" [attr-defined] +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] """ diff --git a/conformance/results/zuban/narrowing_typeguard.toml b/conformance/results/zuban/narrowing_typeguard.toml index e6334600..b8892b07 100644 --- a/conformance/results/zuban/narrowing_typeguard.toml +++ b/conformance/results/zuban/narrowing_typeguard.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -narrowing_typeguard.py:102: error: TypeGuard functions must have a positional argument -narrowing_typeguard.py:107: error: TypeGuard functions must have a positional argument -narrowing_typeguard.py:128: error: Argument 1 to "takes_callable_str" has incompatible type "Callable[[object], TypeGuard[int]]"; expected "Callable[[object], str]" -narrowing_typeguard.py:148: error: Argument 1 to "takes_callable_str_proto" has incompatible type "Callable[[object], TypeGuard[int]]"; expected "CallableStrProto" +narrowing_typeguard.py:102: error: TypeGuard functions must have a positional argument [misc] +narrowing_typeguard.py:107: error: TypeGuard functions must have a positional argument [misc] +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] """ diff --git a/conformance/results/zuban/narrowing_typeis.toml b/conformance/results/zuban/narrowing_typeis.toml index ff20cda3..e62ce812 100644 --- a/conformance/results/zuban/narrowing_typeis.toml +++ b/conformance/results/zuban/narrowing_typeis.toml @@ -2,13 +2,13 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -narrowing_typeis.py:105: error: "TypeIs" functions must have a positional argument -narrowing_typeis.py:110: error: "TypeIs" functions must have a positional argument -narrowing_typeis.py:132: error: Argument 1 to "takes_callable_str" has incompatible type "Callable[[object], TypeIs[int]]"; expected "Callable[[object], str]" -narrowing_typeis.py:152: error: Argument 1 to "takes_callable_str_proto" has incompatible type "Callable[[object], TypeIs[int]]"; expected "CallableStrProto" -narrowing_typeis.py:169: error: Argument 1 to "takes_typeguard" has incompatible type "Callable[[object], TypeIs[int]]"; expected "Callable[[object], TypeGuard[int]]" -narrowing_typeis.py:170: error: Argument 1 to "takes_typeis" has incompatible type "Callable[[object], TypeGuard[int]]"; expected "Callable[[object], TypeIs[int]]" -narrowing_typeis.py:191: error: Argument 1 to "takes_int_typeis" has incompatible type "Callable[[object], TypeIs[bool]]"; expected "Callable[[object], TypeIs[int]]" -narrowing_typeis.py:195: error: Narrowed type "str" is not a subtype of input type "int" -narrowing_typeis.py:199: error: Narrowed type "list[int]" is not a subtype of input type "list[object]" +narrowing_typeis.py:105: error: "TypeIs" functions must have a positional argument [misc] +narrowing_typeis.py:110: error: "TypeIs" functions must have a positional argument [misc] +narrowing_typeis.py:132: error: Argument 1 to "takes_callable_str" has incompatible type "Callable[[object], TypeIs[int]]"; expected "Callable[[object], str]" [arg-type] +narrowing_typeis.py:152: error: Argument 1 to "takes_callable_str_proto" has incompatible type "Callable[[object], TypeIs[int]]"; expected "CallableStrProto" [arg-type] +narrowing_typeis.py:169: error: Argument 1 to "takes_typeguard" has incompatible type "Callable[[object], TypeIs[int]]"; expected "Callable[[object], TypeGuard[int]]" [arg-type] +narrowing_typeis.py:170: error: Argument 1 to "takes_typeis" has incompatible type "Callable[[object], TypeGuard[int]]"; expected "Callable[[object], TypeIs[int]]" [arg-type] +narrowing_typeis.py:191: error: Argument 1 to "takes_int_typeis" has incompatible type "Callable[[object], TypeIs[bool]]"; expected "Callable[[object], TypeIs[int]]" [arg-type] +narrowing_typeis.py:195: error: Narrowed type "str" is not a subtype of input type "int" [narrowed-type-not-subtype] +narrowing_typeis.py:199: error: Narrowed type "list[int]" is not a subtype of input type "list[object]" [narrowed-type-not-subtype] """ diff --git a/conformance/results/zuban/overloads_basic.toml b/conformance/results/zuban/overloads_basic.toml index d2a44774..6c345564 100644 --- a/conformance/results/zuban/overloads_basic.toml +++ b/conformance/results/zuban/overloads_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -overloads_basic.py:39: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" +overloads_basic.py:39: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload] overloads_basic.py:39: note: Possible overload variants: overloads_basic.py:39: note: def __getitem__(self, int, /) -> int overloads_basic.py:39: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes diff --git a/conformance/results/zuban/overloads_consistency.toml b/conformance/results/zuban/overloads_consistency.toml index 41c2ec4f..8d5f032d 100644 --- a/conformance/results/zuban/overloads_consistency.toml +++ b/conformance/results/zuban/overloads_consistency.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -overloads_consistency.py:28: error: Overloaded function implementation cannot produce return type of signature 2 -overloads_consistency.py:44: error: Overloaded function implementation does not accept all possible arguments of signature 2 +overloads_consistency.py:28: error: Overloaded function implementation cannot produce return type of signature 2 [misc] +overloads_consistency.py:44: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc] """ diff --git a/conformance/results/zuban/overloads_definitions.toml b/conformance/results/zuban/overloads_definitions.toml index 200451cd..af18910f 100644 --- a/conformance/results/zuban/overloads_definitions.toml +++ b/conformance/results/zuban/overloads_definitions.toml @@ -2,16 +2,16 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -overloads_definitions.py:15: error: Single overload definition, multiple required -overloads_definitions.py:28: error: An overloaded function outside a stub file must have an implementation -overloads_definitions.py:59: error: An overloaded function outside a stub file must have an implementation -overloads_definitions.py:71: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. -overloads_definitions.py:84: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. -overloads_definitions.py:122: error: @final should be applied only to overload implementation -overloads_definitions.py:136: error: @final should be applied only to overload implementation -overloads_definitions.py:141: error: @final should be applied only to overload implementation -overloads_definitions.py:175: error: Cannot override final attribute "final_method" (previously declared in base class "Base") -overloads_definitions.py:190: error: Method "bad_override" is marked as an override, but no base method was found with this name -overloads_definitions.py:221: error: @override should be applied only to overload implementation -overloads_definitions.py:225: error: @override should be applied only to overload implementation +overloads_definitions.py:15: error: Single overload definition, multiple required [misc] +overloads_definitions.py:28: error: An overloaded function outside a stub file must have an implementation [no-overload-impl] +overloads_definitions.py:59: error: An overloaded function outside a stub file must have an implementation [no-overload-impl] +overloads_definitions.py:71: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc] +overloads_definitions.py:84: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc] +overloads_definitions.py:122: error: @final should be applied only to overload implementation [misc] +overloads_definitions.py:136: error: @final should be applied only to overload implementation [misc] +overloads_definitions.py:141: error: @final should be applied only to overload implementation [misc] +overloads_definitions.py:175: error: Cannot override final attribute "final_method" (previously declared in base class "Base") [misc] +overloads_definitions.py:190: error: Method "bad_override" is marked as an override, but no base method was found with this name [misc] +overloads_definitions.py:221: error: @override should be applied only to overload implementation [misc] +overloads_definitions.py:225: error: @override should be applied only to overload implementation [misc] """ diff --git a/conformance/results/zuban/overloads_definitions_stub.toml b/conformance/results/zuban/overloads_definitions_stub.toml index 8bb641f4..0dbbf631 100644 --- a/conformance/results/zuban/overloads_definitions_stub.toml +++ b/conformance/results/zuban/overloads_definitions_stub.toml @@ -2,12 +2,12 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -overloads_definitions_stub.pyi:13: error: Single overload definition, multiple required -overloads_definitions_stub.pyi:32: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. -overloads_definitions_stub.pyi:39: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. -overloads_definitions_stub.pyi:72: error: In a stub file @final must be applied only to the first overload -overloads_definitions_stub.pyi:85: error: In a stub file @final must be applied only to the first overload -overloads_definitions_stub.pyi:107: error: Cannot override final attribute "final_method" (previously declared in base class "Base") -overloads_definitions_stub.pyi:120: error: Method "bad_override" is marked as an override, but no base method was found with this name -overloads_definitions_stub.pyi:146: error: In a stub file @override must be applied only to the first overload +overloads_definitions_stub.pyi:13: error: Single overload definition, multiple required [misc] +overloads_definitions_stub.pyi:32: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc] +overloads_definitions_stub.pyi:39: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc] +overloads_definitions_stub.pyi:72: error: In a stub file @final must be applied only to the first overload [misc] +overloads_definitions_stub.pyi:85: error: In a stub file @final must be applied only to the first overload [misc] +overloads_definitions_stub.pyi:107: error: Cannot override final attribute "final_method" (previously declared in base class "Base") [misc] +overloads_definitions_stub.pyi:120: error: Method "bad_override" is marked as an override, but no base method was found with this name [misc] +overloads_definitions_stub.pyi:146: error: In a stub file @override must be applied only to the first overload [misc] """ diff --git a/conformance/results/zuban/overloads_evaluation.toml b/conformance/results/zuban/overloads_evaluation.toml index 45c1a5e7..893e0fcb 100644 --- a/conformance/results/zuban/overloads_evaluation.toml +++ b/conformance/results/zuban/overloads_evaluation.toml @@ -8,46 +8,46 @@ Evaluates Any in some cases where overload is not ambiguous. """ conformance_automated = "Fail" errors_diff = """ -Line 134: Unexpected errors ['overloads_evaluation.py:134: error: No overload variant of "expand_bool" matches argument type "bool"'] -Line 135: Unexpected errors ['overloads_evaluation.py:135: error: Expression is of type "Any", not "Literal[0, 1]"'] -Line 160: Unexpected errors ['overloads_evaluation.py:160: error: No overload variant of "expand_enum" matches argument type "Color"'] -Line 161: Unexpected errors ['overloads_evaluation.py:161: error: Expression is of type "Any", not "Literal[0, 1]"'] -Line 204: Unexpected errors ['overloads_evaluation.py:204: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]"'] -Line 205: Unexpected errors ['overloads_evaluation.py:205: error: Expression is of type "int", not "int | str"'] -Line 261: Unexpected errors ['overloads_evaluation.py:261: error: Expression is of type "list[Any]", not "list[int]"'] -Line 264: Unexpected errors ['overloads_evaluation.py:264: error: Expression is of type "list[Any]", not "Any"'] -Line 280: Unexpected errors ['overloads_evaluation.py:280: error: Expression is of type "list[Any]", not "Any"'] -Line 345: Unexpected errors ['overloads_evaluation.py:345: error: Expression is of type "list[Any]", not "Any"'] +Line 134: Unexpected errors ['overloads_evaluation.py:134: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]'] +Line 135: Unexpected errors ['overloads_evaluation.py:135: error: Expression is of type "Any", not "Literal[0, 1]" [misc]'] +Line 160: Unexpected errors ['overloads_evaluation.py:160: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]'] +Line 161: Unexpected errors ['overloads_evaluation.py:161: error: Expression is of type "Any", not "Literal[0, 1]" [misc]'] +Line 204: Unexpected errors ['overloads_evaluation.py:204: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]'] +Line 205: Unexpected errors ['overloads_evaluation.py:205: error: Expression is of type "int", not "int | str" [misc]'] +Line 261: Unexpected errors ['overloads_evaluation.py:261: error: Expression is of type "list[Any]", not "list[int]" [misc]'] +Line 264: Unexpected errors ['overloads_evaluation.py:264: error: Expression is of type "list[Any]", not "Any" [misc]'] +Line 280: Unexpected errors ['overloads_evaluation.py:280: error: Expression is of type "list[Any]", not "Any" [misc]'] +Line 345: Unexpected errors ['overloads_evaluation.py:345: error: Expression is of type "list[Any]", not "Any" [misc]'] """ output = """ -overloads_evaluation.py:38: error: All overload variants of "example1_1" require at least one argument +overloads_evaluation.py:38: error: All overload variants of "example1_1" require at least one argument [call-overload] overloads_evaluation.py:38: note: Possible overload variants: overloads_evaluation.py:38: note: def example1_1(x: int, y: str) -> int overloads_evaluation.py:38: note: def example1_1(x: str) -> str -overloads_evaluation.py:46: error: No overload variant of "example1_1" matches argument types "int", "int" +overloads_evaluation.py:46: error: No overload variant of "example1_1" matches argument types "int", "int" [call-overload] overloads_evaluation.py:46: note: Possible overload variants: overloads_evaluation.py:46: note: def example1_1(x: int, y: str) -> int overloads_evaluation.py:46: note: def example1_1(x: str) -> str -overloads_evaluation.py:51: error: No overload variant of "example1_1" matches argument type "int" +overloads_evaluation.py:51: error: No overload variant of "example1_1" matches argument type "int" [call-overload] overloads_evaluation.py:51: note: Possible overload variants: overloads_evaluation.py:51: note: def example1_1(x: int, y: str) -> int overloads_evaluation.py:51: note: def example1_1(x: str) -> str -overloads_evaluation.py:115: error: Argument 1 to "example2" has incompatible type "int | str"; expected "int" -overloads_evaluation.py:115: error: Argument 2 to "example2" has incompatible type "int | str"; expected "str" -overloads_evaluation.py:134: error: No overload variant of "expand_bool" matches argument type "bool" +overloads_evaluation.py:115: error: Argument 1 to "example2" has incompatible type "int | str"; expected "int" [arg-type] +overloads_evaluation.py:115: error: Argument 2 to "example2" has incompatible type "int | str"; expected "str" [arg-type] +overloads_evaluation.py:134: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload] overloads_evaluation.py:134: note: Possible overload variants: overloads_evaluation.py:134: note: def expand_bool(x: Literal[False]) -> Literal[0] overloads_evaluation.py:134: note: def expand_bool(x: Literal[True]) -> Literal[1] -overloads_evaluation.py:135: error: Expression is of type "Any", not "Literal[0, 1]" -overloads_evaluation.py:160: error: No overload variant of "expand_enum" matches argument type "Color" +overloads_evaluation.py:135: error: Expression is of type "Any", not "Literal[0, 1]" [misc] +overloads_evaluation.py:160: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload] overloads_evaluation.py:160: note: Possible overload variants: overloads_evaluation.py:160: note: def expand_enum(x: Literal[Color.RED]) -> Literal[0] overloads_evaluation.py:160: note: def expand_enum(x: Literal[Color.BLUE]) -> Literal[1] -overloads_evaluation.py:161: error: Expression is of type "Any", not "Literal[0, 1]" -overloads_evaluation.py:204: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" -overloads_evaluation.py:205: error: Expression is of type "int", not "int | str" -overloads_evaluation.py:261: error: Expression is of type "list[Any]", not "list[int]" -overloads_evaluation.py:264: error: Expression is of type "list[Any]", not "Any" -overloads_evaluation.py:280: error: Expression is of type "list[Any]", not "Any" -overloads_evaluation.py:345: error: Expression is of type "list[Any]", not "Any" +overloads_evaluation.py:161: error: Expression is of type "Any", not "Literal[0, 1]" [misc] +overloads_evaluation.py:204: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type] +overloads_evaluation.py:205: error: Expression is of type "int", not "int | str" [misc] +overloads_evaluation.py:261: error: Expression is of type "list[Any]", not "list[int]" [misc] +overloads_evaluation.py:264: error: Expression is of type "list[Any]", not "Any" [misc] +overloads_evaluation.py:280: error: Expression is of type "list[Any]", not "Any" [misc] +overloads_evaluation.py:345: error: Expression is of type "list[Any]", not "Any" [misc] """ diff --git a/conformance/results/zuban/protocols_class_objects.toml b/conformance/results/zuban/protocols_class_objects.toml index 29f10b1b..f02bb9de 100644 --- a/conformance/results/zuban/protocols_class_objects.toml +++ b/conformance/results/zuban/protocols_class_objects.toml @@ -2,24 +2,24 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -protocols_class_objects.py:29: error: Only concrete class can be given where "Type[Proto]" is expected -protocols_class_objects.py:34: error: Can only assign concrete classes to a variable of type "Type[Proto]" -protocols_class_objects.py:58: error: Incompatible types in assignment (expression has type "Type[ConcreteA]", variable has type "ProtoA1") +protocols_class_objects.py:29: error: Only concrete class can be given where "Type[Proto]" is expected [misc] +protocols_class_objects.py:34: error: Can only assign concrete classes to a variable of type "Type[Proto]" [misc] +protocols_class_objects.py:58: error: Incompatible types in assignment (expression has type "Type[ConcreteA]", variable has type "ProtoA1") [assignment] protocols_class_objects.py:58: note: Following member(s) of "ConcreteA" have conflicts: protocols_class_objects.py:58: note: Expected: protocols_class_objects.py:58: note: def method1(x: int) -> int protocols_class_objects.py:58: note: Got: protocols_class_objects.py:58: note: def method1(self: ConcreteA, x: int) -> int -protocols_class_objects.py:74: error: Incompatible types in assignment (expression has type "Type[ConcreteB]", variable has type "ProtoB1") +protocols_class_objects.py:74: error: Incompatible types in assignment (expression has type "Type[ConcreteB]", variable has type "ProtoB1") [assignment] protocols_class_objects.py:74: note: Following member(s) of "ConcreteB" have conflicts: protocols_class_objects.py:74: note: prop1: expected "int", got "property" -protocols_class_objects.py:104: error: Incompatible types in assignment (expression has type "Type[ConcreteC1]", variable has type "ProtoC1") +protocols_class_objects.py:104: error: Incompatible types in assignment (expression has type "Type[ConcreteC1]", variable has type "ProtoC1") [assignment] protocols_class_objects.py:104: note: ClassVar protocol member ProtoC1.attr1 can never be matched by a class object -protocols_class_objects.py:106: error: Incompatible types in assignment (expression has type "Type[ConcreteC2]", variable has type "ProtoC1") +protocols_class_objects.py:106: error: Incompatible types in assignment (expression has type "Type[ConcreteC2]", variable has type "ProtoC1") [assignment] protocols_class_objects.py:106: note: Protocol member ProtoC1.attr1 expected class variable, got instance variable protocols_class_objects.py:106: note: Only class variables allowed for class object access on protocols, attr1 is an instance variable of "ConcreteC2" -protocols_class_objects.py:107: error: Incompatible types in assignment (expression has type "Type[ConcreteC2]", variable has type "ProtoC2") +protocols_class_objects.py:107: error: Incompatible types in assignment (expression has type "Type[ConcreteC2]", variable has type "ProtoC2") [assignment] protocols_class_objects.py:107: note: Only class variables allowed for class object access on protocols, attr1 is an instance variable of "ConcreteC2" -protocols_class_objects.py:108: error: Incompatible types in assignment (expression has type "Type[ConcreteC3]", variable has type "ProtoC1") +protocols_class_objects.py:108: error: Incompatible types in assignment (expression has type "Type[ConcreteC3]", variable has type "ProtoC1") [assignment] protocols_class_objects.py:108: note: ClassVar protocol member ProtoC1.attr1 can never be matched by a class object """ diff --git a/conformance/results/zuban/protocols_definition.toml b/conformance/results/zuban/protocols_definition.toml index a1ce5c87..b4ca17e4 100644 --- a/conformance/results/zuban/protocols_definition.toml +++ b/conformance/results/zuban/protocols_definition.toml @@ -10,51 +10,51 @@ Line 286: Expected 1 errors Line 288: Expected 1 errors """ output = """ -protocols_definition.py:30: error: List item 0 has incompatible type "int"; expected "SupportsClose" -protocols_definition.py:67: error: Protocol members cannot be defined via assignment to self -protocols_definition.py:67: error: "Template" has no attribute "temp" -protocols_definition.py:114: error: Incompatible types in assignment (expression has type "Concrete2_Bad1", variable has type "Template2") -protocols_definition.py:115: error: Incompatible types in assignment (expression has type "Concrete2_Bad2", variable has type "Template2") +protocols_definition.py:30: error: List item 0 has incompatible type "int"; expected "SupportsClose" [list-item] +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] +protocols_definition.py:114: error: Incompatible types in assignment (expression has type "Concrete2_Bad1", variable has type "Template2") [assignment] +protocols_definition.py:115: error: Incompatible types in assignment (expression has type "Concrete2_Bad2", variable has type "Template2") [assignment] protocols_definition.py:115: note: Following member(s) of "Concrete2_Bad2" have conflicts: protocols_definition.py:115: note: val1: expected "Sequence[int]", got "Sequence[float]" protocols_definition.py:115: note: Protocol member Template2.val1 expected class variable, got instance variable -protocols_definition.py:116: error: Incompatible types in assignment (expression has type "Concrete2_Bad3", variable has type "Template2") +protocols_definition.py:116: error: Incompatible types in assignment (expression has type "Concrete2_Bad3", variable has type "Template2") [assignment] protocols_definition.py:116: note: Following member(s) of "Concrete2_Bad3" have conflicts: protocols_definition.py:116: note: val1: expected "Sequence[int]", got "list[int]" protocols_definition.py:116: note: Protocol member Template2.val1 expected class variable, got instance variable -protocols_definition.py:117: error: Incompatible types in assignment (expression has type "Concrete2_Bad4", variable has type "Template2") +protocols_definition.py:117: error: Incompatible types in assignment (expression has type "Concrete2_Bad4", variable has type "Template2") [assignment] protocols_definition.py:117: note: Protocol member Template2.val1 expected class variable, got instance variable -protocols_definition.py:156: error: Incompatible types in assignment (expression has type "Concrete3_Bad1", variable has type "Template3") -protocols_definition.py:157: error: Incompatible types in assignment (expression has type "Concrete3_Bad2", variable has type "Template3") +protocols_definition.py:156: error: Incompatible types in assignment (expression has type "Concrete3_Bad1", variable has type "Template3") [assignment] +protocols_definition.py:157: error: Incompatible types in assignment (expression has type "Concrete3_Bad2", variable has type "Template3") [assignment] protocols_definition.py:157: note: Protocol member Template3.val1 expected instance variable, got class variable -protocols_definition.py:158: error: Incompatible types in assignment (expression has type "Concrete3_Bad3", variable has type "Template3") +protocols_definition.py:158: error: Incompatible types in assignment (expression has type "Concrete3_Bad3", variable has type "Template3") [assignment] protocols_definition.py:158: note: Protocol member Template3.val1 expected settable variable, got read-only attribute -protocols_definition.py:159: error: Incompatible types in assignment (expression has type "Concrete3_Bad4", variable has type "Template3") +protocols_definition.py:159: error: Incompatible types in assignment (expression has type "Concrete3_Bad4", variable has type "Template3") [assignment] protocols_definition.py:159: note: Following member(s) of "Concrete3_Bad4" have conflicts: protocols_definition.py:159: note: val1: expected "Sequence[int]", got "Sequence[float]" -protocols_definition.py:160: error: Incompatible types in assignment (expression has type "Concrete3_Bad5", variable has type "Template3") +protocols_definition.py:160: error: Incompatible types in assignment (expression has type "Concrete3_Bad5", variable has type "Template3") [assignment] protocols_definition.py:160: note: Following member(s) of "Concrete3_Bad5" have conflicts: protocols_definition.py:160: note: val1: expected "Sequence[int]", got "list[int]" -protocols_definition.py:218: error: Incompatible types in assignment (expression has type "Concrete4_Bad1", variable has type "Template4") +protocols_definition.py:218: error: Incompatible types in assignment (expression has type "Concrete4_Bad1", variable has type "Template4") [assignment] protocols_definition.py:218: note: Following member(s) of "Concrete4_Bad1" have conflicts: protocols_definition.py:218: note: val1: expected "Sequence[float]", got "Callable[[], Sequence[int]]" -protocols_definition.py:219: error: Incompatible types in assignment (expression has type "Concrete4_Bad2", variable has type "Template4") -protocols_definition.py:287: error: Incompatible types in assignment (expression has type "Concrete5_Bad3", variable has type "Template5") +protocols_definition.py:219: error: Incompatible types in assignment (expression has type "Concrete4_Bad2", variable has type "Template4") [assignment] +protocols_definition.py:287: error: Incompatible types in assignment (expression has type "Concrete5_Bad3", variable has type "Template5") [assignment] protocols_definition.py:287: note: Following member(s) of "Concrete5_Bad3" have conflicts: protocols_definition.py:287: note: Expected: protocols_definition.py:287: note: def method1(self, a: int, b: int) -> float protocols_definition.py:287: note: Got: protocols_definition.py:287: note: def method1(self, *, a: int, b: int) -> float -protocols_definition.py:289: error: Incompatible types in assignment (expression has type "Concrete5_Bad5", variable has type "Template5") +protocols_definition.py:289: error: Incompatible types in assignment (expression has type "Concrete5_Bad5", variable has type "Template5") [assignment] protocols_definition.py:289: note: Following member(s) of "Concrete5_Bad5" have conflicts: protocols_definition.py:289: note: Expected: protocols_definition.py:289: note: def method1(self: Template5, a: int, b: int) -> float protocols_definition.py:289: note: Got: protocols_definition.py:289: note: def method1(self: Any, a: int, b: int) -> float -protocols_definition.py:339: error: Incompatible types in assignment (expression has type "Concrete6_Bad1", variable has type "Template6") +protocols_definition.py:339: error: Incompatible types in assignment (expression has type "Concrete6_Bad1", variable has type "Template6") [assignment] protocols_definition.py:339: note: Protocol member Template6.val1 expected settable variable, got read-only attribute -protocols_definition.py:340: error: Incompatible types in assignment (expression has type "Concrete6_Bad2", variable has type "Template6") +protocols_definition.py:340: error: Incompatible types in assignment (expression has type "Concrete6_Bad2", variable has type "Template6") [assignment] protocols_definition.py:340: note: Protocol member Template6.val1 expected settable variable, got read-only attribute -protocols_definition.py:341: error: Incompatible types in assignment (expression has type "Concrete6_Bad3", variable has type "Template6") +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 """ diff --git a/conformance/results/zuban/protocols_explicit.toml b/conformance/results/zuban/protocols_explicit.toml index 3a515ecf..4a0f7c2a 100644 --- a/conformance/results/zuban/protocols_explicit.toml +++ b/conformance/results/zuban/protocols_explicit.toml @@ -8,9 +8,9 @@ Line 90: Expected 1 errors Line 110: Expected 1 errors """ output = """ -protocols_explicit.py:27: error: Call to abstract method "draw" of "PColor" with trivial body via super() is unsafe -protocols_explicit.py:56: error: Incompatible types in assignment (expression has type "tuple[int, int, str]", variable has type "tuple[int, int, int]") -protocols_explicit.py:60: error: Cannot instantiate abstract class "Point" with abstract attributes "intensity" and "transparency" -protocols_explicit.py:135: error: Cannot instantiate abstract class "Concrete5" with abstract attribute "method1" -protocols_explicit.py:165: error: Cannot instantiate abstract class "Concrete7A" with abstract attribute "method1" +protocols_explicit.py:27: error: Call to abstract method "draw" of "PColor" with trivial body via super() is unsafe [safe-super] +protocols_explicit.py:56: error: Incompatible types in assignment (expression has type "tuple[int, int, str]", variable has type "tuple[int, int, int]") [assignment] +protocols_explicit.py:60: error: Cannot instantiate abstract class "Point" with abstract attributes "intensity" and "transparency" [abstract] +protocols_explicit.py:135: error: Cannot instantiate abstract class "Concrete5" with abstract attribute "method1" [abstract] +protocols_explicit.py:165: error: Cannot instantiate abstract class "Concrete7A" with abstract attribute "method1" [abstract] """ diff --git a/conformance/results/zuban/protocols_generic.toml b/conformance/results/zuban/protocols_generic.toml index ab3b3ae3..102540dd 100644 --- a/conformance/results/zuban/protocols_generic.toml +++ b/conformance/results/zuban/protocols_generic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -protocols_generic.py:40: error: Incompatible types in assignment (expression has type "Concrete1", variable has type "Proto1[int, str]") +protocols_generic.py:40: error: Incompatible types in assignment (expression has type "Concrete1", variable has type "Proto1[int, str]") [assignment] protocols_generic.py:40: note: Following member(s) of "Concrete1" have conflicts: protocols_generic.py:40: note: Expected: protocols_generic.py:40: note: def method1(self, x: int) -> int @@ -12,25 +12,25 @@ protocols_generic.py:40: note: Expected: protocols_generic.py:40: note: def __iter__(self) -> Iterator[str] protocols_generic.py:40: note: Got: protocols_generic.py:40: note: def __iter__(self) -> Iterator[int] -protocols_generic.py:44: error: Only single Generic[...] or Protocol[...] can be in bases -protocols_generic.py:56: error: Incompatible types in assignment (expression has type "Box[float]", variable has type "Box[int]") -protocols_generic.py:66: error: Incompatible types in assignment (expression has type "Sender[int]", variable has type "Sender[float]") -protocols_generic.py:74: error: Incompatible types in assignment (expression has type "AttrProto[int]", variable has type "AttrProto[float]") -protocols_generic.py:75: error: Incompatible types in assignment (expression has type "AttrProto[float]", variable has type "AttrProto[int]") -protocols_generic.py:145: error: Incompatible types in assignment (expression has type "ConcreteHasProperty2", variable has type "HasPropertyProto") +protocols_generic.py:44: error: Only single Generic[...] or Protocol[...] can be in bases [misc] +protocols_generic.py:56: error: Incompatible types in assignment (expression has type "Box[float]", variable has type "Box[int]") [assignment] +protocols_generic.py:66: error: Incompatible types in assignment (expression has type "Sender[int]", variable has type "Sender[float]") [assignment] +protocols_generic.py:74: error: Incompatible types in assignment (expression has type "AttrProto[int]", variable has type "AttrProto[float]") [assignment] +protocols_generic.py:75: error: Incompatible types in assignment (expression has type "AttrProto[float]", variable has type "AttrProto[int]") [assignment] +protocols_generic.py:145: error: Incompatible types in assignment (expression has type "ConcreteHasProperty2", variable has type "HasPropertyProto") [assignment] protocols_generic.py:145: note: Following member(s) of "ConcreteHasProperty2" have conflicts: protocols_generic.py:145: note: Expected: protocols_generic.py:145: note: def [T] m(self, item: T, callback: Callable[[T], str]) -> str protocols_generic.py:145: note: Got: protocols_generic.py:145: note: def m(self, item: int, callback: Callable[[int], str]) -> str -protocols_generic.py:146: error: Incompatible types in assignment (expression has type "ConcreteHasProperty3", variable has type "HasPropertyProto") +protocols_generic.py:146: error: Incompatible types in assignment (expression has type "ConcreteHasProperty3", variable has type "HasPropertyProto") [assignment] protocols_generic.py:146: note: Following member(s) of "ConcreteHasProperty3" have conflicts: protocols_generic.py:146: note: f: expected "ConcreteHasProperty3", got "int" protocols_generic.py:146: note: Expected: protocols_generic.py:146: note: def [T] m(self, item: T, callback: Callable[[T], str]) -> str protocols_generic.py:146: note: Got: protocols_generic.py:146: note: def m(self, item: int, callback: Callable[[int], str]) -> str -protocols_generic.py:147: error: Incompatible types in assignment (expression has type "ConcreteHasProperty4", variable has type "HasPropertyProto") +protocols_generic.py:147: error: Incompatible types in assignment (expression has type "ConcreteHasProperty4", variable has type "HasPropertyProto") [assignment] protocols_generic.py:147: note: Following member(s) of "ConcreteHasProperty4" have conflicts: protocols_generic.py:147: note: Expected: protocols_generic.py:147: note: def [T] m(self, item: T, callback: Callable[[T], str]) -> str diff --git a/conformance/results/zuban/protocols_merging.toml b/conformance/results/zuban/protocols_merging.toml index 747ee0b5..96fe626e 100644 --- a/conformance/results/zuban/protocols_merging.toml +++ b/conformance/results/zuban/protocols_merging.toml @@ -2,14 +2,14 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -protocols_merging.py:52: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable1") +protocols_merging.py:52: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable1") [assignment] protocols_merging.py:52: note: "SCConcrete2" is missing following "SizedAndClosable1" protocol member: protocols_merging.py:52: note: __len__ -protocols_merging.py:53: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable2") +protocols_merging.py:53: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable2") [assignment] protocols_merging.py:53: note: "SCConcrete2" is missing following "SizedAndClosable2" protocol member: protocols_merging.py:53: note: __len__ -protocols_merging.py:54: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable3") -protocols_merging.py:67: error: All bases of a protocol must be protocols -protocols_merging.py:82: error: Cannot instantiate abstract class "SizedAndClosable4" with abstract attribute "close" -protocols_merging.py:83: error: Incompatible types in assignment (expression has type "SCConcrete1", variable has type "SizedAndClosable4") +protocols_merging.py:54: error: Incompatible types in assignment (expression has type "SCConcrete2", variable has type "SizedAndClosable3") [assignment] +protocols_merging.py:67: error: All bases of a protocol must be protocols [misc] +protocols_merging.py:82: error: Cannot instantiate abstract class "SizedAndClosable4" with abstract attribute "close" [abstract] +protocols_merging.py:83: error: Incompatible types in assignment (expression has type "SCConcrete1", variable has type "SizedAndClosable4") [assignment] """ diff --git a/conformance/results/zuban/protocols_modules.toml b/conformance/results/zuban/protocols_modules.toml index 76e6f70f..204ef50f 100644 --- a/conformance/results/zuban/protocols_modules.toml +++ b/conformance/results/zuban/protocols_modules.toml @@ -2,14 +2,14 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -protocols_modules.py:26: error: Incompatible types in assignment (expression has type "ModuleType", variable has type "Options2") +protocols_modules.py:26: error: Incompatible types in assignment (expression has type "ModuleType", variable has type "Options2") [assignment] protocols_modules.py:26: note: Following member(s) of Module "_protocols_modules1" have conflicts: protocols_modules.py:26: note: timeout: expected "str", got "int" -protocols_modules.py:48: error: Incompatible types in assignment (expression has type "ModuleType", variable has type "Reporter2") +protocols_modules.py:48: error: Incompatible types in assignment (expression has type "ModuleType", variable has type "Reporter2") [assignment] protocols_modules.py:48: note: Following member(s) of Module "_protocols_modules2" have conflicts: protocols_modules.py:48: note: Expected: protocols_modules.py:48: note: def on_error(x: int) -> int 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 "ModuleType", variable has type "Reporter3") +protocols_modules.py:49: error: Incompatible types in assignment (expression has type "ModuleType", variable has type "Reporter3") [assignment] """ diff --git a/conformance/results/zuban/protocols_runtime_checkable.toml b/conformance/results/zuban/protocols_runtime_checkable.toml index b3170391..aec23be6 100644 --- a/conformance/results/zuban/protocols_runtime_checkable.toml +++ b/conformance/results/zuban/protocols_runtime_checkable.toml @@ -9,9 +9,9 @@ Line 92: Expected 1 errors Line 96: Expected 1 errors """ output = """ -protocols_runtime_checkable.py:23: error: Only @runtime_checkable protocols can be used with instance and class checks -protocols_runtime_checkable.py:55: error: Only protocols that don't have non-method members can be used with issubclass() +protocols_runtime_checkable.py:23: error: Only @runtime_checkable protocols can be used with instance and class checks [misc] +protocols_runtime_checkable.py:55: error: Only protocols that don't have non-method members can be used with issubclass() [misc] protocols_runtime_checkable.py:55: note: Protocol "DataProtocol" has non-method member(s): name -protocols_runtime_checkable.py:61: error: Only protocols that don't have non-method members can be used with issubclass() +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 """ diff --git a/conformance/results/zuban/protocols_subtyping.toml b/conformance/results/zuban/protocols_subtyping.toml index 6ba591cb..159857a4 100644 --- a/conformance/results/zuban/protocols_subtyping.toml +++ b/conformance/results/zuban/protocols_subtyping.toml @@ -2,30 +2,30 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -protocols_subtyping.py:16: error: Cannot instantiate protocol class "Proto1" -protocols_subtyping.py:38: error: Incompatible types in assignment (expression has type "Proto2", variable has type "Concrete2") -protocols_subtyping.py:55: error: Incompatible types in assignment (expression has type "Proto2", variable has type "Proto3") +protocols_subtyping.py:16: error: Cannot instantiate protocol class "Proto1" [misc] +protocols_subtyping.py:38: error: Incompatible types in assignment (expression has type "Proto2", variable has type "Concrete2") [assignment] +protocols_subtyping.py:55: error: Incompatible types in assignment (expression has type "Proto2", variable has type "Proto3") [assignment] protocols_subtyping.py:55: note: "Proto2" is missing following "Proto3" protocol member: protocols_subtyping.py:55: note: method2 -protocols_subtyping.py:79: error: Incompatible types in assignment (expression has type "Proto5[int]", variable has type "Proto4[int, float]") +protocols_subtyping.py:79: error: Incompatible types in assignment (expression has type "Proto5[int]", variable has type "Proto4[int, float]") [assignment] protocols_subtyping.py:79: note: Following member(s) of "Proto5[int]" have conflicts: protocols_subtyping.py:79: note: Expected: protocols_subtyping.py:79: note: def method1(self, a: int, b: float) -> tuple[int, float] protocols_subtyping.py:79: note: Got: protocols_subtyping.py:79: note: def method1(self, a: int, b: int) -> tuple[int, int] -protocols_subtyping.py:80: error: Incompatible types in assignment (expression has type "Proto4[int, int]", variable has type "Proto5[float]") +protocols_subtyping.py:80: error: Incompatible types in assignment (expression has type "Proto4[int, int]", variable has type "Proto5[float]") [assignment] protocols_subtyping.py:80: note: Following member(s) of "Proto4[int, int]" have conflicts: protocols_subtyping.py:80: note: Expected: protocols_subtyping.py:80: note: def method1(self, a: float, b: float) -> tuple[float, float] protocols_subtyping.py:80: note: Got: protocols_subtyping.py:80: note: def method1(self, a: int, b: int) -> tuple[int, int] -protocols_subtyping.py:102: error: Incompatible types in assignment (expression has type "Proto6[float, float]", variable has type "Proto7[int, float]") +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:102: note: Following member(s) of "Proto6[float, float]" have conflicts: protocols_subtyping.py:102: note: Expected: protocols_subtyping.py:102: note: def method1(self, a: float) -> Sequence[int] protocols_subtyping.py:102: note: Got: protocols_subtyping.py:102: note: def method1(self, a: float) -> Sequence[float] -protocols_subtyping.py:103: error: Incompatible types in assignment (expression has type "Proto6[float, float]", variable has type "Proto7[float, object]") +protocols_subtyping.py:103: error: Incompatible types in assignment (expression has type "Proto6[float, float]", variable has type "Proto7[float, object]") [assignment] protocols_subtyping.py:103: note: Following member(s) of "Proto6[float, float]" have conflicts: protocols_subtyping.py:103: note: Expected: protocols_subtyping.py:103: note: def method1(self, a: object) -> Sequence[float] diff --git a/conformance/results/zuban/protocols_variance.toml b/conformance/results/zuban/protocols_variance.toml index c8525a48..ba95f136 100644 --- a/conformance/results/zuban/protocols_variance.toml +++ b/conformance/results/zuban/protocols_variance.toml @@ -2,13 +2,13 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -protocols_variance.py:21: error: Invariant type variable "T1" used in protocol where Covariant one is expected -protocols_variance.py:40: error: Invariant type variable "T3" used in protocol where Contravariant one is expected -protocols_variance.py:56: error: Invariant type variable "T1" used in protocol where Contravariant one is expected -protocols_variance.py:61: error: Covariant type variable "T1_co" used in protocol where Contravariant one is expected -protocols_variance.py:62: error: Cannot use a covariant type variable as a parameter -protocols_variance.py:66: error: Invariant type variable "T1" used in protocol where Covariant one is expected -protocols_variance.py:71: error: Contravariant type variable "T1_contra" used in protocol where Covariant one is expected -protocols_variance.py:72: error: Cannot use a contravariant type variable as return type -protocols_variance.py:104: error: Invariant type variable "T1" used in protocol where Covariant one is expected +protocols_variance.py:21: error: Invariant type variable "T1" used in protocol where Covariant one is expected [misc] +protocols_variance.py:40: error: Invariant type variable "T3" used in protocol where Contravariant one is expected [misc] +protocols_variance.py:56: error: Invariant type variable "T1" used in protocol where Contravariant one is expected [misc] +protocols_variance.py:61: error: Covariant type variable "T1_co" used in protocol where Contravariant one is expected [misc] +protocols_variance.py:62: error: Cannot use a covariant type variable as a parameter [type-var] +protocols_variance.py:66: error: Invariant type variable "T1" used in protocol where Covariant one is expected [misc] +protocols_variance.py:71: error: Contravariant type variable "T1_contra" used in protocol where Covariant one is expected [misc] +protocols_variance.py:72: error: Cannot use a contravariant type variable as return type [type-var] +protocols_variance.py:104: error: Invariant type variable "T1" used in protocol where Covariant one is expected [misc] """ diff --git a/conformance/results/zuban/qualifiers_annotated.toml b/conformance/results/zuban/qualifiers_annotated.toml index 822a7e8e..76e44123 100644 --- a/conformance/results/zuban/qualifiers_annotated.toml +++ b/conformance/results/zuban/qualifiers_annotated.toml @@ -2,26 +2,26 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -qualifiers_annotated.py:43: error: Bracketed expression "[...]" is not valid as a type +qualifiers_annotated.py:43: error: Bracketed expression "[...]" is not valid as a type [valid-type] qualifiers_annotated.py:43: note: Did you mean "List[...]"? -qualifiers_annotated.py:44: error: Syntax error in type annotation +qualifiers_annotated.py:44: error: Syntax error in type annotation [valid-type] qualifiers_annotated.py:44: note: Suggestion: Is there a spurious trailing comma? -qualifiers_annotated.py:45: error: Invalid type comment or annotation -qualifiers_annotated.py:46: error: Invalid type comment or annotation -qualifiers_annotated.py:47: error: Invalid type comment or annotation -qualifiers_annotated.py:48: error: Invalid type comment or annotation -qualifiers_annotated.py:49: error: Invalid type comment or annotation -qualifiers_annotated.py:50: error: Name "var1" is not defined -qualifiers_annotated.py:51: error: Invalid type comment or annotation -qualifiers_annotated.py:52: error: Invalid type: try using Literal[1] instead? -qualifiers_annotated.py:53: error: Invalid type comment or annotation -qualifiers_annotated.py:54: error: Invalid type comment or annotation -qualifiers_annotated.py:64: error: Annotated[...] must have exactly one type argument and at least one annotation -qualifiers_annotated.py:76: error: Incompatible types in assignment (expression has type "_SpecialForm", variable has type "Type[Any]") -qualifiers_annotated.py:77: error: Incompatible types in assignment (expression has type "_SpecialForm", variable has type "Type[Any]") -qualifiers_annotated.py:84: error: Argument 1 to "func4" has incompatible type "_SpecialForm"; expected "Type[Never]" -qualifiers_annotated.py:85: error: Argument 1 to "func4" has incompatible type "_SpecialForm"; expected "Type[Never]" -qualifiers_annotated.py:91: error: "_SpecialForm" not callable -qualifiers_annotated.py:92: error: "_SpecialForm" not callable -qualifiers_annotated.py:93: error: "" not callable +qualifiers_annotated.py:45: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:46: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:47: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:48: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:49: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:50: error: Name "var1" is not defined [name-defined] +qualifiers_annotated.py:51: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:52: error: Invalid type: try using Literal[1] instead? [valid-type] +qualifiers_annotated.py:53: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:54: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:64: error: Annotated[...] must have exactly one type argument and at least one annotation [valid-type] +qualifiers_annotated.py:76: error: Incompatible types in assignment (expression has type "_SpecialForm", variable has type "Type[Any]") [assignment] +qualifiers_annotated.py:77: error: Incompatible types in assignment (expression has type "_SpecialForm", variable has type "Type[Any]") [assignment] +qualifiers_annotated.py:84: error: Argument 1 to "func4" has incompatible type "_SpecialForm"; expected "Type[Never]" [arg-type] +qualifiers_annotated.py:85: error: Argument 1 to "func4" has incompatible type "_SpecialForm"; expected "Type[Never]" [arg-type] +qualifiers_annotated.py:91: error: "_SpecialForm" not callable [operator] +qualifiers_annotated.py:92: error: "_SpecialForm" not callable [operator] +qualifiers_annotated.py:93: error: "" not callable [operator] """ diff --git a/conformance/results/zuban/qualifiers_final_annotation.toml b/conformance/results/zuban/qualifiers_final_annotation.toml index aa317cad..98d47108 100644 --- a/conformance/results/zuban/qualifiers_final_annotation.toml +++ b/conformance/results/zuban/qualifiers_final_annotation.toml @@ -7,35 +7,35 @@ conformance_automated = "Fail" errors_diff = """ Line 134: Expected 1 errors Line 135: Expected 1 errors -Line 59: Unexpected errors ['qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6"'] -Line 131: Unexpected errors ['qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name'] +Line 59: Unexpected errors ['qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" [misc]'] +Line 131: Unexpected errors ['qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name [misc]'] """ output = """ -qualifiers_final_annotation.py:16: error: Type in Final[...] can only be omitted if there is an initializer -qualifiers_final_annotation.py:18: error: Final[...] takes at most one type argument -qualifiers_final_annotation.py:34: error: Type in Final[...] can only be omitted if there is an initializer -qualifiers_final_annotation.py:38: error: Final name must be initialized with a value -qualifiers_final_annotation.py:54: error: Cannot assign to final attribute "ID5" -qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" -qualifiers_final_annotation.py:62: error: Can only declare a final attribute in class body or __init__ -qualifiers_final_annotation.py:63: error: Can only declare a final attribute in class body or __init__ -qualifiers_final_annotation.py:65: error: Cannot assign to final attribute "ID7" -qualifiers_final_annotation.py:67: error: Cannot assign to final attribute "ID7" -qualifiers_final_annotation.py:71: error: Cannot assign to final name "RATE" -qualifiers_final_annotation.py:81: error: Cannot assign to final attribute "DEFAULT_ID" -qualifiers_final_annotation.py:94: error: Cannot assign to final name "BORDER_WIDTH" -qualifiers_final_annotation.py:107: error: Final can be only used as an outermost qualifier in a variable annotation -qualifiers_final_annotation.py:108: error: Invalid Type: ClassVar nested inside other type -qualifiers_final_annotation.py:118: error: Final can be only used as an outermost qualifier in a variable annotation -qualifiers_final_annotation.py:121: error: Final can be only used as an outermost qualifier in a variable annotation -qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name -qualifiers_final_annotation.py:141: error: Cannot assign to final name "ID1" -qualifiers_final_annotation.py:145: error: Cannot assign to final name "x" -qualifiers_final_annotation.py:147: error: Cannot assign to final name "x" -qualifiers_final_annotation.py:149: error: Cannot assign to final name "x" -qualifiers_final_annotation.py:152: error: Cannot assign to final name "x" -qualifiers_final_annotation.py:152: error: Incompatible types in assignment (expression has type "TextIOWrapper[_WrappedBuffer]", variable has type "int") -qualifiers_final_annotation.py:155: error: Cannot assign to final name "x" -qualifiers_final_annotation.py:166: error: Cannot assign to final name "TEN" -qualifiers_final_annotation.py:170: error: Cannot assign to final name "PI" +qualifiers_final_annotation.py:16: error: Type in Final[...] can only be omitted if there is an initializer [misc] +qualifiers_final_annotation.py:18: error: Final[...] takes at most one type argument [misc] +qualifiers_final_annotation.py:34: error: Type in Final[...] can only be omitted if there is an initializer [misc] +qualifiers_final_annotation.py:38: error: Final name must be initialized with a value [misc] +qualifiers_final_annotation.py:54: error: Cannot assign to final attribute "ID5" [misc] +qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" [misc] +qualifiers_final_annotation.py:62: error: Can only declare a final attribute in class body or __init__ [misc] +qualifiers_final_annotation.py:63: error: Can only declare a final attribute in class body or __init__ [misc] +qualifiers_final_annotation.py:65: error: Cannot assign to final attribute "ID7" [misc] +qualifiers_final_annotation.py:67: error: Cannot assign to final attribute "ID7" [misc] +qualifiers_final_annotation.py:71: error: Cannot assign to final name "RATE" [misc] +qualifiers_final_annotation.py:81: error: Cannot assign to final attribute "DEFAULT_ID" [misc] +qualifiers_final_annotation.py:94: error: Cannot assign to final name "BORDER_WIDTH" [misc] +qualifiers_final_annotation.py:107: error: Final can be only used as an outermost qualifier in a variable annotation [misc] +qualifiers_final_annotation.py:108: error: Invalid Type: ClassVar nested inside other type [misc] +qualifiers_final_annotation.py:118: error: Final can be only used as an outermost qualifier in a variable annotation [misc] +qualifiers_final_annotation.py:121: error: Final can be only used as an outermost qualifier in a variable annotation [misc] +qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name [misc] +qualifiers_final_annotation.py:141: error: Cannot assign to final name "ID1" [misc] +qualifiers_final_annotation.py:145: error: Cannot assign to final name "x" [misc] +qualifiers_final_annotation.py:147: error: Cannot assign to final name "x" [misc] +qualifiers_final_annotation.py:149: error: Cannot assign to final name "x" [misc] +qualifiers_final_annotation.py:152: error: Cannot assign to final name "x" [misc] +qualifiers_final_annotation.py:152: error: Incompatible types in assignment (expression has type "TextIOWrapper[_WrappedBuffer]", variable has type "int") [assignment] +qualifiers_final_annotation.py:155: error: Cannot assign to final name "x" [misc] +qualifiers_final_annotation.py:166: error: Cannot assign to final name "TEN" [misc] +qualifiers_final_annotation.py:170: error: Cannot assign to final name "PI" [misc] """ diff --git a/conformance/results/zuban/qualifiers_final_decorator.toml b/conformance/results/zuban/qualifiers_final_decorator.toml index 92903082..bbedc5e6 100644 --- a/conformance/results/zuban/qualifiers_final_decorator.toml +++ b/conformance/results/zuban/qualifiers_final_decorator.toml @@ -2,19 +2,19 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -qualifiers_final_decorator.py:21: error: Cannot inherit from final class "Base1" -qualifiers_final_decorator.py:56: error: Cannot override final attribute "method1" (previously declared in base class "Base2") -qualifiers_final_decorator.py:59: error: Cannot override final attribute "method2" (previously declared in base class "Base2") -qualifiers_final_decorator.py:63: error: Cannot override final attribute "method3" (previously declared in base class "Base2") -qualifiers_final_decorator.py:67: error: Cannot override final attribute "method4" (previously declared in base class "Base2") -qualifiers_final_decorator.py:80: error: Cannot override final attribute "method" (previously declared in base class "Base3") -qualifiers_final_decorator.py:85: error: @final should be applied only to overload implementation -qualifiers_final_decorator.py:94: error: Cannot override final attribute "method" (previously declared in base class "Base4") -qualifiers_final_decorator.py:118: error: Cannot override final attribute "method" (previously declared in base class "Base5_2") -qualifiers_final_decorator.py:118: error: Signature of "method" incompatible with supertype "Base5_2" +qualifiers_final_decorator.py:21: error: Cannot inherit from final class "Base1" [misc] +qualifiers_final_decorator.py:56: error: Cannot override final attribute "method1" (previously declared in base class "Base2") [misc] +qualifiers_final_decorator.py:59: error: Cannot override final attribute "method2" (previously declared in base class "Base2") [misc] +qualifiers_final_decorator.py:63: error: Cannot override final attribute "method3" (previously declared in base class "Base2") [misc] +qualifiers_final_decorator.py:67: error: Cannot override final attribute "method4" (previously declared in base class "Base2") [misc] +qualifiers_final_decorator.py:80: error: Cannot override final attribute "method" (previously declared in base class "Base3") [misc] +qualifiers_final_decorator.py:85: error: @final should be applied only to overload implementation [misc] +qualifiers_final_decorator.py:94: error: Cannot override final attribute "method" (previously declared in base class "Base4") [misc] +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] qualifiers_final_decorator.py:118: note: Superclass: qualifiers_final_decorator.py:118: note: def method(self, v: int) -> None 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 +qualifiers_final_decorator.py:125: error: @final cannot be used with non-method functions [misc] """ diff --git a/conformance/results/zuban/specialtypes_never.toml b/conformance/results/zuban/specialtypes_never.toml index dbdbe2e6..5face3bb 100644 --- a/conformance/results/zuban/specialtypes_never.toml +++ b/conformance/results/zuban/specialtypes_never.toml @@ -2,9 +2,9 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -specialtypes_never.py:19: error: Implicit return in function which does not return -specialtypes_never.py:86: error: Incompatible types in assignment (expression has type "list[Never]", variable has type "list[int]") +specialtypes_never.py:19: error: Implicit return in function which does not return [misc] +specialtypes_never.py:86: error: Incompatible types in assignment (expression has type "list[Never]", variable has type "list[int]") [assignment] specialtypes_never.py:86: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance specialtypes_never.py:86: note: Consider using "Sequence" instead, which is covariant -specialtypes_never.py:105: error: Incompatible return value type (got "ClassC[Never]", expected "ClassC[U]") +specialtypes_never.py:105: error: Incompatible return value type (got "ClassC[Never]", expected "ClassC[U]") [return-value] """ diff --git a/conformance/results/zuban/specialtypes_none.toml b/conformance/results/zuban/specialtypes_none.toml index 698c02f1..4cc99a4a 100644 --- a/conformance/results/zuban/specialtypes_none.toml +++ b/conformance/results/zuban/specialtypes_none.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -specialtypes_none.py:21: error: Argument 1 to "func1" has incompatible type "Type[None]"; expected "None" -specialtypes_none.py:27: error: Incompatible types in assignment (expression has type "None", variable has type "Iterable[Any]") -specialtypes_none.py:41: error: Argument 1 to "func2" has incompatible type "None"; expected "Type[None]" +specialtypes_none.py:21: error: Argument 1 to "func1" has incompatible type "Type[None]"; expected "None" [arg-type] +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] """ diff --git a/conformance/results/zuban/specialtypes_promotions.toml b/conformance/results/zuban/specialtypes_promotions.toml index 469985d2..a261c18d 100644 --- a/conformance/results/zuban/specialtypes_promotions.toml +++ b/conformance/results/zuban/specialtypes_promotions.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -specialtypes_promotions.py:13: error: "float" has no attribute "numerator" +specialtypes_promotions.py:13: error: "float" has no attribute "numerator" [attr-defined] """ diff --git a/conformance/results/zuban/specialtypes_type.toml b/conformance/results/zuban/specialtypes_type.toml index 01efce3e..31f3a848 100644 --- a/conformance/results/zuban/specialtypes_type.toml +++ b/conformance/results/zuban/specialtypes_type.toml @@ -2,13 +2,13 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -specialtypes_type.py:56: error: Argument 1 to "func4" has incompatible type "Type[TeamUser]"; expected "Type[BasicUser | ProUser]" -specialtypes_type.py:70: error: Argument 1 to "func5" has incompatible type "_SpecialForm"; expected "Type[Never]" -specialtypes_type.py:76: error: Invalid type comment or annotation -specialtypes_type.py:117: error: "Type[object]" has no attribute "unknown" -specialtypes_type.py:120: error: "Type[object]" has no attribute "unknown" -specialtypes_type.py:143: error: "_SpecialForm" has no attribute "unknown" -specialtypes_type.py:144: error: "_SpecialForm" has no attribute "unknown" -specialtypes_type.py:145: error: "_SpecialForm" has no attribute "unknown" -specialtypes_type.py:146: error: "_SpecialForm" has no attribute "unknown" +specialtypes_type.py:56: error: Argument 1 to "func4" has incompatible type "Type[TeamUser]"; expected "Type[BasicUser | ProUser]" [arg-type] +specialtypes_type.py:70: error: Argument 1 to "func5" has incompatible type "_SpecialForm"; expected "Type[Never]" [arg-type] +specialtypes_type.py:76: error: Invalid type comment or annotation [valid-type] +specialtypes_type.py:117: error: "Type[object]" has no attribute "unknown" [attr-defined] +specialtypes_type.py:120: error: "Type[object]" has no attribute "unknown" [attr-defined] +specialtypes_type.py:143: error: "_SpecialForm" has no attribute "unknown" [attr-defined] +specialtypes_type.py:144: error: "_SpecialForm" has no attribute "unknown" [attr-defined] +specialtypes_type.py:145: error: "_SpecialForm" has no attribute "unknown" [attr-defined] +specialtypes_type.py:146: error: "_SpecialForm" has no attribute "unknown" [attr-defined] """ diff --git a/conformance/results/zuban/tuples_type_compat.toml b/conformance/results/zuban/tuples_type_compat.toml index fe4bd500..991732fe 100644 --- a/conformance/results/zuban/tuples_type_compat.toml +++ b/conformance/results/zuban/tuples_type_compat.toml @@ -5,33 +5,33 @@ Does not support tuple narrowing based on `len()` type guard (optional). conformance_automated = "Fail" errors_diff = """ Lines 80, 81: Expected exactly one error (tag 'func5_2') -Line 80: Unexpected errors ['tuples_type_compat.py:80: error: Expression is of type "tuple[str, str]", not "tuple[str, str] | tuple[int, int]"'] -Line 81: Unexpected errors ['tuples_type_compat.py:81: error: Expression is of type "tuple[str, str]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]"'] +Line 80: Unexpected errors ['tuples_type_compat.py:80: error: Expression is of type "tuple[str, str]", not "tuple[str, str] | tuple[int, int]" [misc]'] +Line 81: Unexpected errors ['tuples_type_compat.py:81: error: Expression is of type "tuple[str, str]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]" [misc]'] """ output = """ -tuples_type_compat.py:15: error: Incompatible types in assignment (expression has type "tuple[float, complex]", variable has type "tuple[int, int]") -tuples_type_compat.py:29: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int, Unpack[Tuple[int, ...]]]") -tuples_type_compat.py:32: error: Incompatible types in assignment (expression has type "tuple[int, Unpack[Tuple[int, ...]]]", variable has type "tuple[int]") -tuples_type_compat.py:33: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int]") -tuples_type_compat.py:43: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int]") -tuples_type_compat.py:62: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int, int]") -tuples_type_compat.py:76: error: Expression is of type "tuple[int]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]" -tuples_type_compat.py:80: error: Expression is of type "tuple[str, str]", not "tuple[str, str] | tuple[int, int]" -tuples_type_compat.py:81: error: Expression is of type "tuple[str, str]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]" -tuples_type_compat.py:86: error: Expression is of type "tuple[int, str, int]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]" -tuples_type_compat.py:101: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]", not "tuple[int]" -tuples_type_compat.py:106: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]", not "tuple[str, str] | tuple[int, int]" -tuples_type_compat.py:111: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]", not "tuple[int, str, int]" -tuples_type_compat.py:126: error: Expression is of type "tuple[int | str, int | str]", not "tuple[int | str, str]" -tuples_type_compat.py:129: error: Expression is of type "tuple[int | str, int | str]", not "tuple[int | str, int]" -tuples_type_compat.py:157: error: Incompatible types in assignment (expression has type "tuple[int, str, str]", variable has type "tuple[int, str]") -tuples_type_compat.py:162: error: Incompatible types in assignment (expression has type "tuple[int, int, str]", variable has type "tuple[int, Unpack[Tuple[str, ...]]]") -tuples_type_compat.py:163: error: Incompatible types in assignment (expression has type "tuple[int, str, int]", variable has type "tuple[int, Unpack[Tuple[str, ...]]]") -tuples_type_compat.py:169: error: Incompatible types in assignment (expression has type "tuple[int, str, str]", variable has type "tuple[int, Unpack[Tuple[str, ...]], int]") -tuples_type_compat.py:170: error: Incompatible types in assignment (expression has type "tuple[int, str, str, float]", variable has type "tuple[int, Unpack[Tuple[str, ...]], int]") -tuples_type_compat.py:175: error: Incompatible types in assignment (expression has type "tuple[int, str, int]", variable has type "tuple[Unpack[Tuple[str, ...]], int]") -tuples_type_compat.py:176: error: Incompatible types in assignment (expression has type "tuple[str, str, float]", variable has type "tuple[Unpack[Tuple[str, ...]], int]") -tuples_type_compat.py:181: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[str, str, int]") -tuples_type_compat.py:184: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[str, str, str, Unpack[Tuple[str, ...]]]") -tuples_type_compat.py:188: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[Unpack[Tuple[str, ...]], str, str, str]") +tuples_type_compat.py:15: error: Incompatible types in assignment (expression has type "tuple[float, complex]", variable has type "tuple[int, int]") [assignment] +tuples_type_compat.py:29: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int, Unpack[Tuple[int, ...]]]") [assignment] +tuples_type_compat.py:32: error: Incompatible types in assignment (expression has type "tuple[int, Unpack[Tuple[int, ...]]]", variable has type "tuple[int]") [assignment] +tuples_type_compat.py:33: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int]") [assignment] +tuples_type_compat.py:43: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int]") [assignment] +tuples_type_compat.py:62: error: Incompatible types in assignment (expression has type "tuple[int, ...]", variable has type "tuple[int, int]") [assignment] +tuples_type_compat.py:76: error: Expression is of type "tuple[int]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]" [misc] +tuples_type_compat.py:80: error: Expression is of type "tuple[str, str]", not "tuple[str, str] | tuple[int, int]" [misc] +tuples_type_compat.py:81: error: Expression is of type "tuple[str, str]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]" [misc] +tuples_type_compat.py:86: error: Expression is of type "tuple[int, str, int]", not "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]" [misc] +tuples_type_compat.py:101: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]", not "tuple[int]" [misc] +tuples_type_compat.py:106: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]", not "tuple[str, str] | tuple[int, int]" [misc] +tuples_type_compat.py:111: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, Unpack[Tuple[str, ...]], int]", not "tuple[int, str, int]" [misc] +tuples_type_compat.py:126: error: Expression is of type "tuple[int | str, int | str]", not "tuple[int | str, str]" [misc] +tuples_type_compat.py:129: error: Expression is of type "tuple[int | str, int | str]", not "tuple[int | str, int]" [misc] +tuples_type_compat.py:157: error: Incompatible types in assignment (expression has type "tuple[int, str, str]", variable has type "tuple[int, str]") [assignment] +tuples_type_compat.py:162: error: Incompatible types in assignment (expression has type "tuple[int, int, str]", variable has type "tuple[int, Unpack[Tuple[str, ...]]]") [assignment] +tuples_type_compat.py:163: error: Incompatible types in assignment (expression has type "tuple[int, str, int]", variable has type "tuple[int, Unpack[Tuple[str, ...]]]") [assignment] +tuples_type_compat.py:169: error: Incompatible types in assignment (expression has type "tuple[int, str, str]", variable has type "tuple[int, Unpack[Tuple[str, ...]], int]") [assignment] +tuples_type_compat.py:170: error: Incompatible types in assignment (expression has type "tuple[int, str, str, float]", variable has type "tuple[int, Unpack[Tuple[str, ...]], int]") [assignment] +tuples_type_compat.py:175: error: Incompatible types in assignment (expression has type "tuple[int, str, int]", variable has type "tuple[Unpack[Tuple[str, ...]], int]") [assignment] +tuples_type_compat.py:176: error: Incompatible types in assignment (expression has type "tuple[str, str, float]", variable has type "tuple[Unpack[Tuple[str, ...]], int]") [assignment] +tuples_type_compat.py:181: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[str, str, int]") [assignment] +tuples_type_compat.py:184: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[str, str, str, Unpack[Tuple[str, ...]]]") [assignment] +tuples_type_compat.py:188: error: Incompatible types in assignment (expression has type "tuple[str, str]", variable has type "tuple[Unpack[Tuple[str, ...]], str, str, str]") [assignment] """ diff --git a/conformance/results/zuban/tuples_type_form.toml b/conformance/results/zuban/tuples_type_form.toml index 7d1d7eda..c363b015 100644 --- a/conformance/results/zuban/tuples_type_form.toml +++ b/conformance/results/zuban/tuples_type_form.toml @@ -2,15 +2,15 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -tuples_type_form.py:12: error: Incompatible types in assignment (expression has type "tuple[int, int]", variable has type "tuple[int]") -tuples_type_form.py:14: error: Incompatible types in assignment (expression has type "tuple[int]", variable has type "tuple[int, int]") -tuples_type_form.py:15: error: Incompatible types in assignment (expression has type "tuple[int, str]", variable has type "tuple[int, int]") -tuples_type_form.py:25: error: Incompatible types in assignment (expression has type "tuple[int]", variable has type "tuple[()]") -tuples_type_form.py:36: error: Incompatible types in assignment (expression has type "tuple[int, int, int, str]", variable has type "tuple[int, ...]") -tuples_type_form.py:40: error: Unexpected "..." -tuples_type_form.py:41: error: Unexpected "..." -tuples_type_form.py:42: error: Unexpected "..." -tuples_type_form.py:43: error: Unexpected "..." -tuples_type_form.py:44: error: Unpack is only valid in a variadic position -tuples_type_form.py:45: error: Unpack is only valid in a variadic position +tuples_type_form.py:12: error: Incompatible types in assignment (expression has type "tuple[int, int]", variable has type "tuple[int]") [assignment] +tuples_type_form.py:14: error: Incompatible types in assignment (expression has type "tuple[int]", variable has type "tuple[int, int]") [assignment] +tuples_type_form.py:15: error: Incompatible types in assignment (expression has type "tuple[int, str]", variable has type "tuple[int, int]") [assignment] +tuples_type_form.py:25: error: Incompatible types in assignment (expression has type "tuple[int]", variable has type "tuple[()]") [assignment] +tuples_type_form.py:36: error: Incompatible types in assignment (expression has type "tuple[int, int, int, str]", variable has type "tuple[int, ...]") [assignment] +tuples_type_form.py:40: error: Unexpected "..." [valid-type] +tuples_type_form.py:41: error: Unexpected "..." [valid-type] +tuples_type_form.py:42: error: Unexpected "..." [valid-type] +tuples_type_form.py:43: error: Unexpected "..." [valid-type] +tuples_type_form.py:44: error: Unpack is only valid in a variadic position [misc] +tuples_type_form.py:45: error: Unpack is only valid in a variadic position [misc] """ diff --git a/conformance/results/zuban/tuples_unpacked.toml b/conformance/results/zuban/tuples_unpacked.toml index e8422d81..ab51bf6d 100644 --- a/conformance/results/zuban/tuples_unpacked.toml +++ b/conformance/results/zuban/tuples_unpacked.toml @@ -2,9 +2,9 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -tuples_unpacked.py:40: error: More than one Unpack in a type is not allowed -tuples_unpacked.py:41: error: More than one Unpack in a type is not allowed -tuples_unpacked.py:51: error: More than one Unpack in a type is not allowed -tuples_unpacked.py:59: error: More than one Unpack in a type is not allowed -tuples_unpacked.py:61: error: More than one Unpack in a type is not allowed +tuples_unpacked.py:40: error: More than one Unpack in a type is not allowed [misc] +tuples_unpacked.py:41: error: More than one Unpack in a type is not allowed [misc] +tuples_unpacked.py:51: error: More than one Unpack in a type is not allowed [misc] +tuples_unpacked.py:59: error: More than one Unpack in a type is not allowed [misc] +tuples_unpacked.py:61: error: More than one Unpack in a type is not allowed [misc] """ diff --git a/conformance/results/zuban/typeddicts_alt_syntax.toml b/conformance/results/zuban/typeddicts_alt_syntax.toml index 16ef84dc..f98d6588 100644 --- a/conformance/results/zuban/typeddicts_alt_syntax.toml +++ b/conformance/results/zuban/typeddicts_alt_syntax.toml @@ -5,9 +5,9 @@ Does not support keyword-argument form of alternative syntax (deprecated in 3.11 errors_diff = """ """ output = """ -typeddicts_alt_syntax.py:23: error: TypedDict() expects a dictionary literal as the second argument -typeddicts_alt_syntax.py:27: error: Invalid TypedDict() field name -typeddicts_alt_syntax.py:31: error: First argument "WrongName" to TypedDict() does not match variable name "BadTypedDict3" -typeddicts_alt_syntax.py:35: error: Too many arguments for "TODO()" -typeddicts_alt_syntax.py:41: error: TypedDict() expects a dictionary literal as the second argument +typeddicts_alt_syntax.py:23: error: TypedDict() expects a dictionary literal as the second argument [misc] +typeddicts_alt_syntax.py:27: error: Invalid TypedDict() field name [misc] +typeddicts_alt_syntax.py:31: error: First argument "WrongName" to TypedDict() does not match variable name "BadTypedDict3" [name-match] +typeddicts_alt_syntax.py:35: error: Too many arguments for "TODO()" [call-arg] +typeddicts_alt_syntax.py:41: error: TypedDict() expects a dictionary literal as the second argument [misc] """ diff --git a/conformance/results/zuban/typeddicts_class_syntax.toml b/conformance/results/zuban/typeddicts_class_syntax.toml index 8f550a25..cbf24ab3 100644 --- a/conformance/results/zuban/typeddicts_class_syntax.toml +++ b/conformance/results/zuban/typeddicts_class_syntax.toml @@ -2,9 +2,9 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_class_syntax.py:29: error: Invalid statement in TypedDict definition; expected "field_name: field_type" -typeddicts_class_syntax.py:33: error: Invalid statement in TypedDict definition; expected "field_name: field_type" -typeddicts_class_syntax.py:38: error: Invalid statement in TypedDict definition; expected "field_name: field_type" -typeddicts_class_syntax.py:44: error: Unexpected keyword argument "metaclass" for TypedDict -typeddicts_class_syntax.py:49: error: Unexpected keyword argument "other" for TypedDict +typeddicts_class_syntax.py:29: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc] +typeddicts_class_syntax.py:33: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc] +typeddicts_class_syntax.py:38: error: Invalid statement in TypedDict definition; expected "field_name: field_type" [misc] +typeddicts_class_syntax.py:44: error: Unexpected keyword argument "metaclass" for TypedDict [call-arg] +typeddicts_class_syntax.py:49: error: Unexpected keyword argument "other" for TypedDict [call-arg] """ diff --git a/conformance/results/zuban/typeddicts_extra_items.toml b/conformance/results/zuban/typeddicts_extra_items.toml index b5840403..86048bc3 100644 --- a/conformance/results/zuban/typeddicts_extra_items.toml +++ b/conformance/results/zuban/typeddicts_extra_items.toml @@ -16,128 +16,128 @@ Lines 94, 95: Expected error (tag 'MovieD') Lines 184, 185: Expected error (tag 'MovieRequiredYear') Lines 187, 188: Expected error (tag 'MovieNotRequiredYear') Lines 196, 197: Expected error (tag 'BookWithPublisher') -Line 11: Unexpected errors ['typeddicts_extra_items.py:11: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 14: Unexpected errors ['typeddicts_extra_items.py:14: error: Extra key "novel_adaptation" for TypedDict "Movie"'] -Line 19: Unexpected errors ['typeddicts_extra_items.py:19: error: Unexpected keyword argument "extra_items" for "TypedDict"'] -Line 29: Unexpected errors ['typeddicts_extra_items.py:29: error: Expression is of type "Any", not "bool"', 'typeddicts_extra_items.py:29: error: TypedDict "Movie" has no key "novel_adaptation"'] -Line 33: Unexpected errors ['typeddicts_extra_items.py:33: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 40: Unexpected errors ['typeddicts_extra_items.py:40: error: Extra key "other_extra_key" for TypedDict "InheritedMovie"'] -Line 55: Unexpected errors ['typeddicts_extra_items.py:55: error: Unexpected keyword argument "closed" for TypedDict'] -Line 64: Unexpected errors ['typeddicts_extra_items.py:64: error: Unexpected keyword argument "closed" for TypedDict'] -Line 70: Unexpected errors ['typeddicts_extra_items.py:70: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 82: Unexpected errors ['typeddicts_extra_items.py:82: error: Unexpected keyword argument "closed" for TypedDict'] -Line 88: Unexpected errors ['typeddicts_extra_items.py:88: error: Unexpected keyword argument "closed" for TypedDict'] -Line 100: Unexpected errors ['typeddicts_extra_items.py:100: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 103: Unexpected errors ['typeddicts_extra_items.py:103: error: Unexpected keyword argument "closed" for TypedDict'] -Line 106: Unexpected errors ['typeddicts_extra_items.py:106: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 124: Unexpected errors ['typeddicts_extra_items.py:124: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 129: Unexpected errors ['typeddicts_extra_items.py:129: error: TypedDict "MovieEI" has no key "year"'] -Line 137: Unexpected errors ['typeddicts_extra_items.py:137: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 144: Unexpected errors ['typeddicts_extra_items.py:144: error: Unexpected keyword argument "year" for "unpack_extra"'] -Line 149: Unexpected errors ['typeddicts_extra_items.py:149: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 152: Unexpected errors ['typeddicts_extra_items.py:152: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 155: Unexpected errors ['typeddicts_extra_items.py:155: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 165: Unexpected errors ['typeddicts_extra_items.py:165: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 171: Unexpected errors ['typeddicts_extra_items.py:171: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 181: Unexpected errors ['typeddicts_extra_items.py:181: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 193: Unexpected errors ['typeddicts_extra_items.py:193: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 210: Unexpected errors ['typeddicts_extra_items.py:210: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 217: Unexpected errors ['typeddicts_extra_items.py:217: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 228: Unexpected errors ['typeddicts_extra_items.py:228: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 231: Unexpected errors ['typeddicts_extra_items.py:231: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 235: Unexpected errors ['typeddicts_extra_items.py:235: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 248: Unexpected errors ['typeddicts_extra_items.py:248: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 251: Unexpected errors ['typeddicts_extra_items.py:251: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 254: Unexpected errors ['typeddicts_extra_items.py:254: error: Extra key "year" for TypedDict "MovieExtraInt"'] -Line 255: Unexpected errors ['typeddicts_extra_items.py:255: error: Extra key "description" for TypedDict "MovieExtraStr"'] -Line 266: Unexpected errors ['typeddicts_extra_items.py:266: error: Extra key "year" for TypedDict "MovieExtraInt"'] -Line 280: Unexpected errors ['typeddicts_extra_items.py:280: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 284: Unexpected errors ['typeddicts_extra_items.py:284: error: Extra key "year" for TypedDict "ExtraMovie"'] -Line 289: Unexpected errors ['typeddicts_extra_items.py:289: error: Unexpected keyword argument "closed" for TypedDict'] -Line 299: Unexpected errors ['typeddicts_extra_items.py:299: error: Extra key "summary" for TypedDict "MovieExtraStr"'] -Line 300: Unexpected errors ['typeddicts_extra_items.py:300: error: Incompatible types in assignment (expression has type "MovieExtraStr", variable has type "Mapping[str, str]")'] -Line 302: Unexpected errors ['typeddicts_extra_items.py:302: error: Extra key "year" for TypedDict "MovieExtraInt"'] -Line 304: Unexpected errors ['typeddicts_extra_items.py:304: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "Mapping[str, int | str]")'] -Line 310: Unexpected errors ['typeddicts_extra_items.py:310: error: Expression is of type "list[tuple[str, object]]", not "list[tuple[str, int | str]]"'] -Line 311: Unexpected errors ['typeddicts_extra_items.py:311: error: Expression is of type "list[object]", not "list[int | str]"'] -Line 319: Unexpected errors ['typeddicts_extra_items.py:319: error: Unexpected keyword argument "extra_items" for TypedDict'] -Line 326: Unexpected errors ['typeddicts_extra_items.py:326: error: Incompatible types in assignment (expression has type "IntDict", variable has type "dict[str, int]")'] -Line 329: Unexpected errors ['typeddicts_extra_items.py:329: error: Extra key "bar" for TypedDict "IntDictWithNum"'] -Line 330: Unexpected errors ['typeddicts_extra_items.py:330: error: Incompatible types in assignment (expression has type "IntDictWithNum", variable has type "dict[str, int]")'] -Line 337: Unexpected errors ['typeddicts_extra_items.py:337: error: "IntDictWithNum" has no attribute "clear"'] -Line 339: Unexpected errors ['typeddicts_extra_items.py:339: error: Expression is of type "Any", not "tuple[str, int]"', 'typeddicts_extra_items.py:339: error: "IntDictWithNum" has no attribute "popitem"'] -Line 342: Unexpected errors ['typeddicts_extra_items.py:342: error: TypedDict key must be a string literal; expected one of ("num")'] -Line 343: Unexpected errors ['typeddicts_extra_items.py:343: error: Expected TypedDict key to be string literal'] +Line 11: Unexpected errors ['typeddicts_extra_items.py:11: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 14: Unexpected errors ['typeddicts_extra_items.py:14: error: Extra key "novel_adaptation" for TypedDict "Movie" [typeddict-unknown-key]'] +Line 19: Unexpected errors ['typeddicts_extra_items.py:19: error: Unexpected keyword argument "extra_items" for "TypedDict" [call-arg]'] +Line 29: Unexpected errors ['typeddicts_extra_items.py:29: error: Expression is of type "Any", not "bool" [misc]', 'typeddicts_extra_items.py:29: error: TypedDict "Movie" has no key "novel_adaptation" [typeddict-item]'] +Line 33: Unexpected errors ['typeddicts_extra_items.py:33: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 40: Unexpected errors ['typeddicts_extra_items.py:40: error: Extra key "other_extra_key" for TypedDict "InheritedMovie" [typeddict-unknown-key]'] +Line 55: Unexpected errors ['typeddicts_extra_items.py:55: error: Unexpected keyword argument "closed" for TypedDict [call-arg]'] +Line 64: Unexpected errors ['typeddicts_extra_items.py:64: error: Unexpected keyword argument "closed" for TypedDict [call-arg]'] +Line 70: Unexpected errors ['typeddicts_extra_items.py:70: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 82: Unexpected errors ['typeddicts_extra_items.py:82: error: Unexpected keyword argument "closed" for TypedDict [call-arg]'] +Line 88: Unexpected errors ['typeddicts_extra_items.py:88: error: Unexpected keyword argument "closed" for TypedDict [call-arg]'] +Line 100: Unexpected errors ['typeddicts_extra_items.py:100: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 103: Unexpected errors ['typeddicts_extra_items.py:103: error: Unexpected keyword argument "closed" for TypedDict [call-arg]'] +Line 106: Unexpected errors ['typeddicts_extra_items.py:106: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 124: Unexpected errors ['typeddicts_extra_items.py:124: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 129: Unexpected errors ['typeddicts_extra_items.py:129: error: TypedDict "MovieEI" has no key "year" [typeddict-unknown-key]'] +Line 137: Unexpected errors ['typeddicts_extra_items.py:137: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 144: Unexpected errors ['typeddicts_extra_items.py:144: error: Unexpected keyword argument "year" for "unpack_extra" [call-arg]'] +Line 149: Unexpected errors ['typeddicts_extra_items.py:149: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 152: Unexpected errors ['typeddicts_extra_items.py:152: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 155: Unexpected errors ['typeddicts_extra_items.py:155: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 165: Unexpected errors ['typeddicts_extra_items.py:165: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 171: Unexpected errors ['typeddicts_extra_items.py:171: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 181: Unexpected errors ['typeddicts_extra_items.py:181: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 193: Unexpected errors ['typeddicts_extra_items.py:193: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 210: Unexpected errors ['typeddicts_extra_items.py:210: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 217: Unexpected errors ['typeddicts_extra_items.py:217: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 228: Unexpected errors ['typeddicts_extra_items.py:228: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 231: Unexpected errors ['typeddicts_extra_items.py:231: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 235: Unexpected errors ['typeddicts_extra_items.py:235: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 248: Unexpected errors ['typeddicts_extra_items.py:248: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 251: Unexpected errors ['typeddicts_extra_items.py:251: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 254: Unexpected errors ['typeddicts_extra_items.py:254: error: Extra key "year" for TypedDict "MovieExtraInt" [typeddict-unknown-key]'] +Line 255: Unexpected errors ['typeddicts_extra_items.py:255: error: Extra key "description" for TypedDict "MovieExtraStr" [typeddict-unknown-key]'] +Line 266: Unexpected errors ['typeddicts_extra_items.py:266: error: Extra key "year" for TypedDict "MovieExtraInt" [typeddict-unknown-key]'] +Line 280: Unexpected errors ['typeddicts_extra_items.py:280: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 284: Unexpected errors ['typeddicts_extra_items.py:284: error: Extra key "year" for TypedDict "ExtraMovie" [typeddict-unknown-key]'] +Line 289: Unexpected errors ['typeddicts_extra_items.py:289: error: Unexpected keyword argument "closed" for TypedDict [call-arg]'] +Line 299: Unexpected errors ['typeddicts_extra_items.py:299: error: Extra key "summary" for TypedDict "MovieExtraStr" [typeddict-unknown-key]'] +Line 300: Unexpected errors ['typeddicts_extra_items.py:300: error: Incompatible types in assignment (expression has type "MovieExtraStr", variable has type "Mapping[str, str]") [assignment]'] +Line 302: Unexpected errors ['typeddicts_extra_items.py:302: error: Extra key "year" for TypedDict "MovieExtraInt" [typeddict-unknown-key]'] +Line 304: Unexpected errors ['typeddicts_extra_items.py:304: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "Mapping[str, int | str]") [assignment]'] +Line 310: Unexpected errors ['typeddicts_extra_items.py:310: error: Expression is of type "list[tuple[str, object]]", not "list[tuple[str, int | str]]" [misc]'] +Line 311: Unexpected errors ['typeddicts_extra_items.py:311: error: Expression is of type "list[object]", not "list[int | str]" [misc]'] +Line 319: Unexpected errors ['typeddicts_extra_items.py:319: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg]'] +Line 326: Unexpected errors ['typeddicts_extra_items.py:326: error: Incompatible types in assignment (expression has type "IntDict", variable has type "dict[str, int]") [assignment]'] +Line 329: Unexpected errors ['typeddicts_extra_items.py:329: error: Extra key "bar" for TypedDict "IntDictWithNum" [typeddict-unknown-key]'] +Line 330: Unexpected errors ['typeddicts_extra_items.py:330: error: Incompatible types in assignment (expression has type "IntDictWithNum", variable has type "dict[str, int]") [assignment]'] +Line 337: Unexpected errors ['typeddicts_extra_items.py:337: error: "IntDictWithNum" has no attribute "clear" [attr-defined]'] +Line 339: Unexpected errors ['typeddicts_extra_items.py:339: error: Expression is of type "Any", not "tuple[str, int]" [misc]', 'typeddicts_extra_items.py:339: error: "IntDictWithNum" has no attribute "popitem" [attr-defined]'] +Line 342: Unexpected errors ['typeddicts_extra_items.py:342: error: TypedDict key must be a string literal; expected one of ("num") [misc]'] +Line 343: Unexpected errors ['typeddicts_extra_items.py:343: error: Expected TypedDict key to be string literal [misc]'] """ output = """ -typeddicts_extra_items.py:11: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:14: error: Extra key "novel_adaptation" for TypedDict "Movie" -typeddicts_extra_items.py:15: error: Extra key "year" for TypedDict "Movie" -typeddicts_extra_items.py:19: error: Unexpected keyword argument "extra_items" for "TypedDict" -typeddicts_extra_items.py:29: error: Expression is of type "Any", not "bool" -typeddicts_extra_items.py:29: error: TypedDict "Movie" has no key "novel_adaptation" -typeddicts_extra_items.py:33: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:39: error: Incompatible types (expression has type "None", TypedDict item "year" has type "int") -typeddicts_extra_items.py:40: error: Extra key "other_extra_key" for TypedDict "InheritedMovie" -typeddicts_extra_items.py:49: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:55: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:64: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:67: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:70: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:73: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:82: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:88: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:100: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:103: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:106: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:109: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:114: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:117: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:124: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:128: error: Key "name" of TypedDict "MovieEI" cannot be deleted -typeddicts_extra_items.py:129: error: TypedDict "MovieEI" has no key "year" -typeddicts_extra_items.py:137: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:143: error: Unexpected keyword argument "year" for "unpack_no_extra" -typeddicts_extra_items.py:144: error: Unexpected keyword argument "year" for "unpack_extra" -typeddicts_extra_items.py:149: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:152: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:155: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:165: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:171: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:174: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:181: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:193: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:210: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:217: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:228: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:231: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:235: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:248: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:251: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:254: error: Extra key "year" for TypedDict "MovieExtraInt" -typeddicts_extra_items.py:255: error: Extra key "description" for TypedDict "MovieExtraStr" -typeddicts_extra_items.py:266: error: Extra key "year" for TypedDict "MovieExtraInt" -typeddicts_extra_items.py:278: error: Extra key "year" for TypedDict "NonClosedMovie" -typeddicts_extra_items.py:280: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:284: error: Extra key "year" for TypedDict "ExtraMovie" -typeddicts_extra_items.py:285: error: Extra key "language" for TypedDict "ExtraMovie" -typeddicts_extra_items.py:289: error: Unexpected keyword argument "closed" for TypedDict -typeddicts_extra_items.py:293: error: Extra key "year" for TypedDict "ClosedMovie" -typeddicts_extra_items.py:299: error: Extra key "summary" for TypedDict "MovieExtraStr" -typeddicts_extra_items.py:300: error: Incompatible types in assignment (expression has type "MovieExtraStr", variable has type "Mapping[str, str]") -typeddicts_extra_items.py:302: error: Extra key "year" for TypedDict "MovieExtraInt" -typeddicts_extra_items.py:303: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "Mapping[str, int]") -typeddicts_extra_items.py:304: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "Mapping[str, int | str]") -typeddicts_extra_items.py:310: error: Expression is of type "list[tuple[str, object]]", not "list[tuple[str, int | str]]" -typeddicts_extra_items.py:311: error: Expression is of type "list[object]", not "list[int | str]" -typeddicts_extra_items.py:319: error: Unexpected keyword argument "extra_items" for TypedDict -typeddicts_extra_items.py:326: error: Incompatible types in assignment (expression has type "IntDict", variable has type "dict[str, int]") -typeddicts_extra_items.py:329: error: Extra key "bar" for TypedDict "IntDictWithNum" -typeddicts_extra_items.py:330: error: Incompatible types in assignment (expression has type "IntDictWithNum", variable has type "dict[str, int]") -typeddicts_extra_items.py:337: error: "IntDictWithNum" has no attribute "clear" -typeddicts_extra_items.py:339: error: Expression is of type "Any", not "tuple[str, int]" -typeddicts_extra_items.py:339: error: "IntDictWithNum" has no attribute "popitem" -typeddicts_extra_items.py:342: error: TypedDict key must be a string literal; expected one of ("num") -typeddicts_extra_items.py:343: error: Expected TypedDict key to be string literal -typeddicts_extra_items.py:352: error: Incompatible types in assignment (expression has type "dict[str, int]", variable has type "IntDict") +typeddicts_extra_items.py:11: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:14: error: Extra key "novel_adaptation" for TypedDict "Movie" [typeddict-unknown-key] +typeddicts_extra_items.py:15: error: Extra key "year" for TypedDict "Movie" [typeddict-unknown-key] +typeddicts_extra_items.py:19: error: Unexpected keyword argument "extra_items" for "TypedDict" [call-arg] +typeddicts_extra_items.py:29: error: Expression is of type "Any", not "bool" [misc] +typeddicts_extra_items.py:29: error: TypedDict "Movie" has no key "novel_adaptation" [typeddict-item] +typeddicts_extra_items.py:33: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:39: error: Incompatible types (expression has type "None", TypedDict item "year" has type "int") [typeddict-item] +typeddicts_extra_items.py:40: error: Extra key "other_extra_key" for TypedDict "InheritedMovie" [typeddict-unknown-key] +typeddicts_extra_items.py:49: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:55: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:64: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:67: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:70: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:73: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:82: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:88: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:100: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:103: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:106: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:109: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:114: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:117: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:124: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:128: error: Key "name" of TypedDict "MovieEI" cannot be deleted [misc] +typeddicts_extra_items.py:129: error: TypedDict "MovieEI" has no key "year" [typeddict-unknown-key] +typeddicts_extra_items.py:137: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:143: error: Unexpected keyword argument "year" for "unpack_no_extra" [call-arg] +typeddicts_extra_items.py:144: error: Unexpected keyword argument "year" for "unpack_extra" [call-arg] +typeddicts_extra_items.py:149: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:152: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:155: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:165: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:171: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:174: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:181: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:193: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:210: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:217: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:228: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:231: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:235: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:248: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:251: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:254: error: Extra key "year" for TypedDict "MovieExtraInt" [typeddict-unknown-key] +typeddicts_extra_items.py:255: error: Extra key "description" for TypedDict "MovieExtraStr" [typeddict-unknown-key] +typeddicts_extra_items.py:266: error: Extra key "year" for TypedDict "MovieExtraInt" [typeddict-unknown-key] +typeddicts_extra_items.py:278: error: Extra key "year" for TypedDict "NonClosedMovie" [typeddict-unknown-key] +typeddicts_extra_items.py:280: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:284: error: Extra key "year" for TypedDict "ExtraMovie" [typeddict-unknown-key] +typeddicts_extra_items.py:285: error: Extra key "language" for TypedDict "ExtraMovie" [typeddict-unknown-key] +typeddicts_extra_items.py:289: error: Unexpected keyword argument "closed" for TypedDict [call-arg] +typeddicts_extra_items.py:293: error: Extra key "year" for TypedDict "ClosedMovie" [typeddict-unknown-key] +typeddicts_extra_items.py:299: error: Extra key "summary" for TypedDict "MovieExtraStr" [typeddict-unknown-key] +typeddicts_extra_items.py:300: error: Incompatible types in assignment (expression has type "MovieExtraStr", variable has type "Mapping[str, str]") [assignment] +typeddicts_extra_items.py:302: error: Extra key "year" for TypedDict "MovieExtraInt" [typeddict-unknown-key] +typeddicts_extra_items.py:303: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "Mapping[str, int]") [assignment] +typeddicts_extra_items.py:304: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "Mapping[str, int | str]") [assignment] +typeddicts_extra_items.py:310: error: Expression is of type "list[tuple[str, object]]", not "list[tuple[str, int | str]]" [misc] +typeddicts_extra_items.py:311: error: Expression is of type "list[object]", not "list[int | str]" [misc] +typeddicts_extra_items.py:319: error: Unexpected keyword argument "extra_items" for TypedDict [call-arg] +typeddicts_extra_items.py:326: error: Incompatible types in assignment (expression has type "IntDict", variable has type "dict[str, int]") [assignment] +typeddicts_extra_items.py:329: error: Extra key "bar" for TypedDict "IntDictWithNum" [typeddict-unknown-key] +typeddicts_extra_items.py:330: error: Incompatible types in assignment (expression has type "IntDictWithNum", variable has type "dict[str, int]") [assignment] +typeddicts_extra_items.py:337: error: "IntDictWithNum" has no attribute "clear" [attr-defined] +typeddicts_extra_items.py:339: error: Expression is of type "Any", not "tuple[str, int]" [misc] +typeddicts_extra_items.py:339: error: "IntDictWithNum" has no attribute "popitem" [attr-defined] +typeddicts_extra_items.py:342: error: TypedDict key must be a string literal; expected one of ("num") [misc] +typeddicts_extra_items.py:343: error: Expected TypedDict key to be string literal [misc] +typeddicts_extra_items.py:352: error: Incompatible types in assignment (expression has type "dict[str, int]", variable has type "IntDict") [assignment] """ diff --git a/conformance/results/zuban/typeddicts_inheritance.toml b/conformance/results/zuban/typeddicts_inheritance.toml index a4ea1936..51cd4730 100644 --- a/conformance/results/zuban/typeddicts_inheritance.toml +++ b/conformance/results/zuban/typeddicts_inheritance.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_inheritance.py:44: error: All bases of a new TypedDict must be TypedDict types -typeddicts_inheritance.py:55: error: Overwriting TypedDict field "x" while extending -typeddicts_inheritance.py:65: error: Overwriting TypedDict field "x" while merging +typeddicts_inheritance.py:44: error: All bases of a new TypedDict must be TypedDict types [misc] +typeddicts_inheritance.py:55: error: Overwriting TypedDict field "x" while extending [misc] +typeddicts_inheritance.py:65: error: Overwriting TypedDict field "x" while merging [misc] """ diff --git a/conformance/results/zuban/typeddicts_operations.toml b/conformance/results/zuban/typeddicts_operations.toml index fbe20908..1f0db30f 100644 --- a/conformance/results/zuban/typeddicts_operations.toml +++ b/conformance/results/zuban/typeddicts_operations.toml @@ -2,15 +2,15 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_operations.py:22: error: Value of "name" has incompatible type "int"; expected "str" -typeddicts_operations.py:23: error: Value of "year" has incompatible type "str"; expected "int" -typeddicts_operations.py:24: error: TypedDict "Movie" has no key "other" -typeddicts_operations.py:26: error: TypedDict "Movie" has no key "other" -typeddicts_operations.py:28: error: Missing key "year" for TypedDict "Movie" -typeddicts_operations.py:29: error: Incompatible types (expression has type "float", TypedDict item "year" has type "int") -typeddicts_operations.py:32: error: Extra key "other" for TypedDict "Movie" -typeddicts_operations.py:37: error: Expected TypedDict key to be string literal -typeddicts_operations.py:47: error: "Movie" has no attribute "clear" -typeddicts_operations.py:49: error: Key "name" of TypedDict "Movie" cannot be deleted -typeddicts_operations.py:62: error: "MovieOptional" has no attribute "clear" +typeddicts_operations.py:22: error: Value of "name" has incompatible type "int"; expected "str" [typeddict-item] +typeddicts_operations.py:23: error: Value of "year" has incompatible type "str"; expected "int" [typeddict-item] +typeddicts_operations.py:24: error: TypedDict "Movie" has no key "other" [typeddict-unknown-key] +typeddicts_operations.py:26: error: TypedDict "Movie" has no key "other" [typeddict-item] +typeddicts_operations.py:28: error: Missing key "year" for TypedDict "Movie" [typeddict-item] +typeddicts_operations.py:29: error: Incompatible types (expression has type "float", TypedDict item "year" has type "int") [typeddict-item] +typeddicts_operations.py:32: error: Extra key "other" for TypedDict "Movie" [typeddict-unknown-key] +typeddicts_operations.py:37: error: Expected TypedDict key to be string literal [misc] +typeddicts_operations.py:47: error: "Movie" has no attribute "clear" [attr-defined] +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] """ diff --git a/conformance/results/zuban/typeddicts_readonly.toml b/conformance/results/zuban/typeddicts_readonly.toml index 3185cff8..a9a62603 100644 --- a/conformance/results/zuban/typeddicts_readonly.toml +++ b/conformance/results/zuban/typeddicts_readonly.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_readonly.py:24: error: ReadOnly TypedDict key "members" TypedDict is mutated -typeddicts_readonly.py:36: error: ReadOnly TypedDict key "members" TypedDict is mutated -typeddicts_readonly.py:50: error: ReadOnly TypedDict key "title" TypedDict is mutated -typeddicts_readonly.py:51: error: ReadOnly TypedDict key "year" TypedDict is mutated -typeddicts_readonly.py:60: error: ReadOnly TypedDict key "title" TypedDict is mutated -typeddicts_readonly.py:61: error: ReadOnly TypedDict key "year" TypedDict is mutated +typeddicts_readonly.py:24: error: ReadOnly TypedDict key "members" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:36: error: ReadOnly TypedDict key "members" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:50: error: ReadOnly TypedDict key "title" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:51: error: ReadOnly TypedDict key "year" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:60: error: ReadOnly TypedDict key "title" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:61: error: ReadOnly TypedDict key "year" TypedDict is mutated [typeddict-readonly-mutated] """ diff --git a/conformance/results/zuban/typeddicts_readonly_consistency.toml b/conformance/results/zuban/typeddicts_readonly_consistency.toml index 4a317175..183704fe 100644 --- a/conformance/results/zuban/typeddicts_readonly_consistency.toml +++ b/conformance/results/zuban/typeddicts_readonly_consistency.toml @@ -2,11 +2,11 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_readonly_consistency.py:37: error: Incompatible types in assignment (expression has type "A1", variable has type "B1") -typeddicts_readonly_consistency.py:38: error: Incompatible types in assignment (expression has type "C1", variable has type "B1") -typeddicts_readonly_consistency.py:40: error: Incompatible types in assignment (expression has type "A1", variable has type "C1") -typeddicts_readonly_consistency.py:81: error: Incompatible types in assignment (expression has type "A2", variable has type "B2") -typeddicts_readonly_consistency.py:82: error: Incompatible types in assignment (expression has type "C2", variable has type "B2") -typeddicts_readonly_consistency.py:84: error: Incompatible types in assignment (expression has type "A2", variable has type "C2") -typeddicts_readonly_consistency.py:85: error: Incompatible types in assignment (expression has type "B2", variable has type "C2") +typeddicts_readonly_consistency.py:37: error: Incompatible types in assignment (expression has type "A1", variable has type "B1") [assignment] +typeddicts_readonly_consistency.py:38: error: Incompatible types in assignment (expression has type "C1", variable has type "B1") [assignment] +typeddicts_readonly_consistency.py:40: error: Incompatible types in assignment (expression has type "A1", variable has type "C1") [assignment] +typeddicts_readonly_consistency.py:81: error: Incompatible types in assignment (expression has type "A2", variable has type "B2") [assignment] +typeddicts_readonly_consistency.py:82: error: Incompatible types in assignment (expression has type "C2", variable has type "B2") [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] """ diff --git a/conformance/results/zuban/typeddicts_readonly_inheritance.toml b/conformance/results/zuban/typeddicts_readonly_inheritance.toml index 79193508..1cc7d575 100644 --- a/conformance/results/zuban/typeddicts_readonly_inheritance.toml +++ b/conformance/results/zuban/typeddicts_readonly_inheritance.toml @@ -6,29 +6,29 @@ Incorrectly rejects override of NotRequired ReadOnly item with a Required ReadOn """ conformance_automated = "Fail" errors_diff = """ -Line 19: Unexpected errors ['typeddicts_readonly_inheritance.py:19: error: Overwriting TypedDict field "name" while extending'] -Line 49: Unexpected errors ['typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending'] -Line 62: Unexpected errors ['typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending'] -Line 76: Unexpected errors ['typeddicts_readonly_inheritance.py:76: error: Overwriting TypedDict field "ident" while extending'] -Line 102: Unexpected errors ['typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending'] +Line 19: Unexpected errors ['typeddicts_readonly_inheritance.py:19: error: Overwriting TypedDict field "name" while extending [misc]'] +Line 49: Unexpected errors ['typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending [misc]'] +Line 62: Unexpected errors ['typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending [misc]'] +Line 76: Unexpected errors ['typeddicts_readonly_inheritance.py:76: error: Overwriting TypedDict field "ident" while extending [misc]'] +Line 102: Unexpected errors ['typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending [misc]'] """ output = """ -typeddicts_readonly_inheritance.py:19: error: Overwriting TypedDict field "name" while extending -typeddicts_readonly_inheritance.py:36: error: ReadOnly TypedDict key "name" TypedDict is mutated -typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending -typeddicts_readonly_inheritance.py:50: error: Overwriting TypedDict field "alt" while extending -typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending -typeddicts_readonly_inheritance.py:65: error: Missing key "name" for TypedDict "RequiredName" -typeddicts_readonly_inheritance.py:76: error: Overwriting TypedDict field "ident" while extending -typeddicts_readonly_inheritance.py:82: error: Value of "ident" has incompatible type "int"; expected "str" -typeddicts_readonly_inheritance.py:83: error: Incompatible types (expression has type "int", TypedDict item "ident" has type "str") -typeddicts_readonly_inheritance.py:84: error: Missing key "ident" for TypedDict "User" -typeddicts_readonly_inheritance.py:94: error: Overwriting TypedDict field "a" while extending -typeddicts_readonly_inheritance.py:98: error: Overwriting TypedDict field "a" while extending -typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending -typeddicts_readonly_inheritance.py:106: error: Overwriting TypedDict field "c" while extending -typeddicts_readonly_inheritance.py:119: error: Overwriting TypedDict field "x" while merging -typeddicts_readonly_inheritance.py:119: error: Overwriting TypedDict field "y" while merging -typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "x" while merging -typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "y" while merging +typeddicts_readonly_inheritance.py:19: error: Overwriting TypedDict field "name" while extending [misc] +typeddicts_readonly_inheritance.py:36: error: ReadOnly TypedDict key "name" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending [misc] +typeddicts_readonly_inheritance.py:50: error: Overwriting TypedDict field "alt" while extending [misc] +typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending [misc] +typeddicts_readonly_inheritance.py:65: error: Missing key "name" for TypedDict "RequiredName" [typeddict-item] +typeddicts_readonly_inheritance.py:76: error: Overwriting TypedDict field "ident" while extending [misc] +typeddicts_readonly_inheritance.py:82: error: Value of "ident" has incompatible type "int"; expected "str" [typeddict-item] +typeddicts_readonly_inheritance.py:83: error: Incompatible types (expression has type "int", TypedDict item "ident" has type "str") [typeddict-item] +typeddicts_readonly_inheritance.py:84: error: Missing key "ident" for TypedDict "User" [typeddict-item] +typeddicts_readonly_inheritance.py:94: error: Overwriting TypedDict field "a" while extending [misc] +typeddicts_readonly_inheritance.py:98: error: Overwriting TypedDict field "a" while extending [misc] +typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending [misc] +typeddicts_readonly_inheritance.py:106: error: Overwriting TypedDict field "c" while extending [misc] +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] +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/zuban/typeddicts_readonly_kwargs.toml b/conformance/results/zuban/typeddicts_readonly_kwargs.toml index 4889dc9b..48f979f9 100644 --- a/conformance/results/zuban/typeddicts_readonly_kwargs.toml +++ b/conformance/results/zuban/typeddicts_readonly_kwargs.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_readonly_kwargs.py:33: error: ReadOnly TypedDict key "key1" TypedDict is mutated +typeddicts_readonly_kwargs.py:33: error: ReadOnly TypedDict key "key1" TypedDict is mutated [typeddict-readonly-mutated] """ diff --git a/conformance/results/zuban/typeddicts_required.toml b/conformance/results/zuban/typeddicts_required.toml index 1d81007d..71d50207 100644 --- a/conformance/results/zuban/typeddicts_required.toml +++ b/conformance/results/zuban/typeddicts_required.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_required.py:12: error: Required[] can be only used in a TypedDict definition -typeddicts_required.py:19: error: NotRequired[] can be only used in a TypedDict definition -typeddicts_required.py:62: error: "Required[]" type cannot be nested -typeddicts_required.py:63: error: "NotRequired[]" type cannot be nested +typeddicts_required.py:12: error: Required[] can be only used in a TypedDict definition [valid-type] +typeddicts_required.py:19: error: NotRequired[] can be only used in a TypedDict definition [valid-type] +typeddicts_required.py:62: error: "Required[]" type cannot be nested [misc] +typeddicts_required.py:63: error: "NotRequired[]" type cannot be nested [misc] """ diff --git a/conformance/results/zuban/typeddicts_type_consistency.toml b/conformance/results/zuban/typeddicts_type_consistency.toml index 7ad2d28a..54fba6af 100644 --- a/conformance/results/zuban/typeddicts_type_consistency.toml +++ b/conformance/results/zuban/typeddicts_type_consistency.toml @@ -2,15 +2,15 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_type_consistency.py:21: error: Incompatible types in assignment (expression has type "B1", variable has type "A1") -typeddicts_type_consistency.py:38: error: Incompatible types in assignment (expression has type "B2", variable has type "A2") -typeddicts_type_consistency.py:65: error: Incompatible types in assignment (expression has type "A3", variable has type "B3") -typeddicts_type_consistency.py:69: error: Extra key "y" for TypedDict "A3" -typeddicts_type_consistency.py:76: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[str, int]") -typeddicts_type_consistency.py:77: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[str, object]") -typeddicts_type_consistency.py:78: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[Any, Any]") -typeddicts_type_consistency.py:82: error: Incompatible types in assignment (expression has type "B3", variable has type "Mapping[str, int]") -typeddicts_type_consistency.py:101: error: Incompatible types in assignment (expression has type "str | None", variable has type "str") -typeddicts_type_consistency.py:107: error: Incompatible types in assignment (expression has type "int | str", variable has type "int") -typeddicts_type_consistency.py:126: error: Incompatible types (expression has type "int", TypedDict item "inner_key" has type "str") +typeddicts_type_consistency.py:21: error: Incompatible types in assignment (expression has type "B1", variable has type "A1") [assignment] +typeddicts_type_consistency.py:38: error: Incompatible types in assignment (expression has type "B2", variable has type "A2") [assignment] +typeddicts_type_consistency.py:65: error: Incompatible types in assignment (expression has type "A3", variable has type "B3") [assignment] +typeddicts_type_consistency.py:69: error: Extra key "y" for TypedDict "A3" [typeddict-unknown-key] +typeddicts_type_consistency.py:76: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[str, int]") [assignment] +typeddicts_type_consistency.py:77: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[str, object]") [assignment] +typeddicts_type_consistency.py:78: error: Incompatible types in assignment (expression has type "B3", variable has type "dict[Any, Any]") [assignment] +typeddicts_type_consistency.py:82: error: Incompatible types in assignment (expression has type "B3", variable has type "Mapping[str, int]") [assignment] +typeddicts_type_consistency.py:101: error: Incompatible types in assignment (expression has type "str | None", variable has type "str") [assignment] +typeddicts_type_consistency.py:107: error: Incompatible types in assignment (expression has type "int | str", variable has type "int") [assignment] +typeddicts_type_consistency.py:126: error: Incompatible types (expression has type "int", TypedDict item "inner_key" has type "str") [typeddict-item] """ diff --git a/conformance/results/zuban/typeddicts_usage.toml b/conformance/results/zuban/typeddicts_usage.toml index d34748fa..b77f80f2 100644 --- a/conformance/results/zuban/typeddicts_usage.toml +++ b/conformance/results/zuban/typeddicts_usage.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -typeddicts_usage.py:23: error: TypedDict "Movie" has no key "director" -typeddicts_usage.py:24: error: Value of "year" has incompatible type "str"; expected "int" -typeddicts_usage.py:28: error: Extra key "title" for TypedDict "Movie" -typeddicts_usage.py:28: error: Missing key "name" for TypedDict "Movie" -typeddicts_usage.py:35: error: Cannot use isinstance() with TypedDict type -typeddicts_usage.py:40: error: Invalid type +typeddicts_usage.py:23: error: TypedDict "Movie" has no key "director" [typeddict-unknown-key] +typeddicts_usage.py:24: error: Value of "year" has incompatible type "str"; expected "int" [typeddict-item] +typeddicts_usage.py:28: error: Extra key "title" for TypedDict "Movie" [typeddict-unknown-key] +typeddicts_usage.py:28: error: Missing key "name" for TypedDict "Movie" [typeddict-item] +typeddicts_usage.py:35: error: Cannot use isinstance() with TypedDict type [misc] +typeddicts_usage.py:40: error: Invalid type [valid-type] """ diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 5dd44082..a2663425 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -309,7 +309,6 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: "--enable-error-code", "deprecated", "--no-warn-unreachable", - "--hide-error-codes", ] proc = run(command, stdout=PIPE, text=True, encoding="utf-8") lines = proc.stdout.split("\n")