From 2dc26439587932cd7c026653659e50fba3b16edb Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 12 Sep 2025 21:26:31 +0200 Subject: [PATCH 1/3] Make it possible to run only a specific type checker --- conformance/src/main.py | 2 ++ conformance/src/options.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/conformance/src/main.py b/conformance/src/main.py index 4b8a683d..62a827bc 100644 --- a/conformance/src/main.py +++ b/conformance/src/main.py @@ -260,6 +260,8 @@ def main(): # Run each test case with each type checker. for type_checker in TYPE_CHECKERS: + if options.only_run and options.only_run != type_checker.name: + continue if not type_checker.install(): print(f"Skipping tests for {type_checker.name}") else: diff --git a/conformance/src/options.py b/conformance/src/options.py index 89120774..76c2c5be 100644 --- a/conformance/src/options.py +++ b/conformance/src/options.py @@ -5,10 +5,12 @@ import argparse from dataclasses import dataclass +from type_checker import TYPE_CHECKERS @dataclass class _Options: report_only: bool | None + only_run: str | None def parse_options(argv: list[str]) -> _Options: @@ -19,5 +21,10 @@ def parse_options(argv: list[str]) -> _Options: action="store_true", help="regenerates the test suite report from past results", ) + reporting_group.add_argument( + "--only-run", + help="Only runs the type checker", + choices=[tc.name for tc in TYPE_CHECKERS] + ) ret = _Options(**vars(parser.parse_args(argv))) return ret From 28a7aed860af6fafa6b4fcf7324200e94694ca6a Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 23 Sep 2025 11:10:58 +0200 Subject: [PATCH 2/3] In some cases a test around Never could mark too many statements after it as unreachable --- conformance/tests/constructors_call_metaclass.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conformance/tests/constructors_call_metaclass.py b/conformance/tests/constructors_call_metaclass.py index fa35bdf1..0b40dfc7 100644 --- a/conformance/tests/constructors_call_metaclass.py +++ b/conformance/tests/constructors_call_metaclass.py @@ -20,7 +20,10 @@ def __new__(cls, x: int) -> Self: return super().__new__(cls) -assert_type(Class1(), NoReturn) +# This needs to be in a separate scope, because some type checkers might mark +# the statements after it as unreachable. +if bool(): + assert_type(Class1(), NoReturn) class Meta2(type): From 5d1d8e59233aa17d8453296b5b10e14684916dc7 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 23 Sep 2025 14:20:05 +0200 Subject: [PATCH 3/3] Upgrade test results --- conformance/results/results.html | 14 +- .../results/zuban/callables_kwargs.toml | 2 + .../zuban/constructors_call_metaclass.toml | 17 +- .../results/zuban/constructors_callable.toml | 6 +- .../dataclasses_transform_converter.toml | 44 +---- .../results/zuban/directives_deprecated.toml | 27 ++- conformance/results/zuban/enums_members.toml | 4 - .../zuban/generics_syntax_infer_variance.toml | 80 +++------ .../zuban/generics_syntax_scoping.toml | 6 +- .../results/zuban/literals_literalstring.toml | 24 +-- .../results/zuban/literals_semantics.toml | 2 +- .../results/zuban/tuples_type_compat.toml | 8 +- .../results/zuban/typeddicts_alt_syntax.toml | 2 +- .../zuban/typeddicts_class_syntax.toml | 4 +- .../results/zuban/typeddicts_extra_items.toml | 156 +++--------------- conformance/results/zuban/version.toml | 2 +- 16 files changed, 97 insertions(+), 301 deletions(-) diff --git a/conformance/results/results.html b/conformance/results/results.html index 5805ee71..35401d35 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -164,7 +164,7 @@

Python Type System Conformance Test Results

pyre 0.9.25
-
zuban 0.0.20
+
zuban 0.0.24
pyrefly 0.30.0
@@ -371,7 +371,7 @@

Python Type System Conformance Test Results

Unsupported

Type parameter syntax not yet support.

Pass
Partial

Incorrectly determines that a class cannot be instantiated with __getitem__.

Incorrectly handles mixing legacy and PEP695 syntax.

-
Unsupported

Type parameter syntax not yet support.

+
Partial

Final is handled a bit different (questionable if this is an issue)

Pass      generics_syntax_scoping @@ -565,7 +565,7 @@

Python Type System Conformance Test Results

Unsupported

Support for `LiteralString` is not implemented.

Pass
Partial

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

-
Unsupported

Support for `LiteralString` is not implemented.

+Pass
Partial

LiteralString is sometimes converted to str

     literals_parameterizations @@ -707,7 +707,7 @@

Python Type System Conformance Test Results

Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

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

Pass
Partial

Does not evaluate __new__ if metaclass __call__ is defined.

-
Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

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

+Pass Pass      constructors_call_new @@ -870,7 +870,7 @@

Python Type System Conformance Test Results

Unsupported

Converter parameter not yet supported.

Pass
Unsupported

Converter parameter not yet supported.

-
Unsupported

Converter parameter not yet supported.

+
Partial

Converters are fully supported, failed to match generic overloads against other generics

Pass      dataclasses_transform_field @@ -922,7 +922,7 @@

Python Type System Conformance Test Results

Unsupported

Not supported.

Partial

Does not flag illegal use of `closed=False` when inheriting from a non-open TypedDict.

Unsupported

Not supported.

-
Unsupported

Not supported.

+Pass
Partial

Does not fully support extra_items for typed dicts

     typeddicts_final @@ -1140,7 +1140,7 @@

Python Type System Conformance Test Results

Pass Pass
Unsupported

Does not support @deprecated.

-Unsupported +Pass Unsupported      directives_no_type_check diff --git a/conformance/results/zuban/callables_kwargs.toml b/conformance/results/zuban/callables_kwargs.toml index f0549f1d..d68256b7 100644 --- a/conformance/results/zuban/callables_kwargs.toml +++ b/conformance/results/zuban/callables_kwargs.toml @@ -6,6 +6,8 @@ callables_kwargs.py:46: error: Missing named argument "v1" for "func1" [call-ar 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:52: error: Missing named argument "v1" for "func1" [call-arg] +callables_kwargs.py:52: error: Missing named argument "v3" 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] diff --git a/conformance/results/zuban/constructors_call_metaclass.toml b/conformance/results/zuban/constructors_call_metaclass.toml index c15a19e3..c9c2218a 100644 --- a/conformance/results/zuban/constructors_call_metaclass.toml +++ b/conformance/results/zuban/constructors_call_metaclass.toml @@ -1,18 +1,7 @@ -conformant = "Unupported" -notes = """ -Does not honor metaclass __call__ method when evaluating constructor call. -Does not skip evaluation of __new__ and __init__ if custom metaclass call returns non-class. -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -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" [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] +constructors_call_metaclass.py:54: error: Missing positional argument "x" in call to "Class3" [call-arg] +constructors_call_metaclass.py:68: error: Missing positional argument "x" in call to "Class4" [call-arg] """ diff --git a/conformance/results/zuban/constructors_callable.toml b/conformance/results/zuban/constructors_callable.toml index 98e51560..f5e130ae 100644 --- a/conformance/results/zuban/constructors_callable.toml +++ b/conformance/results/zuban/constructors_callable.toml @@ -10,8 +10,6 @@ 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") [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]'] @@ -34,9 +32,7 @@ constructors_callable.py:73: error: Incompatible return type for "__new__" (retu 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 [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" [misc] -constructors_callable.py:105: error: Expression is of type "Class5", not "Never" [misc] +constructors_callable.py:97: note: Revealed type is "def (*args: Any, **kwargs: Any) -> Never" 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" [misc] diff --git a/conformance/results/zuban/dataclasses_transform_converter.toml b/conformance/results/zuban/dataclasses_transform_converter.toml index 6e1b3c83..182ab621 100644 --- a/conformance/results/zuban/dataclasses_transform_converter.toml +++ b/conformance/results/zuban/dataclasses_transform_converter.toml @@ -1,50 +1,20 @@ -conformant = "Unsupported" +conformant = "Partial" notes = """ -Converter parameter not yet supported. +Converters are fully supported, failed to match generic overloads against other generics """ 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 [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]" [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:107: error: Argument 1 to "DC2" has incompatible type "int"; expected "str" [arg-type] +dataclasses_transform_converter.py:108: error: Argument 4 to "DC2" has incompatible type "int"; expected "str | bytes" [arg-type] +dataclasses_transform_converter.py:109: error: Argument 5 to "DC2" has incompatible type "complex"; expected "str | list[str]" [arg-type] +dataclasses_transform_converter.py:118: error: Incompatible types in assignment of a dataclass converter (expression has type "int", expected type "str") [assignment] +dataclasses_transform_converter.py:119: error: Incompatible types in assignment of a dataclass converter (expression has type "int", expected type "str | bytes") [assignment] 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/directives_deprecated.toml b/conformance/results/zuban/directives_deprecated.toml index 2b371826..691c82a4 100644 --- a/conformance/results/zuban/directives_deprecated.toml +++ b/conformance/results/zuban/directives_deprecated.toml @@ -1,18 +1,17 @@ -conformant = "Unsupported" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 18: Expected 1 errors -Line 24: Expected 1 errors -Line 25: Expected 1 errors -Line 30: Expected 1 errors -Line 41: Expected 1 errors -Line 42: Expected 1 errors -Line 44: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 58: Expected 1 errors -Line 69: Expected 1 errors -Line 98: Expected 1 errors """ output = """ +directives_deprecated.py:18: error: class _directives_deprecated_library.Ham is deprecated: Use Spam instead [deprecated] +directives_deprecated.py:24: error: function _directives_deprecated_library.norwegian_blue is deprecated: It is pining for the fjords [deprecated] +directives_deprecated.py:25: error: function _directives_deprecated_library.norwegian_blue is deprecated: It is pining for the fjords [deprecated] +directives_deprecated.py:30: error: overload def (x: builtins.int) -> builtins.str of function _directives_deprecated_library.foo is deprecated: Only str will be allowed [deprecated] +directives_deprecated.py:41: error: function _directives_deprecated_library.Spam.__add__ is deprecated: There is enough spam in the world [deprecated] +directives_deprecated.py:42: error: function _directives_deprecated_library.Spam.__add__ is deprecated: There is enough spam in the world [deprecated] +directives_deprecated.py:44: error: function _directives_deprecated_library.Spam.greasy is deprecated: All spam will be equally greasy [deprecated] +directives_deprecated.py:47: error: function _directives_deprecated_library.Spam.shape is deprecated: Shapes are becoming immutable [deprecated] +directives_deprecated.py:48: error: function _directives_deprecated_library.Spam.shape is deprecated: Shapes are becoming immutable [deprecated] +directives_deprecated.py:58: error: function directives_deprecated.Invocable.__call__ is deprecated: Deprecated [deprecated] +directives_deprecated.py:69: error: function directives_deprecated.lorem is deprecated: Deprecated [deprecated] +directives_deprecated.py:98: error: function directives_deprecated.SupportsFoo1.foo is deprecated: Deprecated [deprecated] """ diff --git a/conformance/results/zuban/enums_members.toml b/conformance/results/zuban/enums_members.toml index 991c40eb..0a625e68 100644 --- a/conformance/results/zuban/enums_members.toml +++ b/conformance/results/zuban/enums_members.toml @@ -9,14 +9,10 @@ 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" [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" [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 [valid-type] diff --git a/conformance/results/zuban/generics_syntax_infer_variance.toml b/conformance/results/zuban/generics_syntax_infer_variance.toml index 338d876e..f6f76221 100644 --- a/conformance/results/zuban/generics_syntax_infer_variance.toml +++ b/conformance/results/zuban/generics_syntax_infer_variance.toml @@ -1,67 +1,31 @@ -conformant = "Unsupported" +conformant = "Partial" notes = """ -Type parameter syntax not yet support. +Final is handled a bit different (questionable if this is an issue) """ conformance_automated = "Fail" errors_diff = """ -Line 11: Unexpected errors ['generics_syntax_infer_variance.py:11: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] -Line 12: Unexpected errors ['generics_syntax_infer_variance.py:12: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] -Line 13: Unexpected errors ['generics_syntax_infer_variance.py:13: error: Unexpected argument to "TypeVar()": "infer_variance" [misc]'] -Line 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]'] +Line 79: Unexpected errors ['generics_syntax_infer_variance.py:79: error: Final name declared in class body cannot depend on type variables [misc]'] +Line 85: Unexpected errors ['generics_syntax_infer_variance.py:85: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[int]", variable has type "ShouldBeCovariant6[float]") [assignment]'] """ output = """ -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:15: error: Cannot use covariant with infer_variance [misc] +generics_syntax_infer_variance.py:17: error: Cannot use contravariant with infer_variance [misc] +generics_syntax_infer_variance.py:29: error: Incompatible types in assignment (expression has type "ShouldBeCovariant1[float]", variable has type "ShouldBeCovariant1[int]") [assignment] +generics_syntax_infer_variance.py:37: error: Incompatible types in assignment (expression has type "ShouldBeCovariant2[float]", variable has type "ShouldBeCovariant2[int]") [assignment] +generics_syntax_infer_variance.py:46: error: Incompatible types in assignment (expression has type "ShouldBeCovariant3[float]", variable has type "ShouldBeCovariant3[int]") [assignment] +generics_syntax_infer_variance.py:75: error: Incompatible types in assignment (expression has type "ShouldBeCovariant5[float]", variable has type "ShouldBeCovariant5[int]") [assignment] +generics_syntax_infer_variance.py:79: error: Final name declared in class body cannot depend on type variables [misc] +generics_syntax_infer_variance.py:85: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[int]", variable has type "ShouldBeCovariant6[float]") [assignment] +generics_syntax_infer_variance.py:86: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[float]", variable has type "ShouldBeCovariant6[int]") [assignment] +generics_syntax_infer_variance.py:102: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[int]", variable has type "ShouldBeInvariant1[float]") [assignment] +generics_syntax_infer_variance.py:103: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[float]", variable has type "ShouldBeInvariant1[int]") [assignment] +generics_syntax_infer_variance.py:117: error: Incompatible types in assignment (expression has type "ShouldBeInvariant2[int]", variable has type "ShouldBeInvariant2[float]") [assignment] +generics_syntax_infer_variance.py:118: error: Incompatible types in assignment (expression has type "ShouldBeInvariant2[float]", variable has type "ShouldBeInvariant2[int]") [assignment] +generics_syntax_infer_variance.py:125: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[int, str]", variable has type "ShouldBeInvariant3[float, str]") [assignment] +generics_syntax_infer_variance.py:126: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[float, str]", variable has type "ShouldBeInvariant3[int, str]") [assignment] +generics_syntax_infer_variance.py:127: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[str, int]", variable has type "ShouldBeInvariant3[str, float]") [assignment] +generics_syntax_infer_variance.py:128: error: Incompatible types in assignment (expression has type "ShouldBeInvariant3[str, float]", variable has type "ShouldBeInvariant3[str, int]") [assignment] 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] +generics_syntax_infer_variance.py:155: error: Incompatible types in assignment (expression has type "ShouldBeContravariant1[int]", variable has type "ShouldBeContravariant1[float]") [assignment] """ diff --git a/conformance/results/zuban/generics_syntax_scoping.toml b/conformance/results/zuban/generics_syntax_scoping.toml index 3d864b80..7f32a0ca 100644 --- a/conformance/results/zuban/generics_syntax_scoping.toml +++ b/conformance/results/zuban/generics_syntax_scoping.toml @@ -4,9 +4,6 @@ Does not following runtime scoping rules for type parameters in all cases. """ conformance_automated = "Fail" 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 [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]'] @@ -35,6 +32,9 @@ generics_syntax_scoping.py:56: error: Name "S" already defined on line 55 [no-r 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:92: error: "T" already defined as a type parameter [misc] +generics_syntax_scoping.py:95: error: "T" already defined as a type parameter [misc] +generics_syntax_scoping.py:98: error: "T" already defined as a type parameter [misc] 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] diff --git a/conformance/results/zuban/literals_literalstring.toml b/conformance/results/zuban/literals_literalstring.toml index c223e5f6..8084711d 100644 --- a/conformance/results/zuban/literals_literalstring.toml +++ b/conformance/results/zuban/literals_literalstring.toml @@ -1,22 +1,16 @@ -conformant = "Unsupported" -notes = """ -Support for `LiteralString` is not implemented. -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -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 [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 [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] +literals_literalstring.py:66: error: Incompatible types in assignment (expression has type "str", variable has type "LiteralString") [assignment] +literals_literalstring.py:74: error: Incompatible types in assignment (expression has type "Literal[3]", variable has type "LiteralString") [assignment] +literals_literalstring.py:75: error: Incompatible types in assignment (expression has type "Literal[b'test']", variable has type "LiteralString") [assignment] +literals_literalstring.py:120: error: Value of type variable "TLiteral" of "literal_identity" cannot be "str" [type-var] +literals_literalstring.py:134: error: Value of type variable "T" of "Container" cannot be "str" [type-var] +literals_literalstring.py:171: error: Incompatible types in assignment (expression has type "list[LiteralString]", variable has type "list[str]") [assignment] +literals_literalstring.py:171: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance +literals_literalstring.py:171: note: Consider using "Sequence" instead, which is covariant """ diff --git a/conformance/results/zuban/literals_semantics.toml b/conformance/results/zuban/literals_semantics.toml index ccd8e842..57c26e05 100644 --- a/conformance/results/zuban/literals_semantics.toml +++ b/conformance/results/zuban/literals_semantics.toml @@ -5,5 +5,5 @@ output = """ 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] +literals_semantics.py:33: error: Incompatible types in assignment (expression has type "Literal[6, 7, 8]", variable has type "Literal[3, 4, 5]") [assignment] """ diff --git a/conformance/results/zuban/tuples_type_compat.toml b/conformance/results/zuban/tuples_type_compat.toml index 991732fe..b6ac1afb 100644 --- a/conformance/results/zuban/tuples_type_compat.toml +++ b/conformance/results/zuban/tuples_type_compat.toml @@ -2,11 +2,8 @@ conformant = "Pass" notes = """ Does not support tuple narrowing based on `len()` type guard (optional). """ -conformance_automated = "Fail" +conformance_automated = "Pass" 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]" [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]") [assignment] @@ -16,8 +13,7 @@ tuples_type_compat.py:33: error: Incompatible types in assignment (expression ha 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:81: error: Expression is of type "tuple[str, str] | tuple[int, int]", 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] diff --git a/conformance/results/zuban/typeddicts_alt_syntax.toml b/conformance/results/zuban/typeddicts_alt_syntax.toml index f98d6588..afb3f8a6 100644 --- a/conformance/results/zuban/typeddicts_alt_syntax.toml +++ b/conformance/results/zuban/typeddicts_alt_syntax.toml @@ -8,6 +8,6 @@ output = """ 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:35: error: Unexpected keyword argument "other" for "TypedDict" [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 cbf24ab3..68741c76 100644 --- a/conformance/results/zuban/typeddicts_class_syntax.toml +++ b/conformance/results/zuban/typeddicts_class_syntax.toml @@ -5,6 +5,6 @@ output = """ 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] +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 86048bc3..82f60b5f 100644 --- a/conformance/results/zuban/typeddicts_extra_items.toml +++ b/conformance/results/zuban/typeddicts_extra_items.toml @@ -1,143 +1,33 @@ -conformant = "Unsupported" -notes = """ -Not supported. -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 22: Expected 1 errors -Line 215: Expected 1 errors -Line 222: Expected 1 errors -Line 242: Expected 1 errors -Line 256: Expected 1 errors -Line 257: Expected 1 errors -Line 268: Expected 1 errors -Lines 91, 92: Expected error (tag 'MovieC') -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 [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 [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:15: error: Incompatible types (expression has type "int", TypedDict item "year" has type "bool") [typeddict-item] +typeddicts_extra_items.py:22: error: Incompatible types (expression has type "int", TypedDict item "year" has type "bool") [typeddict-item] 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:49: error: "closed" argument must be a True or False literal [misc] +typeddicts_extra_items.py:67: error: Cannot set "closed=False" when superclass is "closed=True" [misc] +typeddicts_extra_items.py:73: error: Cannot set "closed=False" when superclass has "extra_items" [misc] +typeddicts_extra_items.py:92: error: TypedDict member "age" is required, but the extra_items of the super class are not [misc] +typeddicts_extra_items.py:95: error: TypedDict member "age" is required, but the extra_items of the super class are not [misc] +typeddicts_extra_items.py:109: error: Cannot set "closed=True" when superclass has non-read-only "extra_items" [misc] +typeddicts_extra_items.py:114: error: "extra_items" value cannot be "Required[...]" [misc] +typeddicts_extra_items.py:117: error: "extra_items" value cannot be "NotRequired[...]" [misc] 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:174: error: Cannot change "extra_items" type unless it is "ReadOnly" in the superclass [misc] +typeddicts_extra_items.py:185: error: TypedDict member "year" is required, but the extra_items of the super class are not [misc] +typeddicts_extra_items.py:188: error: TypedDict member "year" type "int" is not assignable, but the extra_items of the super class are of type "int | None" [misc] +typeddicts_extra_items.py:197: error: TypedDict member "publisher" type "str" is not assignable, but the extra_items of the super class are of type "int | None" [misc] +typeddicts_extra_items.py:215: error: Incompatible types in assignment (expression has type "MovieDetails", variable has type "MovieBase2") [assignment] +typeddicts_extra_items.py:222: error: Incompatible types in assignment (expression has type "MovieWithYear2", variable has type "MovieBase2") [assignment] +typeddicts_extra_items.py:242: error: Incompatible types in assignment (expression has type "MovieDetails5", variable has type "MovieSI") [assignment] +typeddicts_extra_items.py:256: error: Incompatible types in assignment (expression has type "MovieExtraStr", variable has type "MovieExtraInt") [assignment] +typeddicts_extra_items.py:257: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "MovieExtraStr") [assignment] +typeddicts_extra_items.py:268: error: Incompatible types in assignment (expression has type "MovieNotClosed", variable has type "MovieExtraInt") [assignment] 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:285: error: Incompatible types (expression has type "str", TypedDict item "language" has type "int") [typeddict-item] +typeddicts_extra_items.py:293: error: Incompatible types (expression has type "int", TypedDict item "year" has type "Never") [typeddict-item] 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/version.toml b/conformance/results/zuban/version.toml index a4131817..88a02908 100644 --- a/conformance/results/zuban/version.toml +++ b/conformance/results/zuban/version.toml @@ -1 +1 @@ -version = "zuban 0.0.20" +version = "zuban 0.0.24"