From d38d55fe6d269b99cc2d7d9bbb9c0205c78f0535 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Feb 2026 21:16:20 -0800 Subject: [PATCH 01/78] first version from codex --- conformance/tests/typeforms_typeform.py | 98 ++++++++++++ docs/spec/type-forms.rst | 191 ++++++++++++++++++++++++ 2 files changed, 289 insertions(+) create mode 100644 conformance/tests/typeforms_typeform.py create mode 100644 docs/spec/type-forms.rst diff --git a/conformance/tests/typeforms_typeform.py b/conformance/tests/typeforms_typeform.py new file mode 100644 index 000000000..f590112cc --- /dev/null +++ b/conformance/tests/typeforms_typeform.py @@ -0,0 +1,98 @@ +""" +Tests TypeForm functionality. +""" + +# Specification: https://typing.readthedocs.io/en/latest/spec/type-forms.html#typeform + +import types +from typing import Annotated, Any, ClassVar, Final, Literal, Optional, Self, TypeVarTuple, Unpack, assert_type +from typing_extensions import TypeForm + + +# > ``TypeForm[T]`` describes the set of all type form objects that represent +# > the type ``T`` or types that are assignable to ``T``. + +ok1: TypeForm[str | None] = str | None # OK +ok2: TypeForm[str | None] = str # OK +ok3: TypeForm[str | None] = None # OK +ok4: TypeForm[str | None] = Literal[None] # OK +ok5: TypeForm[str | None] = Optional[str] # OK +ok6: TypeForm[str | None] = "str | None" # OK +ok7: TypeForm[str | None] = Any # OK + +err1: TypeForm[str | None] = str | int # E +err2: TypeForm[str | None] = list[str | None] # E + + +# > ``TypeForm[Any]`` is assignable both to and from any other ``TypeForm`` type. + +v_any: TypeForm[Any] = int | str +v_str: TypeForm[str] = str +v_any = v_str # OK +v_str = v_any # OK + +assert_type(v_any, TypeForm[Any]) +assert_type(v_str, TypeForm[str]) + + +# > Valid type expressions are assignable to ``TypeForm`` through implicit TypeForm evaluation. + +v1_actual: types.UnionType = str | None # OK +v1_type_form: TypeForm[str | None] = str | None # OK + +v2_actual: types.GenericAlias = list[int] # OK +v2_type_form: TypeForm = list[int] # OK + +v3: TypeForm[int | str] = Annotated[int | str, "metadata"] # OK +v4: TypeForm[set[str]] = "set[str]" # OK + + +# > Expressions that are not valid type expressions should not evaluate to a ``TypeForm`` type. + +Ts = TypeVarTuple("Ts") +var = 1 + +bad1: TypeForm = tuple() # E +bad2: TypeForm = (1, 2) # E +bad3: TypeForm = 1 # E +bad4: TypeForm = Self # E +bad5: TypeForm = Literal[var] # E +bad6: TypeForm = Literal[f""] # E +bad7: TypeForm = ClassVar[int] # E +bad8: TypeForm = Final[int] # E +bad9: TypeForm = Unpack[Ts] # E +bad10: TypeForm = Optional # E +bad11: TypeForm = "int + str" # E + + +# > ``TypeForm`` acts as a function that can be called with a single valid type expression. + +x1 = TypeForm(str | None) +assert_type(x1, TypeForm[str | None]) + +x2 = TypeForm("list[int]") +assert_type(x2, TypeForm[list[int]]) + +x3 = TypeForm("type(1)") # E +x4 = type(1) # OK +x5 = TypeForm(type(1)) # E + + +# > ``TypeForm`` is covariant in its single type parameter. + +def get_type_form() -> TypeForm[int]: + return int + + +t1: TypeForm[int | str] = get_type_form() # OK +t2: TypeForm[str] = get_type_form() # E + + +# > ``type[T]`` is a subtype of ``TypeForm[T]``. + +def get_type() -> type[int]: + return int + + +t3: TypeForm[int | str] = get_type() # OK +t4: TypeForm[str] = get_type() # E diff --git a/docs/spec/type-forms.rst b/docs/spec/type-forms.rst new file mode 100644 index 000000000..827599fa2 --- /dev/null +++ b/docs/spec/type-forms.rst @@ -0,0 +1,191 @@ +.. _`type-forms`: + +Type forms +========== + +.. _`typeform`: + +TypeForm +-------- + +(Originally specified in :pep:`747`.) + +When a type expression is evaluated at runtime, the resulting value is a +*type form* object. This value encodes the information supplied in the type +expression, and it represents the type described by that type expression. + +``TypeForm`` is a :term:`special form` that, when used in a type expression, +describes a set of type form objects. It accepts a single type argument, which +must be a :ref:`valid type expression `. +``TypeForm[T]`` describes the set of all type form objects that represent +the type ``T`` or types that are :term:`assignable` to ``T``. For example, +``TypeForm[str | None]`` describes the set of all type form objects that +represent a type assignable to ``str | None``:: + + from typing import Any, Literal, Optional + from typing_extensions import TypeForm + + ok1: TypeForm[str | None] = str | None # OK + ok2: TypeForm[str | None] = str # OK + ok3: TypeForm[str | None] = None # OK + ok4: TypeForm[str | None] = Literal[None] # OK + ok5: TypeForm[str | None] = Optional[str] # OK + ok6: TypeForm[str | None] = "str | None" # OK + ok7: TypeForm[str | None] = Any # OK + + err1: TypeForm[str | None] = str | int # Error + err2: TypeForm[str | None] = list[str | None] # Error + +By this same definition, ``TypeForm[object]`` describes a type form object +that represents the type ``object`` or any type that is assignable to +``object``. Since all types in the Python type system are assignable to +``object``, ``TypeForm[object]`` describes the set of all type form objects +evaluated from all valid type expressions. + +``TypeForm[Any]`` describes a ``TypeForm`` type whose type argument is not +statically known but is a valid type form object. It is assignable both +to and from any other ``TypeForm`` type (because ``Any`` is assignable both +to and from any type). + +The type expression ``TypeForm``, with no type argument provided, is +equivalent to ``TypeForm[Any]``. + +.. _`implicit-typeform-evaluation`: + +Implicit ``TypeForm`` evaluation +-------------------------------- + +When a static type checker encounters a valid type expression, the evaluated +type of this expression should be assignable to ``TypeForm[T]`` if the type it +describes is assignable to ``T``. + +For example, if a static type checker encounters the expression +``str | None``, it may normally evaluate its type as ``UnionType`` because it +produces a runtime value that is an instance of ``types.UnionType``. However, +because this expression is a valid type expression, it is also assignable to +the type ``TypeForm[str | None]``:: + + from types import GenericAlias, UnionType + from typing_extensions import TypeForm + + v1_actual: UnionType = str | None # OK + v1_type_form: TypeForm[str | None] = str | None # OK + + v2_actual: GenericAlias = list[int] # OK + v2_type_form: TypeForm = list[int] # OK + +The ``Annotated`` special form is allowed in type expressions, so it can +also appear in an expression that is assignable to ``TypeForm``. Consistent +with the typing spec's rules for ``Annotated``, a static type checker may +choose to ignore any ``Annotated`` metadata that it does not understand:: + + from typing import Annotated + from typing_extensions import TypeForm + + v3: TypeForm[int | str] = Annotated[int | str, "metadata"] # OK + +A string literal expression containing a valid type expression should likewise +be assignable to ``TypeForm``:: + + from typing_extensions import TypeForm + + v4: TypeForm[set[str]] = "set[str]" # OK + +.. _`valid-type-expressions`: + +Valid type expressions +---------------------- + +The typing spec defines syntactic rules for type expressions in the form of a +:ref:`formal grammar `. Semantic rules are specified as +comments along with the grammar definition. Contextual requirements are +detailed throughout the typing spec in sections that discuss concepts that +appear within type expressions. For example, the special form ``Self`` can be +used in a type expression only within a class, and a type variable can be used +within a type expression only when it is associated with a valid scope. + +A valid type expression is an expression that follows all of the syntactic, +semantic, and contextual rules for a type expression. + +Expressions that are not valid type expressions should not evaluate to a +``TypeForm`` type:: + + from typing import ClassVar, Final, Literal, Optional, Self, TypeVarTuple, Unpack + from typing_extensions import TypeForm + + Ts = TypeVarTuple("Ts") + var = 1 + + bad1: TypeForm = tuple() # Error: call expression not allowed in type expression + bad2: TypeForm = (1, 2) # Error: tuple expression not allowed in type expression + bad3: TypeForm = 1 # Error: non-class object not allowed in type expression + bad4: TypeForm = Self # Error: Self not allowed outside of a class + bad5: TypeForm = Literal[var] # Error: variable not allowed in type expression + bad6: TypeForm = Literal[f""] # Error: f-strings not allowed in type expression + bad7: TypeForm = ClassVar[int] # Error: ClassVar not allowed in type expression + bad8: TypeForm = Final[int] # Error: Final not allowed in type expression + bad9: TypeForm = Unpack[Ts] # Error: Unpack not allowed in this context + bad10: TypeForm = Optional # Error: invalid use of Optional special form + bad11: TypeForm = "int + str" # Error: invalid quoted type expression + +.. _`explicit-typeform-evaluation`: + +Explicit ``TypeForm`` evaluation +-------------------------------- + +``TypeForm`` also acts as a function that can be called with a single +argument. Type checkers should validate that this argument is a valid type +expression:: + + from typing import assert_type + from typing_extensions import TypeForm + + x1 = TypeForm(str | None) + assert_type(x1, TypeForm[str | None]) + + x2 = TypeForm("list[int]") + assert_type(x2, TypeForm[list[int]]) + + x3 = TypeForm("type(1)") # Error: invalid type expression + +The static type of a ``TypeForm(T)`` expression is ``TypeForm[T]``. + +At runtime the ``TypeForm(...)`` callable simply returns the value passed to +it. + +This explicit syntax serves two purposes. First, it documents the developer's +intent to use the value as a type form object. Second, static type checkers +validate that all rules for type expressions are followed:: + + x4 = type(1) # No error, evaluates to "type[int]" + + x5 = TypeForm(type(1)) # Error: call not allowed in type expression + +.. _`typeform-assignability`: + +Assignability +------------- + +``TypeForm`` has a single type parameter, which is covariant. That means +``TypeForm[B]`` is assignable to ``TypeForm[A]`` if ``B`` is assignable to +``A``:: + + from typing_extensions import TypeForm + + def get_type_form() -> TypeForm[int]: ... + + t1: TypeForm[int | str] = get_type_form() # OK + t2: TypeForm[str] = get_type_form() # Error + +``type[T]`` is a subtype of ``TypeForm[T]``, which means that ``type[B]`` is +assignable to ``TypeForm[A]`` if ``B`` is assignable to ``A``:: + + from typing_extensions import TypeForm + + def get_type() -> type[int]: ... + + t3: TypeForm[int | str] = get_type() # OK + t4: TypeForm[str] = get_type() # Error + +``TypeForm`` is a subtype of ``object`` and is assumed to have all of the +attributes and methods of ``object``. From a87acb72fe39b291d037e5a224e70b2489cbe3f4 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Feb 2026 21:17:41 -0800 Subject: [PATCH 02/78] edits --- conformance/README.md | 1 + conformance/src/test_groups.toml | 4 ++++ docs/spec/annotations.rst | 1 + docs/spec/index.rst | 1 + docs/spec/type-forms.rst | 6 +++--- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/conformance/README.md b/conformance/README.md index e0302c806..0e450e07b 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -12,6 +12,7 @@ This project contains test cases for behaviors defined in the Python typing spec * [concepts](https://typing.python.org/en/latest/spec/concepts.html) * [annotations](https://typing.python.org/en/latest/spec/annotations.html) +* [typeforms](https://typing.python.org/en/latest/spec/type-forms.html) * [specialtypes](https://typing.python.org/en/latest/spec/special-types.html) * [generics](https://typing.python.org/en/latest/spec/generics.html) * [qualifiers](https://typing.python.org/en/latest/spec/qualifiers.html) diff --git a/conformance/src/test_groups.toml b/conformance/src/test_groups.toml index f6588f561..adf2b355c 100644 --- a/conformance/src/test_groups.toml +++ b/conformance/src/test_groups.toml @@ -7,6 +7,10 @@ href = "https://typing.readthedocs.io/en/latest/spec/concepts.html" name = "Type annotations" href = "https://typing.readthedocs.io/en/latest/spec/annotations.html" +[typeforms] +name = "Type forms" +href = "https://typing.readthedocs.io/en/latest/spec/type-forms.html" + [specialtypes] name = "Special types in annotations" href = "https://typing.readthedocs.io/en/latest/spec/special-types.html" diff --git a/docs/spec/annotations.rst b/docs/spec/annotations.rst index 9ef5bfe57..085d9277b 100644 --- a/docs/spec/annotations.rst +++ b/docs/spec/annotations.rst @@ -170,6 +170,7 @@ The following grammar describes the allowed elements of type and annotation expr : (valid only in some contexts) : | '[' `type_expression` ']' : (valid only in some contexts) + : | ('[' `type_expression` ']')? : | `string_annotation` : (must evaluate to a valid `type_expression`) maybe_unpacked: `type_expression` | `unpacked` diff --git a/docs/spec/index.rst b/docs/spec/index.rst index 30210227e..47d491766 100644 --- a/docs/spec/index.rst +++ b/docs/spec/index.rst @@ -9,6 +9,7 @@ Specification for the Python type system meta concepts annotations + type-forms special-types generics qualifiers diff --git a/docs/spec/type-forms.rst b/docs/spec/type-forms.rst index 827599fa2..4dc7c9e35 100644 --- a/docs/spec/type-forms.rst +++ b/docs/spec/type-forms.rst @@ -76,7 +76,7 @@ the type ``TypeForm[str | None]``:: The ``Annotated`` special form is allowed in type expressions, so it can also appear in an expression that is assignable to ``TypeForm``. Consistent -with the typing spec's rules for ``Annotated``, a static type checker may +with the general rules for ``Annotated``, a static type checker may choose to ignore any ``Annotated`` metadata that it does not understand:: from typing import Annotated @@ -96,10 +96,10 @@ be assignable to ``TypeForm``:: Valid type expressions ---------------------- -The typing spec defines syntactic rules for type expressions in the form of a +This specification defines syntactic rules for type expressions in the form of a :ref:`formal grammar `. Semantic rules are specified as comments along with the grammar definition. Contextual requirements are -detailed throughout the typing spec in sections that discuss concepts that +detailed throughout the text in sections that discuss concepts that appear within type expressions. For example, the special form ``Self`` can be used in a type expression only within a class, and a type variable can be used within a type expression only when it is associated with a valid scope. From 7e5cced0d4d7011a2bc8cb1a85b1295b51a3d6f1 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Feb 2026 21:26:07 -0800 Subject: [PATCH 03/78] update --- .../results/mypy/classes_classvar.toml | 2 +- .../results/mypy/dataclasses_final.toml | 2 - .../mypy/generics_variance_inference.toml | 4 +- .../mypy/qualifiers_final_annotation.toml | 4 +- .../results/mypy/typeforms_typeform.toml | 88 +++++++++++++++++++ .../pyrefly/annotations_forward_refs.toml | 4 +- .../results/pyrefly/typeforms_typeform.toml | 76 ++++++++++++++++ .../pyright/annotations_forward_refs.toml | 7 +- .../pyright/generics_variance_inference.toml | 9 +- .../results/pyright/typeforms_typeform.toml | 79 +++++++++++++++++ conformance/results/results.html | 9 ++ .../results/zuban/typeforms_typeform.toml | 70 +++++++++++++++ 12 files changed, 338 insertions(+), 16 deletions(-) create mode 100644 conformance/results/mypy/typeforms_typeform.toml create mode 100644 conformance/results/pyrefly/typeforms_typeform.toml create mode 100644 conformance/results/pyright/typeforms_typeform.toml create mode 100644 conformance/results/zuban/typeforms_typeform.toml diff --git a/conformance/results/mypy/classes_classvar.toml b/conformance/results/mypy/classes_classvar.toml index fd95469f5..072593eed 100644 --- a/conformance/results/mypy/classes_classvar.toml +++ b/conformance/results/mypy/classes_classvar.toml @@ -10,7 +10,6 @@ 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? [valid-type] classes_classvar.py:40: error: Name "var" is not defined [name-defined] 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 [valid-type] classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type] classes_classvar.py:69: error: ClassVar can only be used for assignments in class body [misc] @@ -32,6 +31,7 @@ errors_diff = """ Line 45: Expected 1 errors Line 46: Expected 1 errors Line 47: Expected 1 errors +Line 54: Expected 1 errors Line 67: Unexpected errors ['classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type]'] Line 130: Unexpected errors ['classes_classvar.py:130: error: All protocol members must have explicitly declared types [misc]'] """ diff --git a/conformance/results/mypy/dataclasses_final.toml b/conformance/results/mypy/dataclasses_final.toml index fdf86919a..eb917058d 100644 --- a/conformance/results/mypy/dataclasses_final.toml +++ b/conformance/results/mypy/dataclasses_final.toml @@ -7,12 +7,10 @@ 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 [misc]'] -Line 18: Unexpected errors ['dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] Line 24: Unexpected errors ['dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type]'] """ output = """ 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 [valid-type] dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type] 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] diff --git a/conformance/results/mypy/generics_variance_inference.toml b/conformance/results/mypy/generics_variance_inference.toml index b1158c7e9..ef877e1ee 100644 --- a/conformance/results/mypy/generics_variance_inference.toml +++ b/conformance/results/mypy/generics_variance_inference.toml @@ -6,6 +6,7 @@ generics_variance_inference.py:28: error: Incompatible types in assignment (expr 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:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [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] @@ -24,6 +25,7 @@ generics_variance_inference.py:170: error: Incompatible types in assignment (exp 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] """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 66: Unexpected errors ['generics_variance_inference.py:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [assignment]'] """ diff --git a/conformance/results/mypy/qualifiers_final_annotation.toml b/conformance/results/mypy/qualifiers_final_annotation.toml index 2d0cea337..8c0830f54 100644 --- a/conformance/results/mypy/qualifiers_final_annotation.toml +++ b/conformance/results/mypy/qualifiers_final_annotation.toml @@ -20,8 +20,6 @@ qualifiers_final_annotation.py:71: error: Cannot assign to final name "RATE" [m 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:96: error: Cannot assign to final name "__private" [misc] -qualifiers_final_annotation.py:107: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] -qualifiers_final_annotation.py:108: error: Variable should not be annotated with both ClassVar and Final [misc] qualifiers_final_annotation.py:118: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:121: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name [misc] @@ -40,6 +38,8 @@ qualifiers_final_annotation.py:170: error: Cannot assign to final name "PI" [mi """ conformance_automated = "Fail" errors_diff = """ +Line 107: Expected 1 errors +Line 108: Expected 1 errors Line 149: Expected 1 errors Line 59: Unexpected errors ['qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" [misc]'] Line 96: Unexpected errors ['qualifiers_final_annotation.py:96: error: Cannot assign to final name "__private" [misc]'] diff --git a/conformance/results/mypy/typeforms_typeform.toml b/conformance/results/mypy/typeforms_typeform.toml new file mode 100644 index 000000000..8e0fbfacb --- /dev/null +++ b/conformance/results/mypy/typeforms_typeform.toml @@ -0,0 +1,88 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['typeforms_typeform.py:15: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 16: Unexpected errors ['typeforms_typeform.py:16: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 17: Unexpected errors ['typeforms_typeform.py:17: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 18: Unexpected errors ['typeforms_typeform.py:18: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 19: Unexpected errors ['typeforms_typeform.py:19: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 20: Unexpected errors ['typeforms_typeform.py:20: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]', 'typeforms_typeform.py:20: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform]', 'typeforms_typeform.py:20: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[str | None]") [assignment]'] +Line 21: Unexpected errors ['typeforms_typeform.py:21: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 29: Unexpected errors ['typeforms_typeform.py:29: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 30: Unexpected errors ['typeforms_typeform.py:30: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 34: Unexpected errors ['typeforms_typeform.py:34: error: Expression is of type "TypeForm[str]", not "TypeForm[Any]" [assert-type]', 'typeforms_typeform.py:34: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 35: Unexpected errors ['typeforms_typeform.py:35: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 40: Unexpected errors ['typeforms_typeform.py:40: error: Incompatible types in assignment (expression has type "UnionType | type[str]", variable has type "UnionType") [assignment]'] +Line 41: Unexpected errors ['typeforms_typeform.py:41: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 43: Unexpected errors ['typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment]'] +Line 44: Unexpected errors ['typeforms_typeform.py:44: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 46: Unexpected errors ['typeforms_typeform.py:46: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]', 'typeforms_typeform.py:46: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform]', 'typeforms_typeform.py:46: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[int | str]") [assignment]'] +Line 47: Unexpected errors ['typeforms_typeform.py:47: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]', 'typeforms_typeform.py:47: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform]', 'typeforms_typeform.py:47: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[set[str]]") [assignment]'] +Line 71: Unexpected errors ['typeforms_typeform.py:71: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 74: Unexpected errors ['typeforms_typeform.py:74: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 83: Unexpected errors ['typeforms_typeform.py:83: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 87: Unexpected errors ['typeforms_typeform.py:87: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 97: Unexpected errors ['typeforms_typeform.py:97: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +""" +output = """ +typeforms_typeform.py:15: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:16: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:17: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:18: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:19: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:20: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:20: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] +typeforms_typeform.py:20: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[str | None]") [assignment] +typeforms_typeform.py:21: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:23: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:23: error: Incompatible types in assignment (expression has type "TypeForm[str | int]", variable has type "TypeForm[str | None]") [assignment] +typeforms_typeform.py:24: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:24: error: Incompatible types in assignment (expression has type "TypeForm[list[str | None]]", variable has type "TypeForm[str | None]") [assignment] +typeforms_typeform.py:29: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:30: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:34: error: Expression is of type "TypeForm[str]", not "TypeForm[Any]" [assert-type] +typeforms_typeform.py:34: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:35: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:40: error: Incompatible types in assignment (expression has type "UnionType | type[str]", variable has type "UnionType") [assignment] +typeforms_typeform.py:41: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment] +typeforms_typeform.py:44: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:46: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:46: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] +typeforms_typeform.py:46: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[int | str]") [assignment] +typeforms_typeform.py:47: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:47: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] +typeforms_typeform.py:47: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[set[str]]") [assignment] +typeforms_typeform.py:55: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:55: error: Incompatible types in assignment (expression has type "tuple[Never, ...]", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:56: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:56: error: Incompatible types in assignment (expression has type "tuple[int, int]", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:57: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:57: error: Incompatible types in assignment (expression has type "int", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:58: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:58: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:59: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:59: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:60: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:60: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] +typeforms_typeform.py:60: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:61: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:62: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:63: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:63: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:64: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:64: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:65: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:65: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] +typeforms_typeform.py:65: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:71: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:74: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:76: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:78: error: TypeForm argument is not a type [misc] +typeforms_typeform.py:83: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:87: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:88: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:88: error: Incompatible types in assignment (expression has type "TypeForm[int]", variable has type "TypeForm[str]") [assignment] +typeforms_typeform.py:97: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:98: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:98: error: Incompatible types in assignment (expression has type "type[int]", variable has type "TypeForm[str]") [assignment] +""" diff --git a/conformance/results/pyrefly/annotations_forward_refs.toml b/conformance/results/pyrefly/annotations_forward_refs.toml index 77859140a..cbf25ce24 100644 --- a/conformance/results/pyrefly/annotations_forward_refs.toml +++ b/conformance/results/pyrefly/annotations_forward_refs.toml @@ -5,12 +5,12 @@ Does not reject some type forms that require quotes. """ conformance_automated = "Fail" errors_diff = """ +Line 24: Expected 1 errors +Line 25: Expected 1 errors Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]'] Line 96: Unexpected errors ['assert_type(Any, int) failed [assert-type]'] """ output = """ -ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation] -ERROR annotations_forward_refs.py:25:7-21: `|` union syntax does not work with string literals [invalid-annotation] ERROR annotations_forward_refs.py:41:10-50: Function call cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:42:10-20: List literal cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:43:10-20: Tuple literal cannot be used in annotations [invalid-annotation] diff --git a/conformance/results/pyrefly/typeforms_typeform.toml b/conformance/results/pyrefly/typeforms_typeform.toml new file mode 100644 index 000000000..747711381 --- /dev/null +++ b/conformance/results/pyrefly/typeforms_typeform.toml @@ -0,0 +1,76 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 16: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 17: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 18: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 19: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 20: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 21: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 29: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 30: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 34: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 35: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 40: Unexpected errors ['`type[str | None]` is not assignable to `UnionType` [bad-assignment]'] +Line 41: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 43: Unexpected errors ['`type[list[int]]` is not assignable to `GenericAlias` [bad-assignment]', 'Expected `v2_actual` to be a type alias, got `GenericAlias` [invalid-type-alias]'] +Line 44: Unexpected errors ['Expected a type form, got instance of `_SpecialForm` [not-a-type]'] +Line 46: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 47: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 70: Unexpected errors ['Expected a callable, got `_SpecialForm` [not-callable]'] +Line 71: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 73: Unexpected errors ['Expected a callable, got `_SpecialForm` [not-callable]'] +Line 74: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 83: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 87: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 97: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +""" +output = """ +ERROR typeforms_typeform.py:15:6-26: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:16:6-26: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:17:6-26: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:18:6-26: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:19:6-26: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:20:6-26: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:21:6-26: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:23:7-27: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:24:7-27: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:29:8-21: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:30:8-21: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:34:20-33: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:35:20-33: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:40:30-40: `type[str | None]` is not assignable to `UnionType` [bad-assignment] +ERROR typeforms_typeform.py:41:15-35: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:43:33-42: `type[list[int]]` is not assignable to `GenericAlias` [bad-assignment] +ERROR typeforms_typeform.py:43:33-42: Expected `v2_actual` to be a type alias, got `GenericAlias` [invalid-type-alias] +ERROR typeforms_typeform.py:44:15-23: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:46:5-24: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:47:5-23: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:55:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:56:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:57:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:58:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:58:18-22: `Self` must appear within a class [invalid-annotation] +ERROR typeforms_typeform.py:59:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:59:26-29: Expected a type form, got instance of `Literal[1]` [not-a-type] +ERROR typeforms_typeform.py:60:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:60:26-29: Invalid literal expression [invalid-literal] +ERROR typeforms_typeform.py:61:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:61:18-31: `ClassVar` is not allowed in this context [invalid-annotation] +ERROR typeforms_typeform.py:62:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:62:18-28: `Final` is not allowed in this context [invalid-annotation] +ERROR typeforms_typeform.py:63:7-15: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:64:8-16: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:65:8-16: Expected a type form, got instance of `_SpecialForm` [not-a-type] +ERROR typeforms_typeform.py:70:6-14: Expected a callable, got `_SpecialForm` [not-callable] +ERROR typeforms_typeform.py:71:17-37: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:73:6-14: Expected a callable, got `_SpecialForm` [not-callable] +ERROR typeforms_typeform.py:74:17-36: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:76:6-14: Expected a callable, got `_SpecialForm` [not-callable] +ERROR typeforms_typeform.py:78:6-14: Expected a callable, got `_SpecialForm` [not-callable] +ERROR typeforms_typeform.py:83:24-37: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:87:5-24: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:88:5-18: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:97:5-24: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:98:5-18: Expected a type form, got instance of `object` [not-a-type] +""" diff --git a/conformance/results/pyright/annotations_forward_refs.toml b/conformance/results/pyright/annotations_forward_refs.toml index ca35b5bb1..7caac6289 100644 --- a/conformance/results/pyright/annotations_forward_refs.toml +++ b/conformance/results/pyright/annotations_forward_refs.toml @@ -1,7 +1,5 @@ conformant = "Pass" output = """ -annotations_forward_refs.py:22:7 - error: "ClassA" is not defined (reportUndefinedVariable) -annotations_forward_refs.py:23:12 - error: "ClassA" is not defined (reportUndefinedVariable) annotations_forward_refs.py:24:7 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:25:13 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:41:10 - error: Call expression not allowed in type expression (reportInvalidTypeForm) @@ -29,11 +27,10 @@ annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type ex annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type expression (reportInvalidTypeForm) annotations_forward_refs.py:54:11 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues) annotations_forward_refs.py:55:10 - error: Module cannot be used as a type (reportGeneralTypeIssues) -annotations_forward_refs.py:66:26 - error: "ClassB" is not defined (reportUndefinedVariable) annotations_forward_refs.py:80:14 - error: Type of "ClassF" could not be determined because it refers to itself (reportGeneralTypeIssues) annotations_forward_refs.py:80:14 - error: Variable not allowed in type expression (reportInvalidTypeForm) -annotations_forward_refs.py:89:8 - error: Expected class but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues) """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 89: Expected 1 errors """ diff --git a/conformance/results/pyright/generics_variance_inference.toml b/conformance/results/pyright/generics_variance_inference.toml index 9a378ad6f..5c0f32e2a 100644 --- a/conformance/results/pyright/generics_variance_inference.toml +++ b/conformance/results/pyright/generics_variance_inference.toml @@ -23,10 +23,12 @@ generics_variance_inference.py:58:35 - error: Type "ShouldBeCovariant3[float]" i   "ShouldBeCovariant3[float]" is not assignable to "ShouldBeCovariant3[int]"     Type parameter "T@ShouldBeCovariant3" is covariant, but "float" is not a subtype of "int"       "float" is not assignable to "int" (reportAssignmentType) +generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]" +  "ShouldBeCovariant4[int]" is not assignable to "ShouldBeCovariant4[float]" +    Type parameter "T@ShouldBeCovariant4" is invariant, but "int" is not the same as "float" (reportAssignmentType) generics_variance_inference.py:67:34 - error: Type "ShouldBeCovariant4[float]" is not assignable to declared type "ShouldBeCovariant4[int]"   "ShouldBeCovariant4[float]" is not assignable to "ShouldBeCovariant4[int]" -    Type parameter "T@ShouldBeCovariant4" is covariant, but "float" is not a subtype of "int" -      "float" is not assignable to "int" (reportAssignmentType) +    Type parameter "T@ShouldBeCovariant4" is invariant, but "float" is not the same as "int" (reportAssignmentType) generics_variance_inference.py:80:34 - error: Type "ShouldBeCovariant5[float]" is not assignable to declared type "ShouldBeCovariant5[int]"   "ShouldBeCovariant5[float]" is not assignable to "ShouldBeCovariant5[int]"     Type parameter "T@ShouldBeCovariant5" is covariant, but "float" is not a subtype of "int" @@ -80,6 +82,7 @@ generics_variance_inference.py:194:37 - error: Type "ShouldBeContravariant2[int]     Type parameter "T@ShouldBeContravariant2" is contravariant, but "int" is not a supertype of "float"       "float" is not assignable to "int" (reportAssignmentType) """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 66: Unexpected errors ['generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]"'] """ diff --git a/conformance/results/pyright/typeforms_typeform.toml b/conformance/results/pyright/typeforms_typeform.toml new file mode 100644 index 000000000..5f1416351 --- /dev/null +++ b/conformance/results/pyright/typeforms_typeform.toml @@ -0,0 +1,79 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 58: Expected 1 errors +Line 60: Expected 1 errors +Line 61: Expected 1 errors +Line 62: Expected 1 errors +Line 64: Expected 1 errors +Line 15: Unexpected errors ['typeforms_typeform.py:15:29 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]"'] +Line 17: Unexpected errors ['typeforms_typeform.py:17:29 - error: Type "None" is not assignable to declared type "TypeForm[str | None]"'] +Line 19: Unexpected errors ['typeforms_typeform.py:19:29 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]"'] +Line 20: Unexpected errors ['typeforms_typeform.py:20:29 - error: Type "Literal[\\'str | None\\']" is not assignable to declared type "TypeForm[str | None]"'] +Line 21: Unexpected errors ['typeforms_typeform.py:21:29 - error: Type "type[Any]" is not assignable to declared type "TypeForm[str | None]"'] +Line 29: Unexpected errors ['typeforms_typeform.py:29:24 - error: Type "UnionType" is not assignable to declared type "TypeForm[Any]"'] +Line 34: Unexpected errors ['typeforms_typeform.py:34:13 - error: "assert_type" mismatch: expected "TypeForm[Any]" but received "type[str]" (reportAssertTypeFailure)'] +Line 35: Unexpected errors ['typeforms_typeform.py:35:13 - error: "assert_type" mismatch: expected "TypeForm[str]" but received "type[str]" (reportAssertTypeFailure)'] +Line 41: Unexpected errors ['typeforms_typeform.py:41:38 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]"'] +Line 43: Unexpected errors ['typeforms_typeform.py:43:33 - error: Type "type[list[int]]" is not assignable to declared type "GenericAlias"'] +Line 46: Unexpected errors ['typeforms_typeform.py:46:27 - error: Type "Annotated" is not assignable to declared type "TypeForm[int | str]"'] +Line 47: Unexpected errors ['typeforms_typeform.py:47:26 - error: Type "Literal[\\'set[str]\\']" is not assignable to declared type "TypeForm[set[str]]"'] +Line 71: Unexpected errors ['typeforms_typeform.py:71:13 - error: "assert_type" mismatch: expected "TypeForm[str | None]" but received "UnionType" (reportAssertTypeFailure)'] +Line 74: Unexpected errors ['typeforms_typeform.py:74:13 - error: "assert_type" mismatch: expected "TypeForm[list[int]]" but received "type[list[int]]" (reportAssertTypeFailure)'] +""" +output = """ +typeforms_typeform.py:15:29 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]" +  "UnionType" is not assignable to "TypeForm[str | None]" (reportAssignmentType) +typeforms_typeform.py:17:29 - error: Type "None" is not assignable to declared type "TypeForm[str | None]" +  "None" is not assignable to "TypeForm[str | None]" (reportAssignmentType) +typeforms_typeform.py:19:29 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]" +  "UnionType" is not assignable to "TypeForm[str | None]" (reportAssignmentType) +typeforms_typeform.py:20:29 - error: Type "Literal['str | None']" is not assignable to declared type "TypeForm[str | None]" +  "Literal['str | None']" is not assignable to "TypeForm[str | None]" (reportAssignmentType) +typeforms_typeform.py:21:29 - error: Type "type[Any]" is not assignable to declared type "TypeForm[str | None]" +  Type "Any" is not assignable to type "str | None" +    "Any" is not assignable to "str" +    "Any" is not assignable to "None" (reportAssignmentType) +typeforms_typeform.py:23:30 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]" +  "UnionType" is not assignable to "TypeForm[str | None]" (reportAssignmentType) +typeforms_typeform.py:24:30 - error: Type "type[list[str | None]]" is not assignable to declared type "TypeForm[str | None]" +  Type "list[str | None]" is not assignable to type "str | None" +    "list[str | None]" is not assignable to "str" +    "list[str | None]" is not assignable to "None" (reportAssignmentType) +typeforms_typeform.py:29:24 - error: Type "UnionType" is not assignable to declared type "TypeForm[Any]" +  "UnionType" is not assignable to "TypeForm[Any]" (reportAssignmentType) +typeforms_typeform.py:34:13 - error: "assert_type" mismatch: expected "TypeForm[Any]" but received "type[str]" (reportAssertTypeFailure) +typeforms_typeform.py:35:13 - error: "assert_type" mismatch: expected "TypeForm[str]" but received "type[str]" (reportAssertTypeFailure) +typeforms_typeform.py:41:38 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]" +  "UnionType" is not assignable to "TypeForm[str | None]" (reportAssignmentType) +typeforms_typeform.py:43:33 - error: Type "type[list[int]]" is not assignable to declared type "GenericAlias" +  Type "type[list[int]]" is not assignable to type "GenericAlias" (reportAssignmentType) +typeforms_typeform.py:46:27 - error: Type "Annotated" is not assignable to declared type "TypeForm[int | str]" +  "Annotated" is not assignable to "TypeForm[int | str]" (reportAssignmentType) +typeforms_typeform.py:47:26 - error: Type "Literal['set[str]']" is not assignable to declared type "TypeForm[set[str]]" +  "Literal['set[str]']" is not assignable to "TypeForm[set[str]]" (reportAssignmentType) +typeforms_typeform.py:55:18 - error: Type "tuple[()]" is not assignable to declared type "TypeForm[Unknown]" +  "tuple[()]" is not assignable to "TypeForm[Unknown]" (reportAssignmentType) +typeforms_typeform.py:56:18 - error: Type "tuple[Literal[1], Literal[2]]" is not assignable to declared type "TypeForm[Unknown]" +  "tuple[Literal[1], Literal[2]]" is not assignable to "TypeForm[Unknown]" (reportAssignmentType) +typeforms_typeform.py:57:18 - error: Type "Literal[1]" is not assignable to declared type "TypeForm[Unknown]" +  "Literal[1]" is not assignable to "TypeForm[Unknown]" (reportAssignmentType) +typeforms_typeform.py:59:18 - error: Type "Literal" is not assignable to declared type "TypeForm[Unknown]" +  "Literal" is not assignable to "TypeForm[Unknown]" (reportAssignmentType) +typeforms_typeform.py:63:25 - error: Type variable "Ts" has no meaning in this context (reportGeneralTypeIssues) +typeforms_typeform.py:65:19 - error: Type "Literal['int + str']" is not assignable to declared type "TypeForm[Unknown]" +  "Literal['int + str']" is not assignable to "TypeForm[Unknown]" (reportAssignmentType) +typeforms_typeform.py:71:13 - error: "assert_type" mismatch: expected "TypeForm[str | None]" but received "UnionType" (reportAssertTypeFailure) +typeforms_typeform.py:74:13 - error: "assert_type" mismatch: expected "TypeForm[list[int]]" but received "type[list[int]]" (reportAssertTypeFailure) +typeforms_typeform.py:76:16 - error: type() call should not be used in type expression +  Use type[T] instead (reportInvalidTypeForm) +typeforms_typeform.py:76:16 - error: Call expression not allowed in type expression (reportInvalidTypeForm) +typeforms_typeform.py:78:15 - error: type() call should not be used in type expression +  Use type[T] instead (reportInvalidTypeForm) +typeforms_typeform.py:78:15 - error: Call expression not allowed in type expression (reportInvalidTypeForm) +typeforms_typeform.py:88:21 - error: Type "TypeForm[int]" is not assignable to declared type "TypeForm[str]" +  "TypeForm[int]" is not assignable to "TypeForm[str]" +    Type parameter "T@TypeForm" is covariant, but "int" is not a subtype of "str" +      "int" is not assignable to "str" (reportAssignmentType) +typeforms_typeform.py:98:21 - error: Type "type[int]" is not assignable to declared type "TypeForm[str]" +  "int" is not assignable to "str" (reportAssignmentType) +""" diff --git a/conformance/results/results.html b/conformance/results/results.html index 6099d74f4..3b5388b85 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -215,6 +215,15 @@

Python Type System Conformance Test Results

Pass +Type forms + +     typeforms_typeform +Unknown +Unknown +Unknown +Unknown + + Special types in annotations      specialtypes_any diff --git a/conformance/results/zuban/typeforms_typeform.toml b/conformance/results/zuban/typeforms_typeform.toml new file mode 100644 index 000000000..35593062b --- /dev/null +++ b/conformance/results/zuban/typeforms_typeform.toml @@ -0,0 +1,70 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Unexpected errors ['typeforms_typeform.py:15: error: Invalid type comment or annotation [valid-type]'] +Line 16: Unexpected errors ['typeforms_typeform.py:16: error: Invalid type comment or annotation [valid-type]'] +Line 17: Unexpected errors ['typeforms_typeform.py:17: error: Invalid type comment or annotation [valid-type]'] +Line 18: Unexpected errors ['typeforms_typeform.py:18: error: Invalid type comment or annotation [valid-type]'] +Line 19: Unexpected errors ['typeforms_typeform.py:19: error: Invalid type comment or annotation [valid-type]'] +Line 20: Unexpected errors ['typeforms_typeform.py:20: error: Invalid type comment or annotation [valid-type]'] +Line 21: Unexpected errors ['typeforms_typeform.py:21: error: Invalid type comment or annotation [valid-type]'] +Line 29: Unexpected errors ['typeforms_typeform.py:29: error: Invalid type comment or annotation [valid-type]'] +Line 30: Unexpected errors ['typeforms_typeform.py:30: error: Invalid type comment or annotation [valid-type]'] +Line 34: Unexpected errors ['typeforms_typeform.py:34: error: Cast target is not a type [misc]'] +Line 35: Unexpected errors ['typeforms_typeform.py:35: error: Cast target is not a type [misc]'] +Line 41: Unexpected errors ['typeforms_typeform.py:41: error: Invalid type comment or annotation [valid-type]'] +Line 43: Unexpected errors ['typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment]'] +Line 44: Unexpected errors ['typeforms_typeform.py:44: error: Invalid type comment or annotation [valid-type]'] +Line 46: Unexpected errors ['typeforms_typeform.py:46: error: Invalid type comment or annotation [valid-type]'] +Line 47: Unexpected errors ['typeforms_typeform.py:47: error: Invalid type comment or annotation [valid-type]'] +Line 70: Unexpected errors ['typeforms_typeform.py:70: error: "_SpecialForm" not callable [operator]'] +Line 71: Unexpected errors ['typeforms_typeform.py:71: error: Cast target is not a type [misc]'] +Line 73: Unexpected errors ['typeforms_typeform.py:73: error: "_SpecialForm" not callable [operator]'] +Line 74: Unexpected errors ['typeforms_typeform.py:74: error: Cast target is not a type [misc]'] +Line 83: Unexpected errors ['typeforms_typeform.py:83: error: Invalid type comment or annotation [valid-type]'] +Line 87: Unexpected errors ['typeforms_typeform.py:87: error: Invalid type comment or annotation [valid-type]'] +Line 97: Unexpected errors ['typeforms_typeform.py:97: error: Invalid type comment or annotation [valid-type]'] +""" +output = """ +typeforms_typeform.py:15: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:16: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:17: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:18: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:19: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:20: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:21: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:23: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:24: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:29: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:30: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:34: error: Cast target is not a type [misc] +typeforms_typeform.py:35: error: Cast target is not a type [misc] +typeforms_typeform.py:41: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment] +typeforms_typeform.py:44: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:46: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:47: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:55: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:56: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:57: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:58: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:59: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:59: error: Parameter 1 of Literal[...] is invalid [valid-type] +typeforms_typeform.py:60: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:60: error: Parameter 1 of Literal[...] is invalid [valid-type] +typeforms_typeform.py:61: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:62: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:63: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:64: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:65: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:70: error: "_SpecialForm" not callable [operator] +typeforms_typeform.py:71: error: Cast target is not a type [misc] +typeforms_typeform.py:73: error: "_SpecialForm" not callable [operator] +typeforms_typeform.py:74: error: Cast target is not a type [misc] +typeforms_typeform.py:76: error: "_SpecialForm" not callable [operator] +typeforms_typeform.py:78: error: "_SpecialForm" not callable [operator] +typeforms_typeform.py:83: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:87: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:88: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:97: error: Invalid type comment or annotation [valid-type] +typeforms_typeform.py:98: error: Invalid type comment or annotation [valid-type] +""" From 3ce130243816b25ab6a76d56d0b4a90ed6c691a0 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Feb 2026 21:38:21 -0800 Subject: [PATCH 04/78] turn on experimental mypy support --- .../results/mypy/typeforms_typeform.toml | 66 +------------------ conformance/src/type_checker.py | 1 + 2 files changed, 4 insertions(+), 63 deletions(-) diff --git a/conformance/results/mypy/typeforms_typeform.toml b/conformance/results/mypy/typeforms_typeform.toml index 8e0fbfacb..88bcae13d 100644 --- a/conformance/results/mypy/typeforms_typeform.toml +++ b/conformance/results/mypy/typeforms_typeform.toml @@ -1,88 +1,28 @@ conformance_automated = "Fail" errors_diff = """ -Line 15: Unexpected errors ['typeforms_typeform.py:15: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 16: Unexpected errors ['typeforms_typeform.py:16: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 17: Unexpected errors ['typeforms_typeform.py:17: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 18: Unexpected errors ['typeforms_typeform.py:18: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 19: Unexpected errors ['typeforms_typeform.py:19: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 20: Unexpected errors ['typeforms_typeform.py:20: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]', 'typeforms_typeform.py:20: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform]', 'typeforms_typeform.py:20: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[str | None]") [assignment]'] -Line 21: Unexpected errors ['typeforms_typeform.py:21: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 29: Unexpected errors ['typeforms_typeform.py:29: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 30: Unexpected errors ['typeforms_typeform.py:30: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 34: Unexpected errors ['typeforms_typeform.py:34: error: Expression is of type "TypeForm[str]", not "TypeForm[Any]" [assert-type]', 'typeforms_typeform.py:34: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 35: Unexpected errors ['typeforms_typeform.py:35: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] +Line 34: Unexpected errors ['typeforms_typeform.py:34: error: Expression is of type "TypeForm[str]", not "TypeForm[Any]" [assert-type]'] Line 40: Unexpected errors ['typeforms_typeform.py:40: error: Incompatible types in assignment (expression has type "UnionType | type[str]", variable has type "UnionType") [assignment]'] -Line 41: Unexpected errors ['typeforms_typeform.py:41: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] Line 43: Unexpected errors ['typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment]'] -Line 44: Unexpected errors ['typeforms_typeform.py:44: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 46: Unexpected errors ['typeforms_typeform.py:46: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]', 'typeforms_typeform.py:46: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform]', 'typeforms_typeform.py:46: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[int | str]") [assignment]'] -Line 47: Unexpected errors ['typeforms_typeform.py:47: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]', 'typeforms_typeform.py:47: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform]', 'typeforms_typeform.py:47: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[set[str]]") [assignment]'] -Line 71: Unexpected errors ['typeforms_typeform.py:71: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 74: Unexpected errors ['typeforms_typeform.py:74: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 83: Unexpected errors ['typeforms_typeform.py:83: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 87: Unexpected errors ['typeforms_typeform.py:87: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] -Line 97: Unexpected errors ['typeforms_typeform.py:97: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc]'] """ output = """ -typeforms_typeform.py:15: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:16: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:17: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:18: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:19: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:20: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:20: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] -typeforms_typeform.py:20: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[str | None]") [assignment] -typeforms_typeform.py:21: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:23: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:23: error: Incompatible types in assignment (expression has type "TypeForm[str | int]", variable has type "TypeForm[str | None]") [assignment] -typeforms_typeform.py:24: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:24: error: Incompatible types in assignment (expression has type "TypeForm[list[str | None]]", variable has type "TypeForm[str | None]") [assignment] -typeforms_typeform.py:29: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:30: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:34: error: Expression is of type "TypeForm[str]", not "TypeForm[Any]" [assert-type] -typeforms_typeform.py:34: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:35: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:40: error: Incompatible types in assignment (expression has type "UnionType | type[str]", variable has type "UnionType") [assignment] -typeforms_typeform.py:41: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment] -typeforms_typeform.py:44: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:46: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:46: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] -typeforms_typeform.py:46: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[int | str]") [assignment] -typeforms_typeform.py:47: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:47: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] -typeforms_typeform.py:47: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[set[str]]") [assignment] -typeforms_typeform.py:55: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:55: error: Incompatible types in assignment (expression has type "tuple[Never, ...]", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:56: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:56: error: Incompatible types in assignment (expression has type "tuple[int, int]", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:57: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:57: error: Incompatible types in assignment (expression has type "int", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:58: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:58: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:59: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:59: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:60: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:60: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] typeforms_typeform.py:60: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:61: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:62: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:63: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] +typeforms_typeform.py:61: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] +typeforms_typeform.py:62: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] typeforms_typeform.py:63: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:64: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:64: error: Incompatible types in assignment (expression has type "", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:65: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:65: error: TypeForm containing a string annotation cannot be recognized here. Surround with TypeForm(...) to recognize. [maybe-unrecognized-str-typeform] typeforms_typeform.py:65: error: Incompatible types in assignment (expression has type "str", variable has type "TypeForm[Any]") [assignment] -typeforms_typeform.py:71: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:74: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:76: error: Invalid type comment or annotation [valid-type] typeforms_typeform.py:78: error: TypeForm argument is not a type [misc] -typeforms_typeform.py:83: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:87: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:88: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:88: error: Incompatible types in assignment (expression has type "TypeForm[int]", variable has type "TypeForm[str]") [assignment] -typeforms_typeform.py:97: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] -typeforms_typeform.py:98: error: TypeForm is experimental, must be enabled with --enable-incomplete-feature=TypeForm [misc] typeforms_typeform.py:98: error: Incompatible types in assignment (expression has type "type[int]", variable has type "TypeForm[str]") [assignment] """ diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 7406a8ac0..605c9081f 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -104,6 +104,7 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: ".", "--enable-error-code", "deprecated", + "--enable-incomplete-feature=TypeForm", ] proc = run(command, stdout=PIPE, text=True, encoding="utf-8") lines = proc.stdout.split("\n") From 099f688e2977c9bd2e868c0784725c151dcedf86 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Feb 2026 21:44:18 -0800 Subject: [PATCH 05/78] regenerate on 3.12 --- conformance/results/mypy/classes_classvar.toml | 2 +- conformance/results/mypy/dataclasses_final.toml | 2 ++ .../results/mypy/generics_variance_inference.toml | 4 +--- .../results/mypy/qualifiers_final_annotation.toml | 4 ++-- .../results/pyrefly/annotations_forward_refs.toml | 4 ++-- .../results/pyright/annotations_forward_refs.toml | 7 +++++-- .../results/pyright/generics_variance_inference.toml | 9 +++------ 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/conformance/results/mypy/classes_classvar.toml b/conformance/results/mypy/classes_classvar.toml index 072593eed..fd95469f5 100644 --- a/conformance/results/mypy/classes_classvar.toml +++ b/conformance/results/mypy/classes_classvar.toml @@ -10,6 +10,7 @@ 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? [valid-type] classes_classvar.py:40: error: Name "var" is not defined [name-defined] 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 [valid-type] classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type] classes_classvar.py:69: error: ClassVar can only be used for assignments in class body [misc] @@ -31,7 +32,6 @@ errors_diff = """ Line 45: Expected 1 errors Line 46: Expected 1 errors Line 47: Expected 1 errors -Line 54: Expected 1 errors Line 67: Unexpected errors ['classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type]'] Line 130: Unexpected errors ['classes_classvar.py:130: error: All protocol members must have explicitly declared types [misc]'] """ diff --git a/conformance/results/mypy/dataclasses_final.toml b/conformance/results/mypy/dataclasses_final.toml index eb917058d..fdf86919a 100644 --- a/conformance/results/mypy/dataclasses_final.toml +++ b/conformance/results/mypy/dataclasses_final.toml @@ -7,10 +7,12 @@ 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 [misc]'] +Line 18: Unexpected errors ['dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] Line 24: Unexpected errors ['dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type]'] """ output = """ 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 [valid-type] dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type] 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] diff --git a/conformance/results/mypy/generics_variance_inference.toml b/conformance/results/mypy/generics_variance_inference.toml index ef877e1ee..b1158c7e9 100644 --- a/conformance/results/mypy/generics_variance_inference.toml +++ b/conformance/results/mypy/generics_variance_inference.toml @@ -6,7 +6,6 @@ generics_variance_inference.py:28: error: Incompatible types in assignment (expr 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:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [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] @@ -25,7 +24,6 @@ generics_variance_inference.py:170: error: Incompatible types in assignment (exp 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] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 66: Unexpected errors ['generics_variance_inference.py:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [assignment]'] """ diff --git a/conformance/results/mypy/qualifiers_final_annotation.toml b/conformance/results/mypy/qualifiers_final_annotation.toml index 8c0830f54..2d0cea337 100644 --- a/conformance/results/mypy/qualifiers_final_annotation.toml +++ b/conformance/results/mypy/qualifiers_final_annotation.toml @@ -20,6 +20,8 @@ qualifiers_final_annotation.py:71: error: Cannot assign to final name "RATE" [m 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:96: error: Cannot assign to final name "__private" [misc] +qualifiers_final_annotation.py:107: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] +qualifiers_final_annotation.py:108: error: Variable should not be annotated with both ClassVar and Final [misc] qualifiers_final_annotation.py:118: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:121: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name [misc] @@ -38,8 +40,6 @@ qualifiers_final_annotation.py:170: error: Cannot assign to final name "PI" [mi """ conformance_automated = "Fail" errors_diff = """ -Line 107: Expected 1 errors -Line 108: Expected 1 errors Line 149: Expected 1 errors Line 59: Unexpected errors ['qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" [misc]'] Line 96: Unexpected errors ['qualifiers_final_annotation.py:96: error: Cannot assign to final name "__private" [misc]'] diff --git a/conformance/results/pyrefly/annotations_forward_refs.toml b/conformance/results/pyrefly/annotations_forward_refs.toml index cbf25ce24..77859140a 100644 --- a/conformance/results/pyrefly/annotations_forward_refs.toml +++ b/conformance/results/pyrefly/annotations_forward_refs.toml @@ -5,12 +5,12 @@ Does not reject some type forms that require quotes. """ conformance_automated = "Fail" errors_diff = """ -Line 24: Expected 1 errors -Line 25: Expected 1 errors Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]'] Line 96: Unexpected errors ['assert_type(Any, int) failed [assert-type]'] """ output = """ +ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation] +ERROR annotations_forward_refs.py:25:7-21: `|` union syntax does not work with string literals [invalid-annotation] ERROR annotations_forward_refs.py:41:10-50: Function call cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:42:10-20: List literal cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:43:10-20: Tuple literal cannot be used in annotations [invalid-annotation] diff --git a/conformance/results/pyright/annotations_forward_refs.toml b/conformance/results/pyright/annotations_forward_refs.toml index 7caac6289..ca35b5bb1 100644 --- a/conformance/results/pyright/annotations_forward_refs.toml +++ b/conformance/results/pyright/annotations_forward_refs.toml @@ -1,5 +1,7 @@ conformant = "Pass" output = """ +annotations_forward_refs.py:22:7 - error: "ClassA" is not defined (reportUndefinedVariable) +annotations_forward_refs.py:23:12 - error: "ClassA" is not defined (reportUndefinedVariable) annotations_forward_refs.py:24:7 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:25:13 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:41:10 - error: Call expression not allowed in type expression (reportInvalidTypeForm) @@ -27,10 +29,11 @@ annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type ex annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type expression (reportInvalidTypeForm) annotations_forward_refs.py:54:11 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues) annotations_forward_refs.py:55:10 - error: Module cannot be used as a type (reportGeneralTypeIssues) +annotations_forward_refs.py:66:26 - error: "ClassB" is not defined (reportUndefinedVariable) annotations_forward_refs.py:80:14 - error: Type of "ClassF" could not be determined because it refers to itself (reportGeneralTypeIssues) annotations_forward_refs.py:80:14 - error: Variable not allowed in type expression (reportInvalidTypeForm) +annotations_forward_refs.py:89:8 - error: Expected class but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 89: Expected 1 errors """ diff --git a/conformance/results/pyright/generics_variance_inference.toml b/conformance/results/pyright/generics_variance_inference.toml index 5c0f32e2a..9a378ad6f 100644 --- a/conformance/results/pyright/generics_variance_inference.toml +++ b/conformance/results/pyright/generics_variance_inference.toml @@ -23,12 +23,10 @@ generics_variance_inference.py:58:35 - error: Type "ShouldBeCovariant3[float]" i   "ShouldBeCovariant3[float]" is not assignable to "ShouldBeCovariant3[int]"     Type parameter "T@ShouldBeCovariant3" is covariant, but "float" is not a subtype of "int"       "float" is not assignable to "int" (reportAssignmentType) -generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]" -  "ShouldBeCovariant4[int]" is not assignable to "ShouldBeCovariant4[float]" -    Type parameter "T@ShouldBeCovariant4" is invariant, but "int" is not the same as "float" (reportAssignmentType) generics_variance_inference.py:67:34 - error: Type "ShouldBeCovariant4[float]" is not assignable to declared type "ShouldBeCovariant4[int]"   "ShouldBeCovariant4[float]" is not assignable to "ShouldBeCovariant4[int]" -    Type parameter "T@ShouldBeCovariant4" is invariant, but "float" is not the same as "int" (reportAssignmentType) +    Type parameter "T@ShouldBeCovariant4" is covariant, but "float" is not a subtype of "int" +      "float" is not assignable to "int" (reportAssignmentType) generics_variance_inference.py:80:34 - error: Type "ShouldBeCovariant5[float]" is not assignable to declared type "ShouldBeCovariant5[int]"   "ShouldBeCovariant5[float]" is not assignable to "ShouldBeCovariant5[int]"     Type parameter "T@ShouldBeCovariant5" is covariant, but "float" is not a subtype of "int" @@ -82,7 +80,6 @@ generics_variance_inference.py:194:37 - error: Type "ShouldBeContravariant2[int]     Type parameter "T@ShouldBeContravariant2" is contravariant, but "int" is not a supertype of "float"       "float" is not assignable to "int" (reportAssignmentType) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 66: Unexpected errors ['generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]"'] """ From b2de7bde84ef9a2e7fea67c472c9f0565f48ba9a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Feb 2026 21:51:26 -0800 Subject: [PATCH 06/78] adjust for mypy --- conformance/results/mypy/typeforms_typeform.toml | 6 ++++-- conformance/results/pyrefly/typeforms_typeform.toml | 9 +++++---- conformance/results/pyright/typeforms_typeform.toml | 7 +++---- conformance/results/results.html | 2 +- conformance/results/zuban/typeforms_typeform.toml | 9 +++++---- conformance/tests/typeforms_typeform.py | 6 +++--- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/conformance/results/mypy/typeforms_typeform.toml b/conformance/results/mypy/typeforms_typeform.toml index 88bcae13d..f3234f330 100644 --- a/conformance/results/mypy/typeforms_typeform.toml +++ b/conformance/results/mypy/typeforms_typeform.toml @@ -1,13 +1,15 @@ +conformant = "Partial" +notes = """ +Does not support assigning Union and GenericAlias objects to their runtime types. +""" conformance_automated = "Fail" errors_diff = """ -Line 34: Unexpected errors ['typeforms_typeform.py:34: error: Expression is of type "TypeForm[str]", not "TypeForm[Any]" [assert-type]'] Line 40: Unexpected errors ['typeforms_typeform.py:40: error: Incompatible types in assignment (expression has type "UnionType | type[str]", variable has type "UnionType") [assignment]'] Line 43: Unexpected errors ['typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment]'] """ output = """ typeforms_typeform.py:23: error: Incompatible types in assignment (expression has type "TypeForm[str | int]", variable has type "TypeForm[str | None]") [assignment] typeforms_typeform.py:24: error: Incompatible types in assignment (expression has type "TypeForm[list[str | None]]", variable has type "TypeForm[str | None]") [assignment] -typeforms_typeform.py:34: error: Expression is of type "TypeForm[str]", not "TypeForm[Any]" [assert-type] typeforms_typeform.py:40: error: Incompatible types in assignment (expression has type "UnionType | type[str]", variable has type "UnionType") [assignment] typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment] typeforms_typeform.py:55: error: Incompatible types in assignment (expression has type "tuple[Never, ...]", variable has type "TypeForm[Any]") [assignment] diff --git a/conformance/results/pyrefly/typeforms_typeform.toml b/conformance/results/pyrefly/typeforms_typeform.toml index 747711381..af7f9b5dd 100644 --- a/conformance/results/pyrefly/typeforms_typeform.toml +++ b/conformance/results/pyrefly/typeforms_typeform.toml @@ -1,3 +1,4 @@ +conformance = "Unsupported" conformance_automated = "Fail" errors_diff = """ Line 15: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] @@ -9,8 +10,8 @@ Line 20: Unexpected errors ['Expected a type form, got instance of `object` [not Line 21: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] Line 29: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] Line 30: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] -Line 34: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] -Line 35: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 31: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] +Line 32: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] Line 40: Unexpected errors ['`type[str | None]` is not assignable to `UnionType` [bad-assignment]'] Line 41: Unexpected errors ['Expected a type form, got instance of `object` [not-a-type]'] Line 43: Unexpected errors ['`type[list[int]]` is not assignable to `GenericAlias` [bad-assignment]', 'Expected `v2_actual` to be a type alias, got `GenericAlias` [invalid-type-alias]'] @@ -37,8 +38,8 @@ ERROR typeforms_typeform.py:23:7-27: Expected a type form, got instance of `obje ERROR typeforms_typeform.py:24:7-27: Expected a type form, got instance of `object` [not-a-type] ERROR typeforms_typeform.py:29:8-21: Expected a type form, got instance of `object` [not-a-type] ERROR typeforms_typeform.py:30:8-21: Expected a type form, got instance of `object` [not-a-type] -ERROR typeforms_typeform.py:34:20-33: Expected a type form, got instance of `object` [not-a-type] -ERROR typeforms_typeform.py:35:20-33: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:31:20-33: Expected a type form, got instance of `object` [not-a-type] +ERROR typeforms_typeform.py:32:20-33: Expected a type form, got instance of `object` [not-a-type] ERROR typeforms_typeform.py:40:30-40: `type[str | None]` is not assignable to `UnionType` [bad-assignment] ERROR typeforms_typeform.py:41:15-35: Expected a type form, got instance of `object` [not-a-type] ERROR typeforms_typeform.py:43:33-42: `type[list[int]]` is not assignable to `GenericAlias` [bad-assignment] diff --git a/conformance/results/pyright/typeforms_typeform.toml b/conformance/results/pyright/typeforms_typeform.toml index 5f1416351..af5388b75 100644 --- a/conformance/results/pyright/typeforms_typeform.toml +++ b/conformance/results/pyright/typeforms_typeform.toml @@ -1,3 +1,4 @@ +conformance = "Unsupported" conformance_automated = "Fail" errors_diff = """ Line 58: Expected 1 errors @@ -11,8 +12,7 @@ Line 19: Unexpected errors ['typeforms_typeform.py:19:29 - error: Type "UnionTyp Line 20: Unexpected errors ['typeforms_typeform.py:20:29 - error: Type "Literal[\\'str | None\\']" is not assignable to declared type "TypeForm[str | None]"'] Line 21: Unexpected errors ['typeforms_typeform.py:21:29 - error: Type "type[Any]" is not assignable to declared type "TypeForm[str | None]"'] Line 29: Unexpected errors ['typeforms_typeform.py:29:24 - error: Type "UnionType" is not assignable to declared type "TypeForm[Any]"'] -Line 34: Unexpected errors ['typeforms_typeform.py:34:13 - error: "assert_type" mismatch: expected "TypeForm[Any]" but received "type[str]" (reportAssertTypeFailure)'] -Line 35: Unexpected errors ['typeforms_typeform.py:35:13 - error: "assert_type" mismatch: expected "TypeForm[str]" but received "type[str]" (reportAssertTypeFailure)'] +Line 32: Unexpected errors ['typeforms_typeform.py:32:13 - error: "assert_type" mismatch: expected "TypeForm[str]" but received "type[str]" (reportAssertTypeFailure)'] Line 41: Unexpected errors ['typeforms_typeform.py:41:38 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]"'] Line 43: Unexpected errors ['typeforms_typeform.py:43:33 - error: Type "type[list[int]]" is not assignable to declared type "GenericAlias"'] Line 46: Unexpected errors ['typeforms_typeform.py:46:27 - error: Type "Annotated" is not assignable to declared type "TypeForm[int | str]"'] @@ -41,8 +41,7 @@ typeforms_typeform.py:24:30 - error: Type "type[list[str | None]]" is not assign     "list[str | None]" is not assignable to "None" (reportAssignmentType) typeforms_typeform.py:29:24 - error: Type "UnionType" is not assignable to declared type "TypeForm[Any]"   "UnionType" is not assignable to "TypeForm[Any]" (reportAssignmentType) -typeforms_typeform.py:34:13 - error: "assert_type" mismatch: expected "TypeForm[Any]" but received "type[str]" (reportAssertTypeFailure) -typeforms_typeform.py:35:13 - error: "assert_type" mismatch: expected "TypeForm[str]" but received "type[str]" (reportAssertTypeFailure) +typeforms_typeform.py:32:13 - error: "assert_type" mismatch: expected "TypeForm[str]" but received "type[str]" (reportAssertTypeFailure) typeforms_typeform.py:41:38 - error: Type "UnionType" is not assignable to declared type "TypeForm[str | None]"   "UnionType" is not assignable to "TypeForm[str | None]" (reportAssignmentType) typeforms_typeform.py:43:33 - error: Type "type[list[int]]" is not assignable to declared type "GenericAlias" diff --git a/conformance/results/results.html b/conformance/results/results.html index 3b5388b85..0f10f1080 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -218,7 +218,7 @@

Python Type System Conformance Test Results

Type forms      typeforms_typeform -Unknown +
Partial

Does not support assigning Union and GenericAlias objects to their runtime types.

Unknown Unknown Unknown diff --git a/conformance/results/zuban/typeforms_typeform.toml b/conformance/results/zuban/typeforms_typeform.toml index 35593062b..76eb8d276 100644 --- a/conformance/results/zuban/typeforms_typeform.toml +++ b/conformance/results/zuban/typeforms_typeform.toml @@ -1,3 +1,4 @@ +conformance = "Unsupported" conformance_automated = "Fail" errors_diff = """ Line 15: Unexpected errors ['typeforms_typeform.py:15: error: Invalid type comment or annotation [valid-type]'] @@ -9,8 +10,8 @@ Line 20: Unexpected errors ['typeforms_typeform.py:20: error: Invalid type comme Line 21: Unexpected errors ['typeforms_typeform.py:21: error: Invalid type comment or annotation [valid-type]'] Line 29: Unexpected errors ['typeforms_typeform.py:29: error: Invalid type comment or annotation [valid-type]'] Line 30: Unexpected errors ['typeforms_typeform.py:30: error: Invalid type comment or annotation [valid-type]'] -Line 34: Unexpected errors ['typeforms_typeform.py:34: error: Cast target is not a type [misc]'] -Line 35: Unexpected errors ['typeforms_typeform.py:35: error: Cast target is not a type [misc]'] +Line 31: Unexpected errors ['typeforms_typeform.py:31: error: Cast target is not a type [misc]'] +Line 32: Unexpected errors ['typeforms_typeform.py:32: error: Cast target is not a type [misc]'] Line 41: Unexpected errors ['typeforms_typeform.py:41: error: Invalid type comment or annotation [valid-type]'] Line 43: Unexpected errors ['typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment]'] Line 44: Unexpected errors ['typeforms_typeform.py:44: error: Invalid type comment or annotation [valid-type]'] @@ -36,8 +37,8 @@ typeforms_typeform.py:23: error: Invalid type comment or annotation [valid-type typeforms_typeform.py:24: error: Invalid type comment or annotation [valid-type] typeforms_typeform.py:29: error: Invalid type comment or annotation [valid-type] typeforms_typeform.py:30: error: Invalid type comment or annotation [valid-type] -typeforms_typeform.py:34: error: Cast target is not a type [misc] -typeforms_typeform.py:35: error: Cast target is not a type [misc] +typeforms_typeform.py:31: error: Cast target is not a type [misc] +typeforms_typeform.py:32: error: Cast target is not a type [misc] typeforms_typeform.py:41: error: Invalid type comment or annotation [valid-type] typeforms_typeform.py:43: error: Incompatible types in assignment (expression has type "type[list[int]]", variable has type "GenericAlias") [assignment] typeforms_typeform.py:44: error: Invalid type comment or annotation [valid-type] diff --git a/conformance/tests/typeforms_typeform.py b/conformance/tests/typeforms_typeform.py index f590112cc..3e3960ef0 100644 --- a/conformance/tests/typeforms_typeform.py +++ b/conformance/tests/typeforms_typeform.py @@ -28,12 +28,12 @@ v_any: TypeForm[Any] = int | str v_str: TypeForm[str] = str -v_any = v_str # OK -v_str = v_any # OK - assert_type(v_any, TypeForm[Any]) assert_type(v_str, TypeForm[str]) +v_any = v_str # OK +v_str = v_any # OK + # > Valid type expressions are assignable to ``TypeForm`` through implicit TypeForm evaluation. From 14bc003934533d123ac6726b3694f5bf18ad2b01 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 20 Feb 2026 22:37:27 -0800 Subject: [PATCH 07/78] Initial pycroscope support --- conformance/README.md | 2 +- .../results/pycroscope/aliases_explicit.toml | 46 +++++ .../results/pycroscope/aliases_implicit.toml | 57 ++++++ .../results/pycroscope/aliases_newtype.toml | 21 ++ .../results/pycroscope/aliases_recursive.toml | 19 ++ .../pycroscope/aliases_type_statement.toml | 38 ++++ .../pycroscope/aliases_typealiastype.toml | 38 ++++ .../results/pycroscope/aliases_variance.toml | 9 + .../pycroscope/annotations_coroutines.toml | 5 + .../pycroscope/annotations_forward_refs.toml | 24 +++ .../pycroscope/annotations_generators.toml | 15 ++ .../pycroscope/annotations_methods.toml | 5 + .../pycroscope/annotations_typeexpr.toml | 20 ++ .../pycroscope/callables_annotation.toml | 21 ++ .../results/pycroscope/callables_kwargs.toml | 18 ++ .../pycroscope/callables_protocol.toml | 22 ++ .../pycroscope/callables_subtyping.toml | 37 ++++ .../results/pycroscope/classes_classvar.toml | 22 ++ .../results/pycroscope/classes_override.toml | 10 + .../pycroscope/constructors_call_init.toml | 10 + .../constructors_call_metaclass.toml | 7 + .../pycroscope/constructors_call_new.toml | 7 + .../pycroscope/constructors_call_type.toml | 13 ++ .../pycroscope/constructors_callable.toml | 17 ++ .../pycroscope/constructors_consistency.toml | 5 + .../pycroscope/dataclasses_descriptors.toml | 5 + .../results/pycroscope/dataclasses_final.toml | 10 + .../pycroscope/dataclasses_frozen.toml | 9 + .../results/pycroscope/dataclasses_hash.toml | 7 + .../pycroscope/dataclasses_inheritance.toml | 7 + .../pycroscope/dataclasses_kwonly.toml | 8 + .../pycroscope/dataclasses_match_args.toml | 6 + .../results/pycroscope/dataclasses_order.toml | 6 + .../pycroscope/dataclasses_postinit.toml | 9 + .../results/pycroscope/dataclasses_slots.toml | 10 + .../dataclasses_transform_class.toml | 11 + .../dataclasses_transform_converter.toml | 14 ++ .../dataclasses_transform_field.toml | 7 + .../dataclasses_transform_func.toml | 11 + .../dataclasses_transform_meta.toml | 11 + .../results/pycroscope/dataclasses_usage.toml | 16 ++ .../pycroscope/directives_assert_type.toml | 12 ++ .../results/pycroscope/directives_cast.toml | 8 + .../pycroscope/directives_deprecated.toml | 17 ++ .../pycroscope/directives_no_type_check.toml | 6 + .../pycroscope/directives_reveal_type.toml | 7 + .../pycroscope/directives_type_checking.toml | 5 + .../pycroscope/directives_type_ignore.toml | 5 + .../directives_type_ignore_file1.toml | 5 + .../directives_type_ignore_file2.toml | 6 + .../directives_version_platform.toml | 5 + .../results/pycroscope/enums_behaviors.toml | 8 + .../results/pycroscope/enums_definition.toml | 5 + .../results/pycroscope/enums_expansion.toml | 6 + .../pycroscope/enums_member_names.toml | 5 + .../pycroscope/enums_member_values.toml | 7 + .../results/pycroscope/enums_members.toml | 12 ++ .../exceptions_context_managers.toml | 5 + .../pycroscope/generics_base_class.toml | 12 ++ .../results/pycroscope/generics_basic.toml | 18 ++ .../results/pycroscope/generics_defaults.toml | 11 + .../generics_defaults_referential.toml | 12 ++ .../generics_defaults_specialization.toml | 7 + .../pycroscope/generics_paramspec_basic.toml | 12 ++ .../generics_paramspec_components.toml | 21 ++ .../generics_paramspec_semantics.toml | 14 ++ .../generics_paramspec_specialization.toml | 10 + .../results/pycroscope/generics_scoping.toml | 15 ++ .../pycroscope/generics_self_advanced.toml | 5 + .../pycroscope/generics_self_attributes.toml | 7 + .../pycroscope/generics_self_basic.toml | 8 + .../pycroscope/generics_self_protocols.toml | 7 + .../pycroscope/generics_self_usage.toml | 16 ++ .../generics_syntax_compatibility.toml | 7 + .../generics_syntax_declarations.toml | 15 ++ .../generics_syntax_infer_variance.toml | 23 +++ .../pycroscope/generics_syntax_scoping.toml | 12 ++ .../pycroscope/generics_type_erasure.toml | 12 ++ .../generics_typevartuple_args.toml | 14 ++ .../generics_typevartuple_basic.toml | 20 ++ .../generics_typevartuple_callable.toml | 6 + .../generics_typevartuple_concat.toml | 5 + .../generics_typevartuple_overloads.toml | 5 + .../generics_typevartuple_specialization.toml | 11 + .../generics_typevartuple_unpack.toml | 6 + .../pycroscope/generics_upper_bound.toml | 8 + .../results/pycroscope/generics_variance.toml | 18 ++ .../generics_variance_inference.toml | 28 +++ .../pycroscope/historical_positional.toml | 9 + .../pycroscope/literals_interactions.toml | 9 + .../pycroscope/literals_literalstring.toml | 14 ++ .../literals_parameterizations.toml | 22 ++ .../pycroscope/literals_semantics.toml | 9 + .../pycroscope/namedtuples_define_class.toml | 19 ++ .../namedtuples_define_functional.toml | 14 ++ .../pycroscope/namedtuples_type_compat.toml | 7 + .../results/pycroscope/namedtuples_usage.toml | 13 ++ .../pycroscope/narrowing_typeguard.toml | 9 + .../results/pycroscope/narrowing_typeis.toml | 14 ++ .../results/pycroscope/overloads_basic.toml | 6 + .../pycroscope/overloads_consistency.toml | 7 + .../pycroscope/overloads_definitions.toml | 15 ++ .../overloads_definitions_stub.toml | 13 ++ .../pycroscope/overloads_evaluation.toml | 9 + .../pycroscope/protocols_class_objects.toml | 13 ++ .../pycroscope/protocols_definition.toml | 26 +++ .../pycroscope/protocols_explicit.toml | 11 + .../results/pycroscope/protocols_generic.toml | 14 ++ .../results/pycroscope/protocols_merging.toml | 11 + .../results/pycroscope/protocols_modules.toml | 8 + .../pycroscope/protocols_recursive.toml | 5 + .../protocols_runtime_checkable.toml | 11 + .../results/pycroscope/protocols_self.toml | 5 + .../pycroscope/protocols_subtyping.toml | 12 ++ .../pycroscope/protocols_variance.toml | 12 ++ .../pycroscope/qualifiers_annotated.toml | 25 +++ .../qualifiers_final_annotation.toml | 31 +++ .../qualifiers_final_decorator.toml | 15 ++ .../results/pycroscope/specialtypes_any.toml | 5 + .../pycroscope/specialtypes_never.toml | 8 + .../results/pycroscope/specialtypes_none.toml | 8 + .../pycroscope/specialtypes_promotions.toml | 6 + .../results/pycroscope/specialtypes_type.toml | 14 ++ .../pycroscope/tuples_type_compat.toml | 29 +++ .../results/pycroscope/tuples_type_form.toml | 16 ++ .../results/pycroscope/tuples_unpacked.toml | 10 + .../pycroscope/typeddicts_alt_syntax.toml | 9 + .../pycroscope/typeddicts_class_syntax.toml | 10 + .../pycroscope/typeddicts_extra_items.toml | 33 +++ .../results/pycroscope/typeddicts_final.toml | 5 + .../pycroscope/typeddicts_inheritance.toml | 8 + .../pycroscope/typeddicts_operations.toml | 16 ++ .../pycroscope/typeddicts_readonly.toml | 11 + .../typeddicts_readonly_consistency.toml | 12 ++ .../typeddicts_readonly_inheritance.toml | 16 ++ .../typeddicts_readonly_kwargs.toml | 6 + .../typeddicts_readonly_update.toml | 6 + .../pycroscope/typeddicts_required.toml | 9 + .../typeddicts_type_consistency.toml | 14 ++ .../results/pycroscope/typeddicts_usage.toml | 10 + .../pycroscope/typeforms_typeform.toml | 22 ++ conformance/results/pycroscope/version.toml | 1 + conformance/results/results.html | 188 ++++++++++++++++-- conformance/src/type_checker.py | 80 ++++++++ 144 files changed, 2042 insertions(+), 22 deletions(-) create mode 100644 conformance/results/pycroscope/aliases_explicit.toml create mode 100644 conformance/results/pycroscope/aliases_implicit.toml create mode 100644 conformance/results/pycroscope/aliases_newtype.toml create mode 100644 conformance/results/pycroscope/aliases_recursive.toml create mode 100644 conformance/results/pycroscope/aliases_type_statement.toml create mode 100644 conformance/results/pycroscope/aliases_typealiastype.toml create mode 100644 conformance/results/pycroscope/aliases_variance.toml create mode 100644 conformance/results/pycroscope/annotations_coroutines.toml create mode 100644 conformance/results/pycroscope/annotations_forward_refs.toml create mode 100644 conformance/results/pycroscope/annotations_generators.toml create mode 100644 conformance/results/pycroscope/annotations_methods.toml create mode 100644 conformance/results/pycroscope/annotations_typeexpr.toml create mode 100644 conformance/results/pycroscope/callables_annotation.toml create mode 100644 conformance/results/pycroscope/callables_kwargs.toml create mode 100644 conformance/results/pycroscope/callables_protocol.toml create mode 100644 conformance/results/pycroscope/callables_subtyping.toml create mode 100644 conformance/results/pycroscope/classes_classvar.toml create mode 100644 conformance/results/pycroscope/classes_override.toml create mode 100644 conformance/results/pycroscope/constructors_call_init.toml create mode 100644 conformance/results/pycroscope/constructors_call_metaclass.toml create mode 100644 conformance/results/pycroscope/constructors_call_new.toml create mode 100644 conformance/results/pycroscope/constructors_call_type.toml create mode 100644 conformance/results/pycroscope/constructors_callable.toml create mode 100644 conformance/results/pycroscope/constructors_consistency.toml create mode 100644 conformance/results/pycroscope/dataclasses_descriptors.toml create mode 100644 conformance/results/pycroscope/dataclasses_final.toml create mode 100644 conformance/results/pycroscope/dataclasses_frozen.toml create mode 100644 conformance/results/pycroscope/dataclasses_hash.toml create mode 100644 conformance/results/pycroscope/dataclasses_inheritance.toml create mode 100644 conformance/results/pycroscope/dataclasses_kwonly.toml create mode 100644 conformance/results/pycroscope/dataclasses_match_args.toml create mode 100644 conformance/results/pycroscope/dataclasses_order.toml create mode 100644 conformance/results/pycroscope/dataclasses_postinit.toml create mode 100644 conformance/results/pycroscope/dataclasses_slots.toml create mode 100644 conformance/results/pycroscope/dataclasses_transform_class.toml create mode 100644 conformance/results/pycroscope/dataclasses_transform_converter.toml create mode 100644 conformance/results/pycroscope/dataclasses_transform_field.toml create mode 100644 conformance/results/pycroscope/dataclasses_transform_func.toml create mode 100644 conformance/results/pycroscope/dataclasses_transform_meta.toml create mode 100644 conformance/results/pycroscope/dataclasses_usage.toml create mode 100644 conformance/results/pycroscope/directives_assert_type.toml create mode 100644 conformance/results/pycroscope/directives_cast.toml create mode 100644 conformance/results/pycroscope/directives_deprecated.toml create mode 100644 conformance/results/pycroscope/directives_no_type_check.toml create mode 100644 conformance/results/pycroscope/directives_reveal_type.toml create mode 100644 conformance/results/pycroscope/directives_type_checking.toml create mode 100644 conformance/results/pycroscope/directives_type_ignore.toml create mode 100644 conformance/results/pycroscope/directives_type_ignore_file1.toml create mode 100644 conformance/results/pycroscope/directives_type_ignore_file2.toml create mode 100644 conformance/results/pycroscope/directives_version_platform.toml create mode 100644 conformance/results/pycroscope/enums_behaviors.toml create mode 100644 conformance/results/pycroscope/enums_definition.toml create mode 100644 conformance/results/pycroscope/enums_expansion.toml create mode 100644 conformance/results/pycroscope/enums_member_names.toml create mode 100644 conformance/results/pycroscope/enums_member_values.toml create mode 100644 conformance/results/pycroscope/enums_members.toml create mode 100644 conformance/results/pycroscope/exceptions_context_managers.toml create mode 100644 conformance/results/pycroscope/generics_base_class.toml create mode 100644 conformance/results/pycroscope/generics_basic.toml create mode 100644 conformance/results/pycroscope/generics_defaults.toml create mode 100644 conformance/results/pycroscope/generics_defaults_referential.toml create mode 100644 conformance/results/pycroscope/generics_defaults_specialization.toml create mode 100644 conformance/results/pycroscope/generics_paramspec_basic.toml create mode 100644 conformance/results/pycroscope/generics_paramspec_components.toml create mode 100644 conformance/results/pycroscope/generics_paramspec_semantics.toml create mode 100644 conformance/results/pycroscope/generics_paramspec_specialization.toml create mode 100644 conformance/results/pycroscope/generics_scoping.toml create mode 100644 conformance/results/pycroscope/generics_self_advanced.toml create mode 100644 conformance/results/pycroscope/generics_self_attributes.toml create mode 100644 conformance/results/pycroscope/generics_self_basic.toml create mode 100644 conformance/results/pycroscope/generics_self_protocols.toml create mode 100644 conformance/results/pycroscope/generics_self_usage.toml create mode 100644 conformance/results/pycroscope/generics_syntax_compatibility.toml create mode 100644 conformance/results/pycroscope/generics_syntax_declarations.toml create mode 100644 conformance/results/pycroscope/generics_syntax_infer_variance.toml create mode 100644 conformance/results/pycroscope/generics_syntax_scoping.toml create mode 100644 conformance/results/pycroscope/generics_type_erasure.toml create mode 100644 conformance/results/pycroscope/generics_typevartuple_args.toml create mode 100644 conformance/results/pycroscope/generics_typevartuple_basic.toml create mode 100644 conformance/results/pycroscope/generics_typevartuple_callable.toml create mode 100644 conformance/results/pycroscope/generics_typevartuple_concat.toml create mode 100644 conformance/results/pycroscope/generics_typevartuple_overloads.toml create mode 100644 conformance/results/pycroscope/generics_typevartuple_specialization.toml create mode 100644 conformance/results/pycroscope/generics_typevartuple_unpack.toml create mode 100644 conformance/results/pycroscope/generics_upper_bound.toml create mode 100644 conformance/results/pycroscope/generics_variance.toml create mode 100644 conformance/results/pycroscope/generics_variance_inference.toml create mode 100644 conformance/results/pycroscope/historical_positional.toml create mode 100644 conformance/results/pycroscope/literals_interactions.toml create mode 100644 conformance/results/pycroscope/literals_literalstring.toml create mode 100644 conformance/results/pycroscope/literals_parameterizations.toml create mode 100644 conformance/results/pycroscope/literals_semantics.toml create mode 100644 conformance/results/pycroscope/namedtuples_define_class.toml create mode 100644 conformance/results/pycroscope/namedtuples_define_functional.toml create mode 100644 conformance/results/pycroscope/namedtuples_type_compat.toml create mode 100644 conformance/results/pycroscope/namedtuples_usage.toml create mode 100644 conformance/results/pycroscope/narrowing_typeguard.toml create mode 100644 conformance/results/pycroscope/narrowing_typeis.toml create mode 100644 conformance/results/pycroscope/overloads_basic.toml create mode 100644 conformance/results/pycroscope/overloads_consistency.toml create mode 100644 conformance/results/pycroscope/overloads_definitions.toml create mode 100644 conformance/results/pycroscope/overloads_definitions_stub.toml create mode 100644 conformance/results/pycroscope/overloads_evaluation.toml create mode 100644 conformance/results/pycroscope/protocols_class_objects.toml create mode 100644 conformance/results/pycroscope/protocols_definition.toml create mode 100644 conformance/results/pycroscope/protocols_explicit.toml create mode 100644 conformance/results/pycroscope/protocols_generic.toml create mode 100644 conformance/results/pycroscope/protocols_merging.toml create mode 100644 conformance/results/pycroscope/protocols_modules.toml create mode 100644 conformance/results/pycroscope/protocols_recursive.toml create mode 100644 conformance/results/pycroscope/protocols_runtime_checkable.toml create mode 100644 conformance/results/pycroscope/protocols_self.toml create mode 100644 conformance/results/pycroscope/protocols_subtyping.toml create mode 100644 conformance/results/pycroscope/protocols_variance.toml create mode 100644 conformance/results/pycroscope/qualifiers_annotated.toml create mode 100644 conformance/results/pycroscope/qualifiers_final_annotation.toml create mode 100644 conformance/results/pycroscope/qualifiers_final_decorator.toml create mode 100644 conformance/results/pycroscope/specialtypes_any.toml create mode 100644 conformance/results/pycroscope/specialtypes_never.toml create mode 100644 conformance/results/pycroscope/specialtypes_none.toml create mode 100644 conformance/results/pycroscope/specialtypes_promotions.toml create mode 100644 conformance/results/pycroscope/specialtypes_type.toml create mode 100644 conformance/results/pycroscope/tuples_type_compat.toml create mode 100644 conformance/results/pycroscope/tuples_type_form.toml create mode 100644 conformance/results/pycroscope/tuples_unpacked.toml create mode 100644 conformance/results/pycroscope/typeddicts_alt_syntax.toml create mode 100644 conformance/results/pycroscope/typeddicts_class_syntax.toml create mode 100644 conformance/results/pycroscope/typeddicts_extra_items.toml create mode 100644 conformance/results/pycroscope/typeddicts_final.toml create mode 100644 conformance/results/pycroscope/typeddicts_inheritance.toml create mode 100644 conformance/results/pycroscope/typeddicts_operations.toml create mode 100644 conformance/results/pycroscope/typeddicts_readonly.toml create mode 100644 conformance/results/pycroscope/typeddicts_readonly_consistency.toml create mode 100644 conformance/results/pycroscope/typeddicts_readonly_inheritance.toml create mode 100644 conformance/results/pycroscope/typeddicts_readonly_kwargs.toml create mode 100644 conformance/results/pycroscope/typeddicts_readonly_update.toml create mode 100644 conformance/results/pycroscope/typeddicts_required.toml create mode 100644 conformance/results/pycroscope/typeddicts_type_consistency.toml create mode 100644 conformance/results/pycroscope/typeddicts_usage.toml create mode 100644 conformance/results/pycroscope/typeforms_typeform.toml create mode 100644 conformance/results/pycroscope/version.toml diff --git a/conformance/README.md b/conformance/README.md index 0e450e07b..f91aedc91 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -81,7 +81,7 @@ Note that some type checkers may not run on some platforms. If a type checker fa Different type checkers report errors in different ways (with different wording in error messages and different line numbers or character ranges for errors). This variation makes it difficult to fully automate test validation given that tests will want to check for both false positive and false negative type errors. Some level of manual inspection will therefore be needed to determine whether a type checker is fully conformant with all tests in any given test file. This "scoring" process is required only when the output of a test changes — e.g. when a new version of that type checker is released and the tests are rerun. We assume that the output of a type checker will be the same from one run to the next unless/until a new version is released that fixes or introduces a bug. In this case, the output will need to be manually inspected and the conformance results re-scored for those tests whose output has changed. -Conformance results are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyrefly, pyright, and zuban. It is the goal and desire to add additional type checkers over time. +Conformance results are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyrefly, pyright, zuban, and pycroscope. It is the goal and desire to add additional type checkers over time. ## Adding a New Test Case diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml new file mode 100644 index 000000000..6c9a04261 --- /dev/null +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -0,0 +1,46 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 67: Expected 1 errors +Line 70: Expected 1 errors +Line 71: Expected 1 errors +Line 79: Expected 1 errors +Line 80: Expected 1 errors +Line 81: Expected 1 errors +Line 83: Expected 1 errors +Line 84: Expected 1 errors +Line 85: Expected 1 errors +Line 86: Expected 1 errors +Line 87: Expected 1 errors +Line 88: Expected 1 errors +Line 89: Expected 1 errors +Line 91: Expected 1 errors +Line 100: Expected 1 errors +Line 102: Expected 1 errors +Line 36: Unexpected errors ['./aliases_explicit.py:36:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 38: Unexpected errors ['./aliases_explicit.py:38:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 52: Unexpected errors ['./aliases_explicit.py:52:16: list[int] | Any[error] is not equivalent to list[int]'] +Line 53: Unexpected errors ['./aliases_explicit.py:53:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str]'] +Line 54: Unexpected errors ['./aliases_explicit.py:54:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str]'] +Line 55: Unexpected errors ['./aliases_explicit.py:55:16: (...) -> int is not equivalent to (...) -> int'] +Line 56: Unexpected errors ['./aliases_explicit.py:56:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str'] +Line 57: Unexpected errors ['./aliases_explicit.py:57:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None'] +Line 59: Unexpected errors ['./aliases_explicit.py:59:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None'] +Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None'] +""" +output = """ +./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_explicit.py:36:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_explicit.py:38:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_explicit.py:52:16: list[int] | Any[error] is not equivalent to list[int] +./aliases_explicit.py:53:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str] +./aliases_explicit.py:54:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str] +./aliases_explicit.py:55:16: (...) -> int is not equivalent to (...) -> int +./aliases_explicit.py:56:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str +./aliases_explicit.py:57:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None +./aliases_explicit.py:59:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None +./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None +./aliases_explicit.py:82:29: Variable i is never accessed [unused_variable] +./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] +""" diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml new file mode 100644 index 000000000..33ff6bc8d --- /dev/null +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -0,0 +1,57 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 76: Expected 1 errors +Line 79: Expected 1 errors +Line 80: Expected 1 errors +Line 106: Expected 1 errors +Line 111: Expected 1 errors +Line 112: Expected 1 errors +Line 113: Expected 1 errors +Line 117: Expected 1 errors +Line 118: Expected 1 errors +Line 119: Expected 1 errors +Line 135: Expected 1 errors +Line 49: Unexpected errors ['./aliases_implicit.py:49:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 51: Unexpected errors ['./aliases_implicit.py:51:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 57: Unexpected errors ['./aliases_implicit.py:57:9: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 63: Unexpected errors ['./aliases_implicit.py:63:16: list[int] | Any[error] is not equivalent to list[int]'] +Line 64: Unexpected errors ['./aliases_implicit.py:64:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str]'] +Line 65: Unexpected errors ['./aliases_implicit.py:65:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str]'] +Line 66: Unexpected errors ['./aliases_implicit.py:66:16: (...) -> int is not equivalent to (...) -> int'] +Line 67: Unexpected errors ['./aliases_implicit.py:67:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str'] +Line 68: Unexpected errors ['./aliases_implicit.py:68:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None'] +Line 70: Unexpected errors ['./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None'] +Line 71: Unexpected errors ['./aliases_implicit.py:71:16: list[bool] | Any[error] is not equivalent to list[bool]'] +Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None'] +Line 92: Unexpected errors ['./aliases_implicit.py:92:25: Variable i is never accessed [unused_variable]'] +Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] +Line 131: Unexpected errors ['./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int]'] +""" +output = """ +./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:78:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] +./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] +./aliases_implicit.py:109:8: Unrecognized annotation [invalid_annotation] +./aliases_implicit.py:110:8: Invalid type annotation {'a': 'b'} [invalid_annotation] +./aliases_implicit.py:114:8: Invalid type annotation 3 [invalid_annotation] +./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] +./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] +./aliases_implicit.py:49:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:51:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:57:9: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:63:16: list[int] | Any[error] is not equivalent to list[int] +./aliases_implicit.py:64:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str] +./aliases_implicit.py:65:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str] +./aliases_implicit.py:66:16: (...) -> int is not equivalent to (...) -> int +./aliases_implicit.py:67:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str +./aliases_implicit.py:68:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None +./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None +./aliases_implicit.py:71:16: list[bool] | Any[error] is not equivalent to list[bool] +./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None +./aliases_implicit.py:81:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:92:25: Variable i is never accessed [unused_variable] +./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int] +./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] +""" diff --git a/conformance/results/pycroscope/aliases_newtype.toml b/conformance/results/pycroscope/aliases_newtype.toml new file mode 100644 index 000000000..f65302622 --- /dev/null +++ b/conformance/results/pycroscope/aliases_newtype.toml @@ -0,0 +1,21 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 11: Expected 1 errors +Line 12: Expected 1 errors +Line 18: Expected 1 errors +Line 23: Expected 1 errors +Line 26: Expected 1 errors +Line 35: Expected 1 errors +Line 41: Expected 1 errors +Line 47: Expected 1 errors +Line 50: Expected 1 errors +Line 52: Expected 1 errors +Line 54: Expected 1 errors +Line 61: Expected 1 errors +Line 65: Expected 1 errors +Line 15: Unexpected errors ['./aliases_newtype.py:15:12: Any[from_another] is not equivalent to int'] +""" +output = """ +./aliases_newtype.py:15:12: Any[from_another] is not equivalent to int +./aliases_newtype.py:63:14: In call to typing.NewType: Takes 2 positional arguments but 3 were given [incompatible_call] +""" diff --git a/conformance/results/pycroscope/aliases_recursive.toml b/conformance/results/pycroscope/aliases_recursive.toml new file mode 100644 index 000000000..a26e2d5f5 --- /dev/null +++ b/conformance/results/pycroscope/aliases_recursive.toml @@ -0,0 +1,19 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 69: Expected 1 errors +Line 72: Expected 1 errors +Line 75: Expected 1 errors +Line 62: Unexpected errors ["./aliases_recursive.py:62:0: Incompatible assignment: expected list[list[~T1: (str, int)] | str], got Literal[['hi', 'bye', [''], [['hi']]]] [incompatible_assignment]"] +""" +output = """ +./aliases_recursive.py:19:0: Incompatible assignment: expected int | str | float | list[int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None, got Literal[{'a': 1, 'b': 3j}] [incompatible_assignment] +./aliases_recursive.py:20:0: Incompatible assignment: expected int | str | float | list[int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None, got Literal[[2, 3j]] [incompatible_assignment] +./aliases_recursive.py:38:0: Incompatible assignment: expected str | int | tuple[str | int | tuple[.RecursiveTuple = str | int | tuple[.RecursiveTuple, ...], ...], ...], got Literal[(1, ('1', 1), (1, (1, [2])))] [incompatible_assignment] +./aliases_recursive.py:39:0: Incompatible assignment: expected str | int | tuple[str | int | tuple[.RecursiveTuple = str | int | tuple[.RecursiveTuple, ...], ...], ...], got Literal[(1, [1])] [incompatible_assignment] +./aliases_recursive.py:39:0: t6 already declared [already_declared] +./aliases_recursive.py:50:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, None.RecursiveMapping]]], got Literal[{'1': [1]}] [incompatible_assignment] +./aliases_recursive.py:51:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, None.RecursiveMapping]]], got Literal[{'1': '1', '2': 1, '3': [1, 2]}] [incompatible_assignment] +./aliases_recursive.py:52:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, None.RecursiveMapping]]], got Literal[{'1': '1', '2': 1, '3': {'0': '0', '1': 1, '2': [1, 2, 3]}}] [incompatible_assignment] +./aliases_recursive.py:62:0: Incompatible assignment: expected list[list[~T1: (str, int)] | str], got Literal[['hi', 'bye', [''], [['hi']]]] [incompatible_assignment] +./aliases_recursive.py:63:0: Incompatible assignment: expected list[list[~T1: (str, int)] | str], got Literal[['hi', [2.4]]] [incompatible_assignment] +""" diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml new file mode 100644 index 000000000..3d3da64c0 --- /dev/null +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -0,0 +1,38 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Expected 1 errors +Line 26: Expected 1 errors +Line 31: Expected 1 errors +Line 37: Expected 1 errors +Line 38: Expected 1 errors +Line 39: Expected 1 errors +Line 41: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +Line 47: Expected 1 errors +Line 49: Expected 1 errors +Line 56: Expected 1 errors +Line 62: Expected 1 errors +Line 67: Expected 1 errors +Line 77: Expected 1 errors +Line 79: Expected 1 errors +Line 82: Expected 1 errors +Line 84: Expected 1 errors +Lines 51, 52: Expected error (tag 'TA14') +Lines 88, 89: Expected error (tag 'RTA6') +Line 9: Unexpected errors ['./aliases_type_statement.py:9:0: Traceback (most recent call last):'] +Line 21: Unexpected errors ["./aliases_type_statement.py:21:6: int has no attribute '__value__' [undefined_attribute]"] +Line 75: Unexpected errors ['./aliases_type_statement.py:75:0: Traceback (most recent call last):'] +""" +output = """ +./aliases_type_statement.py:9:0: Traceback (most recent call last): +./aliases_type_statement.py:19:0: .GoodAlias1 = int is not callable [not_callable] +./aliases_type_statement.py:21:6: int has no attribute '__value__' [undefined_attribute] +./aliases_type_statement.py:23:6: int has no attribute 'other_attrib' [undefined_attribute] +./aliases_type_statement.py:40:30: Variable i is never accessed [unused_variable] +./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_type_statement.py:75:0: Traceback (most recent call last): +""" diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml new file mode 100644 index 000000000..92a46529c --- /dev/null +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -0,0 +1,38 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 43: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +Line 47: Expected 1 errors +Line 48: Expected 1 errors +Line 52: Expected 1 errors +Line 53: Expected 1 errors +Line 54: Expected 1 errors +Line 56: Expected 1 errors +Line 57: Expected 1 errors +Line 58: Expected 1 errors +Line 59: Expected 1 errors +Line 60: Expected 1 errors +Line 61: Expected 1 errors +Line 62: Expected 1 errors +Line 64: Expected 1 errors +Line 66: Expected 1 errors +Line 35: Unexpected errors ['./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation]'] +Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]", './aliases_typealiastype.py:39:0: Traceback (most recent call last):'] +Line 36: Unexpected errors ['./aliases_typealiastype.py:36:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 37: Unexpected errors ['./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 38: Unexpected errors ['./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +""" +output = """ +./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation] +./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] +./aliases_typealiastype.py:39:0: Traceback (most recent call last): +./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] +./aliases_typealiastype.py:36:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_typealiastype.py:40:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_typealiastype.py:55:50: Variable i is never accessed [unused_variable] +./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +""" diff --git a/conformance/results/pycroscope/aliases_variance.toml b/conformance/results/pycroscope/aliases_variance.toml new file mode 100644 index 000000000..5add77e80 --- /dev/null +++ b/conformance/results/pycroscope/aliases_variance.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 28: Expected 1 errors +Line 32: Expected 1 errors +Line 44: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/annotations_coroutines.toml b/conformance/results/pycroscope/annotations_coroutines.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/annotations_coroutines.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml new file mode 100644 index 000000000..c897056bc --- /dev/null +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -0,0 +1,24 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 25: Expected 1 errors +Line 41: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +Line 47: Expected 1 errors +Line 48: Expected 1 errors +Line 49: Expected 1 errors +Line 50: Expected 1 errors +Line 51: Expected 1 errors +Line 52: Expected 1 errors +Line 53: Expected 1 errors +Line 54: Expected 1 errors +Line 55: Expected 1 errors +Line 80: Expected 1 errors +Line 89: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/annotations_generators.toml b/conformance/results/pycroscope/annotations_generators.toml new file mode 100644 index 000000000..24b7862ca --- /dev/null +++ b/conformance/results/pycroscope/annotations_generators.toml @@ -0,0 +1,15 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 51: Expected 1 errors +Line 54: Expected 1 errors +Line 57: Expected 1 errors +Line 66: Expected 1 errors +Line 75: Expected 1 errors +Line 86: Expected 1 errors +Line 91: Expected 1 errors +Line 118: Expected 1 errors +Line 119: Expected 1 errors +Line 135: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/annotations_methods.toml b/conformance/results/pycroscope/annotations_methods.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/annotations_methods.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/annotations_typeexpr.toml b/conformance/results/pycroscope/annotations_typeexpr.toml new file mode 100644 index 000000000..cdd3a7a57 --- /dev/null +++ b/conformance/results/pycroscope/annotations_typeexpr.toml @@ -0,0 +1,20 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 88: Expected 1 errors +Line 89: Expected 1 errors +Line 90: Expected 1 errors +Line 91: Expected 1 errors +Line 92: Expected 1 errors +Line 93: Expected 1 errors +Line 94: Expected 1 errors +Line 95: Expected 1 errors +Line 96: Expected 1 errors +Line 97: Expected 1 errors +Line 98: Expected 1 errors +Line 99: Expected 1 errors +Line 100: Expected 1 errors +Line 101: Expected 1 errors +Line 102: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml new file mode 100644 index 000000000..6f46d22d3 --- /dev/null +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -0,0 +1,21 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Expected 1 errors +Line 26: Expected 1 errors +Line 27: Expected 1 errors +Line 29: Expected 1 errors +Line 35: Expected 1 errors +Line 55: Expected 1 errors +Line 56: Expected 1 errors +Line 57: Expected 1 errors +Line 58: Expected 1 errors +Line 59: Expected 1 errors +Line 91: Expected 1 errors +Line 93: Expected 1 errors +Line 159: Expected 1 errors +Line 172: Expected 1 errors +Line 187: Expected 1 errors +Line 189: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/callables_kwargs.toml b/conformance/results/pycroscope/callables_kwargs.toml new file mode 100644 index 000000000..bfb638a4d --- /dev/null +++ b/conformance/results/pycroscope/callables_kwargs.toml @@ -0,0 +1,18 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 46: Expected 1 errors +Line 51: Expected 1 errors +Line 52: Expected 1 errors +Line 58: Expected 1 errors +Line 63: Expected 1 errors +Line 64: Expected 1 errors +Line 65: Expected 1 errors +Line 101: Expected 1 errors +Line 102: Expected 1 errors +Line 103: Expected 1 errors +Line 111: Expected 1 errors +Line 122: Expected 1 errors +Line 134: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml new file mode 100644 index 000000000..052bbe7f1 --- /dev/null +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -0,0 +1,22 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 35: Expected 1 errors +Line 36: Expected 1 errors +Line 37: Expected 1 errors +Line 67: Expected 1 errors +Line 68: Expected 1 errors +Line 69: Expected 1 errors +Line 70: Expected 1 errors +Line 97: Expected 1 errors +Line 121: Expected 1 errors +Line 169: Expected 1 errors +Line 186: Expected 1 errors +Line 187: Expected 1 errors +Line 197: Expected 1 errors +Line 238: Expected 1 errors +Line 260: Expected 1 errors +Line 284: Expected 1 errors +Line 311: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml new file mode 100644 index 000000000..ec0d519dc --- /dev/null +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -0,0 +1,37 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Expected 1 errors +Line 29: Expected 1 errors +Line 51: Expected 1 errors +Line 52: Expected 1 errors +Line 55: Expected 1 errors +Line 58: Expected 1 errors +Line 82: Expected 1 errors +Line 85: Expected 1 errors +Line 86: Expected 1 errors +Line 116: Expected 1 errors +Line 119: Expected 1 errors +Line 120: Expected 1 errors +Line 122: Expected 1 errors +Line 124: Expected 1 errors +Line 125: Expected 1 errors +Line 126: Expected 1 errors +Line 151: Expected 1 errors +Line 154: Expected 1 errors +Line 155: Expected 1 errors +Line 187: Expected 1 errors +Line 190: Expected 1 errors +Line 191: Expected 1 errors +Line 193: Expected 1 errors +Line 195: Expected 1 errors +Line 196: Expected 1 errors +Line 197: Expected 1 errors +Line 236: Expected 1 errors +Line 237: Expected 1 errors +Line 240: Expected 1 errors +Line 243: Expected 1 errors +Line 273: Expected 1 errors +Line 297: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml new file mode 100644 index 000000000..336da9d4e --- /dev/null +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -0,0 +1,22 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 38: Expected 1 errors +Line 39: Expected 1 errors +Line 40: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +Line 47: Expected 1 errors +Line 52: Expected 1 errors +Line 54: Expected 1 errors +Line 55: Expected 1 errors +Line 69: Expected 1 errors +Line 70: Expected 1 errors +Line 71: Expected 1 errors +Line 73: Expected 1 errors +Line 77: Expected 1 errors +Line 78: Expected 1 errors +Line 111: Expected 1 errors +Line 140: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/classes_override.toml b/conformance/results/pycroscope/classes_override.toml new file mode 100644 index 000000000..4ecee067a --- /dev/null +++ b/conformance/results/pycroscope/classes_override.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Lines 52, 53: Expected error (tag 'method3') +Lines 56, 57, 64, 65: Expected error (tag 'method4') +Lines 78, 79: Expected error (tag 'static_method1') +Lines 83, 84: Expected error (tag 'class_method1') +Lines 88, 89: Expected error (tag 'property1') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml new file mode 100644 index 000000000..02bb5dfa5 --- /dev/null +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Expected 1 errors +Line 42: Expected 1 errors +Line 56: Expected 1 errors +Line 107: Expected 1 errors +Line 130: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml new file mode 100644 index 000000000..2b47a9181 --- /dev/null +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 54: Expected 1 errors +Line 68: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml new file mode 100644 index 000000000..1bc562bf2 --- /dev/null +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Expected 1 errors +Line 148: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/constructors_call_type.toml b/conformance/results/pycroscope/constructors_call_type.toml new file mode 100644 index 000000000..4dd185c12 --- /dev/null +++ b/conformance/results/pycroscope/constructors_call_type.toml @@ -0,0 +1,13 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Expected 1 errors +Line 40: Expected 1 errors +Line 50: Expected 1 errors +Line 59: Expected 1 errors +Line 64: Expected 1 errors +Line 72: Expected 1 errors +Line 81: Expected 1 errors +Line 82: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml new file mode 100644 index 000000000..11a12371a --- /dev/null +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -0,0 +1,17 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 38: Expected 1 errors +Line 39: Expected 1 errors +Line 51: Expected 1 errors +Line 66: Expected 1 errors +Line 67: Expected 1 errors +Line 68: Expected 1 errors +Line 81: Expected 1 errors +Line 82: Expected 1 errors +Line 129: Expected 1 errors +Line 146: Expected 1 errors +Line 186: Expected 1 errors +Line 197: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/constructors_consistency.toml b/conformance/results/pycroscope/constructors_consistency.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/constructors_consistency.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml new file mode 100644 index 000000000..36aba1dc0 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Expected 1 errors +Line 35: Expected 1 errors +Line 36: Expected 1 errors +Line 37: Expected 1 errors +Line 38: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_frozen.toml b/conformance/results/pycroscope/dataclasses_frozen.toml new file mode 100644 index 000000000..d789c7c92 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_frozen.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Expected 1 errors +Line 17: Expected 1 errors +Lines 22, 23: Expected error (tag 'DC2') +Lines 32, 33: Expected error (tag 'DC4') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_hash.toml b/conformance/results/pycroscope/dataclasses_hash.toml new file mode 100644 index 000000000..a7f264ee3 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_hash.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 32: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_inheritance.toml b/conformance/results/pycroscope/dataclasses_inheritance.toml new file mode 100644 index 000000000..6973d93fa --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_inheritance.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 62: Expected 1 errors +Line 66: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_kwonly.toml b/conformance/results/pycroscope/dataclasses_kwonly.toml new file mode 100644 index 000000000..af4dc4303 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_kwonly.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Expected 1 errors +Line 38: Expected 1 errors +Line 53: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml new file mode 100644 index 000000000..4ab7fa64a --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 42: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_order.toml b/conformance/results/pycroscope/dataclasses_order.toml new file mode 100644 index 000000000..8a6afe99a --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_order.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 50: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_postinit.toml b/conformance/results/pycroscope/dataclasses_postinit.toml new file mode 100644 index 000000000..67e9675bc --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_postinit.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Expected 1 errors +Line 28: Expected 1 errors +Line 29: Expected 1 errors +Line 36: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_slots.toml b/conformance/results/pycroscope/dataclasses_slots.toml new file mode 100644 index 000000000..f6dc3e870 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_slots.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 25: Expected 1 errors +Line 38: Expected 1 errors +Line 66: Expected 1 errors +Line 69: Expected 1 errors +Lines 10, 11: Expected error (tag 'DC1') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml new file mode 100644 index 000000000..1df80a155 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 51: Expected 1 errors +Line 63: Expected 1 errors +Line 66: Expected 1 errors +Line 72: Expected 1 errors +Line 82: Expected 1 errors +Line 122: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml new file mode 100644 index 000000000..846613836 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 48: Expected 1 errors +Line 49: Expected 1 errors +Line 107: Expected 1 errors +Line 108: Expected 1 errors +Line 109: Expected 1 errors +Line 118: Expected 1 errors +Line 119: Expected 1 errors +Line 130: Expected 1 errors +Line 133: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_transform_field.toml b/conformance/results/pycroscope/dataclasses_transform_field.toml new file mode 100644 index 000000000..47dcdb0bf --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_transform_field.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 64: Expected 1 errors +Line 75: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_transform_func.toml b/conformance/results/pycroscope/dataclasses_transform_func.toml new file mode 100644 index 000000000..ec9648a77 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_transform_func.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 56: Expected 1 errors +Line 60: Expected 1 errors +Line 64: Expected 1 errors +Line 70: Expected 1 errors +Line 96: Expected 1 errors +Lines 88, 89: Expected error (tag 'Customer3Subclass') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_transform_meta.toml b/conformance/results/pycroscope/dataclasses_transform_meta.toml new file mode 100644 index 000000000..23f707a1e --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_transform_meta.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 51: Expected 1 errors +Line 63: Expected 1 errors +Line 66: Expected 1 errors +Line 73: Expected 1 errors +Line 83: Expected 1 errors +Line 103: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml new file mode 100644 index 000000000..b49cd0c85 --- /dev/null +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -0,0 +1,16 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 50: Expected 1 errors +Line 51: Expected 1 errors +Line 52: Expected 1 errors +Line 83: Expected 1 errors +Line 88: Expected 1 errors +Line 127: Expected 1 errors +Line 130: Expected 1 errors +Line 179: Expected 1 errors +Lines 58, 60, 61: Expected error (tag 'DC1') +Lines 64, 66, 67: Expected error (tag 'DC2') +Lines 70, 72, 73: Expected error (tag 'DC3') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_assert_type.toml b/conformance/results/pycroscope/directives_assert_type.toml new file mode 100644 index 000000000..5fc6190f1 --- /dev/null +++ b/conformance/results/pycroscope/directives_assert_type.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Expected 1 errors +Line 28: Expected 1 errors +Line 29: Expected 1 errors +Line 30: Expected 1 errors +Line 32: Expected 1 errors +Line 33: Expected 1 errors +Line 34: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_cast.toml b/conformance/results/pycroscope/directives_cast.toml new file mode 100644 index 000000000..6c8e99524 --- /dev/null +++ b/conformance/results/pycroscope/directives_cast.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 16: Expected 1 errors +Line 17: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml new file mode 100644 index 000000000..83e5186af --- /dev/null +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -0,0 +1,17 @@ +conformance_automated = "Fail" +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 = """ +""" diff --git a/conformance/results/pycroscope/directives_no_type_check.toml b/conformance/results/pycroscope/directives_no_type_check.toml new file mode 100644 index 000000000..223c8a3d0 --- /dev/null +++ b/conformance/results/pycroscope/directives_no_type_check.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 32: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_reveal_type.toml b/conformance/results/pycroscope/directives_reveal_type.toml new file mode 100644 index 000000000..470634b6d --- /dev/null +++ b/conformance/results/pycroscope/directives_reveal_type.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Expected 1 errors +Line 20: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_type_checking.toml b/conformance/results/pycroscope/directives_type_checking.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/directives_type_checking.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_type_ignore.toml b/conformance/results/pycroscope/directives_type_ignore.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/directives_type_ignore.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_type_ignore_file1.toml b/conformance/results/pycroscope/directives_type_ignore_file1.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/directives_type_ignore_file1.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_type_ignore_file2.toml b/conformance/results/pycroscope/directives_type_ignore_file2.toml new file mode 100644 index 000000000..536748909 --- /dev/null +++ b/conformance/results/pycroscope/directives_type_ignore_file2.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/directives_version_platform.toml b/conformance/results/pycroscope/directives_version_platform.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/directives_version_platform.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/enums_behaviors.toml b/conformance/results/pycroscope/enums_behaviors.toml new file mode 100644 index 000000000..8e572589b --- /dev/null +++ b/conformance/results/pycroscope/enums_behaviors.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 44: Expected 1 errors +Lines 27, 28: Expected error (tag 'red') +Lines 31, 32: Expected error (tag 'blue') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/enums_definition.toml b/conformance/results/pycroscope/enums_definition.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/enums_definition.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/enums_expansion.toml b/conformance/results/pycroscope/enums_expansion.toml new file mode 100644 index 000000000..28deb70ee --- /dev/null +++ b/conformance/results/pycroscope/enums_expansion.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 53: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/enums_member_names.toml b/conformance/results/pycroscope/enums_member_names.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/enums_member_names.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/enums_member_values.toml b/conformance/results/pycroscope/enums_member_values.toml new file mode 100644 index 000000000..905357727 --- /dev/null +++ b/conformance/results/pycroscope/enums_member_values.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 78: Expected 1 errors +Line 85: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml new file mode 100644 index 000000000..690c7cfd7 --- /dev/null +++ b/conformance/results/pycroscope/enums_members.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 50: Expected 1 errors +Line 82: Expected 1 errors +Line 83: Expected 1 errors +Line 84: Expected 1 errors +Line 85: Expected 1 errors +Line 116: Expected 1 errors +Line 129: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/exceptions_context_managers.toml b/conformance/results/pycroscope/exceptions_context_managers.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/exceptions_context_managers.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml new file mode 100644 index 000000000..d7d30005c --- /dev/null +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Expected 1 errors +Line 29: Expected 1 errors +Line 30: Expected 1 errors +Line 49: Expected 1 errors +Line 61: Expected 1 errors +Line 68: Expected 1 errors +Line 98: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml new file mode 100644 index 000000000..5f51fee8d --- /dev/null +++ b/conformance/results/pycroscope/generics_basic.toml @@ -0,0 +1,18 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 40: Expected 1 errors +Line 41: Expected 1 errors +Line 49: Expected 1 errors +Line 55: Expected 1 errors +Line 69: Expected 1 errors +Line 121: Expected 1 errors +Line 157: Expected 1 errors +Line 158: Expected 1 errors +Line 162: Expected 1 errors +Line 163: Expected 1 errors +Line 171: Expected 1 errors +Line 172: Expected 1 errors +Line 208: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml new file mode 100644 index 000000000..163e64d66 --- /dev/null +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 50: Expected 1 errors +Line 107: Expected 1 errors +Line 114: Expected 1 errors +Line 143: Expected 1 errors +Lines 131, 132: Expected error (tag 'optional-default-use') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml new file mode 100644 index 000000000..973dcdcda --- /dev/null +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Expected 1 errors +Line 37: Expected 1 errors +Line 53: Expected 1 errors +Line 60: Expected 1 errors +Line 68: Expected 1 errors +Line 74: Expected 1 errors +Line 78: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml new file mode 100644 index 000000000..90113f84f --- /dev/null +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Expected 1 errors +Line 55: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_paramspec_basic.toml b/conformance/results/pycroscope/generics_paramspec_basic.toml new file mode 100644 index 000000000..67daf2de0 --- /dev/null +++ b/conformance/results/pycroscope/generics_paramspec_basic.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Expected 1 errors +Line 15: Expected 1 errors +Line 23: Expected 1 errors +Line 27: Expected 1 errors +Line 31: Expected 1 errors +Line 35: Expected 1 errors +Line 39: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_paramspec_components.toml b/conformance/results/pycroscope/generics_paramspec_components.toml new file mode 100644 index 000000000..83b43e978 --- /dev/null +++ b/conformance/results/pycroscope/generics_paramspec_components.toml @@ -0,0 +1,21 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Expected 1 errors +Line 20: Expected 1 errors +Line 23: Expected 1 errors +Line 26: Expected 1 errors +Line 30: Expected 1 errors +Line 35: Expected 1 errors +Line 36: Expected 1 errors +Line 38: Expected 1 errors +Line 41: Expected 1 errors +Line 49: Expected 1 errors +Line 51: Expected 1 errors +Line 60: Expected 1 errors +Line 70: Expected 1 errors +Line 72: Expected 1 errors +Line 83: Expected 1 errors +Line 98: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml new file mode 100644 index 000000000..091235122 --- /dev/null +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Expected 1 errors +Line 27: Expected 1 errors +Line 61: Expected 1 errors +Line 98: Expected 1 errors +Line 108: Expected 1 errors +Line 120: Expected 1 errors +Line 127: Expected 1 errors +Line 132: Expected 1 errors +Line 137: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_paramspec_specialization.toml b/conformance/results/pycroscope/generics_paramspec_specialization.toml new file mode 100644 index 000000000..1b34f1129 --- /dev/null +++ b/conformance/results/pycroscope/generics_paramspec_specialization.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 44: Expected 1 errors +Line 54: Expected 1 errors +Line 55: Expected 1 errors +Line 60: Expected 1 errors +Line 61: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_scoping.toml b/conformance/results/pycroscope/generics_scoping.toml new file mode 100644 index 000000000..d22184382 --- /dev/null +++ b/conformance/results/pycroscope/generics_scoping.toml @@ -0,0 +1,15 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Expected 1 errors +Line 50: Expected 1 errors +Line 54: Expected 1 errors +Line 65: Expected 1 errors +Line 75: Expected 1 errors +Line 78: Expected 1 errors +Line 87: Expected 1 errors +Line 94: Expected 1 errors +Line 95: Expected 1 errors +Line 96: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_self_attributes.toml b/conformance/results/pycroscope/generics_self_attributes.toml new file mode 100644 index 000000000..d645143c1 --- /dev/null +++ b/conformance/results/pycroscope/generics_self_attributes.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Expected 1 errors +Line 32: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml new file mode 100644 index 000000000..401cc7c63 --- /dev/null +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 20: Expected 1 errors +Line 33: Expected 1 errors +Line 68: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_self_protocols.toml b/conformance/results/pycroscope/generics_self_protocols.toml new file mode 100644 index 000000000..8092eb32c --- /dev/null +++ b/conformance/results/pycroscope/generics_self_protocols.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 61: Expected 1 errors +Line 64: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml new file mode 100644 index 000000000..7e7f3f25b --- /dev/null +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -0,0 +1,16 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 73: Expected 1 errors +Line 76: Expected 1 errors +Line 82: Expected 1 errors +Line 87: Expected 1 errors +Line 103: Expected 1 errors +Line 105: Expected 1 errors +Line 108: Expected 1 errors +Line 113: Expected 1 errors +Line 118: Expected 1 errors +Line 123: Expected 1 errors +Line 127: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_syntax_compatibility.toml b/conformance/results/pycroscope/generics_syntax_compatibility.toml new file mode 100644 index 000000000..c2a2f515c --- /dev/null +++ b/conformance/results/pycroscope/generics_syntax_compatibility.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Expected 1 errors +Line 26: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml new file mode 100644 index 000000000..4c8787146 --- /dev/null +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -0,0 +1,15 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 17: Expected 1 errors +Line 25: Expected 1 errors +Line 32: Expected 1 errors +Line 44: Expected 1 errors +Line 48: Expected 1 errors +Line 60: Expected 1 errors +Line 64: Expected 1 errors +Line 71: Expected 1 errors +Line 75: Expected 1 errors +Line 79: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml new file mode 100644 index 000000000..c842540ab --- /dev/null +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -0,0 +1,23 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 17: Expected 1 errors +Line 29: Expected 1 errors +Line 47: Expected 1 errors +Line 56: Expected 1 errors +Line 85: Expected 1 errors +Line 96: Expected 1 errors +Line 112: Expected 1 errors +Line 113: Expected 1 errors +Line 127: Expected 1 errors +Line 128: Expected 1 errors +Line 135: Expected 1 errors +Line 136: Expected 1 errors +Line 137: Expected 1 errors +Line 138: Expected 1 errors +Line 146: Expected 1 errors +Line 154: Expected 1 errors +Line 165: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml new file mode 100644 index 000000000..789786633 --- /dev/null +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Expected 1 errors +Line 18: Expected 1 errors +Line 35: Expected 1 errors +Line 44: Expected 1 errors +Line 92: Expected 1 errors +Line 95: Expected 1 errors +Line 98: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml new file mode 100644 index 000000000..746cb716c --- /dev/null +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 38: Expected 1 errors +Line 40: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml new file mode 100644 index 000000000..81a52aa58 --- /dev/null +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Expected 1 errors +Line 34: Expected 1 errors +Line 48: Expected 1 errors +Line 57: Expected 1 errors +Line 58: Expected 1 errors +Line 59: Expected 1 errors +Line 67: Expected 1 errors +Line 75: Expected 1 errors +Line 76: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml new file mode 100644 index 000000000..98af861f1 --- /dev/null +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -0,0 +1,20 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 52: Expected 1 errors +Line 53: Expected 1 errors +Line 56: Expected 1 errors +Line 59: Expected 1 errors +Line 65: Expected 1 errors +Line 66: Expected 1 errors +Line 67: Expected 1 errors +Line 89: Expected 1 errors +Line 90: Expected 1 errors +Line 99: Expected 1 errors +Line 100: Expected 1 errors +Line 106: Expected 1 errors +Lines 44, 45: Expected error (tag 'v6') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml new file mode 100644 index 000000000..754595dab --- /dev/null +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_typevartuple_overloads.toml b/conformance/results/pycroscope/generics_typevartuple_overloads.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/generics_typevartuple_overloads.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml new file mode 100644 index 000000000..87d1bf75f --- /dev/null +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 109: Expected 1 errors +Line 110: Expected 1 errors +Line 121: Expected 1 errors +Line 122: Expected 1 errors +Line 127: Expected 1 errors +Line 163: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml new file mode 100644 index 000000000..0ad3bee37 --- /dev/null +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml new file mode 100644 index 000000000..f3dbcd244 --- /dev/null +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 51: Expected 1 errors +Line 56: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml new file mode 100644 index 000000000..f90a22c0f --- /dev/null +++ b/conformance/results/pycroscope/generics_variance.toml @@ -0,0 +1,18 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 14: Expected 1 errors +Line 77: Expected 1 errors +Line 81: Expected 1 errors +Line 93: Expected 1 errors +Line 105: Expected 1 errors +Line 113: Expected 1 errors +Line 163: Expected 1 errors +Line 167: Expected 1 errors +Line 191: Expected 1 errors +Lines 125, 126: Expected error (tag 'CoContra_Child2') +Lines 131, 132: Expected error (tag 'CoContra_Child3') +Lines 141, 142: Expected error (tag 'CoContra_Child5') +Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/generics_variance_inference.toml b/conformance/results/pycroscope/generics_variance_inference.toml new file mode 100644 index 000000000..a3af0abd5 --- /dev/null +++ b/conformance/results/pycroscope/generics_variance_inference.toml @@ -0,0 +1,28 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 25: Expected 1 errors +Line 28: Expected 1 errors +Line 41: Expected 1 errors +Line 49: Expected 1 errors +Line 58: Expected 1 errors +Line 67: Expected 1 errors +Line 80: Expected 1 errors +Line 96: Expected 1 errors +Line 97: Expected 1 errors +Line 111: Expected 1 errors +Line 112: Expected 1 errors +Line 119: Expected 1 errors +Line 120: Expected 1 errors +Line 121: Expected 1 errors +Line 122: Expected 1 errors +Line 130: Expected 1 errors +Line 138: Expected 1 errors +Line 149: Expected 1 errors +Line 169: Expected 1 errors +Line 170: Expected 1 errors +Line 181: Expected 1 errors +Line 194: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/historical_positional.toml b/conformance/results/pycroscope/historical_positional.toml new file mode 100644 index 000000000..225aec04c --- /dev/null +++ b/conformance/results/pycroscope/historical_positional.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 18: Expected 1 errors +Line 26: Expected 1 errors +Line 54: Expected 1 errors +Line 59: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/literals_interactions.toml b/conformance/results/pycroscope/literals_interactions.toml new file mode 100644 index 000000000..f8c170639 --- /dev/null +++ b/conformance/results/pycroscope/literals_interactions.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 16: Expected 1 errors +Line 17: Expected 1 errors +Line 18: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/literals_literalstring.toml b/conformance/results/pycroscope/literals_literalstring.toml new file mode 100644 index 000000000..bbc3cffb5 --- /dev/null +++ b/conformance/results/pycroscope/literals_literalstring.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Expected 1 errors +Line 37: Expected 1 errors +Line 43: Expected 1 errors +Line 66: Expected 1 errors +Line 74: Expected 1 errors +Line 75: Expected 1 errors +Line 120: Expected 1 errors +Line 134: Expected 1 errors +Line 171: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/literals_parameterizations.toml b/conformance/results/pycroscope/literals_parameterizations.toml new file mode 100644 index 000000000..0cb441c58 --- /dev/null +++ b/conformance/results/pycroscope/literals_parameterizations.toml @@ -0,0 +1,22 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 41: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +Line 47: Expected 1 errors +Line 48: Expected 1 errors +Line 49: Expected 1 errors +Line 50: Expected 1 errors +Line 51: Expected 1 errors +Line 52: Expected 1 errors +Line 53: Expected 1 errors +Line 56: Expected 1 errors +Line 60: Expected 1 errors +Line 61: Expected 1 errors +Line 65: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/literals_semantics.toml b/conformance/results/pycroscope/literals_semantics.toml new file mode 100644 index 000000000..3bd76f309 --- /dev/null +++ b/conformance/results/pycroscope/literals_semantics.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 10: Expected 1 errors +Line 24: Expected 1 errors +Line 25: Expected 1 errors +Line 33: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml new file mode 100644 index 000000000..fd7ce01cc --- /dev/null +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -0,0 +1,19 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 32: Expected 1 errors +Line 33: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +Line 47: Expected 1 errors +Line 48: Expected 1 errors +Line 49: Expected 1 errors +Line 69: Expected 1 errors +Line 76: Expected 1 errors +Line 86: Expected 1 errors +Line 106: Expected 1 errors +Line 125: Expected 1 errors +Line 132: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/namedtuples_define_functional.toml b/conformance/results/pycroscope/namedtuples_define_functional.toml new file mode 100644 index 000000000..a2514deb3 --- /dev/null +++ b/conformance/results/pycroscope/namedtuples_define_functional.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Expected 1 errors +Line 21: Expected 1 errors +Line 26: Expected 1 errors +Line 31: Expected 1 errors +Line 36: Expected 1 errors +Line 37: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 69: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/namedtuples_type_compat.toml b/conformance/results/pycroscope/namedtuples_type_compat.toml new file mode 100644 index 000000000..93423c550 --- /dev/null +++ b/conformance/results/pycroscope/namedtuples_type_compat.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Expected 1 errors +Line 23: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml new file mode 100644 index 000000000..09363bf12 --- /dev/null +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -0,0 +1,13 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 34: Expected 1 errors +Line 35: Expected 1 errors +Line 40: Expected 1 errors +Line 41: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 52: Expected 1 errors +Line 53: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/narrowing_typeguard.toml b/conformance/results/pycroscope/narrowing_typeguard.toml new file mode 100644 index 000000000..fee80b2f6 --- /dev/null +++ b/conformance/results/pycroscope/narrowing_typeguard.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 102: Expected 1 errors +Line 107: Expected 1 errors +Line 128: Expected 1 errors +Line 148: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml new file mode 100644 index 000000000..f8b09a836 --- /dev/null +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 105: Expected 1 errors +Line 110: Expected 1 errors +Line 132: Expected 1 errors +Line 152: Expected 1 errors +Line 169: Expected 1 errors +Line 170: Expected 1 errors +Line 191: Expected 1 errors +Line 195: Expected 1 errors +Line 199: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/overloads_basic.toml b/conformance/results/pycroscope/overloads_basic.toml new file mode 100644 index 000000000..4097eaca3 --- /dev/null +++ b/conformance/results/pycroscope/overloads_basic.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 39: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/overloads_consistency.toml b/conformance/results/pycroscope/overloads_consistency.toml new file mode 100644 index 000000000..e389cd61b --- /dev/null +++ b/conformance/results/pycroscope/overloads_consistency.toml @@ -0,0 +1,7 @@ +conformance_automated = "Fail" +errors_diff = """ +Lines 25, 28: Expected error (tag 'return_type') +Lines 41, 44: Expected error (tag 'parameter_type') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/overloads_definitions.toml b/conformance/results/pycroscope/overloads_definitions.toml new file mode 100644 index 000000000..09a6cfccf --- /dev/null +++ b/conformance/results/pycroscope/overloads_definitions.toml @@ -0,0 +1,15 @@ +conformance_automated = "Fail" +errors_diff = """ +Lines 15, 16: Expected error (tag 'func1') +Lines 27, 28: Expected error (tag 'func2') +Lines 58, 59: Expected error (tag 'not_abstract') +Lines 71, 73, 78, 81: Expected error (tag 'func5') +Lines 84, 86, 90, 93, 94: Expected error (tag 'func6') +Lines 122, 123, 124, 128: Expected error (tag 'invalid_final') +Lines 137, 138, 139, 143, 144: Expected error (tag 'invalid_final_2') +Lines 175, 180, 181, 186, 188: Expected error (tag 'override-final') +Lines 195, 196, 202, 203: Expected error (tag 'bad_override') +Lines 226, 227, 228, 231, 232: Expected error (tag 'override_impl') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/overloads_definitions_stub.toml b/conformance/results/pycroscope/overloads_definitions_stub.toml new file mode 100644 index 000000000..54c4dede7 --- /dev/null +++ b/conformance/results/pycroscope/overloads_definitions_stub.toml @@ -0,0 +1,13 @@ +conformance_automated = "Fail" +errors_diff = """ +Lines 13, 14: Expected error (tag 'func1') +Lines 32, 33, 37: Expected error (tag 'func5') +Lines 39, 41, 44: Expected error (tag 'func6') +Lines 67, 69, 71, 72, 73: Expected error (tag 'invalid_final') +Lines 80, 82, 84, 85, 86: Expected error (tag 'invalid_final_2') +Lines 102, 107, 108, 111, 113: Expected error (tag 'override-final') +Lines 120, 121, 122: Expected error (tag 'bad_override') +Lines 143, 146, 147, 149: Expected error (tag 'override_impl') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/overloads_evaluation.toml b/conformance/results/pycroscope/overloads_evaluation.toml new file mode 100644 index 000000000..f43c12568 --- /dev/null +++ b/conformance/results/pycroscope/overloads_evaluation.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 38: Expected 1 errors +Line 46: Expected 1 errors +Line 51: Expected 1 errors +Line 116: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml new file mode 100644 index 000000000..381e8989c --- /dev/null +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -0,0 +1,13 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Expected 1 errors +Line 34: Expected 1 errors +Line 58: Expected 1 errors +Line 74: Expected 1 errors +Line 104: Expected 1 errors +Line 106: Expected 1 errors +Line 107: Expected 1 errors +Line 108: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml new file mode 100644 index 000000000..1ef5b6646 --- /dev/null +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -0,0 +1,26 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 30: Expected 1 errors +Line 67: Expected 1 errors +Line 114: Expected 1 errors +Line 115: Expected 1 errors +Line 116: Expected 1 errors +Line 117: Expected 1 errors +Line 156: Expected 1 errors +Line 157: Expected 1 errors +Line 158: Expected 1 errors +Line 159: Expected 1 errors +Line 160: Expected 1 errors +Line 218: Expected 1 errors +Line 219: Expected 1 errors +Line 285: Expected 1 errors +Line 286: Expected 1 errors +Line 287: Expected 1 errors +Line 288: Expected 1 errors +Line 289: Expected 1 errors +Line 339: Expected 1 errors +Line 340: Expected 1 errors +Line 341: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_explicit.toml b/conformance/results/pycroscope/protocols_explicit.toml new file mode 100644 index 000000000..d80bfe872 --- /dev/null +++ b/conformance/results/pycroscope/protocols_explicit.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 27: Expected 1 errors +Line 56: Expected 1 errors +Line 60: Expected 1 errors +Line 89: Expected 1 errors +Line 134: Expected 1 errors +Line 164: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml new file mode 100644 index 000000000..7bf1fa0a5 --- /dev/null +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 40: Expected 1 errors +Line 44: Expected 1 errors +Line 56: Expected 1 errors +Line 66: Expected 1 errors +Line 74: Expected 1 errors +Line 75: Expected 1 errors +Line 145: Expected 1 errors +Line 146: Expected 1 errors +Line 147: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml new file mode 100644 index 000000000..52eaf2096 --- /dev/null +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 52: Expected 1 errors +Line 53: Expected 1 errors +Line 54: Expected 1 errors +Line 67: Expected 1 errors +Line 82: Expected 1 errors +Line 83: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_modules.toml b/conformance/results/pycroscope/protocols_modules.toml new file mode 100644 index 000000000..d26457104 --- /dev/null +++ b/conformance/results/pycroscope/protocols_modules.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 26: Expected 1 errors +Line 48: Expected 1 errors +Line 49: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_runtime_checkable.toml b/conformance/results/pycroscope/protocols_runtime_checkable.toml new file mode 100644 index 000000000..58abba848 --- /dev/null +++ b/conformance/results/pycroscope/protocols_runtime_checkable.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Expected 1 errors +Line 55: Expected 1 errors +Line 61: Expected 1 errors +Line 88: Expected 1 errors +Line 92: Expected 1 errors +Line 96: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_self.toml b/conformance/results/pycroscope/protocols_self.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/protocols_self.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml new file mode 100644 index 000000000..7438b4310 --- /dev/null +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Expected 1 errors +Line 38: Expected 1 errors +Line 55: Expected 1 errors +Line 79: Expected 1 errors +Line 80: Expected 1 errors +Line 102: Expected 1 errors +Line 103: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/protocols_variance.toml b/conformance/results/pycroscope/protocols_variance.toml new file mode 100644 index 000000000..a5f099546 --- /dev/null +++ b/conformance/results/pycroscope/protocols_variance.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Expected 1 errors +Line 40: Expected 1 errors +Line 56: Expected 1 errors +Line 66: Expected 1 errors +Line 104: Expected 1 errors +Lines 61, 62: Expected error (tag 'covariant_in_input') +Lines 71, 72: Expected error (tag 'contravariant_in_output') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml new file mode 100644 index 000000000..c4cda1251 --- /dev/null +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -0,0 +1,25 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 38: Expected 1 errors +Line 39: Expected 1 errors +Line 40: Expected 1 errors +Line 41: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +Line 46: Expected 1 errors +Line 47: Expected 1 errors +Line 48: Expected 1 errors +Line 49: Expected 1 errors +Line 59: Expected 1 errors +Line 71: Expected 1 errors +Line 72: Expected 1 errors +Line 79: Expected 1 errors +Line 80: Expected 1 errors +Line 86: Expected 1 errors +Line 87: Expected 1 errors +Line 88: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml new file mode 100644 index 000000000..17a076626 --- /dev/null +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -0,0 +1,31 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 16: Expected 1 errors +Line 18: Expected 1 errors +Line 34: Expected 1 errors +Line 38: Expected 1 errors +Line 54: Expected 1 errors +Line 62: Expected 1 errors +Line 63: Expected 1 errors +Line 65: Expected 1 errors +Line 67: Expected 1 errors +Line 71: Expected 1 errors +Line 81: Expected 1 errors +Line 94: Expected 1 errors +Line 107: Expected 1 errors +Line 108: Expected 1 errors +Line 118: Expected 1 errors +Line 121: Expected 1 errors +Line 134: Expected 1 errors +Line 135: Expected 1 errors +Line 141: Expected 1 errors +Line 145: Expected 1 errors +Line 147: Expected 1 errors +Line 149: Expected 1 errors +Line 152: Expected 1 errors +Line 155: Expected 1 errors +Line 166: Expected 1 errors +Line 170: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/qualifiers_final_decorator.toml b/conformance/results/pycroscope/qualifiers_final_decorator.toml new file mode 100644 index 000000000..68fc20884 --- /dev/null +++ b/conformance/results/pycroscope/qualifiers_final_decorator.toml @@ -0,0 +1,15 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Expected 1 errors +Line 56: Expected 1 errors +Line 118: Expected 1 errors +Lines 59, 60: Expected error (tag 'method2') +Lines 63, 64: Expected error (tag 'method3') +Lines 67, 68, 75: Expected error (tag 'method4') +Lines 80, 81, 89: Expected error (tag 'Derived3') +Lines 84, 85, 86: Expected error (tag 'Derived3-2') +Lines 94, 95, 102: Expected error (tag 'Derived4') +Lines 125, 126: Expected error (tag 'func') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/specialtypes_any.toml b/conformance/results/pycroscope/specialtypes_any.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/specialtypes_any.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/specialtypes_never.toml b/conformance/results/pycroscope/specialtypes_never.toml new file mode 100644 index 000000000..b5a5f37d5 --- /dev/null +++ b/conformance/results/pycroscope/specialtypes_never.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 19: Expected 1 errors +Line 85: Expected 1 errors +Line 104: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/specialtypes_none.toml b/conformance/results/pycroscope/specialtypes_none.toml new file mode 100644 index 000000000..0149642f1 --- /dev/null +++ b/conformance/results/pycroscope/specialtypes_none.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Expected 1 errors +Line 27: Expected 1 errors +Line 41: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/specialtypes_promotions.toml b/conformance/results/pycroscope/specialtypes_promotions.toml new file mode 100644 index 000000000..4a94412fb --- /dev/null +++ b/conformance/results/pycroscope/specialtypes_promotions.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 13: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml new file mode 100644 index 000000000..1b10575f4 --- /dev/null +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 56: Expected 1 errors +Line 70: Expected 1 errors +Line 76: Expected 1 errors +Line 117: Expected 1 errors +Line 120: Expected 1 errors +Line 143: Expected 1 errors +Line 144: Expected 1 errors +Line 145: Expected 1 errors +Line 146: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml new file mode 100644 index 000000000..982ab22ee --- /dev/null +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -0,0 +1,29 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 29: Expected 1 errors +Line 32: Expected 1 errors +Line 33: Expected 1 errors +Line 43: Expected 1 errors +Line 62: Expected 1 errors +Line 157: Expected 1 errors +Line 162: Expected 1 errors +Line 163: Expected 1 errors +Line 169: Expected 1 errors +Line 170: Expected 1 errors +Line 175: Expected 1 errors +Line 176: Expected 1 errors +Line 181: Expected 1 errors +Line 184: Expected 1 errors +Line 188: Expected 1 errors +Lines 75, 76: Expected error (tag 'func5_1') +Lines 80, 81: Expected error (tag 'func5_2') +Lines 85, 86: Expected error (tag 'func5_3') +Lines 101, 102: Expected error (tag 'func6_1') +Lines 106, 107: Expected error (tag 'func6_2') +Lines 111, 112: Expected error (tag 'func6_3') +Lines 126, 127: Expected error (tag 'func7_1') +Lines 129, 130: Expected error (tag 'func7_2') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/tuples_type_form.toml b/conformance/results/pycroscope/tuples_type_form.toml new file mode 100644 index 000000000..e47740b7e --- /dev/null +++ b/conformance/results/pycroscope/tuples_type_form.toml @@ -0,0 +1,16 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Expected 1 errors +Line 14: Expected 1 errors +Line 15: Expected 1 errors +Line 25: Expected 1 errors +Line 36: Expected 1 errors +Line 40: Expected 1 errors +Line 41: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors +Line 44: Expected 1 errors +Line 45: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/tuples_unpacked.toml b/conformance/results/pycroscope/tuples_unpacked.toml new file mode 100644 index 000000000..a16914ecd --- /dev/null +++ b/conformance/results/pycroscope/tuples_unpacked.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 40: Expected 1 errors +Line 41: Expected 1 errors +Line 51: Expected 1 errors +Line 59: Expected 1 errors +Lines 60, 61: Expected error (tag 't14') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_alt_syntax.toml b/conformance/results/pycroscope/typeddicts_alt_syntax.toml new file mode 100644 index 000000000..d39d314cc --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_alt_syntax.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Expected 1 errors +Line 27: Expected 1 errors +Line 31: Expected 1 errors +Line 35: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_class_syntax.toml b/conformance/results/pycroscope/typeddicts_class_syntax.toml new file mode 100644 index 000000000..23f929c29 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_class_syntax.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 29: Expected 1 errors +Line 44: Expected 1 errors +Line 49: Expected 1 errors +Lines 33, 34: Expected error (tag 'method2') +Lines 38, 39: Expected error (tag 'method3') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml new file mode 100644 index 000000000..e7be7e304 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -0,0 +1,33 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 15: Expected 1 errors +Line 22: Expected 1 errors +Line 39: Expected 1 errors +Line 49: Expected 1 errors +Line 67: Expected 1 errors +Line 73: Expected 1 errors +Line 109: Expected 1 errors +Line 114: Expected 1 errors +Line 117: Expected 1 errors +Line 128: Expected 1 errors +Line 143: Expected 1 errors +Line 174: 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 +Line 278: Expected 1 errors +Line 285: Expected 1 errors +Line 293: Expected 1 errors +Line 303: Expected 1 errors +Line 352: 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') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_final.toml b/conformance/results/pycroscope/typeddicts_final.toml new file mode 100644 index 000000000..cdd4d0cd9 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_final.toml @@ -0,0 +1,5 @@ +conformance_automated = "Pass" +errors_diff = """ +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_inheritance.toml b/conformance/results/pycroscope/typeddicts_inheritance.toml new file mode 100644 index 000000000..599d3bd12 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_inheritance.toml @@ -0,0 +1,8 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 44: Expected 1 errors +Line 65: Expected 1 errors +Lines 54, 55: Expected error (tag 'Y1') +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_operations.toml b/conformance/results/pycroscope/typeddicts_operations.toml new file mode 100644 index 000000000..84dc4df14 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_operations.toml @@ -0,0 +1,16 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 22: Expected 1 errors +Line 23: Expected 1 errors +Line 24: Expected 1 errors +Line 26: Expected 1 errors +Line 28: Expected 1 errors +Line 29: Expected 1 errors +Line 32: Expected 1 errors +Line 37: Expected 1 errors +Line 47: Expected 1 errors +Line 49: Expected 1 errors +Line 62: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_readonly.toml b/conformance/results/pycroscope/typeddicts_readonly.toml new file mode 100644 index 000000000..52e731930 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_readonly.toml @@ -0,0 +1,11 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 24: Expected 1 errors +Line 36: Expected 1 errors +Line 50: Expected 1 errors +Line 51: Expected 1 errors +Line 60: Expected 1 errors +Line 61: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_readonly_consistency.toml b/conformance/results/pycroscope/typeddicts_readonly_consistency.toml new file mode 100644 index 000000000..9548e2105 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_readonly_consistency.toml @@ -0,0 +1,12 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 37: Expected 1 errors +Line 38: Expected 1 errors +Line 40: Expected 1 errors +Line 81: Expected 1 errors +Line 82: Expected 1 errors +Line 84: Expected 1 errors +Line 85: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml new file mode 100644 index 000000000..171d81b35 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml @@ -0,0 +1,16 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 36: Expected 1 errors +Line 50: Expected 1 errors +Line 65: Expected 1 errors +Line 82: Expected 1 errors +Line 83: Expected 1 errors +Line 84: Expected 1 errors +Line 94: Expected 1 errors +Line 98: Expected 1 errors +Line 106: Expected 1 errors +Line 119: Expected 1 errors +Line 132: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_readonly_kwargs.toml b/conformance/results/pycroscope/typeddicts_readonly_kwargs.toml new file mode 100644 index 000000000..ff5101052 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_readonly_kwargs.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 33: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_readonly_update.toml b/conformance/results/pycroscope/typeddicts_readonly_update.toml new file mode 100644 index 000000000..c614899ef --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_readonly_update.toml @@ -0,0 +1,6 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_required.toml b/conformance/results/pycroscope/typeddicts_required.toml new file mode 100644 index 000000000..355a54a88 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_required.toml @@ -0,0 +1,9 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 12: Expected 1 errors +Line 16: Expected 1 errors +Line 59: Expected 1 errors +Line 60: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_type_consistency.toml b/conformance/results/pycroscope/typeddicts_type_consistency.toml new file mode 100644 index 000000000..8e8077a94 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_type_consistency.toml @@ -0,0 +1,14 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 21: Expected 1 errors +Line 38: Expected 1 errors +Line 65: Expected 1 errors +Line 69: Expected 1 errors +Line 76: Expected 1 errors +Line 77: Expected 1 errors +Line 78: Expected 1 errors +Line 82: Expected 1 errors +Line 126: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeddicts_usage.toml b/conformance/results/pycroscope/typeddicts_usage.toml new file mode 100644 index 000000000..4a08d2813 --- /dev/null +++ b/conformance/results/pycroscope/typeddicts_usage.toml @@ -0,0 +1,10 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Expected 1 errors +Line 24: Expected 1 errors +Line 28: Expected 1 errors +Line 35: Expected 1 errors +Line 40: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/typeforms_typeform.toml b/conformance/results/pycroscope/typeforms_typeform.toml new file mode 100644 index 000000000..607723755 --- /dev/null +++ b/conformance/results/pycroscope/typeforms_typeform.toml @@ -0,0 +1,22 @@ +conformance_automated = "Fail" +errors_diff = """ +Line 23: Expected 1 errors +Line 24: Expected 1 errors +Line 55: Expected 1 errors +Line 56: Expected 1 errors +Line 57: Expected 1 errors +Line 58: Expected 1 errors +Line 59: Expected 1 errors +Line 60: Expected 1 errors +Line 61: Expected 1 errors +Line 62: Expected 1 errors +Line 63: Expected 1 errors +Line 64: Expected 1 errors +Line 65: Expected 1 errors +Line 76: Expected 1 errors +Line 78: Expected 1 errors +Line 88: Expected 1 errors +Line 98: Expected 1 errors +""" +output = """ +""" diff --git a/conformance/results/pycroscope/version.toml b/conformance/results/pycroscope/version.toml new file mode 100644 index 000000000..61502d799 --- /dev/null +++ b/conformance/results/pycroscope/version.toml @@ -0,0 +1 @@ +version = "pycroscope 0.2.0" diff --git a/conformance/results/results.html b/conformance/results/results.html index 0f10f1080..608a3a1c6 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -180,8 +180,10 @@

Python Type System Conformance Test Results

pyrefly 0.53.0
+
pycroscope 0.2.0
+ - + Type annotations      annotations_coroutines @@ -189,32 +191,37 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      annotations_forward_refs
Partial

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

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

Incorrectly generates error for quoted type defined in class scope.

Pass
Partial

Incorrectly generates error for quoted type defined in class scope.

Partial

Types in quotes incorrectly refer to shadowing class member.

Does not reject some type forms that require quotes.

+Unknown      annotations_generators
Partial

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

Pass Pass
Partial

Does not detect that invalid yield is unreachable

+Unknown      annotations_methods
Pass*

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

Pass*

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

Pass Pass +Pass      annotations_typeexpr Pass Pass Pass Pass +Unknown - + Type forms      typeforms_typeform @@ -222,8 +229,9 @@

Python Type System Conformance Test Results

Unknown Unknown Unknown +Unknown - + Special types in annotations      specialtypes_any @@ -231,32 +239,37 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      specialtypes_never Pass Pass Pass Pass +Unknown      specialtypes_none Pass Pass Pass Pass +Unknown      specialtypes_promotions Pass Pass Pass Pass +Unknown      specialtypes_type
Partial

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

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

Pass Pass Pass +Unknown - + Generics      generics_base_class @@ -264,182 +277,216 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      generics_basic Pass Pass Pass
Partial

Incorrect rejects + between two AnyStr

Constrained type var resolves to subtype instead of explcitly listed constraint

+Unknown      generics_defaults Partial Pass Pass Pass +Unknown      generics_defaults_referential Partial Pass Pass Pass +Unknown      generics_defaults_specialization Partial Pass Pass Pass +Unknown      generics_paramspec_basic Pass Pass Pass Pass +Unknown      generics_paramspec_components Pass Pass Pass
Partial

Does not reject usage of args/kwargs for out-of-scope ParamSpec

+Unknown      generics_paramspec_semantics Pass
Pass*

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

Pass Pass +Unknown      generics_paramspec_specialization Pass Pass Pass Pass +Unknown      generics_scoping Pass Pass Partial
Partial

Does not implement several scoping checks/restrictions for generics

+Unknown      generics_self_advanced
Partial

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

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

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

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

Pass
Partial

Doesn't allow accessing `Self` in a classmethod

Pass*

Treats attributes not initialized on the class as instance-only

+Pass      generics_self_attributes Pass Pass Pass Pass +Unknown      generics_self_basic Pass Pass Pass
Partial

Return annotation of Self allows returning the concrete instance of the current class.

+Unknown      generics_self_protocols Pass Pass Pass Pass +Unknown      generics_self_usage Pass Pass Pass
Partial

Does not implement some restrictions on where Self can be used

+Unknown      generics_syntax_compatibility Pass Pass Pass Pass +Unknown      generics_syntax_declarations Pass Pass Pass Pass +Unknown      generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet supported.

Pass Pass Pass +Unknown      generics_syntax_scoping
Partial

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

Pass Pass Pass +Unknown      generics_type_erasure
Partial

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

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

Pass Pass Pass +Unknown      generics_typevartuple_args
Partial

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

Pass Pass Pass +Unknown      generics_typevartuple_basic
Partial

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

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

Pass Pass
Partial

TypeVarTuple is pinned too early when calling generic function

+Unknown      generics_typevartuple_callable Pass Pass Pass Pass +Unknown      generics_typevartuple_concat Pass Pass Pass Pass +Pass      generics_typevartuple_overloads Pass Pass Pass Pass +Pass      generics_typevartuple_specialization
Partial

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

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

Pass Pass
Partial

Sometimes specializes to tuple[Any, ...] instead of empty tuple

+Unknown      generics_typevartuple_unpack Pass Pass Pass Pass +Unknown      generics_upper_bound
Partial

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

Pass Pass +<<<<<<< HEAD
Partial

Cannot find a common supertype of `list[int]` and `set[int]` in order to solve a type variable bound to `Sized`.

+======= +Pass +Unknown +>>>>>>> 7a5f235 (Initial pycroscope support)      generics_variance
Partial

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

Pass Pass Pass +Unknown      generics_variance_inference Pass Pass Pass Pass +Unknown - + Type qualifiers      qualifiers_annotated @@ -447,20 +494,23 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Allows Annotated in some contexts where it should not be allowed

+Unknown      qualifiers_final_annotation
Partial

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

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

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

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

Pass Pass
Partial

Final attributes not initialized on the class can be assigned to

+Unknown      qualifiers_final_decorator Pass Pass Pass Pass +Unknown - + Class type compatibility      classes_classvar @@ -468,14 +518,16 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      classes_override Pass Pass Pass Pass +Unknown - + Type aliases      aliases_explicit @@ -483,44 +535,51 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      aliases_implicit Pass Pass Pass
Partial

Does not reject invalid syntax in implicit type aliases.

+Unknown      aliases_newtype
Partial

`NewType`s are incorrectly considered to be classes.

Pass Pass Pass +Unknown      aliases_recursive Pass Pass Pass Pass +Unknown      aliases_type_statement
Partial

Does not reject type alias defined in function scope.

Pass Pass Pass +Unknown      aliases_typealiastype
Partial

Incorrectly rejects some recursive type aliases using TypeAliasType.

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

Pass Pass
Partial

Does not detect circular definitions.

+Unknown      aliases_variance Pass Pass Pass Pass +Unknown - + Literals      literals_interactions @@ -528,26 +587,30 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

Pass Pass Pass +Unknown      literals_parameterizations
Partial

Does not reject tuple within Literal.

Pass Pass Pass +Unknown      literals_semantics Pass Pass Pass Pass +Unknown - + Protocols      protocols_class_objects @@ -555,68 +618,79 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      protocols_definition
Partial

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

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

Pass Pass Pass +Unknown      protocols_explicit
Pass*

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

Pass Pass Pass +Unknown      protocols_generic Pass Pass Pass Pass +Unknown      protocols_merging Pass Pass Pass Pass +Unknown      protocols_modules Pass Pass Pass
Partial

Fails one subtyping example of protocol modules

+Unknown      protocols_recursive Pass Pass Pass Pass +Pass      protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Pass Pass Pass +Unknown      protocols_self Pass Pass Pass Pass +Pass      protocols_subtyping Pass Pass Pass Pass +Unknown      protocols_variance Pass Pass Pass Pass +Unknown - + Callables      callables_annotation @@ -624,26 +698,30 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Parameter names are lost when resolving ParamSpec

+Unknown      callables_kwargs
Partial

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

Pass Pass Pass +Unknown      callables_protocol Pass Pass Pass Pass +Unknown      callables_subtyping Pass Pass Pass Pass +Unknown - + Constructors      constructors_call_init @@ -651,38 +729,44 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      constructors_call_metaclass
Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

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

Pass Pass Pass +Unknown      constructors_call_new
Partial

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

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

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

Pass Pass Pass +Unknown      constructors_call_type
Partial

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

Pass Pass Pass +Unknown      constructors_callable
Partial

Does not generate a union type for __new__ and __init__ when converting class to callable.

Does not ignore __init__ based on __new__ return type when converting class to callable.

Does not support __new__ return type that is different from class being constructed.

Pass Pass
Partial

Converting constructor to callable does not preserve class-scoped type params.

Converting constructor to callable does not substitute Self in __new__

Converting constructor to callable uses __new__ signature instead of __init__

+Unknown      constructors_consistency
Pass*

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

Pass Pass Pass +Pass - + Overloads      overloads_basic @@ -690,32 +774,37 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      overloads_consistency Pass Pass Pass Pass +Unknown      overloads_definitions
Partial

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

Pass Pass Pass +Unknown      overloads_definitions_stub
Partial

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

Pass Pass Pass +Unknown      overloads_evaluation
Partial

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

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

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

Evaluates Any in some cases where overload is not ambiguous.

Partial

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

Pass Pass +Unknown - + Exceptions      exceptions_context_managers @@ -723,8 +812,9 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Some error suppressing context managers are not detected

+Pass - + Dataclasses      dataclasses_descriptors @@ -732,98 +822,114 @@

Python Type System Conformance Test Results

Pass Pass
Partial

* Assumes descriptor behavior only when field is assigned in class body

* Doesn't allow non-data descriptors or data descriptors with differing `__get__` and `__set__` types

+Pass      dataclasses_final
Partial

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

Doesn't support Final nested inside ClassVar.

Pass Pass Pass +Unknown      dataclasses_frozen Pass Pass Pass Pass +Unknown      dataclasses_hash
Partial

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

Pass Pass Pass +Unknown      dataclasses_inheritance Pass Pass Pass Pass +Unknown      dataclasses_kwonly Pass Pass Pass Pass +Unknown      dataclasses_match_args Pass Pass Pass Pass +Unknown      dataclasses_order Pass Pass Pass Pass +Unknown      dataclasses_postinit Pass Pass Pass Pass +Unknown      dataclasses_slots
Partial

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

Pass Pass
Partial

__slots__ is generated but not checked during attribute assignment

+Unknown      dataclasses_transform_class Pass Pass Pass Pass +Unknown      dataclasses_transform_converter
Unsupported

Converter parameter not yet supported.

Pass Pass Pass +Unknown      dataclasses_transform_field
Partial

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

Pass Pass Pass +Unknown      dataclasses_transform_func
Partial

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

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

Pass Pass Pass +Unknown      dataclasses_transform_meta Pass Pass Pass Pass +Unknown      dataclasses_usage
Pass*

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

Pass Pass Pass +Unknown - + Typed dictionaries      typeddicts_alt_syntax @@ -831,86 +937,100 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      typeddicts_class_syntax Pass Pass Pass Pass +Unknown      typeddicts_extra_items
Unsupported

Not supported.

Pass Pass Pass +Unknown      typeddicts_final Pass Pass Pass Pass +Pass      typeddicts_inheritance Pass Pass Pass Pass +Unknown      typeddicts_operations Pass Pass Pass Pass +Unknown      typeddicts_readonly Pass Pass Pass Pass +Unknown      typeddicts_readonly_consistency Pass Pass Pass Pass +Unknown      typeddicts_readonly_inheritance
Partial

Incorrectly rejects non-ReadOnly override of ReadOnly item.

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

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

Pass Pass Pass +Unknown      typeddicts_readonly_kwargs Pass Pass Pass Pass +Unknown      typeddicts_readonly_update
Partial

Incorrectly allows update of ReadOnly item.

Incorrectly rejects update involving an item with Never type.

Pass Pass Pass +Unknown      typeddicts_required Pass Pass Pass Pass +Unknown      typeddicts_type_consistency Pass Pass Pass Pass +Unknown      typeddicts_usage Pass Pass Pass Pass +Unknown - + Tuples      tuples_type_compat @@ -918,20 +1038,23 @@

Python Type System Conformance Test Results

Partial

Incorrectly marks a match case as unreachable.

Pass Pass +Unknown      tuples_type_form Pass Pass Pass Pass +Unknown      tuples_unpacked
Partial

"More than one unpack" error is missing in some cases.

Pass Pass Pass +Unknown - + Named tuples      namedtuples_define_class @@ -939,26 +1062,30 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      namedtuples_define_functional Pass Pass Pass Pass +Unknown      namedtuples_type_compat Pass Pass Pass Pass +Unknown      namedtuples_usage
Partial

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

Pass Pass Pass +Unknown - + Enumerations      enums_behaviors @@ -966,38 +1093,44 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      enums_definition Pass Pass Pass Pass +Pass      enums_expansion
Partial

Improperly applies narrowing to Flag subclass.

Pass Pass Pass +Unknown      enums_member_names
Pass*

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

Pass Pass Pass +Pass      enums_member_values
Partial

Does not enforce declared type of `_value_`.

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

Pass Pass Pass +Unknown      enums_members
Partial

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

Does not treat callables as non-members.

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

Does not properly handle aliased enum members.

Does not support `_ignore_` mechanism (optional).

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

Pass*

Does not support `_ignore_` mechanism (optional).

Pass Pass +Unknown - + Type narrowing      narrowing_typeguard @@ -1005,14 +1138,16 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      narrowing_typeis Pass Pass Pass Pass +Unknown - + Type checker directives      directives_assert_type @@ -1020,62 +1155,72 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown      directives_cast Pass Pass Pass Pass +Unknown      directives_deprecated Pass Pass Pass Pass +Unknown      directives_no_type_check
Partial

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

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

Pass*

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

Pass Pass +Unknown      directives_reveal_type Pass Pass Pass Pass +Unknown      directives_type_checking Pass Pass Pass Pass +Pass      directives_type_ignore
Partial

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

Pass
Partial

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

Pass +Pass      directives_type_ignore_file1 Pass Pass Pass Pass +Pass      directives_type_ignore_file2 Pass Pass Pass Pass +Unknown      directives_version_platform
Pass*

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

Does not understand os.name checks.

Pass Pass Pass +Pass - + Historical and deprecated features      historical_positional @@ -1083,6 +1228,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Unknown diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 605c9081f..3e6b4e52b 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -339,9 +339,89 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: return line_to_errors +class PycroscopeTypeChecker(TypeChecker): + @property + def name(self) -> str: + return "pycroscope" + + def install(self) -> bool: + source_dir = Path.home() / "py" / "pycroscope" + if not source_dir.is_dir(): + print( + f"Unable to install pycroscope: source directory not found at {source_dir}" + ) + return False + try: + # Uninstall any existing version if present. + run( + [sys.executable, "-m", "pip", "uninstall", "pycroscope", "-y"], + check=True, + ) + + # Install editable from the local pycroscope repo. + run( + [sys.executable, "-m", "pip", "install", "-e", str(source_dir)], + check=True, + ) + + # Ensure it is installed and the entrypoint is available. + self.get_version() + + return True + except CalledProcessError: + print("Unable to install pycroscope") + return False + + def get_version(self) -> str: + proc = run(["pycroscope", "--version"], stdout=PIPE, text=True) + return proc.stdout.strip() + + def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: + command = [ + "pycroscope", + ".", + "--output-format", + "concise", + "--disable", + "import_failed", + ] + proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") + lines = proc.stderr.splitlines() + + # Add results to a dictionary keyed by the file name. + results_dict: dict[str, str] = {} + for line in lines: + if not line.strip(): + continue + # Concise output line format: + # file.py:12:3: Message text [error_code] + match = re.match(r"^(.+?):(\d+)(?::\d+)?:\s", line) + if not match: + continue + file_name = Path(match.group(1)).name + results_dict[file_name] = results_dict.get(file_name, "") + line + "\n" + + return results_dict + + def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: + line_to_errors: dict[int, list[str]] = {} + for line in output: + if not line.strip(): + continue + # reveal_type diagnostics are informational for conformance purposes. + if "[reveal_type]" in line or "Revealed type is " in line: + continue + match = re.match(r"^.+?:(\d+)(?::\d+)?:\s", line) + if not match: + continue + line_to_errors.setdefault(int(match.group(1)), []).append(line) + return line_to_errors + + TYPE_CHECKERS: Sequence[TypeChecker] = ( MypyTypeChecker(), PyrightTypeChecker(), ZubanLSTypeChecker(), PyreflyTypeChecker(), + PycroscopeTypeChecker(), ) From 3c1847270d97b19c96532d3284b52dace8b59016 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 20 Feb 2026 22:44:57 -0800 Subject: [PATCH 08/78] update --- .../pycroscope/annotations_forward_refs.toml | 17 +++- .../pycroscope/annotations_generators.toml | 33 +++++-- .../pycroscope/annotations_methods.toml | 1 + .../pycroscope/annotations_typeexpr.toml | 18 ++-- .../pycroscope/callables_annotation.toml | 42 ++++++--- .../results/pycroscope/callables_kwargs.toml | 21 ++--- .../pycroscope/callables_protocol.toml | 26 ++++++ .../pycroscope/callables_subtyping.toml | 74 ++++++++------- .../results/pycroscope/classes_classvar.toml | 23 +++-- .../results/pycroscope/classes_override.toml | 12 +-- .../pycroscope/constructors_call_init.toml | 12 ++- .../constructors_call_metaclass.toml | 2 + .../pycroscope/constructors_call_new.toml | 9 ++ .../pycroscope/constructors_call_type.toml | 4 +- .../pycroscope/constructors_callable.toml | 20 +++++ .../pycroscope/dataclasses_descriptors.toml | 16 +++- .../results/pycroscope/dataclasses_final.toml | 4 + .../pycroscope/dataclasses_kwonly.toml | 2 + .../pycroscope/dataclasses_match_args.toml | 10 +++ .../pycroscope/dataclasses_postinit.toml | 6 ++ .../dataclasses_transform_class.toml | 2 + .../dataclasses_transform_converter.toml | 10 ++- .../dataclasses_transform_field.toml | 4 + .../dataclasses_transform_func.toml | 2 + .../dataclasses_transform_meta.toml | 2 + .../results/pycroscope/dataclasses_usage.toml | 22 ++++- .../pycroscope/directives_assert_type.toml | 16 ++-- .../results/pycroscope/directives_cast.toml | 8 +- .../pycroscope/directives_deprecated.toml | 1 + .../pycroscope/directives_no_type_check.toml | 10 ++- .../pycroscope/directives_reveal_type.toml | 10 ++- .../pycroscope/directives_type_checking.toml | 8 +- .../pycroscope/directives_type_ignore.toml | 10 ++- .../directives_type_ignore_file1.toml | 4 +- .../directives_type_ignore_file2.toml | 4 +- .../directives_version_platform.toml | 2 + .../results/pycroscope/enums_expansion.toml | 4 + .../pycroscope/enums_member_names.toml | 1 + .../pycroscope/enums_member_values.toml | 7 ++ .../results/pycroscope/enums_members.toml | 11 +++ .../exceptions_context_managers.toml | 4 +- .../pycroscope/generics_base_class.toml | 6 ++ .../results/pycroscope/generics_basic.toml | 28 +++++- .../results/pycroscope/generics_defaults.toml | 4 +- .../generics_defaults_referential.toml | 20 +++++ .../generics_defaults_specialization.toml | 2 + .../pycroscope/generics_paramspec_basic.toml | 4 +- .../generics_paramspec_components.toml | 14 +-- .../generics_paramspec_semantics.toml | 41 +++++++-- .../generics_paramspec_specialization.toml | 10 +++ .../results/pycroscope/generics_scoping.toml | 10 ++- .../pycroscope/generics_self_advanced.toml | 8 +- .../pycroscope/generics_self_basic.toml | 2 +- .../pycroscope/generics_self_protocols.toml | 4 +- .../pycroscope/generics_self_usage.toml | 2 +- .../generics_syntax_declarations.toml | 16 ++-- .../generics_syntax_infer_variance.toml | 10 ++- .../pycroscope/generics_syntax_scoping.toml | 14 ++- .../pycroscope/generics_type_erasure.toml | 8 ++ .../generics_typevartuple_args.toml | 18 +++- .../generics_typevartuple_basic.toml | 14 +-- .../generics_typevartuple_callable.toml | 8 ++ .../generics_typevartuple_concat.toml | 6 +- .../generics_typevartuple_overloads.toml | 4 +- .../generics_typevartuple_specialization.toml | 56 +++++++++++- .../pycroscope/generics_upper_bound.toml | 9 +- .../results/pycroscope/generics_variance.toml | 5 +- .../generics_variance_inference.toml | 6 +- .../pycroscope/literals_interactions.toml | 10 ++- .../pycroscope/literals_literalstring.toml | 16 ++-- .../literals_parameterizations.toml | 4 +- .../pycroscope/literals_semantics.toml | 14 ++- .../pycroscope/namedtuples_define_class.toml | 22 +++++ .../namedtuples_define_functional.toml | 24 ++--- .../pycroscope/namedtuples_type_compat.toml | 6 +- .../results/pycroscope/namedtuples_usage.toml | 20 +++++ .../pycroscope/narrowing_typeguard.toml | 16 +++- .../results/pycroscope/narrowing_typeis.toml | 24 +++-- .../results/pycroscope/overloads_basic.toml | 8 +- .../pycroscope/overloads_definitions.toml | 10 ++- .../pycroscope/overloads_evaluation.toml | 42 ++++++++- .../pycroscope/protocols_class_objects.toml | 6 ++ .../pycroscope/protocols_definition.toml | 16 ++++ .../pycroscope/protocols_explicit.toml | 4 + .../results/pycroscope/protocols_generic.toml | 22 ++++- .../results/pycroscope/protocols_merging.toml | 2 + .../results/pycroscope/protocols_modules.toml | 4 + .../pycroscope/protocols_recursive.toml | 13 ++- .../protocols_runtime_checkable.toml | 6 ++ .../results/pycroscope/protocols_self.toml | 4 +- .../pycroscope/protocols_subtyping.toml | 12 +++ .../pycroscope/protocols_variance.toml | 30 ++++++- .../pycroscope/qualifiers_annotated.toml | 30 ++++--- .../qualifiers_final_annotation.toml | 32 ++++--- .../results/pycroscope/specialtypes_any.toml | 6 +- .../pycroscope/specialtypes_never.toml | 6 +- .../results/pycroscope/specialtypes_none.toml | 4 +- .../pycroscope/specialtypes_promotions.toml | 4 +- .../results/pycroscope/specialtypes_type.toml | 28 ++++-- .../pycroscope/tuples_type_compat.toml | 89 ++++++++++++++----- .../results/pycroscope/tuples_type_form.toml | 10 +-- .../pycroscope/typeddicts_alt_syntax.toml | 3 +- .../pycroscope/typeddicts_extra_items.toml | 26 +++++- .../pycroscope/typeddicts_operations.toml | 2 + .../pycroscope/typeddicts_readonly.toml | 14 +-- .../typeddicts_readonly_consistency.toml | 16 ++-- .../typeddicts_readonly_inheritance.toml | 42 ++++++++- .../typeddicts_readonly_kwargs.toml | 4 +- .../typeddicts_readonly_update.toml | 4 +- .../pycroscope/typeddicts_required.toml | 4 +- .../typeddicts_type_consistency.toml | 8 +- .../pycroscope/typeforms_typeform.toml | 37 ++++---- conformance/results/results.html | 44 ++++----- conformance/src/type_checker.py | 1 + 114 files changed, 1220 insertions(+), 352 deletions(-) diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index c897056bc..11f943db9 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -3,8 +3,6 @@ errors_diff = """ Line 24: Expected 1 errors Line 25: Expected 1 errors Line 41: Expected 1 errors -Line 42: Expected 1 errors -Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors @@ -17,8 +15,19 @@ Line 52: Expected 1 errors Line 53: Expected 1 errors Line 54: Expected 1 errors Line 55: Expected 1 errors -Line 80: Expected 1 errors -Line 89: Expected 1 errors +Line 1: Unexpected errors ['./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]'] +Line 40: Unexpected errors ['./annotations_forward_refs.py:40:0: Traceback (most recent call last):'] +Line 103: Unexpected errors ['./annotations_forward_refs.py:103:7: Syntax error in type annotation: '] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] """ output = """ +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] +./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] +./annotations_forward_refs.py:40:0: Traceback (most recent call last): +./annotations_forward_refs.py:103:7: Syntax error in type annotation: +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] +./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/annotations_generators.toml b/conformance/results/pycroscope/annotations_generators.toml index 24b7862ca..2baa3e658 100644 --- a/conformance/results/pycroscope/annotations_generators.toml +++ b/conformance/results/pycroscope/annotations_generators.toml @@ -1,15 +1,30 @@ conformance_automated = "Fail" errors_diff = """ Line 51: Expected 1 errors -Line 54: Expected 1 errors -Line 57: Expected 1 errors -Line 66: Expected 1 errors -Line 75: Expected 1 errors -Line 86: Expected 1 errors -Line 91: Expected 1 errors -Line 118: Expected 1 errors -Line 119: Expected 1 errors -Line 135: Expected 1 errors +Line 96: Unexpected errors ['./annotations_generators.py:96:4: Function may exit without returning a value [missing_return]'] +Line 100: Unexpected errors ['./annotations_generators.py:100:21: Generator function must return an iterable [generator_return]'] +Line 105: Unexpected errors ['./annotations_generators.py:105:4: Function may exit without returning a value [missing_return]'] +Line 109: Unexpected errors ['./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return]'] +Line 167: Unexpected errors ['./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] +Line 174: Unexpected errors ['./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] +Line 190: Unexpected errors ['./annotations_generators.py:190:4: Cannot assign value of type None to yield expression of type int [incompatible_yield]'] """ output = """ +./annotations_generators.py:54:8: Incompatible return type: expected /Users/jelle/py/typing/conformance/tests/annotations_generators.py.C, got Literal[False] [incompatible_return_value] +./annotations_generators.py:57:8: Cannot assign value of type Literal[3] to yield expression of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:66:8: Cannot assign value of type Literal[3] to yield expression of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:71:4: Incompatible return type: expected None, got Literal[True] [incompatible_return_value] +./annotations_generators.py:75:4: Cannot assign value of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.B to yield expression of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:86:20: Generator function must return an iterable [generator_return] +./annotations_generators.py:91:26: Async generator function must return an async iterable [generator_return] +./annotations_generators.py:96:4: Function may exit without returning a value [missing_return] +./annotations_generators.py:100:21: Generator function must return an iterable [generator_return] +./annotations_generators.py:105:4: Function may exit without returning a value [missing_return] +./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return] +./annotations_generators.py:118:4: Cannot yield from collections.abc.Iterator[/Users/jelle/py/typing/conformance/tests/annotations_generators.py.A] (expected /Users/jelle/py/typing/conformance/tests/annotations_generators.py.B) [incompatible_yield] +./annotations_generators.py:119:4: Cannot yield from Literal[[1]] (expected /Users/jelle/py/typing/conformance/tests/annotations_generators.py.B) [incompatible_yield] +./annotations_generators.py:135:4: Cannot send int to a generator (expected str) [incompatible_yield] +./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] +./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] +./annotations_generators.py:190:4: Cannot assign value of type None to yield expression of type int [incompatible_yield] """ diff --git a/conformance/results/pycroscope/annotations_methods.toml b/conformance/results/pycroscope/annotations_methods.toml index cdd4d0cd9..8e4662c72 100644 --- a/conformance/results/pycroscope/annotations_methods.toml +++ b/conformance/results/pycroscope/annotations_methods.toml @@ -2,4 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ +./annotations_methods.py:42:12: /Users/jelle/py/typing/conformance/tests/annotations_methods.py.B is not equivalent to /Users/jelle/py/typing/conformance/tests/annotations_methods.py.A """ diff --git a/conformance/results/pycroscope/annotations_typeexpr.toml b/conformance/results/pycroscope/annotations_typeexpr.toml index cdd3a7a57..b207f1610 100644 --- a/conformance/results/pycroscope/annotations_typeexpr.toml +++ b/conformance/results/pycroscope/annotations_typeexpr.toml @@ -1,20 +1,20 @@ conformance_automated = "Fail" errors_diff = """ Line 88: Expected 1 errors -Line 89: Expected 1 errors -Line 90: Expected 1 errors -Line 91: Expected 1 errors -Line 92: Expected 1 errors Line 93: Expected 1 errors Line 94: Expected 1 errors Line 95: Expected 1 errors -Line 96: Expected 1 errors -Line 97: Expected 1 errors -Line 98: Expected 1 errors -Line 99: Expected 1 errors Line 100: Expected 1 errors Line 101: Expected 1 errors -Line 102: Expected 1 errors """ output = """ +./annotations_typeexpr.py:89:8: Invalid type annotation [, ] [invalid_annotation] +./annotations_typeexpr.py:90:8: Invalid type annotation (, ) [invalid_annotation] +./annotations_typeexpr.py:91:8: Unrecognized annotation [invalid_annotation] +./annotations_typeexpr.py:92:8: Invalid type annotation {} [invalid_annotation] +./annotations_typeexpr.py:96:8: Invalid type annotation 3 [invalid_annotation] +./annotations_typeexpr.py:97:9: Invalid type annotation True [invalid_annotation] +./annotations_typeexpr.py:98:9: Invalid type annotation 1 [invalid_annotation] +./annotations_typeexpr.py:99:9: Invalid type annotation -1 [invalid_annotation] +./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 6f46d22d3..5e811cf16 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -1,21 +1,39 @@ conformance_automated = "Fail" errors_diff = """ -Line 25: Expected 1 errors -Line 26: Expected 1 errors -Line 27: Expected 1 errors -Line 29: Expected 1 errors -Line 35: Expected 1 errors Line 55: Expected 1 errors Line 56: Expected 1 errors -Line 57: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 91: Expected 1 errors -Line 93: Expected 1 errors -Line 159: Expected 1 errors -Line 172: Expected 1 errors -Line 187: Expected 1 errors -Line 189: Expected 1 errors +Line 90: Unexpected errors ['./callables_annotation.py:90:0: Traceback (most recent call last):'] +Line 92: Unexpected errors ['./callables_annotation.py:92:0: Traceback (most recent call last):'] +Line 151: Unexpected errors ['./callables_annotation.py:151:4: Traceback (most recent call last):'] +Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] +Line 156: Unexpected errors ["./callables_annotation.py:156:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]"] +Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] +Line 175: Unexpected errors ['./callables_annotation.py:175:4: Traceback (most recent call last):'] +Line 186: Unexpected errors ['./callables_annotation.py:186:4: Traceback (most recent call last):'] +Line 188: Unexpected errors ['./callables_annotation.py:188:4: Traceback (most recent call last):'] """ output = """ +./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] +./callables_annotation.py:90:0: Traceback (most recent call last): +./callables_annotation.py:92:0: Traceback (most recent call last): +./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] +./callables_annotation.py:26:10: Incompatible argument type for @1: expected str but got Literal[2] [incompatible_argument] +./callables_annotation.py:27:4: Takes 2 positional arguments but 3 were given [incompatible_call] +./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] +./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] +./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '/Users/jelle/py/typing/conformance/tests/callables_annotation.py.test_cb2' [incompatible_assignment] +./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '/Users/jelle/py/typing/conformance/tests/callables_annotation.py.test_cb4' [incompatible_assignment] +./callables_annotation.py:151:4: Traceback (most recent call last): +./callables_annotation.py:152:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] +./callables_annotation.py:156:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] +./callables_annotation.py:157:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:159:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto5[Any[explicit]], got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:175:4: Traceback (most recent call last): +./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:186:4: Traceback (most recent call last): +./callables_annotation.py:188:4: Traceback (most recent call last): +./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] +./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_kwargs.toml b/conformance/results/pycroscope/callables_kwargs.toml index bfb638a4d..696fc0445 100644 --- a/conformance/results/pycroscope/callables_kwargs.toml +++ b/conformance/results/pycroscope/callables_kwargs.toml @@ -1,18 +1,19 @@ conformance_automated = "Fail" errors_diff = """ -Line 46: Expected 1 errors -Line 51: Expected 1 errors -Line 52: Expected 1 errors -Line 58: Expected 1 errors -Line 63: Expected 1 errors -Line 64: Expected 1 errors -Line 65: Expected 1 errors -Line 101: Expected 1 errors -Line 102: Expected 1 errors -Line 103: Expected 1 errors Line 111: Expected 1 errors Line 122: Expected 1 errors Line 134: Expected 1 errors """ output = """ +./callables_kwargs.py:46:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] +./callables_kwargs.py:51:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] +./callables_kwargs.py:52:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] +./callables_kwargs.py:58:4: Incompatible argument type for v1: expected int but got str [incompatible_argument] +./callables_kwargs.py:61:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] +./callables_kwargs.py:63:4: Multiple values provided for argument 'v1' [incompatible_call] +./callables_kwargs.py:64:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] +./callables_kwargs.py:65:4: Multiple values provided for argument 'v1' [incompatible_call] +./callables_kwargs.py:101:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.TDProtocol3 (Protocol with members '__call__'), got function '/Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:102:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.TDProtocol4 (Protocol with members '__call__'), got function '/Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:103:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.TDProtocol5 (Protocol with members '__call__'), got function '/Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1' [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 052bbe7f1..07c877bb3 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -17,6 +17,32 @@ Line 238: Expected 1 errors Line 260: Expected 1 errors Line 284: Expected 1 errors Line 311: Expected 1 errors +Line 14: Unexpected errors ['./callables_protocol.py:14:4: Function may exit without returning a value [missing_return]'] +Line 101: Unexpected errors ['./callables_protocol.py:101:4: Function may exit without returning a value [missing_return]'] +Line 125: Unexpected errors ['./callables_protocol.py:125:4: Function may exit without returning a value [missing_return]'] +Line 156: Unexpected errors ['./callables_protocol.py:156:4: Function may exit without returning a value [missing_return]'] +Line 179: Unexpected errors ['./callables_protocol.py:179:4: Function may exit without returning a value [missing_return]'] +Line 220: Unexpected errors ['./callables_protocol.py:220:4: Function may exit without returning a value [missing_return]'] +Line 224: Unexpected errors ['./callables_protocol.py:224:0: Function may exit without returning a value [missing_return]'] +Line 228: Unexpected errors ['./callables_protocol.py:228:0: Function may exit without returning a value [missing_return]'] +Line 232: Unexpected errors ['./callables_protocol.py:232:0: Function may exit without returning a value [missing_return]'] +Line 265: Unexpected errors ['./callables_protocol.py:265:4: Function may exit without returning a value [missing_return]'] +Line 271: Unexpected errors ['./callables_protocol.py:271:4: Function may exit without returning a value [missing_return]'] +Line 292: Unexpected errors ['./callables_protocol.py:292:4: Function may exit without returning a value [missing_return]'] +Line 298: Unexpected errors ['./callables_protocol.py:298:4: Function may exit without returning a value [missing_return]'] """ output = """ +./callables_protocol.py:14:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:101:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:125:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:156:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:179:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:220:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:224:0: Function may exit without returning a value [missing_return] +./callables_protocol.py:228:0: Function may exit without returning a value [missing_return] +./callables_protocol.py:232:0: Function may exit without returning a value [missing_return] +./callables_protocol.py:265:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:271:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:292:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:298:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index ec0d519dc..2b3f0c73e 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -1,37 +1,49 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors -Line 29: Expected 1 errors -Line 51: Expected 1 errors -Line 52: Expected 1 errors -Line 55: Expected 1 errors -Line 58: Expected 1 errors -Line 82: Expected 1 errors -Line 85: Expected 1 errors -Line 86: Expected 1 errors -Line 116: Expected 1 errors -Line 119: Expected 1 errors -Line 120: Expected 1 errors -Line 122: Expected 1 errors -Line 124: Expected 1 errors -Line 125: Expected 1 errors -Line 126: Expected 1 errors -Line 151: Expected 1 errors -Line 154: Expected 1 errors -Line 155: Expected 1 errors -Line 187: Expected 1 errors -Line 190: Expected 1 errors -Line 191: Expected 1 errors -Line 193: Expected 1 errors -Line 195: Expected 1 errors -Line 196: Expected 1 errors -Line 197: Expected 1 errors -Line 236: Expected 1 errors -Line 237: Expected 1 errors -Line 240: Expected 1 errors -Line 243: Expected 1 errors Line 273: Expected 1 errors -Line 297: Expected 1 errors +Line 259: Unexpected errors ['./callables_subtyping.py:259:4: Function may exit without returning a value [missing_return]'] +Line 263: Unexpected errors ['./callables_subtyping.py:263:4: Function may exit without returning a value [missing_return]'] +Line 267: Unexpected errors ['./callables_subtyping.py:267:4: Function may exit without returning a value [missing_return]'] +Line 288: Unexpected errors ['./callables_subtyping.py:288:4: Function may exit without returning a value [missing_return]'] +Line 292: Unexpected errors ['./callables_subtyping.py:292:4: Function may exit without returning a value [missing_return]'] +Line 296: Unexpected errors ["./callables_subtyping.py:296:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ +./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment] +./callables_subtyping.py:29:4: Incompatible assignment: expected (int, /) -> int, got (float | int, /) -> float | int [incompatible_assignment] +./callables_subtyping.py:51:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:52:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:55:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:58:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:82:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:85:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:86:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:116:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:119:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:120:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:122:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:124:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:125:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:126:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:151:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:154:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:155:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:187:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:190:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:191:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:193:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:195:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:196:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:197:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:236:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:237:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:240:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:243:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoX8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:259:4: Function may exit without returning a value [missing_return] +./callables_subtyping.py:263:4: Function may exit without returning a value [missing_return] +./callables_subtyping.py:267:4: Function may exit without returning a value [missing_return] +./callables_subtyping.py:288:4: Function may exit without returning a value [missing_return] +./callables_subtyping.py:292:4: Function may exit without returning a value [missing_return] +./callables_subtyping.py:296:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:297:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 336da9d4e..1938da329 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -1,22 +1,27 @@ conformance_automated = "Fail" errors_diff = """ -Line 38: Expected 1 errors -Line 39: Expected 1 errors -Line 40: Expected 1 errors -Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 52: Expected 1 errors Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 69: Expected 1 errors Line 70: Expected 1 errors Line 71: Expected 1 errors -Line 73: Expected 1 errors Line 77: Expected 1 errors Line 78: Expected 1 errors Line 111: Expected 1 errors Line 140: Expected 1 errors +Line 81: Unexpected errors ['./classes_classvar.py:81:12: Any[from_another] is not equivalent to int'] +Line 82: Unexpected errors ['./classes_classvar.py:82:12: Any[from_another] is not equivalent to list[str]'] """ output = """ +./classes_classvar.py:38:10: Unrecognized annotation object [invalid_annotation] +./classes_classvar.py:39:10: Invalid type annotation 3 [invalid_annotation] +./classes_classvar.py:40:13: Undefined name: var [undefined_name] +./classes_classvar.py:40:10: Unrecognized annotation object [invalid_annotation] +./classes_classvar.py:45:10: Unrecognized annotation object [invalid_annotation] +./classes_classvar.py:47:10: Unrecognized annotation object [invalid_annotation] +./classes_classvar.py:52:4: Incompatible assignment: expected list[str], got Literal[{}] [incompatible_assignment] +./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] +./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] +./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] +./classes_classvar.py:81:12: Any[from_another] is not equivalent to int +./classes_classvar.py:82:12: Any[from_another] is not equivalent to list[str] """ diff --git a/conformance/results/pycroscope/classes_override.toml b/conformance/results/pycroscope/classes_override.toml index 4ecee067a..3a8ad2099 100644 --- a/conformance/results/pycroscope/classes_override.toml +++ b/conformance/results/pycroscope/classes_override.toml @@ -1,10 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Lines 52, 53: Expected error (tag 'method3') -Lines 56, 57, 64, 65: Expected error (tag 'method4') -Lines 78, 79: Expected error (tag 'static_method1') -Lines 83, 84: Expected error (tag 'class_method1') -Lines 88, 89: Expected error (tag 'property1') +Line 101: Unexpected errors ['./classes_override.py:101:4: Traceback (most recent call last):'] """ output = """ +./classes_override.py:53:4: Method does not override any base method [override_does_not_override] +./classes_override.py:65:4: Method does not override any base method [override_does_not_override] +./classes_override.py:79:4: Method does not override any base method [override_does_not_override] +./classes_override.py:84:4: Method does not override any base method [override_does_not_override] +./classes_override.py:89:4: Method does not override any base method [override_does_not_override] +./classes_override.py:101:4: Traceback (most recent call last): """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 02bb5dfa5..e2f4e7117 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -3,8 +3,18 @@ errors_diff = """ Line 21: Expected 1 errors Line 42: Expected 1 errors Line 56: Expected 1 errors -Line 107: Expected 1 errors Line 130: Expected 1 errors +Line 51: Unexpected errors ['./constructors_call_init.py:51:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 61: Unexpected errors ['./constructors_call_init.py:61:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 63: Unexpected errors ['./constructors_call_init.py:63:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 88: Unexpected errors ['./constructors_call_init.py:88:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 96: Unexpected errors ['./constructors_call_init.py:96:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] """ output = """ +./constructors_call_init.py:51:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_init.py:61:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_init.py:63:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_init.py:88:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_init.py:96:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_init.py:107:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index 2b47a9181..fc10c457e 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -2,6 +2,8 @@ conformance_automated = "Fail" errors_diff = """ Line 54: Expected 1 errors Line 68: Expected 1 errors +Line 26: Unexpected errors ['./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never'] """ output = """ +./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 1bc562bf2..51a219e26 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -2,6 +2,15 @@ conformance_automated = "Fail" errors_diff = """ Line 21: Expected 1 errors Line 148: Expected 1 errors +Line 49: Unexpected errors ['./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int'] +Line 76: Unexpected errors ['./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never'] +Line 113: Unexpected errors ['./constructors_call_new.py:113:41: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 142: Unexpected errors ['./constructors_call_new.py:142:21: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]', './constructors_call_new.py:142:46: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] """ output = """ +./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int +./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never +./constructors_call_new.py:113:41: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_new.py:142:21: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_new.py:142:46: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/constructors_call_type.toml b/conformance/results/pycroscope/constructors_call_type.toml index 4dd185c12..a683183ef 100644 --- a/conformance/results/pycroscope/constructors_call_type.toml +++ b/conformance/results/pycroscope/constructors_call_type.toml @@ -1,8 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors -Line 40: Expected 1 errors -Line 50: Expected 1 errors Line 59: Expected 1 errors Line 64: Expected 1 errors Line 72: Expected 1 errors @@ -10,4 +8,6 @@ Line 81: Expected 1 errors Line 82: Expected 1 errors """ output = """ +./constructors_call_type.py:40:4: In call to /Users/jelle/py/typing/conformance/tests/constructors_call_type.py.Class2: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:50:4: In call to /Users/jelle/py/typing/conformance/tests/constructors_call_type.py.Class3: Missing required argument 'x' [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 11a12371a..7cda900ad 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -12,6 +12,26 @@ Line 129: Expected 1 errors Line 146: Expected 1 errors Line 186: Expected 1 errors Line 197: Expected 1 errors +Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[generic_argument] | Any[from_another] is not equivalent to int'] +Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[generic_argument] | Any[from_another] is not equivalent to Never'] +Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[generic_argument] | Any[from_another] is not equivalent to Never'] +Line 155: Unexpected errors ['./constructors_callable.py:155:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 157: Unexpected errors ['./constructors_callable.py:157:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] """ output = """ +./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:80:12: Any[generic_argument] | Any[from_another] is not equivalent to int +./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:102:16: Any[generic_argument] | Any[from_another] is not equivalent to Never +./constructors_callable.py:107:16: Any[generic_argument] | Any[from_another] is not equivalent to Never +./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:155:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_callable.py:157:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] """ diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index cdd4d0cd9..6d27d46c8 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,5 +1,19 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int'] +Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int]'] +Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str]'] +Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: Any[from_another] is not equivalent to list[str]'] +Line 66: Unexpected errors ['./dataclasses_descriptors.py:66:12: Any[from_another] is not equivalent to int'] +Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: Any[from_another] is not equivalent to str'] +Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str'] """ output = """ +./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int +./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int] +./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str] +./dataclasses_descriptors.py:63:12: Any[from_another] is not equivalent to list[str] +./dataclasses_descriptors.py:66:12: Any[from_another] is not equivalent to int +./dataclasses_descriptors.py:67:12: Any[from_another] is not equivalent to str +./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index 36aba1dc0..514f280fe 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -5,6 +5,10 @@ Line 35: Expected 1 errors Line 36: Expected 1 errors Line 37: Expected 1 errors Line 38: Expected 1 errors +Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Literal[10] is not equivalent to int'] +Line 32: Unexpected errors ["./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str"] """ output = """ +./dataclasses_final.py:31:12: Literal[10] is not equivalent to int +./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str """ diff --git a/conformance/results/pycroscope/dataclasses_kwonly.toml b/conformance/results/pycroscope/dataclasses_kwonly.toml index af4dc4303..8e7369d85 100644 --- a/conformance/results/pycroscope/dataclasses_kwonly.toml +++ b/conformance/results/pycroscope/dataclasses_kwonly.toml @@ -3,6 +3,8 @@ errors_diff = """ Line 23: Expected 1 errors Line 38: Expected 1 errors Line 53: Expected 1 errors +Line 13: Unexpected errors ['./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation]'] """ output = """ +./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml index 4ab7fa64a..843d07800 100644 --- a/conformance/results/pycroscope/dataclasses_match_args.toml +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -1,6 +1,16 @@ conformance_automated = "Fail" errors_diff = """ Line 42: Expected 1 errors +Line 15: Unexpected errors ['./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation]'] +Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] +Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] +Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] +Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Any[from_another] is not equivalent to tuple[]'] """ output = """ +./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation] +./dataclasses_match_args.py:18:12: Any[from_another] is not equivalent to tuple[Literal['x']] +./dataclasses_match_args.py:26:12: Any[from_another] is not equivalent to tuple[Literal['x']] +./dataclasses_match_args.py:34:12: Any[from_another] is not equivalent to tuple[Literal['x']] +./dataclasses_match_args.py:49:12: Any[from_another] is not equivalent to tuple[] """ diff --git a/conformance/results/pycroscope/dataclasses_postinit.toml b/conformance/results/pycroscope/dataclasses_postinit.toml index 67e9675bc..58109c517 100644 --- a/conformance/results/pycroscope/dataclasses_postinit.toml +++ b/conformance/results/pycroscope/dataclasses_postinit.toml @@ -4,6 +4,12 @@ Line 19: Expected 1 errors Line 28: Expected 1 errors Line 29: Expected 1 errors Line 36: Expected 1 errors +Line 25: Unexpected errors ['./dataclasses_postinit.py:25:12: Any[from_another] is not equivalent to int'] +Line 26: Unexpected errors ['./dataclasses_postinit.py:26:12: Any[from_another] is not equivalent to int'] +Line 27: Unexpected errors ['./dataclasses_postinit.py:27:12: Any[from_another] is not equivalent to int'] """ output = """ +./dataclasses_postinit.py:25:12: Any[from_another] is not equivalent to int +./dataclasses_postinit.py:26:12: Any[from_another] is not equivalent to int +./dataclasses_postinit.py:27:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 1df80a155..8d09eb0f0 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -6,6 +6,8 @@ Line 66: Expected 1 errors Line 72: Expected 1 errors Line 82: Expected 1 errors Line 122: Expected 1 errors +Line 17: Unexpected errors ['./dataclasses_transform_class.py:17:0: Function may exit without returning a value [missing_return]'] """ output = """ +./dataclasses_transform_class.py:17:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index 846613836..280d258c6 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -1,14 +1,16 @@ conformance_automated = "Fail" errors_diff = """ -Line 48: Expected 1 errors -Line 49: Expected 1 errors Line 107: Expected 1 errors Line 108: Expected 1 errors Line 109: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors -Line 130: Expected 1 errors -Line 133: Expected 1 errors +Line 103: Unexpected errors ['./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str | Any[generic_argument] [incompatible_assignment]'] """ output = """ +./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] +./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] +./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str | Any[generic_argument] [incompatible_assignment] +./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] +./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_field.toml b/conformance/results/pycroscope/dataclasses_transform_field.toml index 47dcdb0bf..1983f8a5a 100644 --- a/conformance/results/pycroscope/dataclasses_transform_field.toml +++ b/conformance/results/pycroscope/dataclasses_transform_field.toml @@ -2,6 +2,10 @@ conformance_automated = "Fail" errors_diff = """ Line 64: Expected 1 errors Line 75: Expected 1 errors +Line 35: Unexpected errors ['./dataclasses_transform_field.py:35:0: Function may exit without returning a value [missing_return]'] +Line 44: Unexpected errors ['./dataclasses_transform_field.py:44:0: Function may exit without returning a value [missing_return]'] """ output = """ +./dataclasses_transform_field.py:35:0: Function may exit without returning a value [missing_return] +./dataclasses_transform_field.py:44:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_func.toml b/conformance/results/pycroscope/dataclasses_transform_func.toml index ec9648a77..032673172 100644 --- a/conformance/results/pycroscope/dataclasses_transform_func.toml +++ b/conformance/results/pycroscope/dataclasses_transform_func.toml @@ -6,6 +6,8 @@ Line 64: Expected 1 errors Line 70: Expected 1 errors Line 96: Expected 1 errors Lines 88, 89: Expected error (tag 'Customer3Subclass') +Line 28: Unexpected errors ['./dataclasses_transform_func.py:28:0: Function may exit without returning a value [missing_return]'] """ output = """ +./dataclasses_transform_func.py:28:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_meta.toml b/conformance/results/pycroscope/dataclasses_transform_meta.toml index 23f707a1e..0bc0ee730 100644 --- a/conformance/results/pycroscope/dataclasses_transform_meta.toml +++ b/conformance/results/pycroscope/dataclasses_transform_meta.toml @@ -6,6 +6,8 @@ Line 66: Expected 1 errors Line 73: Expected 1 errors Line 83: Expected 1 errors Line 103: Expected 1 errors +Line 15: Unexpected errors ['./dataclasses_transform_meta.py:15:0: Function may exit without returning a value [missing_return]'] """ output = """ +./dataclasses_transform_meta.py:15:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index b49cd0c85..297428321 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -4,13 +4,33 @@ Line 50: Expected 1 errors Line 51: Expected 1 errors Line 52: Expected 1 errors Line 83: Expected 1 errors -Line 88: Expected 1 errors Line 127: Expected 1 errors Line 130: Expected 1 errors Line 179: Expected 1 errors Lines 58, 60, 61: Expected error (tag 'DC1') Lines 64, 66, 67: Expected error (tag 'DC2') Lines 70, 72, 73: Expected error (tag 'DC3') +Line 46: Unexpected errors ['./dataclasses_usage.py:46:12: Any[from_another] is not equivalent to str'] +Line 47: Unexpected errors ['./dataclasses_usage.py:47:12: Any[from_another] is not equivalent to float | int'] +Line 48: Unexpected errors ['./dataclasses_usage.py:48:12: Any[from_another] is not equivalent to int'] +Line 103: Unexpected errors ['./dataclasses_usage.py:103:12: Any[from_another] is not equivalent to int'] +Line 104: Unexpected errors ['./dataclasses_usage.py:104:12: Any[from_another] is not equivalent to int'] +Line 105: Unexpected errors ['./dataclasses_usage.py:105:12: Any[from_another] is not equivalent to str'] +Line 106: Unexpected errors ['./dataclasses_usage.py:106:12: Any[from_another] is not equivalent to (str, /) -> int'] +Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] +Line 197: Unexpected errors ['./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str'] +Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str'] """ output = """ +./dataclasses_usage.py:46:12: Any[from_another] is not equivalent to str +./dataclasses_usage.py:47:12: Any[from_another] is not equivalent to float | int +./dataclasses_usage.py:48:12: Any[from_another] is not equivalent to int +./dataclasses_usage.py:88:4: Incompatible assignment: expected int, got str [incompatible_assignment] +./dataclasses_usage.py:103:12: Any[from_another] is not equivalent to int +./dataclasses_usage.py:104:12: Any[from_another] is not equivalent to int +./dataclasses_usage.py:105:12: Any[from_another] is not equivalent to str +./dataclasses_usage.py:106:12: Any[from_another] is not equivalent to (str, /) -> int +./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str +./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str +./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/directives_assert_type.toml b/conformance/results/pycroscope/directives_assert_type.toml index 5fc6190f1..88a01739d 100644 --- a/conformance/results/pycroscope/directives_assert_type.toml +++ b/conformance/results/pycroscope/directives_assert_type.toml @@ -1,12 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 27: Expected 1 errors -Line 28: Expected 1 errors -Line 29: Expected 1 errors -Line 30: Expected 1 errors -Line 32: Expected 1 errors -Line 33: Expected 1 errors -Line 34: Expected 1 errors """ output = """ +./directives_assert_type.py:27:16: int | str is not equivalent to int +./directives_assert_type.py:28:16: int | str is not equivalent to Any[explicit] +./directives_assert_type.py:29:16: Any[explicit] is not equivalent to int +./directives_assert_type.py:30:16: Annotated[Literal[4], Literal['']] is not equivalent to int +./directives_assert_type.py:32:4: In call to typing.assert_type: Missing required positional argument 'val' [incompatible_call] +./directives_assert_type.py:33:16: Literal[''] is not equivalent to int +./directives_assert_type.py:34:4: In call to typing.assert_type: Takes 2 positional arguments but 3 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_cast.toml b/conformance/results/pycroscope/directives_cast.toml index 6c8e99524..9429a6b9c 100644 --- a/conformance/results/pycroscope/directives_cast.toml +++ b/conformance/results/pycroscope/directives_cast.toml @@ -1,8 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 15: Expected 1 errors -Line 16: Expected 1 errors -Line 17: Expected 1 errors """ output = """ +./directives_cast.py:15:7: In call to typing.cast: Missing required positional argument 'typ' [incompatible_call] +./directives_cast.py:16:7: Invalid type annotation 1 [invalid_annotation] +./directives_cast.py:17:7: In call to typing.cast: Takes 2 positional arguments but 3 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 83e5186af..c4dc3c52b 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -14,4 +14,5 @@ Line 69: Expected 1 errors Line 98: Expected 1 errors """ output = """ +./directives_deprecated.py:90:4: @override decorator in invalid location [invalid_override_decorator] """ diff --git a/conformance/results/pycroscope/directives_no_type_check.toml b/conformance/results/pycroscope/directives_no_type_check.toml index 223c8a3d0..5c0db1007 100644 --- a/conformance/results/pycroscope/directives_no_type_check.toml +++ b/conformance/results/pycroscope/directives_no_type_check.toml @@ -1,6 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 32: Expected 1 errors """ output = """ +./directives_no_type_check.py:15:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] +./directives_no_type_check.py:25:8: Unsupported operands for addition: int and str [unsupported_operation] +./directives_no_type_check.py:26:4: Incompatible return type: expected None, got Literal[1] [incompatible_return_value] +./directives_no_type_check.py:25:4: Variable c is never accessed [unused_variable] +./directives_no_type_check.py:29:6: Incompatible argument type for a: expected int but got Literal[b'invalid'] [incompatible_argument] +./directives_no_type_check.py:29:18: Incompatible argument type for b: expected str but got Literal[b'arguments'] [incompatible_argument] +./directives_no_type_check.py:32:0: Missing required argument 'a' [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_reveal_type.toml b/conformance/results/pycroscope/directives_reveal_type.toml index 470634b6d..3d3faf573 100644 --- a/conformance/results/pycroscope/directives_reveal_type.toml +++ b/conformance/results/pycroscope/directives_reveal_type.toml @@ -1,7 +1,11 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 19: Expected 1 errors -Line 20: Expected 1 errors """ output = """ +./directives_reveal_type.py:14:16: Revealed type is 'int | str' [reveal_type] +./directives_reveal_type.py:15:16: Revealed type is 'list[int]' [reveal_type] +./directives_reveal_type.py:16:16: Revealed type is 'Any[explicit]' [reveal_type] +./directives_reveal_type.py:17:16: Revealed type is '/Users/jelle/py/typing/conformance/tests/directives_reveal_type.py.ForwardReference' [reveal_type] +./directives_reveal_type.py:19:4: In call to typing.reveal_type: Missing required positional argument 'value' [incompatible_call] +./directives_reveal_type.py:20:4: In call to typing.reveal_type: Takes 1 positional arguments but 2 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_type_checking.toml b/conformance/results/pycroscope/directives_type_checking.toml index cdd4d0cd9..8dcb519d8 100644 --- a/conformance/results/pycroscope/directives_type_checking.toml +++ b/conformance/results/pycroscope/directives_type_checking.toml @@ -1,5 +1,11 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 11: Unexpected errors ["./directives_type_checking.py:11:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] +Line 16: Unexpected errors ['./directives_type_checking.py:16:4: b already declared [already_declared]'] +Line 18: Unexpected errors ['./directives_type_checking.py:18:12: list[str] is not equivalent to list[int]'] """ output = """ +./directives_type_checking.py:11:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] +./directives_type_checking.py:16:4: b already declared [already_declared] +./directives_type_checking.py:18:12: list[str] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/directives_type_ignore.toml b/conformance/results/pycroscope/directives_type_ignore.toml index cdd4d0cd9..112ff680c 100644 --- a/conformance/results/pycroscope/directives_type_ignore.toml +++ b/conformance/results/pycroscope/directives_type_ignore.toml @@ -1,5 +1,13 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 8: Unexpected errors ["./directives_type_ignore.py:8:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] +Line 11: Unexpected errors ["./directives_type_ignore.py:11:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] +Line 14: Unexpected errors ["./directives_type_ignore.py:14:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] +Line 20: Unexpected errors ["./directives_type_ignore.py:20:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] """ output = """ +./directives_type_ignore.py:8:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] +./directives_type_ignore.py:11:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] +./directives_type_ignore.py:14:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] +./directives_type_ignore.py:20:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/directives_type_ignore_file1.toml b/conformance/results/pycroscope/directives_type_ignore_file1.toml index cdd4d0cd9..998e85f05 100644 --- a/conformance/results/pycroscope/directives_type_ignore_file1.toml +++ b/conformance/results/pycroscope/directives_type_ignore_file1.toml @@ -1,5 +1,7 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 16: Unexpected errors ["./directives_type_ignore_file1.py:16:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] """ output = """ +./directives_type_ignore_file1.py:16:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/directives_type_ignore_file2.toml b/conformance/results/pycroscope/directives_type_ignore_file2.toml index 536748909..b1f55aca0 100644 --- a/conformance/results/pycroscope/directives_type_ignore_file2.toml +++ b/conformance/results/pycroscope/directives_type_ignore_file2.toml @@ -1,6 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 14: Expected 1 errors """ output = """ +./directives_type_ignore_file2.py:14:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/directives_version_platform.toml b/conformance/results/pycroscope/directives_version_platform.toml index cdd4d0cd9..adfc6c86c 100644 --- a/conformance/results/pycroscope/directives_version_platform.toml +++ b/conformance/results/pycroscope/directives_version_platform.toml @@ -2,4 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ +./directives_version_platform.py:40:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] +./directives_version_platform.py:45:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/enums_expansion.toml b/conformance/results/pycroscope/enums_expansion.toml index 28deb70ee..971e4daeb 100644 --- a/conformance/results/pycroscope/enums_expansion.toml +++ b/conformance/results/pycroscope/enums_expansion.toml @@ -1,6 +1,10 @@ conformance_automated = "Fail" errors_diff = """ Line 53: Expected 1 errors +Line 52: Unexpected errors ['./enums_expansion.py:52:20: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags'] +Line 63: Unexpected errors ['./enums_expansion.py:63:24: Never is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags'] """ output = """ +./enums_expansion.py:52:20: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags +./enums_expansion.py:63:24: Never is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags """ diff --git a/conformance/results/pycroscope/enums_member_names.toml b/conformance/results/pycroscope/enums_member_names.toml index cdd4d0cd9..deb9f37fa 100644 --- a/conformance/results/pycroscope/enums_member_names.toml +++ b/conformance/results/pycroscope/enums_member_names.toml @@ -2,4 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ +./enums_member_names.py:30:16: Annotated[str, EnumName(enum_cls=)] is not equivalent to Literal['RED', 'BLUE', 'GREEN'] """ diff --git a/conformance/results/pycroscope/enums_member_values.toml b/conformance/results/pycroscope/enums_member_values.toml index 905357727..97f68dc76 100644 --- a/conformance/results/pycroscope/enums_member_values.toml +++ b/conformance/results/pycroscope/enums_member_values.toml @@ -4,4 +4,11 @@ Line 78: Expected 1 errors Line 85: Expected 1 errors """ output = """ +./enums_member_values.py:21:12: Any[from_another] is not equivalent to Literal[1] +./enums_member_values.py:22:12: Any[from_another] is not equivalent to Literal[1] +./enums_member_values.py:26:16: Any[from_another] is not equivalent to Literal[1, 3] +./enums_member_values.py:30:16: Any[from_another] is not equivalent to Literal[1, 2, 3] +./enums_member_values.py:54:12: Any[from_another] is not equivalent to Literal[1] +./enums_member_values.py:68:12: Any[from_another] is not equivalent to Literal[1] +./enums_member_values.py:96:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 690c7cfd7..0c4829605 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -7,6 +7,17 @@ Line 84: Expected 1 errors Line 85: Expected 1 errors Line 116: Expected 1 errors Line 129: Expected 1 errors +Line 27: Unexpected errors ['./enums_members.py:27:12: Any[from_another] is not equivalent to str'] +Line 28: Unexpected errors ['./enums_members.py:28:12: Any[from_another] is not equivalent to str'] +Line 35: Unexpected errors ['./enums_members.py:35:12: Any[from_another] is not equivalent to str'] +Line 36: Unexpected errors ['./enums_members.py:36:12: Any[from_another] is not equivalent to str'] """ output = """ +./enums_members.py:27:12: Any[from_another] is not equivalent to str +./enums_members.py:28:12: Any[from_another] is not equivalent to str +./enums_members.py:35:12: Any[from_another] is not equivalent to str +./enums_members.py:36:12: Any[from_another] is not equivalent to str +./enums_members.py:128:20: Revealed type is 'Any[from_another]' [reveal_type] +./enums_members.py:146:12: Any[from_another] is not equivalent to int +./enums_members.py:147:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/exceptions_context_managers.toml b/conformance/results/pycroscope/exceptions_context_managers.toml index cdd4d0cd9..d9984ae19 100644 --- a/conformance/results/pycroscope/exceptions_context_managers.toml +++ b/conformance/results/pycroscope/exceptions_context_managers.toml @@ -1,5 +1,7 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 85: Unexpected errors ['./exceptions_context_managers.py:85:16: int | str is not equivalent to str'] """ output = """ +./exceptions_context_managers.py:85:16: int | str is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index d7d30005c..5e96fff43 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -7,6 +7,12 @@ Line 49: Expected 1 errors Line 61: Expected 1 errors Line 68: Expected 1 errors Line 98: Expected 1 errors +Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int]'] +Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool'] +Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[from_another] is not equivalent to int'] """ output = """ +./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int] +./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool +./generics_base_class.py:58:16: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 5f51fee8d..f7463a132 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -1,8 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 40: Expected 1 errors -Line 41: Expected 1 errors -Line 49: Expected 1 errors Line 55: Expected 1 errors Line 69: Expected 1 errors Line 121: Expected 1 errors @@ -13,6 +10,31 @@ Line 163: Expected 1 errors Line 171: Expected 1 errors Line 172: Expected 1 errors Line 208: Expected 1 errors +Line 23: Unexpected errors ['./generics_basic.py:23:16: int | Any[generic_argument] is not equivalent to int'] +Line 24: Unexpected errors ['./generics_basic.py:24:16: str | Any[generic_argument] is not equivalent to str'] +Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) | ~AnyStr: (str, bytes) [unsupported_operation]'] +Line 67: Unexpected errors ['./generics_basic.py:67:16: Any[inference] | Any[generic_argument] is not equivalent to str'] +Line 68: Unexpected errors ['./generics_basic.py:68:16: str | Any[generic_argument] is not equivalent to str'] +Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] +Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int'] +Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] +Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[from_another] is not equivalent to int'] +Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[from_another] is not equivalent to int'] +Line 199: Unexpected errors ['./generics_basic.py:199:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[Any[explicit]]'] """ output = """ +./generics_basic.py:23:16: int | Any[generic_argument] is not equivalent to int +./generics_basic.py:24:16: str | Any[generic_argument] is not equivalent to str +./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) | ~AnyStr: (str, bytes) [unsupported_operation] +./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] +./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] +./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] +./generics_basic.py:67:16: Any[inference] | Any[generic_argument] is not equivalent to str +./generics_basic.py:68:16: str | Any[generic_argument] is not equivalent to str +./generics_basic.py:106:20: Any[from_another] is not equivalent to int +./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int +./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int +./generics_basic.py:154:16: Any[from_another] is not equivalent to int +./generics_basic.py:155:16: Any[from_another] is not equivalent to int +./generics_basic.py:199:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[Any[explicit]] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 163e64d66..4da7d19cd 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -5,7 +5,9 @@ Line 50: Expected 1 errors Line 107: Expected 1 errors Line 114: Expected 1 errors Line 143: Expected 1 errors -Lines 131, 132: Expected error (tag 'optional-default-use') +Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[from_another] is not equivalent to int'] """ output = """ +./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int +./generics_defaults.py:173:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index 973dcdcda..c45c9f3f4 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -7,6 +7,26 @@ Line 60: Expected 1 errors Line 68: Expected 1 errors Line 74: Expected 1 errors Line 78: Expected 1 errors +Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None]]"] +Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None]'] +Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, str, int | None]'] +Line 26: Unexpected errors ['./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, bool, complex | float | int]'] +Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[int, str]"] +Line 94: Unexpected errors ["./generics_defaults_referential.py:94:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]]"] +Line 95: Unexpected errors ['./generics_defaults_referential.py:95:12: Literal[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]]]'] +Line 96: Unexpected errors ['./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]]'] +Line 97: Unexpected errors ['./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[str]]'] +Line 98: Unexpected errors ['./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, str]'] """ output = """ +./generics_defaults_referential.py:23:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None]] +./generics_defaults_referential.py:24:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None] +./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, str, int | None] +./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, bool, complex | float | int] +./generics_defaults_referential.py:35:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[int, str] +./generics_defaults_referential.py:94:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]] +./generics_defaults_referential.py:95:12: Literal[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]]] +./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]] +./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[str]] +./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, str] """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index 90113f84f..379db9816 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -2,6 +2,8 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 55: Expected 1 errors +Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str'] """ output = """ +./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_paramspec_basic.toml b/conformance/results/pycroscope/generics_paramspec_basic.toml index 67daf2de0..cfbb6f4fa 100644 --- a/conformance/results/pycroscope/generics_paramspec_basic.toml +++ b/conformance/results/pycroscope/generics_paramspec_basic.toml @@ -2,11 +2,11 @@ conformance_automated = "Fail" errors_diff = """ Line 10: Expected 1 errors Line 15: Expected 1 errors -Line 23: Expected 1 errors -Line 27: Expected 1 errors Line 31: Expected 1 errors Line 35: Expected 1 errors Line 39: Expected 1 errors """ output = """ +./generics_paramspec_basic.py:23:0: Traceback (most recent call last): +./generics_paramspec_basic.py:27:13: Unrecognized annotation typing.Concatenate[, ~P] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_paramspec_components.toml b/conformance/results/pycroscope/generics_paramspec_components.toml index 83b43e978..299f6518c 100644 --- a/conformance/results/pycroscope/generics_paramspec_components.toml +++ b/conformance/results/pycroscope/generics_paramspec_components.toml @@ -1,21 +1,23 @@ conformance_automated = "Fail" errors_diff = """ Line 17: Expected 1 errors -Line 20: Expected 1 errors Line 23: Expected 1 errors Line 26: Expected 1 errors Line 30: Expected 1 errors Line 35: Expected 1 errors Line 36: Expected 1 errors Line 38: Expected 1 errors -Line 41: Expected 1 errors -Line 49: Expected 1 errors Line 51: Expected 1 errors Line 60: Expected 1 errors Line 70: Expected 1 errors -Line 72: Expected 1 errors -Line 83: Expected 1 errors -Line 98: Expected 1 errors +Line 82: Unexpected errors ['./generics_paramspec_components.py:82:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument]'] """ output = """ +./generics_paramspec_components.py:20:19: ParamSpec.args must be used on *args, not x [invalid_annotation] +./generics_paramspec_components.py:41:22: ParamSpec.kwargs must be used together with ParamSpec.args [invalid_annotation] +./generics_paramspec_components.py:49:8: tuple[object, ...] is not a mapping [incompatible_call] +./generics_paramspec_components.py:72:8: Missing required positional argument at position 0 [incompatible_call] +./generics_paramspec_components.py:82:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument] +./generics_paramspec_components.py:83:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument] +./generics_paramspec_components.py:98:0: In call to /Users/jelle/py/typing/conformance/tests/generics_paramspec_components.py.twice: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index 091235122..421b6a2f4 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -1,14 +1,37 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors -Line 27: Expected 1 errors -Line 61: Expected 1 errors -Line 98: Expected 1 errors -Line 108: Expected 1 errors -Line 120: Expected 1 errors -Line 127: Expected 1 errors -Line 132: Expected 1 errors -Line 137: Expected 1 errors +Line 22: Unexpected errors ['./generics_paramspec_semantics.py:22:12: (a: str, b: bool, /) -> str | Any[unannotated] is not equivalent to (str, bool, /) -> str'] +Line 25: Unexpected errors ['./generics_paramspec_semantics.py:25:12: str | Any[from_another] is not equivalent to str'] +Line 43: Unexpected errors ['./generics_paramspec_semantics.py:43:12: bool | Any[from_another] is not equivalent to bool'] +Line 44: Unexpected errors ['./generics_paramspec_semantics.py:44:12: bool | Any[from_another] is not equivalent to bool'] +Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: Any[from_another] is not equivalent to (int, /) -> str'] +Line 96: Unexpected errors ['./generics_paramspec_semantics.py:96:12: bool | Any[from_another] is not equivalent to bool'] +Line 97: Unexpected errors ['./generics_paramspec_semantics.py:97:12: bool | Any[from_another] is not equivalent to bool'] +Line 106: Unexpected errors ['./generics_paramspec_semantics.py:106:12: bool | Any[from_another] is not equivalent to bool'] +Line 107: Unexpected errors ['./generics_paramspec_semantics.py:107:12: bool | Any[from_another] is not equivalent to bool'] +Line 118: Unexpected errors ['./generics_paramspec_semantics.py:118:12: bool | Any[from_another] is not equivalent to bool'] +Line 119: Unexpected errors ['./generics_paramspec_semantics.py:119:12: bool | Any[from_another] is not equivalent to bool'] """ output = """ +./generics_paramspec_semantics.py:22:12: (a: str, b: bool, /) -> str | Any[unannotated] is not equivalent to (str, bool, /) -> str +./generics_paramspec_semantics.py:25:12: str | Any[from_another] is not equivalent to str +./generics_paramspec_semantics.py:26:0: Missing required positional argument 'a' [incompatible_call] +./generics_paramspec_semantics.py:27:8: Incompatible argument type for b: expected bool but got Literal['A'] [incompatible_argument] +./generics_paramspec_semantics.py:43:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:44:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:46:5: Cannot resolve type variables [incompatible_call] +./generics_paramspec_semantics.py:61:0: Cannot resolve type variables [incompatible_call] +./generics_paramspec_semantics.py:84:16: Any[from_another] is not equivalent to (int, /) -> str +./generics_paramspec_semantics.py:96:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:97:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] +./generics_paramspec_semantics.py:106:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:107:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:108:0: Incompatible argument type for args: expected tuple[bool, ...] but got tuple[Literal[1]] [incompatible_argument] +./generics_paramspec_semantics.py:118:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:119:12: bool | Any[from_another] is not equivalent to bool +./generics_paramspec_semantics.py:120:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] +./generics_paramspec_semantics.py:127:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (x: str) -> int [incompatible_argument] +./generics_paramspec_semantics.py:132:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (*, x: int) -> int [incompatible_argument] +./generics_paramspec_semantics.py:137:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (**kwargs: dict[str, int]) -> int [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_paramspec_specialization.toml b/conformance/results/pycroscope/generics_paramspec_specialization.toml index 1b34f1129..3cd41967f 100644 --- a/conformance/results/pycroscope/generics_paramspec_specialization.toml +++ b/conformance/results/pycroscope/generics_paramspec_specialization.toml @@ -5,6 +5,16 @@ Line 54: Expected 1 errors Line 55: Expected 1 errors Line 60: Expected 1 errors Line 61: Expected 1 errors +Line 28: Unexpected errors ["./generics_paramspec_specialization.py:28:14: Unrecognized annotation typing.Concatenate[, ~P2] [invalid_annotation]"] +Line 32: Unexpected errors ["./generics_paramspec_specialization.py:32:14: Invalid type annotation (, ) [invalid_annotation]"] +Line 40: Unexpected errors ['./generics_paramspec_specialization.py:40:14: Invalid type annotation () [invalid_annotation]'] +Line 52: Unexpected errors ["./generics_paramspec_specialization.py:52:14: Invalid type annotation (, , ) [invalid_annotation]"] +Line 58: Unexpected errors ["./generics_paramspec_specialization.py:58:14: Invalid type annotation (, , ) [invalid_annotation]"] """ output = """ +./generics_paramspec_specialization.py:28:14: Unrecognized annotation typing.Concatenate[, ~P2] [invalid_annotation] +./generics_paramspec_specialization.py:32:14: Invalid type annotation (, ) [invalid_annotation] +./generics_paramspec_specialization.py:40:14: Invalid type annotation () [invalid_annotation] +./generics_paramspec_specialization.py:52:14: Invalid type annotation (, , ) [invalid_annotation] +./generics_paramspec_specialization.py:58:14: Invalid type annotation (, , ) [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_scoping.toml b/conformance/results/pycroscope/generics_scoping.toml index d22184382..1d990bb3b 100644 --- a/conformance/results/pycroscope/generics_scoping.toml +++ b/conformance/results/pycroscope/generics_scoping.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 29: Expected 1 errors Line 50: Expected 1 errors Line 54: Expected 1 errors Line 65: Expected 1 errors @@ -10,6 +9,15 @@ Line 87: Expected 1 errors Line 94: Expected 1 errors Line 95: Expected 1 errors Line 96: Expected 1 errors +Line 14: Unexpected errors ['./generics_scoping.py:14:12: Literal[1] is not equivalent to int'] +Line 15: Unexpected errors ["./generics_scoping.py:15:12: Literal['a'] is not equivalent to str"] +Line 42: Unexpected errors ["./generics_scoping.py:42:12: Literal['abc'] is not equivalent to str"] +Line 43: Unexpected errors ["./generics_scoping.py:43:12: Literal[b'abc'] is not equivalent to bytes"] """ output = """ +./generics_scoping.py:14:12: Literal[1] is not equivalent to int +./generics_scoping.py:15:12: Literal['a'] is not equivalent to str +./generics_scoping.py:29:9: Incompatible argument type for x: expected int but got Literal['a'] [incompatible_argument] +./generics_scoping.py:42:12: Literal['abc'] is not equivalent to str +./generics_scoping.py:43:12: Literal[b'abc'] is not equivalent to bytes """ diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index cdd4d0cd9..fd4db8513 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -1,5 +1,11 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT]'] +Line 42: Unexpected errors ['./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT]'] +Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT]'] """ output = """ +./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT] +./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT] +./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 401cc7c63..202939fef 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors -Line 68: Expected 1 errors """ output = """ +./generics_self_basic.py:68:25: Unrecognized annotation object [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_protocols.toml b/conformance/results/pycroscope/generics_self_protocols.toml index 8092eb32c..7b1efabce 100644 --- a/conformance/results/pycroscope/generics_self_protocols.toml +++ b/conformance/results/pycroscope/generics_self_protocols.toml @@ -1,7 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 61: Expected 1 errors Line 64: Expected 1 errors +Line 11: Unexpected errors ['./generics_self_protocols.py:11:4: Function may exit without returning a value [missing_return]'] """ output = """ +./generics_self_protocols.py:11:4: Function may exit without returning a value [missing_return] +./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected /Users/jelle/py/typing/conformance/tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got /Users/jelle/py/typing/conformance/tests/generics_self_protocols.py.BadReturnType [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 7e7f3f25b..303f38efb 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 73: Expected 1 errors Line 76: Expected 1 errors Line 82: Expected 1 errors Line 87: Expected 1 errors @@ -13,4 +12,5 @@ Line 123: Expected 1 errors Line 127: Expected 1 errors """ output = """ +./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index 4c8787146..f0a618032 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -2,14 +2,20 @@ conformance_automated = "Fail" errors_diff = """ Line 17: Expected 1 errors Line 25: Expected 1 errors -Line 32: Expected 1 errors Line 44: Expected 1 errors -Line 48: Expected 1 errors Line 60: Expected 1 errors Line 64: Expected 1 errors -Line 71: Expected 1 errors -Line 75: Expected 1 errors -Line 79: Expected 1 errors +Line 13: Unexpected errors ['./generics_syntax_declarations.py:13:0: Traceback (most recent call last):'] +Line 39: Unexpected errors ['./generics_syntax_declarations.py:39:39: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:13: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] """ output = """ +./generics_syntax_declarations.py:13:0: Traceback (most recent call last): +./generics_syntax_declarations.py:48:13: Invalid type annotation [, ] [invalid_annotation] +./generics_syntax_declarations.py:71:13: Invalid type annotation (, ) [invalid_annotation] +./generics_syntax_declarations.py:75:13: Invalid type annotation 3 [invalid_annotation] +./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] +./generics_syntax_declarations.py:39:39: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_declarations.py:56:13: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_declarations.py:79:22: Undefined name: S [undefined_name] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index c842540ab..292ed4ccd 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,7 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 15: Expected 1 errors -Line 17: Expected 1 errors Line 29: Expected 1 errors Line 47: Expected 1 errors Line 56: Expected 1 errors @@ -18,6 +16,14 @@ Line 138: Expected 1 errors Line 146: Expected 1 errors Line 154: Expected 1 errors Line 165: Expected 1 errors +Line 51: Unexpected errors ['./generics_syntax_infer_variance.py:51:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 89: Unexpected errors ['./generics_syntax_infer_variance.py:89:7: Unrecognized annotation object [invalid_annotation]'] +Line 108: Unexpected errors ['./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition]'] """ output = """ +./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:51:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_infer_variance.py:89:7: Unrecognized annotation object [invalid_annotation] +./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition] """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index 789786633..a2dad8c7e 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -3,10 +3,22 @@ errors_diff = """ Line 14: Expected 1 errors Line 18: Expected 1 errors Line 35: Expected 1 errors -Line 44: Expected 1 errors Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors +Line 38: Unexpected errors ['./generics_syntax_scoping.py:38:0: Traceback (most recent call last):'] +Line 81: Unexpected errors ['./generics_syntax_scoping.py:81:0: Traceback (most recent call last):'] +Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] +Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] +Line 121: Unexpected errors ['./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int'] +Line 124: Unexpected errors ['./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int'] """ output = """ +./generics_syntax_scoping.py:38:0: Traceback (most recent call last): +./generics_syntax_scoping.py:81:0: Traceback (most recent call last): +./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] +./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] +./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] +./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int +./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int """ diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index 746cb716c..43eaaed06 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -7,6 +7,14 @@ Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors +Line 21: Unexpected errors ['./generics_type_erasure.py:21:12: Any[from_another] is not equivalent to int'] +Line 47: Unexpected errors ['./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int'] +Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int'] +Line 56: Unexpected errors ['./generics_type_erasure.py:56:12: Any[from_another] is not equivalent to bytes'] """ output = """ +./generics_type_erasure.py:21:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:56:12: Any[from_another] is not equivalent to bytes """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 81a52aa58..aa1927875 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -7,8 +7,24 @@ Line 57: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors Line 67: Expected 1 errors -Line 75: Expected 1 errors Line 76: Expected 1 errors +Line 16: Unexpected errors ["./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] +Line 27: Unexpected errors ["./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 42: Unexpected errors ["./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 51: Unexpected errors ["./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 62: Unexpected errors ["./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] +Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[]'] +Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] """ output = """ +./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] +./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[] +./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] +./generics_typevartuple_args.py:75:0: Incompatible argument type for args: expected tuple[tuple[Any[explicit]], ...] but got tuple[Literal[(0,)], Literal[(1, 2)]] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 98af861f1..7e4222a01 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -5,16 +5,20 @@ Line 43: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors Line 56: Expected 1 errors -Line 59: Expected 1 errors -Line 65: Expected 1 errors -Line 66: Expected 1 errors -Line 67: Expected 1 errors Line 89: Expected 1 errors -Line 90: Expected 1 errors Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') +Line 16: Unexpected errors ["./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] +Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[Any[explicit]] is not equivalent to tuple[int]'] """ output = """ +./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] +./generics_typevartuple_basic.py:59:23: Invalid type annotation Shape [invalid_annotation] +./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] +./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] +./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] +./generics_typevartuple_basic.py:84:12: tuple[Any[explicit]] is not equivalent to tuple[int] +./generics_typevartuple_basic.py:90:6: Incompatible argument type for arg1: expected tuple[Any[explicit]] but got Literal[(0, 0)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 754595dab..488885705 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,6 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 26: Expected 1 errors +Line 45: Unexpected errors ["./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int]'] +Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str]'] +Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ +./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int] +./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str] +./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index cdd4d0cd9..e3df6acaf 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,5 +1,9 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 51: Unexpected errors ["./generics_typevartuple_concat.py:51:24: Incompatible argument type for y: expected tuple[Any[explicit]] but got Literal[(True, 'a')] [incompatible_argument]"] +Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Any[explicit]] is not equivalent to tuple[int, bool, str]'] """ output = """ +./generics_typevartuple_concat.py:51:24: Incompatible argument type for y: expected tuple[Any[explicit]] but got Literal[(True, 'a')] [incompatible_argument] +./generics_typevartuple_concat.py:52:12: tuple[Any[explicit]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_overloads.toml b/conformance/results/pycroscope/generics_typevartuple_overloads.toml index cdd4d0cd9..782510eff 100644 --- a/conformance/results/pycroscope/generics_typevartuple_overloads.toml +++ b/conformance/results/pycroscope/generics_typevartuple_overloads.toml @@ -1,5 +1,7 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 25: Unexpected errors ['./generics_typevartuple_overloads.py:25:4: Function may exit without returning a value [missing_return]'] """ output = """ +./generics_typevartuple_overloads.py:25:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 87d1bf75f..f755e9103 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -4,8 +4,62 @@ Line 109: Expected 1 errors Line 110: Expected 1 errors Line 121: Expected 1 errors Line 122: Expected 1 errors -Line 127: Expected 1 errors Line 163: Expected 1 errors +Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 92: Unexpected errors ['./generics_typevartuple_specialization.py:92:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:92:41: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 134: Unexpected errors ['./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 147: Unexpected errors ['./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 46: Unexpected errors ['./generics_typevartuple_specialization.py:46:16: Any[error] is not equivalent to tuple[int, float | int, bool]'] +Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]]'] +Line 51: Unexpected errors ['./generics_typevartuple_specialization.py:51:16: Any[error] is not equivalent to tuple[int]'] +Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]]'] +Line 93: Unexpected errors ['./generics_typevartuple_specialization.py:93:16: Any[error] is not equivalent to tuple[str, int]'] +Line 94: Unexpected errors ['./generics_typevartuple_specialization.py:94:16: Any[error] is not equivalent to tuple[float | int]'] +Line 95: Unexpected errors ['./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]]'] +Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool]'] +Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str], bool, float | int]'] +Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] +Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool, float | int]'] +Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] +Line 157: Unexpected errors ['./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int]'] +Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] +Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] """ output = """ +./generics_typevartuple_specialization.py:45:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:50:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:92:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:92:41: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:46:16: Any[error] is not equivalent to tuple[int, float | int, bool] +./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]] +./generics_typevartuple_specialization.py:51:16: Any[error] is not equivalent to tuple[int] +./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]] +./generics_typevartuple_specialization.py:93:16: Any[error] is not equivalent to tuple[str, int] +./generics_typevartuple_specialization.py:94:16: Any[error] is not equivalent to tuple[float | int] +./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]] +./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool] +./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str], bool, float | int] +./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str, bool], float | int, int] +./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool, float | int] +./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[bool], str, float | int, int] +./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int] +./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] +./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] """ diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index f3dbcd244..c7b5c3e9d 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -1,8 +1,13 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors -Line 51: Expected 1 errors -Line 56: Expected 1 errors +Line 37: Unexpected errors ['./generics_upper_bound.py:37:12: Any[generic_argument] | Literal[[1], [1, 2]] is not equivalent to list[int]'] +Line 38: Unexpected errors ['./generics_upper_bound.py:38:12: Any[generic_argument] | Literal[{1}, {1, 2}] is not equivalent to set[int]'] """ output = """ +./generics_upper_bound.py:37:12: Any[generic_argument] | Literal[[1], [1, 2]] is not equivalent to list[int] +./generics_upper_bound.py:38:12: Any[generic_argument] | Literal[{1}, {1, 2}] is not equivalent to set[int] +./generics_upper_bound.py:43:12: Any[generic_argument] | Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] +./generics_upper_bound.py:51:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] +./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index f90a22c0f..faa444479 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 14: Expected 1 errors Line 77: Expected 1 errors Line 81: Expected 1 errors Line 93: Expected 1 errors @@ -13,6 +12,10 @@ Lines 125, 126: Expected error (tag 'CoContra_Child2') Lines 131, 132: Expected error (tag 'CoContra_Child3') Lines 141, 142: Expected error (tag 'CoContra_Child5') Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') +Line 45: Unexpected errors ['./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation]', './generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation]'] """ output = """ +./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] +./generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation] +./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_variance_inference.toml b/conformance/results/pycroscope/generics_variance_inference.toml index a3af0abd5..3127b2d73 100644 --- a/conformance/results/pycroscope/generics_variance_inference.toml +++ b/conformance/results/pycroscope/generics_variance_inference.toml @@ -1,8 +1,6 @@ conformance_automated = "Fail" errors_diff = """ -Line 24: Expected 1 errors Line 25: Expected 1 errors -Line 28: Expected 1 errors Line 41: Expected 1 errors Line 49: Expected 1 errors Line 58: Expected 1 errors @@ -23,6 +21,10 @@ Line 169: Expected 1 errors Line 170: Expected 1 errors Line 181: Expected 1 errors Line 194: Expected 1 errors +Line 29: Unexpected errors ['./generics_variance_inference.py:29:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, float | int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment]'] """ output = """ +./generics_variance_inference.py:24:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] +./generics_variance_inference.py:28:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] +./generics_variance_inference.py:29:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, float | int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/literals_interactions.toml b/conformance/results/pycroscope/literals_interactions.toml index f8c170639..3440ddf03 100644 --- a/conformance/results/pycroscope/literals_interactions.toml +++ b/conformance/results/pycroscope/literals_interactions.toml @@ -1,9 +1,11 @@ conformance_automated = "Fail" errors_diff = """ -Line 15: Expected 1 errors -Line 16: Expected 1 errors -Line 17: Expected 1 errors -Line 18: Expected 1 errors +Line 45: Unexpected errors ['./literals_interactions.py:45:0: Function may exit without returning a value [missing_return]'] """ output = """ +./literals_interactions.py:15:4: Tuple index out of range: Literal[5] [incompatible_call] +./literals_interactions.py:16:4: Tuple index out of range: Literal[-5] [incompatible_call] +./literals_interactions.py:17:4: Tuple index out of range: Literal[4] [incompatible_call] +./literals_interactions.py:18:4: Tuple index out of range: Literal[-4] [incompatible_call] +./literals_interactions.py:45:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/literals_literalstring.toml b/conformance/results/pycroscope/literals_literalstring.toml index bbc3cffb5..f1c2ea4e6 100644 --- a/conformance/results/pycroscope/literals_literalstring.toml +++ b/conformance/results/pycroscope/literals_literalstring.toml @@ -2,13 +2,17 @@ conformance_automated = "Fail" errors_diff = """ Line 36: Expected 1 errors Line 37: Expected 1 errors -Line 43: Expected 1 errors -Line 66: Expected 1 errors -Line 74: Expected 1 errors -Line 75: Expected 1 errors -Line 120: Expected 1 errors -Line 134: Expected 1 errors Line 171: Expected 1 errors +Line 63: Unexpected errors ['./literals_literalstring.py:63:16: str is not equivalent to LiteralString'] +Line 161: Unexpected errors ['./literals_literalstring.py:161:0: Function may exit without returning a value [missing_return]'] """ output = """ +./literals_literalstring.py:43:4: Incompatible assignment: expected Literal[''], got Literal['two'] [incompatible_assignment] +./literals_literalstring.py:63:16: str is not equivalent to LiteralString +./literals_literalstring.py:66:4: Incompatible assignment: expected LiteralString, got str [incompatible_assignment] +./literals_literalstring.py:74:4: Incompatible assignment: expected LiteralString, got Literal[3] [incompatible_assignment] +./literals_literalstring.py:75:4: Incompatible assignment: expected LiteralString, got Literal[b'test'] [incompatible_assignment] +./literals_literalstring.py:120:21: Incompatible argument type for s: expected ~TLiteral: LiteralString but got str [incompatible_argument] +./literals_literalstring.py:134:50: Incompatible argument type for value: expected ~T: LiteralString but got str [incompatible_argument] +./literals_literalstring.py:161:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/literals_parameterizations.toml b/conformance/results/pycroscope/literals_parameterizations.toml index 0cb441c58..51ae040a8 100644 --- a/conformance/results/pycroscope/literals_parameterizations.toml +++ b/conformance/results/pycroscope/literals_parameterizations.toml @@ -14,9 +14,9 @@ Line 51: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors Line 56: Expected 1 errors -Line 60: Expected 1 errors Line 61: Expected 1 errors -Line 65: Expected 1 errors """ output = """ +./literals_parameterizations.py:60:3: Invalid type annotation typing.Literal [invalid_annotation] +./literals_parameterizations.py:65:4: Incompatible assignment: expected Literal['Color.RED'], got Literal[] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/literals_semantics.toml b/conformance/results/pycroscope/literals_semantics.toml index 3bd76f309..070738801 100644 --- a/conformance/results/pycroscope/literals_semantics.toml +++ b/conformance/results/pycroscope/literals_semantics.toml @@ -1,9 +1,15 @@ conformance_automated = "Fail" errors_diff = """ -Line 10: Expected 1 errors -Line 24: Expected 1 errors -Line 25: Expected 1 errors -Line 33: Expected 1 errors +Line 32: Unexpected errors ['./literals_semantics.py:32:4: Variable c is never accessed [unused_variable]'] +Line 31: Unexpected errors ['./literals_semantics.py:31:4: Variable b is never accessed [unused_variable]'] +Line 40: Unexpected errors ['./literals_semantics.py:40:4: Assigned value of a is never accessed [unused_assignment]'] """ output = """ +./literals_semantics.py:10:0: Incompatible assignment: expected Literal[3], got Literal[4] [incompatible_assignment] +./literals_semantics.py:24:4: Incompatible assignment: expected Literal[False], got Literal[0] [incompatible_assignment] +./literals_semantics.py:25:4: Incompatible assignment: expected Literal[0], got Literal[False] [incompatible_assignment] +./literals_semantics.py:33:4: Assigned value of a is never accessed [unused_assignment] +./literals_semantics.py:32:4: Variable c is never accessed [unused_variable] +./literals_semantics.py:31:4: Variable b is never accessed [unused_variable] +./literals_semantics.py:40:4: Assigned value of a is never accessed [unused_assignment] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index fd7ce01cc..f0cd44073 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -14,6 +14,28 @@ Line 86: Expected 1 errors Line 106: Expected 1 errors Line 125: Expected 1 errors Line 132: Expected 1 errors +Line 23: Unexpected errors ['./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int'] +Line 24: Unexpected errors ['./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int'] +Line 25: Unexpected errors ['./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str'] +Line 26: Unexpected errors ['./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str'] +Line 27: Unexpected errors ['./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int'] +Line 28: Unexpected errors ['./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int'] +Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int]'] +Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str]'] +Line 101: Unexpected errors ['./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str'] +Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int'] +Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int'] """ output = """ +./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str +./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str +./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int] +./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str] +./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str +./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int +./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int """ diff --git a/conformance/results/pycroscope/namedtuples_define_functional.toml b/conformance/results/pycroscope/namedtuples_define_functional.toml index a2514deb3..eaa0de901 100644 --- a/conformance/results/pycroscope/namedtuples_define_functional.toml +++ b/conformance/results/pycroscope/namedtuples_define_functional.toml @@ -1,14 +1,18 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 16: Expected 1 errors -Line 21: Expected 1 errors -Line 26: Expected 1 errors -Line 31: Expected 1 errors -Line 36: Expected 1 errors -Line 37: Expected 1 errors -Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 69: Expected 1 errors """ output = """ +./namedtuples_define_functional.py:16:7: In call to pycroscope.signature.Point1: Missing required argument 'y' [incompatible_call] +./namedtuples_define_functional.py:21:7: In call to pycroscope.signature.Point2: Missing required argument 'x' [incompatible_call] +./namedtuples_define_functional.py:26:7: In call to pycroscope.signature.Point3: Takes 2 positional arguments but 3 were given [incompatible_call] +./namedtuples_define_functional.py:31:7: In call to pycroscope.signature.Point4: Missing required argument 'y' [incompatible_call] +./namedtuples_define_functional.py:36:17: Incompatible argument type for y: expected int but got Literal['1'] [incompatible_argument] +./namedtuples_define_functional.py:37:7: In call to pycroscope.signature.Point5: Takes 2 positional arguments but 3 were given [incompatible_call] +./namedtuples_define_functional.py:42:17: Incompatible argument type for y: expected int but got Literal['1'] [incompatible_argument] +./namedtuples_define_functional.py:43:16: Incompatible argument type for x: expected int but got Literal[1.1] [incompatible_argument] +./namedtuples_define_functional.py:52:6: Error calling (typename: str, field_names: str | collections.abc.Iterable[str], *, rename: bool = Literal[False], module: str | None = None, defaults: collections.abc.Iterable[Any[explicit]] | None = None) -> type[tuple[Any[explicit], ...]]: Encountered duplicate field name: 'a' [incompatible_call] +./namedtuples_define_functional.py:53:6: Error calling (typename: str, field_names: str | collections.abc.Iterable[str], *, rename: bool = Literal[False], module: str | None = None, defaults: collections.abc.Iterable[Any[explicit]] | None = None) -> type[tuple[Any[explicit], ...]]: Type names and field names cannot be a keyword: 'def' [incompatible_call] +./namedtuples_define_functional.py:54:6: Error calling (typename: str, field_names: str | collections.abc.Iterable[str], *, rename: bool = Literal[False], module: str | None = None, defaults: collections.abc.Iterable[Any[explicit]] | None = None) -> type[tuple[Any[explicit], ...]]: Type names and field names cannot be a keyword: 'def' [incompatible_call] +./namedtuples_define_functional.py:55:6: Error calling (typename: str, field_names: str | collections.abc.Iterable[str], *, rename: bool = Literal[False], module: str | None = None, defaults: collections.abc.Iterable[Any[explicit]] | None = None) -> type[tuple[Any[explicit], ...]]: Field names cannot start with an underscore: '_d' [incompatible_call] +./namedtuples_define_functional.py:69:0: In call to pycroscope.signature.NT7: Missing required argument 'a' [incompatible_call] """ diff --git a/conformance/results/pycroscope/namedtuples_type_compat.toml b/conformance/results/pycroscope/namedtuples_type_compat.toml index 93423c550..15ccafae4 100644 --- a/conformance/results/pycroscope/namedtuples_type_compat.toml +++ b/conformance/results/pycroscope/namedtuples_type_compat.toml @@ -1,7 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 22: Expected 1 errors -Line 23: Expected 1 errors """ output = """ +./namedtuples_type_compat.py:22:0: Incompatible assignment: expected tuple[int, int], got Literal[Point(x=1, y=2, units='inches')] [incompatible_assignment] +./namedtuples_type_compat.py:23:0: Incompatible assignment: expected tuple[int, str, str], got Literal[Point(x=1, y=2, units='inches')] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml index 09363bf12..9108d022e 100644 --- a/conformance/results/pycroscope/namedtuples_usage.toml +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -8,6 +8,26 @@ Line 42: Expected 1 errors Line 43: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors +Line 20: Unexpected errors ['./namedtuples_usage.py:20:12: Any[from_another] is not equivalent to int'] +Line 21: Unexpected errors ['./namedtuples_usage.py:21:12: Any[from_another] is not equivalent to str'] +Line 27: Unexpected errors ['./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int'] +Line 28: Unexpected errors ['./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int'] +Line 29: Unexpected errors ['./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str'] +Line 30: Unexpected errors ['./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str'] +Line 31: Unexpected errors ['./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int'] +Line 32: Unexpected errors ['./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int'] +Line 49: Unexpected errors ['./namedtuples_usage.py:49:12: Any[generic_argument] is not equivalent to int'] +Line 50: Unexpected errors ['./namedtuples_usage.py:50:12: Any[generic_argument] is not equivalent to str'] """ output = """ +./namedtuples_usage.py:20:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:21:12: Any[from_another] is not equivalent to str +./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str +./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str +./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:49:12: Any[generic_argument] is not equivalent to int +./namedtuples_usage.py:50:12: Any[generic_argument] is not equivalent to str """ diff --git a/conformance/results/pycroscope/narrowing_typeguard.toml b/conformance/results/pycroscope/narrowing_typeguard.toml index fee80b2f6..d1b81f0d6 100644 --- a/conformance/results/pycroscope/narrowing_typeguard.toml +++ b/conformance/results/pycroscope/narrowing_typeguard.toml @@ -1,9 +1,17 @@ conformance_automated = "Fail" errors_diff = """ -Line 102: Expected 1 errors -Line 107: Expected 1 errors -Line 128: Expected 1 errors -Line 148: Expected 1 errors +Line 81: Unexpected errors ['./narrowing_typeguard.py:81:20: object is not equivalent to int'] +Line 85: Unexpected errors ['./narrowing_typeguard.py:85:20: object is not equivalent to int'] +Line 132: Unexpected errors ['./narrowing_typeguard.py:132:4: Function may exit without returning a value [missing_return]'] +Line 136: Unexpected errors ['./narrowing_typeguard.py:136:4: Function may exit without returning a value [missing_return]'] """ output = """ +./narrowing_typeguard.py:81:20: object is not equivalent to int +./narrowing_typeguard.py:85:20: object is not equivalent to int +./narrowing_typeguard.py:102:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] +./narrowing_typeguard.py:107:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] +./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] +./narrowing_typeguard.py:132:4: Function may exit without returning a value [missing_return] +./narrowing_typeguard.py:136:4: Function may exit without returning a value [missing_return] +./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected /Users/jelle/py/typing/conformance/tests/narrowing_typeguard.py.CallableStrProto (Protocol with members '__call__') but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] """ diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml index f8b09a836..d39a82c1f 100644 --- a/conformance/results/pycroscope/narrowing_typeis.toml +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -1,14 +1,22 @@ conformance_automated = "Fail" errors_diff = """ -Line 105: Expected 1 errors -Line 110: Expected 1 errors -Line 132: Expected 1 errors -Line 152: Expected 1 errors -Line 169: Expected 1 errors -Line 170: Expected 1 errors -Line 191: Expected 1 errors -Line 195: Expected 1 errors Line 199: Expected 1 errors +Line 84: Unexpected errors ['./narrowing_typeis.py:84:20: object is not equivalent to int'] +Line 88: Unexpected errors ['./narrowing_typeis.py:88:20: object is not equivalent to int'] +Line 136: Unexpected errors ['./narrowing_typeis.py:136:4: Function may exit without returning a value [missing_return]'] +Line 140: Unexpected errors ['./narrowing_typeis.py:140:4: Function may exit without returning a value [missing_return]'] """ output = """ +./narrowing_typeis.py:84:20: object is not equivalent to int +./narrowing_typeis.py:88:20: object is not equivalent to int +./narrowing_typeis.py:105:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] +./narrowing_typeis.py:110:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] +./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] +./narrowing_typeis.py:136:4: Function may exit without returning a value [missing_return] +./narrowing_typeis.py:140:4: Function may exit without returning a value [missing_return] +./narrowing_typeis.py:152:25: Incompatible argument type for f: expected /Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.CallableStrProto (Protocol with members '__call__') but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] +./narrowing_typeis.py:169:16: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeGuardExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.is_int_typeis' [incompatible_argument] +./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.is_int_typeguard' [incompatible_argument] +./narrowing_typeis.py:191:17: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.bool_typeis' [incompatible_argument] +./narrowing_typeis.py:195:26: TypeIs narrowed type str is incompatible with parameter x [typeis_must_be_subtype] """ diff --git a/conformance/results/pycroscope/overloads_basic.toml b/conformance/results/pycroscope/overloads_basic.toml index 4097eaca3..5bf8e7a6a 100644 --- a/conformance/results/pycroscope/overloads_basic.toml +++ b/conformance/results/pycroscope/overloads_basic.toml @@ -1,6 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 39: Expected 1 errors +Line 37: Unexpected errors ['./overloads_basic.py:37:12: Literal[0] is not equivalent to int'] +Line 38: Unexpected errors ["./overloads_basic.py:38:12: Literal[b''] is not equivalent to bytes"] +Line 59: Unexpected errors ['./overloads_basic.py:59:0: Function may exit without returning a value [missing_return]'] """ output = """ +./overloads_basic.py:37:12: Literal[0] is not equivalent to int +./overloads_basic.py:38:12: Literal[b''] is not equivalent to bytes +./overloads_basic.py:39:0: Cannot call overloaded function [incompatible_argument] +./overloads_basic.py:59:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/overloads_definitions.toml b/conformance/results/pycroscope/overloads_definitions.toml index 09a6cfccf..9327d36e1 100644 --- a/conformance/results/pycroscope/overloads_definitions.toml +++ b/conformance/results/pycroscope/overloads_definitions.toml @@ -3,13 +3,17 @@ errors_diff = """ Lines 15, 16: Expected error (tag 'func1') Lines 27, 28: Expected error (tag 'func2') Lines 58, 59: Expected error (tag 'not_abstract') -Lines 71, 73, 78, 81: Expected error (tag 'func5') -Lines 84, 86, 90, 93, 94: Expected error (tag 'func6') +Lines 71, 73, 78, 81: Expected exactly one error (tag 'func5') Lines 122, 123, 124, 128: Expected error (tag 'invalid_final') Lines 137, 138, 139, 143, 144: Expected error (tag 'invalid_final_2') Lines 175, 180, 181, 186, 188: Expected error (tag 'override-final') -Lines 195, 196, 202, 203: Expected error (tag 'bad_override') Lines 226, 227, 228, 231, 232: Expected error (tag 'override_impl') +Line 73: Unexpected errors ['./overloads_definitions.py:73:4: Traceback (most recent call last):'] +Line 78: Unexpected errors ['./overloads_definitions.py:78:4: Traceback (most recent call last):'] """ output = """ +./overloads_definitions.py:73:4: Traceback (most recent call last): +./overloads_definitions.py:78:4: Traceback (most recent call last): +./overloads_definitions.py:84:5: Incompatible argument type for func: expected (...) -> Any[explicit] but got classmethod[/Users/jelle/py/typing/conformance/tests/overloads_definitions.py.C, (x: int, /) -> Any[unannotated], int] [incompatible_argument] +./overloads_definitions.py:203:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/overloads_evaluation.toml b/conformance/results/pycroscope/overloads_evaluation.toml index f43c12568..b21b70df4 100644 --- a/conformance/results/pycroscope/overloads_evaluation.toml +++ b/conformance/results/pycroscope/overloads_evaluation.toml @@ -1,9 +1,45 @@ conformance_automated = "Fail" errors_diff = """ -Line 38: Expected 1 errors -Line 46: Expected 1 errors Line 51: Expected 1 errors -Line 116: Expected 1 errors +Line 44: Unexpected errors ['./overloads_evaluation.py:44:12: int | str is not equivalent to int'] +Line 49: Unexpected errors ['./overloads_evaluation.py:49:12: int | str is not equivalent to str'] +Line 67: Unexpected errors ['./overloads_evaluation.py:67:16: float | int is not equivalent to int'] +Line 93: Unexpected errors ['./overloads_evaluation.py:93:12: int | str is not equivalent to int'] +Line 136: Unexpected errors ['./overloads_evaluation.py:136:16: int is not equivalent to Literal[0, 1]'] +Line 162: Unexpected errors ['./overloads_evaluation.py:162:16: int is not equivalent to Literal[0, 1]'] +Line 235: Unexpected errors ['./overloads_evaluation.py:235:16: int | str is not equivalent to int'] +Line 262: Unexpected errors ['./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int]'] +Line 265: Unexpected errors ['./overloads_evaluation.py:265:16: list[int] | list[str] is not equivalent to Any[explicit]'] +Line 281: Unexpected errors ['./overloads_evaluation.py:281:16: list[Any[explicit]] is not equivalent to Any[explicit]'] +Line 303: Unexpected errors ['./overloads_evaluation.py:303:16: list[Any[explicit]] | Any[generic_argument] is not equivalent to float | int'] +Line 309: Unexpected errors ['./overloads_evaluation.py:309:16: Any[explicit] | Any[generic_argument] is not equivalent to float | int'] +Line 315: Unexpected errors ['./overloads_evaluation.py:315:16: list[int] | Any[generic_argument] is not equivalent to float | int'] +Line 318: Unexpected errors ['./overloads_evaluation.py:318:16: str | Any[generic_argument] is not equivalent to str'] +Line 324: Unexpected errors ['./overloads_evaluation.py:324:16: list[int] | Any[generic_argument] is not equivalent to list[int]'] +Line 341: Unexpected errors ['./overloads_evaluation.py:341:16: list[int] | list[str] is not equivalent to list[int]'] +Line 344: Unexpected errors ['./overloads_evaluation.py:344:16: list[int] | list[str] is not equivalent to list[str]'] +Line 347: Unexpected errors ['./overloads_evaluation.py:347:16: list[int] | list[str] is not equivalent to Any[explicit]'] """ output = """ +./overloads_evaluation.py:38:0: Missing required argument 'x' [incompatible_call] +./overloads_evaluation.py:44:12: int | str is not equivalent to int +./overloads_evaluation.py:46:14: Incompatible argument type for y: expected str but got Literal[1] [incompatible_argument] +./overloads_evaluation.py:49:12: int | str is not equivalent to str +./overloads_evaluation.py:67:16: float | int is not equivalent to int +./overloads_evaluation.py:93:12: int | str is not equivalent to int +./overloads_evaluation.py:116:13: Incompatible argument type for x: expected int but got int | str [incompatible_argument] +./overloads_evaluation.py:136:16: int is not equivalent to Literal[0, 1] +./overloads_evaluation.py:162:16: int is not equivalent to Literal[0, 1] +./overloads_evaluation.py:235:16: int | str is not equivalent to int +./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int] +./overloads_evaluation.py:265:16: list[int] | list[str] is not equivalent to Any[explicit] +./overloads_evaluation.py:281:16: list[Any[explicit]] is not equivalent to Any[explicit] +./overloads_evaluation.py:303:16: list[Any[explicit]] | Any[generic_argument] is not equivalent to float | int +./overloads_evaluation.py:309:16: Any[explicit] | Any[generic_argument] is not equivalent to float | int +./overloads_evaluation.py:315:16: list[int] | Any[generic_argument] is not equivalent to float | int +./overloads_evaluation.py:318:16: str | Any[generic_argument] is not equivalent to str +./overloads_evaluation.py:324:16: list[int] | Any[generic_argument] is not equivalent to list[int] +./overloads_evaluation.py:341:16: list[int] | list[str] is not equivalent to list[int] +./overloads_evaluation.py:344:16: list[int] | list[str] is not equivalent to list[str] +./overloads_evaluation.py:347:16: list[int] | list[str] is not equivalent to Any[explicit] """ diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 381e8989c..eca607810 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -8,6 +8,12 @@ Line 104: Expected 1 errors Line 106: Expected 1 errors Line 107: Expected 1 errors Line 108: Expected 1 errors +Line 44: Unexpected errors ['./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return]'] +Line 49: Unexpected errors ['./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return]'] +Line 64: Unexpected errors ['./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return] +./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return] +./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 1ef5b6646..646536780 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -21,6 +21,22 @@ Line 289: Expected 1 errors Line 339: Expected 1 errors Line 340: Expected 1 errors Line 341: Expected 1 errors +Line 44: Unexpected errors ['./protocols_definition.py:44:4: Function may exit without returning a value [missing_return]'] +Line 48: Unexpected errors ['./protocols_definition.py:48:4: Function may exit without returning a value [missing_return]'] +Line 52: Unexpected errors ['./protocols_definition.py:52:4: Function may exit without returning a value [missing_return]'] +Line 165: Unexpected errors ['./protocols_definition.py:165:4: Function may exit without returning a value [missing_return]'] +Line 223: Unexpected errors ['./protocols_definition.py:223:4: Function may exit without returning a value [missing_return]'] +Line 294: Unexpected errors ['./protocols_definition.py:294:4: Function may exit without returning a value [missing_return]'] +Line 298: Unexpected errors ['./protocols_definition.py:298:4: Name val1 is already defined [class_variable_redefinition]'] +Line 308: Unexpected errors ['./protocols_definition.py:308:4: Name val1 is already defined [class_variable_redefinition]'] """ output = """ +./protocols_definition.py:44:4: Function may exit without returning a value [missing_return] +./protocols_definition.py:48:4: Function may exit without returning a value [missing_return] +./protocols_definition.py:52:4: Function may exit without returning a value [missing_return] +./protocols_definition.py:165:4: Function may exit without returning a value [missing_return] +./protocols_definition.py:223:4: Function may exit without returning a value [missing_return] +./protocols_definition.py:294:4: Function may exit without returning a value [missing_return] +./protocols_definition.py:298:4: Name val1 is already defined [class_variable_redefinition] +./protocols_definition.py:308:4: Name val1 is already defined [class_variable_redefinition] """ diff --git a/conformance/results/pycroscope/protocols_explicit.toml b/conformance/results/pycroscope/protocols_explicit.toml index d80bfe872..b72548688 100644 --- a/conformance/results/pycroscope/protocols_explicit.toml +++ b/conformance/results/pycroscope/protocols_explicit.toml @@ -6,6 +6,10 @@ Line 60: Expected 1 errors Line 89: Expected 1 errors Line 134: Expected 1 errors Line 164: Expected 1 errors +Line 50: Unexpected errors ['./protocols_explicit.py:50:4: Function may exit without returning a value [missing_return]'] +Line 126: Unexpected errors ['./protocols_explicit.py:126:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_explicit.py:50:4: Function may exit without returning a value [missing_return] +./protocols_explicit.py:126:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 7bf1fa0a5..5cf198654 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -2,13 +2,29 @@ conformance_automated = "Fail" errors_diff = """ Line 40: Expected 1 errors Line 44: Expected 1 errors -Line 56: Expected 1 errors Line 66: Expected 1 errors Line 74: Expected 1 errors -Line 75: Expected 1 errors Line 145: Expected 1 errors -Line 146: Expected 1 errors Line 147: Expected 1 errors +Line 17: Unexpected errors ['./protocols_generic.py:17:4: Function may exit without returning a value [missing_return]'] +Line 27: Unexpected errors ['./protocols_generic.py:27:4: Function may exit without returning a value [missing_return]'] +Line 50: Unexpected errors ['./protocols_generic.py:50:4: Function may exit without returning a value [missing_return]'] +Line 65: Unexpected errors ['./protocols_generic.py:65:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[float | int] [incompatible_assignment]'] +Line 79: Unexpected errors ['./protocols_generic.py:79:4: Function may exit without returning a value [missing_return]'] +Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent'] +Line 101: Unexpected errors ['./protocols_generic.py:101:4: Function may exit without returning a value [missing_return]'] +Line 104: Unexpected errors ['./protocols_generic.py:104:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_generic.py:17:4: Function may exit without returning a value [missing_return] +./protocols_generic.py:27:4: Function may exit without returning a value [missing_return] +./protocols_generic.py:50:4: Function may exit without returning a value [missing_return] +./protocols_generic.py:56:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Box[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Box[float | int] [incompatible_assignment] +./protocols_generic.py:65:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] +./protocols_generic.py:75:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.AttrProto[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] +./protocols_generic.py:79:4: Function may exit without returning a value [missing_return] +./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent +./protocols_generic.py:101:4: Function may exit without returning a value [missing_return] +./protocols_generic.py:104:4: Function may exit without returning a value [missing_return] +./protocols_generic.py:146:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.HasPropertyProto (Protocol with members 'm', 'f'), got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index 52eaf2096..ab213110d 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -6,6 +6,8 @@ Line 54: Expected 1 errors Line 67: Expected 1 errors Line 82: Expected 1 errors Line 83: Expected 1 errors +Line 18: Unexpected errors ['./protocols_merging.py:18:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_merging.py:18:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_modules.toml b/conformance/results/pycroscope/protocols_modules.toml index d26457104..575ff8e8e 100644 --- a/conformance/results/pycroscope/protocols_modules.toml +++ b/conformance/results/pycroscope/protocols_modules.toml @@ -3,6 +3,10 @@ errors_diff = """ Line 26: Expected 1 errors Line 48: Expected 1 errors Line 49: Expected 1 errors +Line 38: Unexpected errors ['./protocols_modules.py:38:4: Function may exit without returning a value [missing_return]'] +Line 43: Unexpected errors ['./protocols_modules.py:43:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_modules.py:38:4: Function may exit without returning a value [missing_return] +./protocols_modules.py:43:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index cdd4d0cd9..c567a9ba0 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,5 +1,16 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 16: Unexpected errors ['./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return]'] +Line 29: Unexpected errors ['./protocols_recursive.py:29:24: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 42: Unexpected errors ['./protocols_recursive.py:42:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]', './protocols_recursive.py:42:4: Function may exit without returning a value [missing_return]'] +Line 51: Unexpected errors ['./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return]'] +Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ +./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return] +./protocols_recursive.py:29:24: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./protocols_recursive.py:42:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return] +./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return] +./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/protocols_runtime_checkable.toml b/conformance/results/pycroscope/protocols_runtime_checkable.toml index 58abba848..f0c1635e4 100644 --- a/conformance/results/pycroscope/protocols_runtime_checkable.toml +++ b/conformance/results/pycroscope/protocols_runtime_checkable.toml @@ -6,6 +6,12 @@ Line 61: Expected 1 errors Line 88: Expected 1 errors Line 92: Expected 1 errors Line 96: Expected 1 errors +Line 38: Unexpected errors ['./protocols_runtime_checkable.py:38:4: Function may exit without returning a value [missing_return]'] +Line 44: Unexpected errors ['./protocols_runtime_checkable.py:44:4: Function may exit without returning a value [missing_return]'] +Line 71: Unexpected errors ['./protocols_runtime_checkable.py:71:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_runtime_checkable.py:38:4: Function may exit without returning a value [missing_return] +./protocols_runtime_checkable.py:44:4: Function may exit without returning a value [missing_return] +./protocols_runtime_checkable.py:71:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_self.toml b/conformance/results/pycroscope/protocols_self.toml index cdd4d0cd9..bf70e8cf0 100644 --- a/conformance/results/pycroscope/protocols_self.toml +++ b/conformance/results/pycroscope/protocols_self.toml @@ -1,5 +1,7 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 41: Unexpected errors ['./protocols_self.py:41:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_self.py:41:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index 7438b4310..3457a8100 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -7,6 +7,18 @@ Line 79: Expected 1 errors Line 80: Expected 1 errors Line 102: Expected 1 errors Line 103: Expected 1 errors +Line 67: Unexpected errors ['./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return]'] +Line 72: Unexpected errors ['./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return]'] +Line 88: Unexpected errors ['./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return]'] +Line 93: Unexpected errors ['./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return]'] +Line 110: Unexpected errors ['./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return]'] +Line 115: Unexpected errors ['./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_variance.toml b/conformance/results/pycroscope/protocols_variance.toml index a5f099546..bceec2d82 100644 --- a/conformance/results/pycroscope/protocols_variance.toml +++ b/conformance/results/pycroscope/protocols_variance.toml @@ -6,7 +6,35 @@ Line 56: Expected 1 errors Line 66: Expected 1 errors Line 104: Expected 1 errors Lines 61, 62: Expected error (tag 'covariant_in_input') -Lines 71, 72: Expected error (tag 'contravariant_in_output') +Line 22: Unexpected errors ['./protocols_variance.py:22:4: Function may exit without returning a value [missing_return]'] +Line 27: Unexpected errors ['./protocols_variance.py:27:4: Function may exit without returning a value [missing_return]'] +Line 30: Unexpected errors ['./protocols_variance.py:30:4: Function may exit without returning a value [missing_return]'] +Line 33: Unexpected errors ['./protocols_variance.py:33:4: Function may exit without returning a value [missing_return]'] +Line 36: Unexpected errors ['./protocols_variance.py:36:4: Function may exit without returning a value [missing_return]'] +Line 41: Unexpected errors ['./protocols_variance.py:41:4: Function may exit without returning a value [missing_return]'] +Line 44: Unexpected errors ['./protocols_variance.py:44:4: Function may exit without returning a value [missing_return]'] +Line 47: Unexpected errors ['./protocols_variance.py:47:4: Function may exit without returning a value [missing_return]'] +Line 67: Unexpected errors ['./protocols_variance.py:67:4: Function may exit without returning a value [missing_return]'] +Line 77: Unexpected errors ['./protocols_variance.py:77:4: Function may exit without returning a value [missing_return]'] +Line 85: Unexpected errors ['./protocols_variance.py:85:4: Function may exit without returning a value [missing_return]'] +Line 91: Unexpected errors ['./protocols_variance.py:91:4: Function may exit without returning a value [missing_return]'] +Line 96: Unexpected errors ['./protocols_variance.py:96:4: Function may exit without returning a value [missing_return]'] +Line 120: Unexpected errors ['./protocols_variance.py:120:4: Function may exit without returning a value [missing_return]'] """ output = """ +./protocols_variance.py:22:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:27:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:30:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:33:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:36:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:41:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:44:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:47:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:67:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:72:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:77:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:85:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:91:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:96:4: Function may exit without returning a value [missing_return] +./protocols_variance.py:120:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index c4cda1251..81cf431c3 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -1,25 +1,33 @@ conformance_automated = "Fail" errors_diff = """ -Line 38: Expected 1 errors Line 39: Expected 1 errors -Line 40: Expected 1 errors -Line 41: Expected 1 errors Line 42: Expected 1 errors Line 43: Expected 1 errors Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors Line 49: Expected 1 errors Line 59: Expected 1 errors -Line 71: Expected 1 errors -Line 72: Expected 1 errors -Line 79: Expected 1 errors -Line 80: Expected 1 errors Line 86: Expected 1 errors Line 87: Expected 1 errors Line 88: Expected 1 errors +Line 105: Unexpected errors ['./qualifiers_annotated.py:105:7: Unexpected Required annotation [invalid_annotation]'] +Line 106: Unexpected errors ['./qualifiers_annotated.py:106:7: Unexpected Required annotation [invalid_annotation]'] +Line 107: Unexpected errors ['./qualifiers_annotated.py:107:7: Unexpected NotRequired annotation [invalid_annotation]'] +Line 108: Unexpected errors ['./qualifiers_annotated.py:108:7: Unexpected NotRequired annotation [invalid_annotation]'] """ output = """ +./qualifiers_annotated.py:38:6: Invalid type annotation [, ] [invalid_annotation] +./qualifiers_annotated.py:41:6: Invalid type annotation {'a': 'b'} [invalid_annotation] +./qualifiers_annotated.py:46:6: Invalid type annotation True [invalid_annotation] +./qualifiers_annotated.py:47:7: Invalid type annotation 1 [invalid_annotation] +./qualifiers_annotated.py:40:25: Variable i is never accessed [unused_variable] +./qualifiers_annotated.py:45:16: Undefined name: var1 [undefined_name] +./qualifiers_annotated.py:48:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./qualifiers_annotated.py:71:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] +./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] +./qualifiers_annotated.py:79:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[str, '']] [incompatible_argument] +./qualifiers_annotated.py:80:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[int, '']] [incompatible_argument] +./qualifiers_annotated.py:105:7: Unexpected Required annotation [invalid_annotation] +./qualifiers_annotated.py:106:7: Unexpected Required annotation [invalid_annotation] +./qualifiers_annotated.py:107:7: Unexpected NotRequired annotation [invalid_annotation] +./qualifiers_annotated.py:108:7: Unexpected NotRequired annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml index 17a076626..56d75882e 100644 --- a/conformance/results/pycroscope/qualifiers_final_annotation.toml +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors -Line 18: Expected 1 errors Line 34: Expected 1 errors Line 38: Expected 1 errors Line 54: Expected 1 errors @@ -9,23 +8,34 @@ Line 62: Expected 1 errors Line 63: Expected 1 errors Line 65: Expected 1 errors Line 67: Expected 1 errors -Line 71: Expected 1 errors Line 81: Expected 1 errors Line 94: Expected 1 errors Line 107: Expected 1 errors Line 108: Expected 1 errors -Line 118: Expected 1 errors -Line 121: Expected 1 errors -Line 134: Expected 1 errors -Line 135: Expected 1 errors Line 141: Expected 1 errors -Line 145: Expected 1 errors -Line 147: Expected 1 errors -Line 149: Expected 1 errors -Line 152: Expected 1 errors -Line 155: Expected 1 errors Line 166: Expected 1 errors Line 170: Expected 1 errors +Line 168: Unexpected errors ["./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import]"] """ output = """ +./qualifiers_final_annotation.py:18:6: Unrecognized annotation object [invalid_annotation] +./qualifiers_final_annotation.py:118:3: Unrecognized annotation typing.Final[] [invalid_annotation] +./qualifiers_final_annotation.py:121:13: Unexpected Final annotation [invalid_annotation] +./qualifiers_final_annotation.py:71:0: Cannot assign to final name RATE [incompatible_assignment] +./qualifiers_final_annotation.py:134:0: In call to pycroscope.signature.N: Missing required argument 'x' [incompatible_call] +./qualifiers_final_annotation.py:135:4: Incompatible argument type for x: expected int but got Literal[''] [incompatible_argument] +./qualifiers_final_annotation.py:135:10: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument] +./qualifiers_final_annotation.py:145:4: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:147:9: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:149:8: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:152:29: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:155:8: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:152:29: Assigned value of x is never accessed [unused_assignment] +./qualifiers_final_annotation.py:155:5: Variable a is never accessed [unused_variable] +./qualifiers_final_annotation.py:145:4: Assigned value of x is never accessed [unused_assignment] +./qualifiers_final_annotation.py:147:9: Assigned value of x is never accessed [unused_assignment] +./qualifiers_final_annotation.py:147:4: Variable a is never accessed [unused_variable] +./qualifiers_final_annotation.py:149:8: Assigned value of x is never accessed [unused_assignment] +./qualifiers_final_annotation.py:155:8: Assigned value of x is never accessed [unused_assignment] +./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import] """ diff --git a/conformance/results/pycroscope/specialtypes_any.toml b/conformance/results/pycroscope/specialtypes_any.toml index cdd4d0cd9..cd09044b5 100644 --- a/conformance/results/pycroscope/specialtypes_any.toml +++ b/conformance/results/pycroscope/specialtypes_any.toml @@ -1,5 +1,9 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 72: Unexpected errors ['./specialtypes_any.py:72:16: (...) -> Any[explicit] is not equivalent to (...) -> Any[explicit]'] +Line 86: Unexpected errors ['./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int'] """ output = """ +./specialtypes_any.py:72:16: (...) -> Any[explicit] is not equivalent to (...) -> Any[explicit] +./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/specialtypes_never.toml b/conformance/results/pycroscope/specialtypes_never.toml index b5a5f37d5..602bc6629 100644 --- a/conformance/results/pycroscope/specialtypes_never.toml +++ b/conformance/results/pycroscope/specialtypes_never.toml @@ -1,8 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 19: Expected 1 errors Line 85: Expected 1 errors Line 104: Expected 1 errors +Line 51: Unexpected errors ['./specialtypes_never.py:51:4: Incompatible return type: expected list[Never], got Literal[[]] [incompatible_return_value]'] +Line 84: Unexpected errors ['./specialtypes_never.py:84:4: Incompatible assignment: expected Never, got Any[explicit] [incompatible_assignment]'] """ output = """ +./specialtypes_never.py:19:0: Function is annotated as NoReturn but may return [no_return_may_return] +./specialtypes_never.py:51:4: Incompatible return type: expected list[Never], got Literal[[]] [incompatible_return_value] +./specialtypes_never.py:84:4: Incompatible assignment: expected Never, got Any[explicit] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/specialtypes_none.toml b/conformance/results/pycroscope/specialtypes_none.toml index 0149642f1..14beedc0a 100644 --- a/conformance/results/pycroscope/specialtypes_none.toml +++ b/conformance/results/pycroscope/specialtypes_none.toml @@ -1,8 +1,8 @@ conformance_automated = "Fail" errors_diff = """ -Line 21: Expected 1 errors -Line 27: Expected 1 errors Line 41: Expected 1 errors """ output = """ +./specialtypes_none.py:21:6: Incompatible argument type for val1: expected None but got type [incompatible_argument] +./specialtypes_none.py:27:0: Incompatible assignment: expected collections.abc.Iterable (Protocol with members '__iter__'), got None [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/specialtypes_promotions.toml b/conformance/results/pycroscope/specialtypes_promotions.toml index 4a94412fb..8e32e247b 100644 --- a/conformance/results/pycroscope/specialtypes_promotions.toml +++ b/conformance/results/pycroscope/specialtypes_promotions.toml @@ -1,6 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 13: Expected 1 errors """ output = """ +./specialtypes_promotions.py:13:4: float has no attribute 'numerator' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index 1b10575f4..5e2e3e50b 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -1,14 +1,32 @@ conformance_automated = "Fail" errors_diff = """ Line 56: Expected 1 errors -Line 70: Expected 1 errors Line 76: Expected 1 errors -Line 117: Expected 1 errors -Line 120: Expected 1 errors Line 143: Expected 1 errors Line 144: Expected 1 errors -Line 145: Expected 1 errors -Line 146: Expected 1 errors +Line 38: Unexpected errors ['./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] +Line 88: Unexpected errors ['./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment]'] +Line 86: Unexpected errors ['./specialtypes_type.py:86:4: Assigned value of b is never accessed [unused_assignment]'] +Line 87: Unexpected errors ['./specialtypes_type.py:87:4: Assigned value of a is never accessed [unused_assignment]'] +Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] +Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] +Line 152: Unexpected errors ['./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 160: Unexpected errors ['./specialtypes_type.py:160:12: int | Any[generic_argument] is not equivalent to int'] +Line 161: Unexpected errors ['./specialtypes_type.py:161:12: int | Any[generic_argument] is not equivalent to int'] """ output = """ +./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] +./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] +./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment] +./specialtypes_type.py:86:4: Assigned value of b is never accessed [unused_assignment] +./specialtypes_type.py:87:4: Assigned value of a is never accessed [unused_assignment] +./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str +./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str +./specialtypes_type.py:120:4: type[object] has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:145:0: type 'type' has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:146:0: Literal[type[typing.Any]] has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation] +./specialtypes_type.py:160:12: int | Any[generic_argument] is not equivalent to int +./specialtypes_type.py:161:12: int | Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 982ab22ee..4d8001caf 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -1,29 +1,70 @@ conformance_automated = "Fail" errors_diff = """ -Line 15: Expected 1 errors -Line 29: Expected 1 errors -Line 32: Expected 1 errors -Line 33: Expected 1 errors -Line 43: Expected 1 errors -Line 62: Expected 1 errors -Line 157: Expected 1 errors -Line 162: Expected 1 errors -Line 163: Expected 1 errors -Line 169: Expected 1 errors -Line 170: Expected 1 errors -Line 175: Expected 1 errors -Line 176: Expected 1 errors -Line 181: Expected 1 errors -Line 184: Expected 1 errors -Line 188: Expected 1 errors -Lines 75, 76: Expected error (tag 'func5_1') -Lines 80, 81: Expected error (tag 'func5_2') -Lines 85, 86: Expected error (tag 'func5_3') -Lines 101, 102: Expected error (tag 'func6_1') -Lines 106, 107: Expected error (tag 'func6_2') -Lines 111, 112: Expected error (tag 'func6_3') -Lines 126, 127: Expected error (tag 'func7_1') -Lines 129, 130: Expected error (tag 'func7_2') +Lines 75, 76: Expected exactly one error (tag 'func5_1') +Lines 80, 81: Expected exactly one error (tag 'func5_2') +Lines 85, 86: Expected exactly one error (tag 'func5_3') +Lines 101, 102: Expected exactly one error (tag 'func6_1') +Lines 106, 107: Expected exactly one error (tag 'func6_2') +Lines 111, 112: Expected exactly one error (tag 'func6_3') +Line 24: Unexpected errors ['./tuples_type_compat.py:24:4: Variable v1 is never accessed [unused_variable]'] +Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable]'] +Line 25: Unexpected errors ['./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable]'] +Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] +Line 75: Unexpected errors ['./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int]'] +Line 76: Unexpected errors ['./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] +Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] +Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] +Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] +Line 107: Unexpected errors ['./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 111: Unexpected errors ['./tuples_type_compat.py:111:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int, str, int]'] +Line 112: Unexpected errors ['./tuples_type_compat.py:112:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 150: Unexpected errors ['./tuples_type_compat.py:150:8: collections.abc.Sequence[complex | float | int | list[int]] | Any[unannotated] is not equivalent to collections.abc.Sequence[complex | float | int | list[int]]'] +Line 152: Unexpected errors ['./tuples_type_compat.py:152:16: collections.abc.Sequence[int | str] | Any[unannotated] is not equivalent to collections.abc.Sequence[int | str]'] +Line 153: Unexpected errors ['./tuples_type_compat.py:153:16: collections.abc.Sequence[Never] | Any[unannotated] is not equivalent to collections.abc.Sequence[Never]'] """ output = """ +./tuples_type_compat.py:15:4: Incompatible assignment: expected tuple[int, int], got tuple[float | int, complex | float | int] [incompatible_assignment] +./tuples_type_compat.py:29:4: Incompatible assignment: expected tuple[int, *tuple[int, ...]], got tuple[int, ...] [incompatible_assignment] +./tuples_type_compat.py:32:4: Incompatible assignment: expected tuple[int], got tuple[int, *tuple[int, ...]] [incompatible_assignment] +./tuples_type_compat.py:33:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] +./tuples_type_compat.py:32:4: Variable v3 is never accessed [unused_variable] +./tuples_type_compat.py:33:4: Variable v3 is never accessed [unused_variable] +./tuples_type_compat.py:24:4: Variable v1 is never accessed [unused_variable] +./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable] +./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable] +./tuples_type_compat.py:29:4: Variable v2 is never accessed [unused_variable] +./tuples_type_compat.py:43:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] +./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment] +./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] +./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] +./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] +./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] +./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] +./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] +./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:111:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int, str, int] +./tuples_type_compat.py:112:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:126:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, str] +./tuples_type_compat.py:129:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, int] +./tuples_type_compat.py:150:8: collections.abc.Sequence[complex | float | int | list[int]] | Any[unannotated] is not equivalent to collections.abc.Sequence[complex | float | int | list[int]] +./tuples_type_compat.py:152:16: collections.abc.Sequence[int | str] | Any[unannotated] is not equivalent to collections.abc.Sequence[int | str] +./tuples_type_compat.py:153:16: collections.abc.Sequence[Never] | Any[unannotated] is not equivalent to collections.abc.Sequence[Never] +./tuples_type_compat.py:157:0: Incompatible assignment: expected tuple[int, str], got Literal[(1, '', '')] [incompatible_assignment] +./tuples_type_compat.py:162:0: Incompatible assignment: expected tuple[int, *tuple[str, ...]], got Literal[(1, 1, '')] [incompatible_assignment] +./tuples_type_compat.py:163:0: Incompatible assignment: expected tuple[int, *tuple[str, ...]], got Literal[(1, '', 1)] [incompatible_assignment] +./tuples_type_compat.py:169:0: Incompatible assignment: expected tuple[int, *tuple[str, ...], int], got Literal[(1, '', '')] [incompatible_assignment] +./tuples_type_compat.py:170:0: Incompatible assignment: expected tuple[int, *tuple[str, ...], int], got Literal[(1, '', '', 1.2)] [incompatible_assignment] +./tuples_type_compat.py:175:0: Incompatible assignment: expected tuple[*tuple[str, ...], int], got Literal[(1, '', 1)] [incompatible_assignment] +./tuples_type_compat.py:176:0: Incompatible assignment: expected tuple[*tuple[str, ...], int], got Literal[('', '', 1.2)] [incompatible_assignment] +./tuples_type_compat.py:181:4: Incompatible assignment: expected tuple[str, str, int], got tuple[str, str] [incompatible_assignment] +./tuples_type_compat.py:184:4: Incompatible assignment: expected tuple[str, str, str, *tuple[str, ...]], got tuple[str, str] [incompatible_assignment] +./tuples_type_compat.py:188:4: Incompatible assignment: expected tuple[*tuple[str, ...], str, str, str], got tuple[str, str] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/tuples_type_form.toml b/conformance/results/pycroscope/tuples_type_form.toml index e47740b7e..dfa619b91 100644 --- a/conformance/results/pycroscope/tuples_type_form.toml +++ b/conformance/results/pycroscope/tuples_type_form.toml @@ -1,10 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 12: Expected 1 errors -Line 14: Expected 1 errors -Line 15: Expected 1 errors -Line 25: Expected 1 errors -Line 36: Expected 1 errors Line 40: Expected 1 errors Line 41: Expected 1 errors Line 42: Expected 1 errors @@ -13,4 +8,9 @@ Line 44: Expected 1 errors Line 45: Expected 1 errors """ output = """ +./tuples_type_form.py:12:0: Incompatible assignment: expected tuple[int], got Literal[(1, 2)] [incompatible_assignment] +./tuples_type_form.py:14:0: Incompatible assignment: expected tuple[int, int], got Literal[(1,)] [incompatible_assignment] +./tuples_type_form.py:15:0: Incompatible assignment: expected tuple[int, int], got Literal[(1, '')] [incompatible_assignment] +./tuples_type_form.py:25:0: Incompatible assignment: expected tuple[], got Literal[(1,)] [incompatible_assignment] +./tuples_type_form.py:36:0: Incompatible assignment: expected tuple[int, ...], got Literal[(1, 2, 3, '')] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_alt_syntax.toml b/conformance/results/pycroscope/typeddicts_alt_syntax.toml index d39d314cc..33bcb9c76 100644 --- a/conformance/results/pycroscope/typeddicts_alt_syntax.toml +++ b/conformance/results/pycroscope/typeddicts_alt_syntax.toml @@ -3,7 +3,8 @@ errors_diff = """ Line 23: Expected 1 errors Line 27: Expected 1 errors Line 31: Expected 1 errors -Line 35: Expected 1 errors """ output = """ +./typeddicts_alt_syntax.py:35:16: In call to typing.TypedDict: Got an unexpected keyword argument 'other' [incompatible_call] +./typeddicts_alt_syntax.py:41:9: In call to typing.TypedDict: Got unexpected keyword arguments 'year', 'name' [incompatible_call] """ diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml index e7be7e304..84a19138a 100644 --- a/conformance/results/pycroscope/typeddicts_extra_items.toml +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -26,8 +26,32 @@ Line 352: 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 140: Unexpected errors ['./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation]'] +Line 141: Unexpected errors ['./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation]'] +Line 19: Unexpected errors ["./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call]"] +Line 28: Unexpected errors ['./typeddicts_extra_items.py:28:16: Any[from_another] is not equivalent to str'] +Line 29: Unexpected errors ['./typeddicts_extra_items.py:29:16: Any[from_another] is not equivalent to bool'] +Line 191: Unexpected errors ['./typeddicts_extra_items.py:191:10: Unexpected NotRequired annotation [invalid_annotation]'] +Line 212: Unexpected errors ['./typeddicts_extra_items.py:212:10: Unexpected NotRequired annotation [invalid_annotation]'] +Line 233: Unexpected errors ['./typeddicts_extra_items.py:233:10: Unexpected NotRequired annotation [invalid_annotation]'] +Line 310: Unexpected errors ['./typeddicts_extra_items.py:310:16: list[Any[generic_argument]] is not equivalent to list[tuple[str, int | str]]'] +Line 311: Unexpected errors ['./typeddicts_extra_items.py:311:16: list[Any[generic_argument]] is not equivalent to list[int | str]'] +Line 323: Unexpected errors ['./typeddicts_extra_items.py:323:9: Unexpected NotRequired annotation [invalid_annotation]'] +Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[from_another] is not equivalent to tuple[str, int]'] """ output = """ +./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation] +./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation] +./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call] +./typeddicts_extra_items.py:28:16: Any[from_another] is not equivalent to str +./typeddicts_extra_items.py:29:16: Any[from_another] is not equivalent to bool +./typeddicts_extra_items.py:188:10: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_extra_items.py:191:10: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_extra_items.py:212:10: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_extra_items.py:233:10: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_extra_items.py:310:16: list[Any[generic_argument]] is not equivalent to list[tuple[str, int | str]] +./typeddicts_extra_items.py:311:16: list[Any[generic_argument]] is not equivalent to list[int | str] +./typeddicts_extra_items.py:323:9: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_extra_items.py:339:12: Any[from_another] is not equivalent to tuple[str, int] """ diff --git a/conformance/results/pycroscope/typeddicts_operations.toml b/conformance/results/pycroscope/typeddicts_operations.toml index 84dc4df14..1199ec3be 100644 --- a/conformance/results/pycroscope/typeddicts_operations.toml +++ b/conformance/results/pycroscope/typeddicts_operations.toml @@ -11,6 +11,8 @@ Line 37: Expected 1 errors Line 47: Expected 1 errors Line 49: Expected 1 errors Line 62: Expected 1 errors +Line 60: Unexpected errors ['./typeddicts_operations.py:60:12: Any[from_another] is not equivalent to str | None'] """ output = """ +./typeddicts_operations.py:60:12: Any[from_another] is not equivalent to str | None """ diff --git a/conformance/results/pycroscope/typeddicts_readonly.toml b/conformance/results/pycroscope/typeddicts_readonly.toml index 52e731930..6434a3a04 100644 --- a/conformance/results/pycroscope/typeddicts_readonly.toml +++ b/conformance/results/pycroscope/typeddicts_readonly.toml @@ -1,11 +1,11 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 24: Expected 1 errors -Line 36: Expected 1 errors -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 60: Expected 1 errors -Line 61: Expected 1 errors """ output = """ +./typeddicts_readonly.py:24:3: Cannot set readonly key 'members' in TypedDict TypedDict({"name": str, "members": Readonly[list[str]]}) [readonly_typeddict] +./typeddicts_readonly.py:36:3: Cannot set readonly key 'members' in TypedDict TypedDict({"name": str, "members": Readonly[list[str]]}) [readonly_typeddict] +./typeddicts_readonly.py:50:3: Cannot set readonly key 'title' in TypedDict TypedDict({"title": Readonly[str], "year": NotRequired[Readonly[Annotated[int, Literal['']]]]}) [readonly_typeddict] +./typeddicts_readonly.py:51:3: Cannot set readonly key 'year' in TypedDict TypedDict({"title": Readonly[str], "year": NotRequired[Readonly[Annotated[int, Literal['']]]]}) [readonly_typeddict] +./typeddicts_readonly.py:60:3: Cannot set readonly key 'title' in TypedDict TypedDict({"title": Readonly[str], "year": NotRequired[Readonly[Annotated[int, Literal['']]]]}) [readonly_typeddict] +./typeddicts_readonly.py:61:3: Cannot set readonly key 'year' in TypedDict TypedDict({"title": Readonly[str], "year": NotRequired[Readonly[Annotated[int, Literal['']]]]}) [readonly_typeddict] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_consistency.toml b/conformance/results/pycroscope/typeddicts_readonly_consistency.toml index 9548e2105..3fd93c951 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_consistency.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_consistency.toml @@ -1,12 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 37: Expected 1 errors -Line 38: Expected 1 errors -Line 40: Expected 1 errors -Line 81: Expected 1 errors -Line 82: Expected 1 errors -Line 84: Expected 1 errors -Line 85: Expected 1 errors """ output = """ +./typeddicts_readonly_consistency.py:37:4: Incompatible assignment: expected TypedDict({"x": int, "y": NotRequired[str]}), got TypedDict({"x": int}) [incompatible_assignment] +./typeddicts_readonly_consistency.py:38:4: Incompatible assignment: expected TypedDict({"x": int, "y": NotRequired[str]}), got TypedDict({"x": int, "y": NotRequired[Readonly[str]]}) [incompatible_assignment] +./typeddicts_readonly_consistency.py:40:4: Incompatible assignment: expected TypedDict({"x": int, "y": NotRequired[Readonly[str]]}), got TypedDict({"x": int}) [incompatible_assignment] +./typeddicts_readonly_consistency.py:81:4: Incompatible assignment: expected TypedDict({"x": NotRequired[str]}), got TypedDict({"x": NotRequired[Readonly[str]]}) [incompatible_assignment] +./typeddicts_readonly_consistency.py:82:4: Incompatible assignment: expected TypedDict({"x": NotRequired[str]}), got TypedDict({"x": str}) [incompatible_assignment] +./typeddicts_readonly_consistency.py:84:4: Incompatible assignment: expected TypedDict({"x": str}), got TypedDict({"x": NotRequired[Readonly[str]]}) [incompatible_assignment] +./typeddicts_readonly_consistency.py:85:4: Incompatible assignment: expected TypedDict({"x": str}), got TypedDict({"x": NotRequired[str]}) [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml index 171d81b35..4bf027776 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml @@ -1,16 +1,50 @@ conformance_automated = "Fail" errors_diff = """ Line 36: Expected 1 errors -Line 50: Expected 1 errors Line 65: Expected 1 errors Line 82: Expected 1 errors Line 83: Expected 1 errors Line 84: Expected 1 errors -Line 94: Expected 1 errors -Line 98: Expected 1 errors -Line 106: Expected 1 errors Line 119: Expected 1 errors Line 132: Expected 1 errors +Line 15: Unexpected errors ['./typeddicts_readonly_inheritance.py:15:10: Unexpected ReadOnly annotation [invalid_annotation]'] +Line 43: Unexpected errors ['./typeddicts_readonly_inheritance.py:43:12: Unrecognized annotation object [invalid_annotation]'] +Line 44: Unexpected errors ['./typeddicts_readonly_inheritance.py:44:9: Unexpected ReadOnly annotation [invalid_annotation]'] +Line 49: Unexpected errors ['./typeddicts_readonly_inheritance.py:49:12: Unexpected ReadOnly annotation [invalid_annotation]'] +Line 58: Unexpected errors ['./typeddicts_readonly_inheritance.py:58:10: Unexpected NotRequired annotation [invalid_annotation]'] +Line 62: Unexpected errors ['./typeddicts_readonly_inheritance.py:62:10: Unexpected Required annotation [invalid_annotation]'] +Line 72: Unexpected errors ['./typeddicts_readonly_inheritance.py:72:11: Unexpected NotRequired annotation [invalid_annotation]'] +Line 88: Unexpected errors ['./typeddicts_readonly_inheritance.py:88:7: Unexpected Required annotation [invalid_annotation]'] +Line 89: Unexpected errors ['./typeddicts_readonly_inheritance.py:89:7: Unexpected NotRequired annotation [invalid_annotation]'] +Line 90: Unexpected errors ['./typeddicts_readonly_inheritance.py:90:7: Unexpected Required annotation [invalid_annotation]'] +Line 102: Unexpected errors ['./typeddicts_readonly_inheritance.py:102:7: Unexpected Required annotation [invalid_annotation]'] +Line 111: Unexpected errors ['./typeddicts_readonly_inheritance.py:111:7: Unexpected ReadOnly annotation [invalid_annotation]'] +Line 116: Unexpected errors ['./typeddicts_readonly_inheritance.py:116:7: Unexpected ReadOnly annotation [invalid_annotation]'] +Line 123: Unexpected errors ['./typeddicts_readonly_inheritance.py:123:7: Unexpected NotRequired annotation [invalid_annotation]'] +Line 124: Unexpected errors ['./typeddicts_readonly_inheritance.py:124:7: Unexpected Required annotation [invalid_annotation]'] +Line 128: Unexpected errors ['./typeddicts_readonly_inheritance.py:128:7: Unexpected Required annotation [invalid_annotation]'] +Line 129: Unexpected errors ['./typeddicts_readonly_inheritance.py:129:7: Unexpected NotRequired annotation [invalid_annotation]'] """ output = """ +./typeddicts_readonly_inheritance.py:15:10: Unexpected ReadOnly annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:43:12: Unrecognized annotation object [invalid_annotation] +./typeddicts_readonly_inheritance.py:44:9: Unexpected ReadOnly annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:49:12: Unexpected ReadOnly annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:50:9: Unexpected ReadOnly annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:58:10: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:62:10: Unexpected Required annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:72:11: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:88:7: Unexpected Required annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:89:7: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:90:7: Unexpected Required annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:94:7: Unexpected ReadOnly annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:98:7: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:102:7: Unexpected Required annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:106:7: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:111:7: Unexpected ReadOnly annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:116:7: Unexpected ReadOnly annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:123:7: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:124:7: Unexpected Required annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:128:7: Unexpected Required annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:129:7: Unexpected NotRequired annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_kwargs.toml b/conformance/results/pycroscope/typeddicts_readonly_kwargs.toml index ff5101052..af09a4abb 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_kwargs.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_kwargs.toml @@ -1,6 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 33: Expected 1 errors """ output = """ +./typeddicts_readonly_kwargs.py:33:11: Cannot set readonly key 'key1' in TypedDict TypedDict({"key1": Readonly[int], "key2": Readonly[str]}) [readonly_typeddict] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_update.toml b/conformance/results/pycroscope/typeddicts_readonly_update.toml index c614899ef..4b5ec4d52 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_update.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_update.toml @@ -1,6 +1,8 @@ conformance_automated = "Fail" errors_diff = """ -Line 23: Expected 1 errors +Line 34: Unexpected errors ['./typeddicts_readonly_update.py:34:4: Cannot set readonly key \\'x\\' in TypedDict TypedDict({"x": Readonly[int], "y": int}) [readonly_typeddict]'] """ output = """ +./typeddicts_readonly_update.py:23:0: Cannot set readonly key 'x' in TypedDict TypedDict({"x": Readonly[int], "y": int}) [readonly_typeddict] +./typeddicts_readonly_update.py:34:4: Cannot set readonly key 'x' in TypedDict TypedDict({"x": Readonly[int], "y": int}) [readonly_typeddict] """ diff --git a/conformance/results/pycroscope/typeddicts_required.toml b/conformance/results/pycroscope/typeddicts_required.toml index 355a54a88..2e272b3b0 100644 --- a/conformance/results/pycroscope/typeddicts_required.toml +++ b/conformance/results/pycroscope/typeddicts_required.toml @@ -1,9 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 12: Expected 1 errors -Line 16: Expected 1 errors Line 59: Expected 1 errors Line 60: Expected 1 errors """ output = """ +./typeddicts_required.py:16:7: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_required.py:12:7: Unexpected Required annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_type_consistency.toml b/conformance/results/pycroscope/typeddicts_type_consistency.toml index 8e8077a94..ceb03071c 100644 --- a/conformance/results/pycroscope/typeddicts_type_consistency.toml +++ b/conformance/results/pycroscope/typeddicts_type_consistency.toml @@ -1,14 +1,14 @@ conformance_automated = "Fail" errors_diff = """ -Line 21: Expected 1 errors -Line 38: Expected 1 errors -Line 65: Expected 1 errors Line 69: Expected 1 errors Line 76: Expected 1 errors Line 77: Expected 1 errors Line 78: Expected 1 errors Line 82: Expected 1 errors -Line 126: Expected 1 errors """ output = """ +./typeddicts_type_consistency.py:21:0: Incompatible assignment: expected TypedDict({"x": int | None}), got TypedDict({"x": int}) [incompatible_assignment] +./typeddicts_type_consistency.py:38:0: Incompatible assignment: expected TypedDict({"x": NotRequired[int]}), got TypedDict({"x": int}) [incompatible_assignment] +./typeddicts_type_consistency.py:65:0: Incompatible assignment: expected TypedDict({"x": int, "y": int}), got TypedDict({"x": int}) [incompatible_assignment] +./typeddicts_type_consistency.py:126:0: Incompatible assignment: expected TypedDict({"outer_key": TypedDict({"inner_key": TypedDict({"inner_key": str})})}), got Literal[{'outer_key': {'inner_key': {'inner_key': 1}}}] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeforms_typeform.toml b/conformance/results/pycroscope/typeforms_typeform.toml index 607723755..e78dbce3c 100644 --- a/conformance/results/pycroscope/typeforms_typeform.toml +++ b/conformance/results/pycroscope/typeforms_typeform.toml @@ -1,22 +1,29 @@ conformance_automated = "Fail" errors_diff = """ -Line 23: Expected 1 errors -Line 24: Expected 1 errors -Line 55: Expected 1 errors -Line 56: Expected 1 errors -Line 57: Expected 1 errors -Line 58: Expected 1 errors Line 59: Expected 1 errors Line 60: Expected 1 errors -Line 61: Expected 1 errors -Line 62: Expected 1 errors -Line 63: Expected 1 errors -Line 64: Expected 1 errors -Line 65: Expected 1 errors -Line 76: Expected 1 errors -Line 78: Expected 1 errors -Line 88: Expected 1 errors -Line 98: Expected 1 errors +Line 1: Unexpected errors ['./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation]', './typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation]'] +Line 71: Unexpected errors ['./typeforms_typeform.py:71:12: Literal[str | None] is not equivalent to TypeForm[str | None]'] +Line 74: Unexpected errors ["./typeforms_typeform.py:74:12: Literal['list[int]'] is not equivalent to TypeForm[list[int]]"] """ output = """ +./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation] +./typeforms_typeform.py:23:0: Incompatible assignment: expected TypeForm[str | None], got Literal[str | int] [incompatible_assignment] +./typeforms_typeform.py:24:0: Incompatible assignment: expected TypeForm[str | None], got Literal[list[str | None]] [incompatible_assignment] +./typeforms_typeform.py:55:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[()] [incompatible_assignment] +./typeforms_typeform.py:56:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[(1, 2)] [incompatible_assignment] +./typeforms_typeform.py:57:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[1] [incompatible_assignment] +./typeforms_typeform.py:58:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Self] [incompatible_assignment] +./typeforms_typeform.py:61:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.ClassVar[int]] [incompatible_assignment] +./typeforms_typeform.py:62:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Final[int]] [incompatible_assignment] +./typeforms_typeform.py:63:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Unpack[Ts]] [incompatible_assignment] +./typeforms_typeform.py:64:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Optional] [incompatible_assignment] +./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation] +./typeforms_typeform.py:65:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal['int + str'] [incompatible_assignment] +./typeforms_typeform.py:71:12: Literal[str | None] is not equivalent to TypeForm[str | None] +./typeforms_typeform.py:74:12: Literal['list[int]'] is not equivalent to TypeForm[list[int]] +./typeforms_typeform.py:76:5: Unrecognized annotation type [invalid_annotation] +./typeforms_typeform.py:78:5: Unrecognized annotation type [invalid_annotation] +./typeforms_typeform.py:88:0: Incompatible assignment: expected TypeForm[str], got TypeForm[int] [incompatible_assignment] +./typeforms_typeform.py:98:0: Incompatible assignment: expected TypeForm[str], got type[int] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 608a3a1c6..093ce92b0 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -239,7 +239,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown      specialtypes_never Pass @@ -260,7 +260,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      specialtypes_type
Partial

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

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

@@ -347,7 +347,7 @@

Python Type System Conformance Test Results

Pass
Partial

Doesn't allow accessing `Self` in a classmethod

Pass*

Treats attributes not initialized on the class as instance-only

-Pass +Unknown      generics_self_attributes Pass @@ -438,14 +438,14 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown      generics_typevartuple_overloads Pass Pass Pass Pass -Pass +Unknown      generics_typevartuple_specialization
Partial

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

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

@@ -660,7 +660,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown      protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

@@ -674,7 +674,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown      protocols_subtyping Pass @@ -812,7 +812,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Some error suppressing context managers are not detected

-Pass +Unknown Dataclasses @@ -822,7 +822,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

* Assumes descriptor behavior only when field is assigned in class body

* Doesn't allow non-data descriptors or data descriptors with differing `__get__` and `__set__` types

-Pass +Unknown      dataclasses_final
Partial

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

Doesn't support Final nested inside ClassVar.

@@ -979,14 +979,14 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_readonly_consistency Pass Pass Pass Pass -Unknown +Pass      typeddicts_readonly_inheritance
Partial

Incorrectly rejects non-ReadOnly override of ReadOnly item.

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

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

@@ -1000,7 +1000,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_readonly_update
Partial

Incorrectly allows update of ReadOnly item.

Incorrectly rejects update involving an item with Never type.

@@ -1069,14 +1069,14 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      namedtuples_type_compat Pass Pass Pass Pass -Unknown +Pass      namedtuples_usage
Partial

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

@@ -1155,14 +1155,14 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      directives_cast Pass Pass Pass Pass -Unknown +Pass      directives_deprecated Pass @@ -1176,42 +1176,42 @@

Python Type System Conformance Test Results

Pass*

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

Pass Pass -Unknown +Pass      directives_reveal_type Pass Pass Pass Pass -Unknown +Pass      directives_type_checking Pass Pass Pass Pass -Pass +Unknown      directives_type_ignore
Partial

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

Pass
Partial

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

Pass -Pass +Unknown      directives_type_ignore_file1 Pass Pass Pass Pass -Pass +Unknown      directives_type_ignore_file2 Pass Pass Pass Pass -Unknown +Pass      directives_version_platform
Pass*

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

Does not understand os.name checks.

diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 3e6b4e52b..537d8d44c 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -387,6 +387,7 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: ] proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") lines = proc.stderr.splitlines() + print("\n".join(lines)) # Add results to a dictionary keyed by the file name. results_dict: dict[str, str] = {} From a36a65fe2d5c5affbc9ffa76020b330c7b6a719e Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 09:59:12 -0800 Subject: [PATCH 09/78] improvements --- .../results/pycroscope/aliases_explicit.toml | 4 +- .../results/pycroscope/aliases_implicit.toml | 18 ++++----- .../pycroscope/aliases_typealiastype.toml | 8 ++-- .../pycroscope/annotations_forward_refs.toml | 12 +++--- .../pycroscope/callables_annotation.toml | 10 ++--- .../pycroscope/dataclasses_kwonly.toml | 4 +- .../pycroscope/dataclasses_match_args.toml | 4 +- .../pycroscope/directives_no_type_check.toml | 2 +- .../generics_syntax_declarations.toml | 6 +-- .../pycroscope/generics_syntax_scoping.toml | 4 +- .../generics_typevartuple_args.toml | 12 +++--- .../generics_typevartuple_callable.toml | 4 +- .../generics_typevartuple_specialization.toml | 38 +++++++++---------- .../results/pycroscope/generics_variance.toml | 2 +- .../pycroscope/literals_semantics.toml | 6 +-- .../results/pycroscope/protocols_generic.toml | 4 +- .../pycroscope/qualifiers_annotated.toml | 4 +- .../qualifiers_final_annotation.toml | 14 +++---- .../results/pycroscope/specialtypes_type.toml | 4 +- .../pycroscope/tuples_type_compat.toml | 28 +++++++------- .../pycroscope/typeddicts_extra_items.toml | 8 ++-- .../pycroscope/typeddicts_required.toml | 2 +- .../pycroscope/typeforms_typeform.toml | 2 +- conformance/src/type_checker.py | 23 ++++++++--- 24 files changed, 118 insertions(+), 105 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 6c9a04261..2df13f028 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -28,8 +28,6 @@ Line 59: Unexpected errors ['./aliases_explicit.py:59:16: int | str | list[lis Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None'] """ output = """ -./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:36:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:38:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:52:16: list[int] | Any[error] is not equivalent to list[int] @@ -40,6 +38,8 @@ output = """ ./aliases_explicit.py:57:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None ./aliases_explicit.py:59:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None ./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None +./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:82:29: Variable i is never accessed [unused_variable] ./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 33ff6bc8d..7b048f19e 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -28,15 +28,6 @@ Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list Line 131: Unexpected errors ['./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int]'] """ output = """ -./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:78:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] -./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] -./aliases_implicit.py:109:8: Unrecognized annotation [invalid_annotation] -./aliases_implicit.py:110:8: Invalid type annotation {'a': 'b'} [invalid_annotation] -./aliases_implicit.py:114:8: Invalid type annotation 3 [invalid_annotation] -./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] -./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] ./aliases_implicit.py:49:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:51:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:57:9: Unrecognized annotation types.GenericAlias [invalid_annotation] @@ -49,9 +40,18 @@ output = """ ./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None ./aliases_implicit.py:71:16: list[bool] | Any[error] is not equivalent to list[bool] ./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None +./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:78:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:81:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:92:25: Variable i is never accessed [unused_variable] ./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] +./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] +./aliases_implicit.py:109:8: Unrecognized annotation [invalid_annotation] +./aliases_implicit.py:110:8: Invalid type annotation {'a': 'b'} [invalid_annotation] +./aliases_implicit.py:114:8: Invalid type annotation 3 [invalid_annotation] +./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] +./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] ./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int] ./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index 92a46529c..d9d9c26af 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -19,19 +19,19 @@ Line 62: Expected 1 errors Line 64: Expected 1 errors Line 66: Expected 1 errors Line 35: Unexpected errors ['./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation]'] -Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]", './aliases_typealiastype.py:39:0: Traceback (most recent call last):'] Line 36: Unexpected errors ['./aliases_typealiastype.py:36:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 37: Unexpected errors ['./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 38: Unexpected errors ['./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]", './aliases_typealiastype.py:39:0: Traceback (most recent call last):'] """ output = """ -./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation] -./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] -./aliases_typealiastype.py:39:0: Traceback (most recent call last): ./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] +./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation] ./aliases_typealiastype.py:36:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] +./aliases_typealiastype.py:39:0: Traceback (most recent call last): ./aliases_typealiastype.py:40:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:55:50: Variable i is never accessed [unused_variable] ./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 11f943db9..4212df196 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -17,17 +17,17 @@ Line 54: Expected 1 errors Line 55: Expected 1 errors Line 1: Unexpected errors ['./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]'] Line 40: Unexpected errors ['./annotations_forward_refs.py:40:0: Traceback (most recent call last):'] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] Line 103: Unexpected errors ['./annotations_forward_refs.py:103:7: Syntax error in type annotation: '] -Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] """ output = """ ./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:40:0: Traceback (most recent call last): ./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] -./annotations_forward_refs.py:40:0: Traceback (most recent call last): -./annotations_forward_refs.py:103:7: Syntax error in type annotation: -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] -./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:103:7: Syntax error in type annotation: """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 5e811cf16..1a1820339 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -15,25 +15,25 @@ Line 186: Unexpected errors ['./callables_annotation.py:186:4: Traceback (most r Line 188: Unexpected errors ['./callables_annotation.py:188:4: Traceback (most recent call last):'] """ output = """ -./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:90:0: Traceback (most recent call last): -./callables_annotation.py:92:0: Traceback (most recent call last): ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] ./callables_annotation.py:26:10: Incompatible argument type for @1: expected str but got Literal[2] [incompatible_argument] ./callables_annotation.py:27:4: Takes 2 positional arguments but 3 were given [incompatible_call] ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] +./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] +./callables_annotation.py:90:0: Traceback (most recent call last): ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '/Users/jelle/py/typing/conformance/tests/callables_annotation.py.test_cb2' [incompatible_assignment] +./callables_annotation.py:92:0: Traceback (most recent call last): ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '/Users/jelle/py/typing/conformance/tests/callables_annotation.py.test_cb4' [incompatible_assignment] ./callables_annotation.py:151:4: Traceback (most recent call last): ./callables_annotation.py:152:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] ./callables_annotation.py:156:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] ./callables_annotation.py:157:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:159:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto5[Any[explicit]], got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:175:4: Traceback (most recent call last): ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:175:4: Traceback (most recent call last): ./callables_annotation.py:186:4: Traceback (most recent call last): -./callables_annotation.py:188:4: Traceback (most recent call last): ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] +./callables_annotation.py:188:4: Traceback (most recent call last): ./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_kwonly.toml b/conformance/results/pycroscope/dataclasses_kwonly.toml index 8e7369d85..c19ae331d 100644 --- a/conformance/results/pycroscope/dataclasses_kwonly.toml +++ b/conformance/results/pycroscope/dataclasses_kwonly.toml @@ -3,8 +3,8 @@ errors_diff = """ Line 23: Expected 1 errors Line 38: Expected 1 errors Line 53: Expected 1 errors -Line 13: Unexpected errors ['./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation]'] +Line 13: Unexpected errors ['./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation]'] """ output = """ -./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation] +./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml index 843d07800..e25297547 100644 --- a/conformance/results/pycroscope/dataclasses_match_args.toml +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -1,14 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 42: Expected 1 errors -Line 15: Unexpected errors ['./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation]'] +Line 15: Unexpected errors ['./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation]'] Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Any[from_another] is not equivalent to tuple[]'] """ output = """ -./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation] +./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation] ./dataclasses_match_args.py:18:12: Any[from_another] is not equivalent to tuple[Literal['x']] ./dataclasses_match_args.py:26:12: Any[from_another] is not equivalent to tuple[Literal['x']] ./dataclasses_match_args.py:34:12: Any[from_another] is not equivalent to tuple[Literal['x']] diff --git a/conformance/results/pycroscope/directives_no_type_check.toml b/conformance/results/pycroscope/directives_no_type_check.toml index 5c0db1007..d9804fa73 100644 --- a/conformance/results/pycroscope/directives_no_type_check.toml +++ b/conformance/results/pycroscope/directives_no_type_check.toml @@ -4,8 +4,8 @@ errors_diff = """ output = """ ./directives_no_type_check.py:15:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] ./directives_no_type_check.py:25:8: Unsupported operands for addition: int and str [unsupported_operation] -./directives_no_type_check.py:26:4: Incompatible return type: expected None, got Literal[1] [incompatible_return_value] ./directives_no_type_check.py:25:4: Variable c is never accessed [unused_variable] +./directives_no_type_check.py:26:4: Incompatible return type: expected None, got Literal[1] [incompatible_return_value] ./directives_no_type_check.py:29:6: Incompatible argument type for a: expected int but got Literal[b'invalid'] [incompatible_argument] ./directives_no_type_check.py:29:18: Incompatible argument type for b: expected str but got Literal[b'arguments'] [incompatible_argument] ./directives_no_type_check.py:32:0: Missing required argument 'a' [incompatible_call] diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index f0a618032..694eca53b 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -11,11 +11,11 @@ Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:13: Cannot res """ output = """ ./generics_syntax_declarations.py:13:0: Traceback (most recent call last): -./generics_syntax_declarations.py:48:13: Invalid type annotation [, ] [invalid_annotation] -./generics_syntax_declarations.py:71:13: Invalid type annotation (, ) [invalid_annotation] -./generics_syntax_declarations.py:75:13: Invalid type annotation 3 [invalid_annotation] ./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] ./generics_syntax_declarations.py:39:39: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_declarations.py:48:13: Invalid type annotation [, ] [invalid_annotation] ./generics_syntax_declarations.py:56:13: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_declarations.py:71:13: Invalid type annotation (, ) [invalid_annotation] +./generics_syntax_declarations.py:75:13: Invalid type annotation 3 [invalid_annotation] ./generics_syntax_declarations.py:79:22: Undefined name: S [undefined_name] """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index a2dad8c7e..5c67421be 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -7,17 +7,17 @@ Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors Line 38: Unexpected errors ['./generics_syntax_scoping.py:38:0: Traceback (most recent call last):'] -Line 81: Unexpected errors ['./generics_syntax_scoping.py:81:0: Traceback (most recent call last):'] Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] +Line 81: Unexpected errors ['./generics_syntax_scoping.py:81:0: Traceback (most recent call last):'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] Line 121: Unexpected errors ['./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int'] Line 124: Unexpected errors ['./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int'] """ output = """ ./generics_syntax_scoping.py:38:0: Traceback (most recent call last): -./generics_syntax_scoping.py:81:0: Traceback (most recent call last): ./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] +./generics_syntax_scoping.py:81:0: Traceback (most recent call last): ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] ./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int ./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index aa1927875..9823ecab1 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -9,22 +9,22 @@ Line 59: Expected 1 errors Line 67: Expected 1 errors Line 76: Expected 1 errors Line 16: Unexpected errors ["./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] +Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] Line 27: Unexpected errors ["./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[]'] +Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] Line 42: Unexpected errors ["./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation]"] Line 51: Unexpected errors ["./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] Line 62: Unexpected errors ["./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] -Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] -Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[]'] -Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] """ output = """ ./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] ./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[] +./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] ./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation] ./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] ./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] -./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[] -./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] ./generics_typevartuple_args.py:75:0: Incompatible argument type for args: expected tuple[tuple[Any[explicit]], ...] but got tuple[Literal[(0,)], Literal[(1, 2)]] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 488885705..bf2113047 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,14 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 26: Expected 1 errors -Line 45: Unexpected errors ["./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int]'] Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str]'] +Line 45: Unexpected errors ["./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ -./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] ./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int] ./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str] +./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] ./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index f755e9103..3ed20643e 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -6,25 +6,25 @@ Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 92: Unexpected errors ['./generics_typevartuple_specialization.py:92:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:92:41: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 134: Unexpected errors ['./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 147: Unexpected errors ['./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 46: Unexpected errors ['./generics_typevartuple_specialization.py:46:16: Any[error] is not equivalent to tuple[int, float | int, bool]'] Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]]'] +Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 51: Unexpected errors ['./generics_typevartuple_specialization.py:51:16: Any[error] is not equivalent to tuple[int]'] Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]]'] +Line 92: Unexpected errors ['./generics_typevartuple_specialization.py:92:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:92:41: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 93: Unexpected errors ['./generics_typevartuple_specialization.py:93:16: Any[error] is not equivalent to tuple[str, int]'] Line 94: Unexpected errors ['./generics_typevartuple_specialization.py:94:16: Any[error] is not equivalent to tuple[float | int]'] Line 95: Unexpected errors ['./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]]'] +Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 134: Unexpected errors ['./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] +Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 147: Unexpected errors ['./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool, float | int]'] Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] +Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 157: Unexpected errors ['./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int]'] Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] @@ -32,33 +32,33 @@ Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: output = """ ./generics_typevartuple_specialization.py:45:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:46:16: Any[error] is not equivalent to tuple[int, float | int, bool] +./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]] ./generics_typevartuple_specialization.py:50:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:51:16: Any[error] is not equivalent to tuple[int] +./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]] ./generics_typevartuple_specialization.py:92:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:92:41: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:93:16: Any[error] is not equivalent to tuple[str, int] +./generics_typevartuple_specialization.py:94:16: Any[error] is not equivalent to tuple[float | int] +./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool] +./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str], bool, float | int] +./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str, bool], float | int, int] ./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool, float | int] +./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[bool], str, float | int, int] ./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:46:16: Any[error] is not equivalent to tuple[int, float | int, bool] -./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]] -./generics_typevartuple_specialization.py:51:16: Any[error] is not equivalent to tuple[int] -./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]] -./generics_typevartuple_specialization.py:93:16: Any[error] is not equivalent to tuple[str, int] -./generics_typevartuple_specialization.py:94:16: Any[error] is not equivalent to tuple[float | int] -./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]] -./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool] -./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str], bool, float | int] -./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str, bool], float | int, int] -./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool, float | int] -./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[bool], str, float | int, int] ./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int] ./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] ./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index faa444479..1f9896bd2 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -15,7 +15,7 @@ Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') Line 45: Unexpected errors ['./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation]', './generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation]'] """ output = """ +./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] ./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] ./generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation] -./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] """ diff --git a/conformance/results/pycroscope/literals_semantics.toml b/conformance/results/pycroscope/literals_semantics.toml index 070738801..3281bcf48 100644 --- a/conformance/results/pycroscope/literals_semantics.toml +++ b/conformance/results/pycroscope/literals_semantics.toml @@ -1,15 +1,15 @@ conformance_automated = "Fail" errors_diff = """ -Line 32: Unexpected errors ['./literals_semantics.py:32:4: Variable c is never accessed [unused_variable]'] Line 31: Unexpected errors ['./literals_semantics.py:31:4: Variable b is never accessed [unused_variable]'] +Line 32: Unexpected errors ['./literals_semantics.py:32:4: Variable c is never accessed [unused_variable]'] Line 40: Unexpected errors ['./literals_semantics.py:40:4: Assigned value of a is never accessed [unused_assignment]'] """ output = """ ./literals_semantics.py:10:0: Incompatible assignment: expected Literal[3], got Literal[4] [incompatible_assignment] ./literals_semantics.py:24:4: Incompatible assignment: expected Literal[False], got Literal[0] [incompatible_assignment] ./literals_semantics.py:25:4: Incompatible assignment: expected Literal[0], got Literal[False] [incompatible_assignment] -./literals_semantics.py:33:4: Assigned value of a is never accessed [unused_assignment] -./literals_semantics.py:32:4: Variable c is never accessed [unused_variable] ./literals_semantics.py:31:4: Variable b is never accessed [unused_variable] +./literals_semantics.py:32:4: Variable c is never accessed [unused_variable] +./literals_semantics.py:33:4: Assigned value of a is never accessed [unused_assignment] ./literals_semantics.py:40:4: Assigned value of a is never accessed [unused_assignment] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 5cf198654..1a3a1610f 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -11,7 +11,7 @@ Line 27: Unexpected errors ['./protocols_generic.py:27:4: Function may exit with Line 50: Unexpected errors ['./protocols_generic.py:50:4: Function may exit without returning a value [missing_return]'] Line 65: Unexpected errors ['./protocols_generic.py:65:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[float | int] [incompatible_assignment]'] Line 79: Unexpected errors ['./protocols_generic.py:79:4: Function may exit without returning a value [missing_return]'] -Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent'] +Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent'] Line 101: Unexpected errors ['./protocols_generic.py:101:4: Function may exit without returning a value [missing_return]'] Line 104: Unexpected errors ['./protocols_generic.py:104:4: Function may exit without returning a value [missing_return]'] """ @@ -23,7 +23,7 @@ output = """ ./protocols_generic.py:65:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] ./protocols_generic.py:75:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.AttrProto[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] ./protocols_generic.py:79:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent +./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent ./protocols_generic.py:101:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:104:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:146:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.HasPropertyProto (Protocol with members 'm', 'f'), got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 81cf431c3..656ac2d79 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -16,11 +16,11 @@ Line 108: Unexpected errors ['./qualifiers_annotated.py:108:7: Unexpected NotReq """ output = """ ./qualifiers_annotated.py:38:6: Invalid type annotation [, ] [invalid_annotation] +./qualifiers_annotated.py:40:25: Variable i is never accessed [unused_variable] ./qualifiers_annotated.py:41:6: Invalid type annotation {'a': 'b'} [invalid_annotation] +./qualifiers_annotated.py:45:16: Undefined name: var1 [undefined_name] ./qualifiers_annotated.py:46:6: Invalid type annotation True [invalid_annotation] ./qualifiers_annotated.py:47:7: Invalid type annotation 1 [invalid_annotation] -./qualifiers_annotated.py:40:25: Variable i is never accessed [unused_variable] -./qualifiers_annotated.py:45:16: Undefined name: var1 [undefined_name] ./qualifiers_annotated.py:48:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./qualifiers_annotated.py:71:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml index 56d75882e..c20cf40ed 100644 --- a/conformance/results/pycroscope/qualifiers_final_annotation.toml +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -19,23 +19,23 @@ Line 168: Unexpected errors ["./qualifiers_final_annotation.py:168:0: Cannot imp """ output = """ ./qualifiers_final_annotation.py:18:6: Unrecognized annotation object [invalid_annotation] +./qualifiers_final_annotation.py:71:0: Cannot assign to final name RATE [incompatible_assignment] ./qualifiers_final_annotation.py:118:3: Unrecognized annotation typing.Final[] [invalid_annotation] ./qualifiers_final_annotation.py:121:13: Unexpected Final annotation [invalid_annotation] -./qualifiers_final_annotation.py:71:0: Cannot assign to final name RATE [incompatible_assignment] ./qualifiers_final_annotation.py:134:0: In call to pycroscope.signature.N: Missing required argument 'x' [incompatible_call] ./qualifiers_final_annotation.py:135:4: Incompatible argument type for x: expected int but got Literal[''] [incompatible_argument] ./qualifiers_final_annotation.py:135:10: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument] +./qualifiers_final_annotation.py:145:4: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:145:4: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:147:9: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:147:9: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:147:4: Variable a is never accessed [unused_variable] +./qualifiers_final_annotation.py:149:8: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:149:8: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:152:29: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:152:29: Cannot assign to final name x [incompatible_assignment] +./qualifiers_final_annotation.py:155:8: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:155:8: Cannot assign to final name x [incompatible_assignment] -./qualifiers_final_annotation.py:152:29: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:155:5: Variable a is never accessed [unused_variable] -./qualifiers_final_annotation.py:145:4: Assigned value of x is never accessed [unused_assignment] -./qualifiers_final_annotation.py:147:9: Assigned value of x is never accessed [unused_assignment] -./qualifiers_final_annotation.py:147:4: Variable a is never accessed [unused_variable] -./qualifiers_final_annotation.py:149:8: Assigned value of x is never accessed [unused_assignment] -./qualifiers_final_annotation.py:155:8: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import] """ diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index 5e2e3e50b..8352cd389 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -5,9 +5,9 @@ Line 76: Expected 1 errors Line 143: Expected 1 errors Line 144: Expected 1 errors Line 38: Unexpected errors ['./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] -Line 88: Unexpected errors ['./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment]'] Line 86: Unexpected errors ['./specialtypes_type.py:86:4: Assigned value of b is never accessed [unused_assignment]'] Line 87: Unexpected errors ['./specialtypes_type.py:87:4: Assigned value of a is never accessed [unused_assignment]'] +Line 88: Unexpected errors ['./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment]'] Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] Line 152: Unexpected errors ['./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation]'] @@ -17,9 +17,9 @@ Line 161: Unexpected errors ['./specialtypes_type.py:161:12: int | Any[generic output = """ ./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] -./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment] ./specialtypes_type.py:86:4: Assigned value of b is never accessed [unused_assignment] ./specialtypes_type.py:87:4: Assigned value of a is never accessed [unused_assignment] +./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment] ./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 4d8001caf..83d92bfab 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -7,15 +7,15 @@ Lines 101, 102: Expected exactly one error (tag 'func6_1') Lines 106, 107: Expected exactly one error (tag 'func6_2') Lines 111, 112: Expected exactly one error (tag 'func6_3') Line 24: Unexpected errors ['./tuples_type_compat.py:24:4: Variable v1 is never accessed [unused_variable]'] -Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable]'] Line 25: Unexpected errors ['./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable]'] +Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable]'] Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] Line 75: Unexpected errors ['./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int]'] Line 76: Unexpected errors ['./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] -Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] -Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] +Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] +Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] @@ -28,24 +28,24 @@ Line 153: Unexpected errors ['./tuples_type_compat.py:153:16: collections.abc. """ output = """ ./tuples_type_compat.py:15:4: Incompatible assignment: expected tuple[int, int], got tuple[float | int, complex | float | int] [incompatible_assignment] +./tuples_type_compat.py:24:4: Variable v1 is never accessed [unused_variable] +./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable] +./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable] ./tuples_type_compat.py:29:4: Incompatible assignment: expected tuple[int, *tuple[int, ...]], got tuple[int, ...] [incompatible_assignment] +./tuples_type_compat.py:29:4: Variable v2 is never accessed [unused_variable] ./tuples_type_compat.py:32:4: Incompatible assignment: expected tuple[int], got tuple[int, *tuple[int, ...]] [incompatible_assignment] -./tuples_type_compat.py:33:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:32:4: Variable v3 is never accessed [unused_variable] +./tuples_type_compat.py:33:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:33:4: Variable v3 is never accessed [unused_variable] -./tuples_type_compat.py:24:4: Variable v1 is never accessed [unused_variable] -./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable] -./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable] -./tuples_type_compat.py:29:4: Variable v2 is never accessed [unused_variable] ./tuples_type_compat.py:43:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment] ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] ./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] -./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] -./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] +./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] +./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] ./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml index 84a19138a..42024c3ea 100644 --- a/conformance/results/pycroscope/typeddicts_extra_items.toml +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -27,11 +27,11 @@ Lines 91, 92: Expected error (tag 'MovieC') Lines 94, 95: Expected error (tag 'MovieD') Lines 184, 185: Expected error (tag 'MovieRequiredYear') Lines 196, 197: Expected error (tag 'BookWithPublisher') -Line 140: Unexpected errors ['./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation]'] -Line 141: Unexpected errors ['./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation]'] Line 19: Unexpected errors ["./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call]"] Line 28: Unexpected errors ['./typeddicts_extra_items.py:28:16: Any[from_another] is not equivalent to str'] Line 29: Unexpected errors ['./typeddicts_extra_items.py:29:16: Any[from_another] is not equivalent to bool'] +Line 140: Unexpected errors ['./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation]'] +Line 141: Unexpected errors ['./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation]'] Line 191: Unexpected errors ['./typeddicts_extra_items.py:191:10: Unexpected NotRequired annotation [invalid_annotation]'] Line 212: Unexpected errors ['./typeddicts_extra_items.py:212:10: Unexpected NotRequired annotation [invalid_annotation]'] Line 233: Unexpected errors ['./typeddicts_extra_items.py:233:10: Unexpected NotRequired annotation [invalid_annotation]'] @@ -41,11 +41,11 @@ Line 323: Unexpected errors ['./typeddicts_extra_items.py:323:9: Unexpected NotR Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[from_another] is not equivalent to tuple[str, int]'] """ output = """ -./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation] -./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation] ./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call] ./typeddicts_extra_items.py:28:16: Any[from_another] is not equivalent to str ./typeddicts_extra_items.py:29:16: Any[from_another] is not equivalent to bool +./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation] +./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation] ./typeddicts_extra_items.py:188:10: Unexpected NotRequired annotation [invalid_annotation] ./typeddicts_extra_items.py:191:10: Unexpected NotRequired annotation [invalid_annotation] ./typeddicts_extra_items.py:212:10: Unexpected NotRequired annotation [invalid_annotation] diff --git a/conformance/results/pycroscope/typeddicts_required.toml b/conformance/results/pycroscope/typeddicts_required.toml index 2e272b3b0..beb18fdb5 100644 --- a/conformance/results/pycroscope/typeddicts_required.toml +++ b/conformance/results/pycroscope/typeddicts_required.toml @@ -4,6 +4,6 @@ Line 59: Expected 1 errors Line 60: Expected 1 errors """ output = """ -./typeddicts_required.py:16:7: Unexpected NotRequired annotation [invalid_annotation] ./typeddicts_required.py:12:7: Unexpected Required annotation [invalid_annotation] +./typeddicts_required.py:16:7: Unexpected NotRequired annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeforms_typeform.toml b/conformance/results/pycroscope/typeforms_typeform.toml index e78dbce3c..f554fe353 100644 --- a/conformance/results/pycroscope/typeforms_typeform.toml +++ b/conformance/results/pycroscope/typeforms_typeform.toml @@ -8,6 +8,7 @@ Line 74: Unexpected errors ["./typeforms_typeform.py:74:12: Literal['list[int] """ output = """ ./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation] +./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation] ./typeforms_typeform.py:23:0: Incompatible assignment: expected TypeForm[str | None], got Literal[str | int] [incompatible_assignment] ./typeforms_typeform.py:24:0: Incompatible assignment: expected TypeForm[str | None], got Literal[list[str | None]] [incompatible_assignment] ./typeforms_typeform.py:55:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[()] [incompatible_assignment] @@ -18,7 +19,6 @@ output = """ ./typeforms_typeform.py:62:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Final[int]] [incompatible_assignment] ./typeforms_typeform.py:63:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Unpack[Ts]] [incompatible_assignment] ./typeforms_typeform.py:64:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Optional] [incompatible_assignment] -./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation] ./typeforms_typeform.py:65:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal['int + str'] [incompatible_assignment] ./typeforms_typeform.py:71:12: Literal[str | None] is not equivalent to TypeForm[str | None] ./typeforms_typeform.py:74:12: Literal['list[int]'] is not equivalent to TypeForm[list[int]] diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 537d8d44c..5ee68d7d2 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -376,6 +376,12 @@ def get_version(self) -> str: proc = run(["pycroscope", "--version"], stdout=PIPE, text=True) return proc.stdout.strip() + @staticmethod + def _normalize_output_line(line: str) -> str: + # Pycroscope can include object reprs with process-specific addresses + # (e.g. "... at 0x10abc1234>"). Normalize these for stable snapshots. + return re.sub(r"0x[0-9a-fA-F]+", "0x...", line) + def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: command = [ "pycroscope", @@ -387,21 +393,27 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: ] proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") lines = proc.stderr.splitlines() - print("\n".join(lines)) - # Add results to a dictionary keyed by the file name. - results_dict: dict[str, str] = {} + # Collect results per file and sort for deterministic output. + sortable_results: dict[str, list[tuple[int, str, str]]] = {} for line in lines: if not line.strip(): continue + line = self._normalize_output_line(line) # Concise output line format: # file.py:12:3: Message text [error_code] - match = re.match(r"^(.+?):(\d+)(?::\d+)?:\s", line) + match = re.match(r"^(.+?):(\d+)(?::\d+)?:\s(.*)$", line) if not match: continue file_name = Path(match.group(1)).name - results_dict[file_name] = results_dict.get(file_name, "") + line + "\n" + lineno = int(match.group(2)) + message = match.group(3) + sortable_results.setdefault(file_name, []).append((lineno, message, line)) + results_dict: dict[str, str] = {} + for file_name, entries in sortable_results.items(): + entries.sort(key=lambda item: (item[0], item[1])) + results_dict[file_name] = "".join(f"{line}\n" for _, _, line in entries) return results_dict def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: @@ -409,6 +421,7 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: for line in output: if not line.strip(): continue + line = self._normalize_output_line(line) # reveal_type diagnostics are informational for conformance purposes. if "[reveal_type]" in line or "Revealed type is " in line: continue From 81dc8d2caed1165ad4131d86767e5559a90a9360 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 10:02:04 -0800 Subject: [PATCH 10/78] clean up more --- .../pycroscope/annotations_generators.toml | 12 ++-- .../pycroscope/annotations_methods.toml | 2 +- .../pycroscope/callables_annotation.toml | 18 +++--- .../results/pycroscope/callables_kwargs.toml | 16 ++--- .../pycroscope/callables_subtyping.toml | 62 +++++++++---------- .../pycroscope/constructors_call_type.toml | 4 +- .../pycroscope/directives_reveal_type.toml | 2 +- .../results/pycroscope/enums_expansion.toml | 8 +-- .../generics_defaults_referential.toml | 40 ++++++------ .../generics_paramspec_components.toml | 2 +- .../pycroscope/generics_self_protocols.toml | 2 +- .../generics_variance_inference.toml | 8 +-- .../pycroscope/narrowing_typeguard.toml | 4 +- .../results/pycroscope/narrowing_typeis.toml | 10 +-- .../pycroscope/overloads_definitions.toml | 2 +- .../results/pycroscope/protocols_generic.toml | 14 ++--- .../pycroscope/tuples_type_compat.toml | 8 +-- conformance/src/type_checker.py | 3 + 18 files changed, 110 insertions(+), 107 deletions(-) diff --git a/conformance/results/pycroscope/annotations_generators.toml b/conformance/results/pycroscope/annotations_generators.toml index 2baa3e658..dc1bfd192 100644 --- a/conformance/results/pycroscope/annotations_generators.toml +++ b/conformance/results/pycroscope/annotations_generators.toml @@ -10,19 +10,19 @@ Line 174: Unexpected errors ['./annotations_generators.py:174:4: Must use collec Line 190: Unexpected errors ['./annotations_generators.py:190:4: Cannot assign value of type None to yield expression of type int [incompatible_yield]'] """ output = """ -./annotations_generators.py:54:8: Incompatible return type: expected /Users/jelle/py/typing/conformance/tests/annotations_generators.py.C, got Literal[False] [incompatible_return_value] -./annotations_generators.py:57:8: Cannot assign value of type Literal[3] to yield expression of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.A [incompatible_yield] -./annotations_generators.py:66:8: Cannot assign value of type Literal[3] to yield expression of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:54:8: Incompatible return type: expected .../tests/annotations_generators.py.C, got Literal[False] [incompatible_return_value] +./annotations_generators.py:57:8: Cannot assign value of type Literal[3] to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:66:8: Cannot assign value of type Literal[3] to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] ./annotations_generators.py:71:4: Incompatible return type: expected None, got Literal[True] [incompatible_return_value] -./annotations_generators.py:75:4: Cannot assign value of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.B to yield expression of type /Users/jelle/py/typing/conformance/tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:75:4: Cannot assign value of type .../tests/annotations_generators.py.B to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] ./annotations_generators.py:86:20: Generator function must return an iterable [generator_return] ./annotations_generators.py:91:26: Async generator function must return an async iterable [generator_return] ./annotations_generators.py:96:4: Function may exit without returning a value [missing_return] ./annotations_generators.py:100:21: Generator function must return an iterable [generator_return] ./annotations_generators.py:105:4: Function may exit without returning a value [missing_return] ./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return] -./annotations_generators.py:118:4: Cannot yield from collections.abc.Iterator[/Users/jelle/py/typing/conformance/tests/annotations_generators.py.A] (expected /Users/jelle/py/typing/conformance/tests/annotations_generators.py.B) [incompatible_yield] -./annotations_generators.py:119:4: Cannot yield from Literal[[1]] (expected /Users/jelle/py/typing/conformance/tests/annotations_generators.py.B) [incompatible_yield] +./annotations_generators.py:118:4: Cannot yield from collections.abc.Iterator[.../tests/annotations_generators.py.A] (expected .../tests/annotations_generators.py.B) [incompatible_yield] +./annotations_generators.py:119:4: Cannot yield from Literal[[1]] (expected .../tests/annotations_generators.py.B) [incompatible_yield] ./annotations_generators.py:135:4: Cannot send int to a generator (expected str) [incompatible_yield] ./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] ./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] diff --git a/conformance/results/pycroscope/annotations_methods.toml b/conformance/results/pycroscope/annotations_methods.toml index 8e4662c72..884e56afa 100644 --- a/conformance/results/pycroscope/annotations_methods.toml +++ b/conformance/results/pycroscope/annotations_methods.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./annotations_methods.py:42:12: /Users/jelle/py/typing/conformance/tests/annotations_methods.py.B is not equivalent to /Users/jelle/py/typing/conformance/tests/annotations_methods.py.A +./annotations_methods.py:42:12: .../tests/annotations_methods.py.B is not equivalent to .../tests/annotations_methods.py.A """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 1a1820339..9e4a6b12b 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -7,9 +7,9 @@ Line 59: Expected 1 errors Line 90: Unexpected errors ['./callables_annotation.py:90:0: Traceback (most recent call last):'] Line 92: Unexpected errors ['./callables_annotation.py:92:0: Traceback (most recent call last):'] Line 151: Unexpected errors ['./callables_annotation.py:151:4: Traceback (most recent call last):'] -Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] -Line 156: Unexpected errors ["./callables_annotation.py:156:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]"] -Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] +Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] +Line 156: Unexpected errors ["./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]"] +Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] Line 175: Unexpected errors ['./callables_annotation.py:175:4: Traceback (most recent call last):'] Line 186: Unexpected errors ['./callables_annotation.py:186:4: Traceback (most recent call last):'] Line 188: Unexpected errors ['./callables_annotation.py:188:4: Traceback (most recent call last):'] @@ -22,14 +22,14 @@ output = """ ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] ./callables_annotation.py:90:0: Traceback (most recent call last): -./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '/Users/jelle/py/typing/conformance/tests/callables_annotation.py.test_cb2' [incompatible_assignment] +./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb2' [incompatible_assignment] ./callables_annotation.py:92:0: Traceback (most recent call last): -./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '/Users/jelle/py/typing/conformance/tests/callables_annotation.py.test_cb4' [incompatible_assignment] +./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb4' [incompatible_assignment] ./callables_annotation.py:151:4: Traceback (most recent call last): -./callables_annotation.py:152:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] -./callables_annotation.py:156:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] -./callables_annotation.py:157:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:159:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto5[Any[explicit]], got /Users/jelle/py/typing/conformance/tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] +./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] +./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:159:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto5[Any[explicit]], got .../tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:175:4: Traceback (most recent call last): ./callables_annotation.py:186:4: Traceback (most recent call last): diff --git a/conformance/results/pycroscope/callables_kwargs.toml b/conformance/results/pycroscope/callables_kwargs.toml index 696fc0445..2db8aab2f 100644 --- a/conformance/results/pycroscope/callables_kwargs.toml +++ b/conformance/results/pycroscope/callables_kwargs.toml @@ -5,15 +5,15 @@ Line 122: Expected 1 errors Line 134: Expected 1 errors """ output = """ -./callables_kwargs.py:46:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] -./callables_kwargs.py:51:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] -./callables_kwargs.py:52:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] +./callables_kwargs.py:46:4: In call to .../tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] +./callables_kwargs.py:51:4: In call to .../tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] +./callables_kwargs.py:52:4: In call to .../tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] ./callables_kwargs.py:58:4: Incompatible argument type for v1: expected int but got str [incompatible_argument] -./callables_kwargs.py:61:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] +./callables_kwargs.py:61:4: In call to .../tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] ./callables_kwargs.py:63:4: Multiple values provided for argument 'v1' [incompatible_call] -./callables_kwargs.py:64:4: In call to /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] +./callables_kwargs.py:64:4: In call to .../tests/callables_kwargs.py.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] ./callables_kwargs.py:65:4: Multiple values provided for argument 'v1' [incompatible_call] -./callables_kwargs.py:101:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.TDProtocol3 (Protocol with members '__call__'), got function '/Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1' [incompatible_assignment] -./callables_kwargs.py:102:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.TDProtocol4 (Protocol with members '__call__'), got function '/Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1' [incompatible_assignment] -./callables_kwargs.py:103:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_kwargs.py.TDProtocol5 (Protocol with members '__call__'), got function '/Users/jelle/py/typing/conformance/tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:101:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol3 (Protocol with members '__call__'), got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:102:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol4 (Protocol with members '__call__'), got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:103:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol5 (Protocol with members '__call__'), got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index 2b3f0c73e..b7f3920fd 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -6,44 +6,44 @@ Line 263: Unexpected errors ['./callables_subtyping.py:263:4: Function may exit Line 267: Unexpected errors ['./callables_subtyping.py:267:4: Function may exit without returning a value [missing_return]'] Line 288: Unexpected errors ['./callables_subtyping.py:288:4: Function may exit without returning a value [missing_return]'] Line 292: Unexpected errors ['./callables_subtyping.py:292:4: Function may exit without returning a value [missing_return]'] -Line 296: Unexpected errors ["./callables_subtyping.py:296:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment]"] +Line 296: Unexpected errors ["./callables_subtyping.py:296:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ ./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment] ./callables_subtyping.py:29:4: Incompatible assignment: expected (int, /) -> int, got (float | int, /) -> float | int [incompatible_assignment] -./callables_subtyping.py:51:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:52:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:55:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:58:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:82:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:85:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:86:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:116:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.PosOnly4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:119:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:120:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:122:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:124:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:125:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:126:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:151:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:154:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:155:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:187:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.KwOnly6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:190:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:191:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:193:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:195:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:196:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:197:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:236:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:237:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:240:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:243:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoX8 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:51:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:52:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:55:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:58:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:82:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:85:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:86:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:116:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:119:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:120:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:122:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:124:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:125:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:126:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:151:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:154:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:155:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:187:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:190:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:191:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:193:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:195:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:196:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:197:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:236:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:259:4: Function may exit without returning a value [missing_return] ./callables_subtyping.py:263:4: Function may exit without returning a value [missing_return] ./callables_subtyping.py:267:4: Function may exit without returning a value [missing_return] ./callables_subtyping.py:288:4: Function may exit without returning a value [missing_return] ./callables_subtyping.py:292:4: Function may exit without returning a value [missing_return] -./callables_subtyping.py:296:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:297:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got /Users/jelle/py/typing/conformance/tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:296:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_call_type.toml b/conformance/results/pycroscope/constructors_call_type.toml index a683183ef..17b748cd4 100644 --- a/conformance/results/pycroscope/constructors_call_type.toml +++ b/conformance/results/pycroscope/constructors_call_type.toml @@ -8,6 +8,6 @@ Line 81: Expected 1 errors Line 82: Expected 1 errors """ output = """ -./constructors_call_type.py:40:4: In call to /Users/jelle/py/typing/conformance/tests/constructors_call_type.py.Class2: Missing required argument 'x' [incompatible_call] -./constructors_call_type.py:50:4: In call to /Users/jelle/py/typing/conformance/tests/constructors_call_type.py.Class3: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:40:4: In call to .../tests/constructors_call_type.py.Class2: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:50:4: In call to .../tests/constructors_call_type.py.Class3: Missing required argument 'x' [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_reveal_type.toml b/conformance/results/pycroscope/directives_reveal_type.toml index 3d3faf573..419c4f6ec 100644 --- a/conformance/results/pycroscope/directives_reveal_type.toml +++ b/conformance/results/pycroscope/directives_reveal_type.toml @@ -5,7 +5,7 @@ output = """ ./directives_reveal_type.py:14:16: Revealed type is 'int | str' [reveal_type] ./directives_reveal_type.py:15:16: Revealed type is 'list[int]' [reveal_type] ./directives_reveal_type.py:16:16: Revealed type is 'Any[explicit]' [reveal_type] -./directives_reveal_type.py:17:16: Revealed type is '/Users/jelle/py/typing/conformance/tests/directives_reveal_type.py.ForwardReference' [reveal_type] +./directives_reveal_type.py:17:16: Revealed type is '.../tests/directives_reveal_type.py.ForwardReference' [reveal_type] ./directives_reveal_type.py:19:4: In call to typing.reveal_type: Missing required positional argument 'value' [incompatible_call] ./directives_reveal_type.py:20:4: In call to typing.reveal_type: Takes 1 positional arguments but 2 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/enums_expansion.toml b/conformance/results/pycroscope/enums_expansion.toml index 971e4daeb..86cf64aab 100644 --- a/conformance/results/pycroscope/enums_expansion.toml +++ b/conformance/results/pycroscope/enums_expansion.toml @@ -1,10 +1,10 @@ conformance_automated = "Fail" errors_diff = """ Line 53: Expected 1 errors -Line 52: Unexpected errors ['./enums_expansion.py:52:20: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags'] -Line 63: Unexpected errors ['./enums_expansion.py:63:24: Never is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags'] +Line 52: Unexpected errors ['./enums_expansion.py:52:20: Literal[] is not equivalent to .../tests/enums_expansion.py.CustomFlags'] +Line 63: Unexpected errors ['./enums_expansion.py:63:24: Never is not equivalent to .../tests/enums_expansion.py.CustomFlags'] """ output = """ -./enums_expansion.py:52:20: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags -./enums_expansion.py:63:24: Never is not equivalent to /Users/jelle/py/typing/conformance/tests/enums_expansion.py.CustomFlags +./enums_expansion.py:52:20: Literal[] is not equivalent to .../tests/enums_expansion.py.CustomFlags +./enums_expansion.py:63:24: Never is not equivalent to .../tests/enums_expansion.py.CustomFlags """ diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index c45c9f3f4..79e6fd002 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -7,26 +7,26 @@ Line 60: Expected 1 errors Line 68: Expected 1 errors Line 74: Expected 1 errors Line 78: Expected 1 errors -Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None]]"] -Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None]'] -Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, str, int | None]'] -Line 26: Unexpected errors ['./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, bool, complex | float | int]'] -Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[int, str]"] -Line 94: Unexpected errors ["./generics_defaults_referential.py:94:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]]"] -Line 95: Unexpected errors ['./generics_defaults_referential.py:95:12: Literal[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]]]'] -Line 96: Unexpected errors ['./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]]'] -Line 97: Unexpected errors ['./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[str]]'] -Line 98: Unexpected errors ['./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, str]'] +Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]]"] +Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None]'] +Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None]'] +Line 26: Unexpected errors ['./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, bool, complex | float | int]'] +Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str]"] +Line 94: Unexpected errors ["./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]]"] +Line 95: Unexpected errors ['./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]]'] +Line 96: Unexpected errors ['./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]]'] +Line 97: Unexpected errors ['./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[str]]'] +Line 98: Unexpected errors ['./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, str]'] """ output = """ -./generics_defaults_referential.py:23:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None]] -./generics_defaults_referential.py:24:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[int, int, int | None] -./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, str, int | None] -./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.slice[str, bool, complex | float | int] -./generics_defaults_referential.py:35:12: /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Foo[int, str] -./generics_defaults_referential.py:94:12: type '/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar' is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]] -./generics_defaults_referential.py:95:12: Literal[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[/Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]]] -./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[int]] -./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, list[str]] -./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to /Users/jelle/py/typing/conformance/tests/generics_defaults_referential.py.Bar[int, str] +./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]] +./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None] +./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None] +./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, bool, complex | float | int] +./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str] +./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]] +./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]] +./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]] +./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[str]] +./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, str] """ diff --git a/conformance/results/pycroscope/generics_paramspec_components.toml b/conformance/results/pycroscope/generics_paramspec_components.toml index 299f6518c..4657cbdfd 100644 --- a/conformance/results/pycroscope/generics_paramspec_components.toml +++ b/conformance/results/pycroscope/generics_paramspec_components.toml @@ -19,5 +19,5 @@ output = """ ./generics_paramspec_components.py:72:8: Missing required positional argument at position 0 [incompatible_call] ./generics_paramspec_components.py:82:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument] ./generics_paramspec_components.py:83:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument] -./generics_paramspec_components.py:98:0: In call to /Users/jelle/py/typing/conformance/tests/generics_paramspec_components.py.twice: Cannot resolve type variables [incompatible_call] +./generics_paramspec_components.py:98:0: In call to .../tests/generics_paramspec_components.py.twice: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_self_protocols.toml b/conformance/results/pycroscope/generics_self_protocols.toml index 7b1efabce..e46c6bbc3 100644 --- a/conformance/results/pycroscope/generics_self_protocols.toml +++ b/conformance/results/pycroscope/generics_self_protocols.toml @@ -5,5 +5,5 @@ Line 11: Unexpected errors ['./generics_self_protocols.py:11:4: Function may exi """ output = """ ./generics_self_protocols.py:11:4: Function may exit without returning a value [missing_return] -./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected /Users/jelle/py/typing/conformance/tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got /Users/jelle/py/typing/conformance/tests/generics_self_protocols.py.BadReturnType [incompatible_argument] +./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got .../tests/generics_self_protocols.py.BadReturnType [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_variance_inference.toml b/conformance/results/pycroscope/generics_variance_inference.toml index 3127b2d73..f8c852e85 100644 --- a/conformance/results/pycroscope/generics_variance_inference.toml +++ b/conformance/results/pycroscope/generics_variance_inference.toml @@ -21,10 +21,10 @@ Line 169: Expected 1 errors Line 170: Expected 1 errors Line 181: Expected 1 errors Line 194: Expected 1 errors -Line 29: Unexpected errors ['./generics_variance_inference.py:29:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, float | int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment]'] +Line 29: Unexpected errors ['./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment]'] """ output = """ -./generics_variance_inference.py:24:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] -./generics_variance_inference.py:28:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] -./generics_variance_inference.py:29:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, int, float | int], got /Users/jelle/py/typing/conformance/tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] +./generics_variance_inference.py:24:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] +./generics_variance_inference.py:28:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] +./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/narrowing_typeguard.toml b/conformance/results/pycroscope/narrowing_typeguard.toml index d1b81f0d6..901b98a9f 100644 --- a/conformance/results/pycroscope/narrowing_typeguard.toml +++ b/conformance/results/pycroscope/narrowing_typeguard.toml @@ -10,8 +10,8 @@ output = """ ./narrowing_typeguard.py:85:20: object is not equivalent to int ./narrowing_typeguard.py:102:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:107:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] -./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] +./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] ./narrowing_typeguard.py:132:4: Function may exit without returning a value [missing_return] ./narrowing_typeguard.py:136:4: Function may exit without returning a value [missing_return] -./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected /Users/jelle/py/typing/conformance/tests/narrowing_typeguard.py.CallableStrProto (Protocol with members '__call__') but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] +./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected .../tests/narrowing_typeguard.py.CallableStrProto (Protocol with members '__call__') but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] """ diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml index d39a82c1f..4777e5892 100644 --- a/conformance/results/pycroscope/narrowing_typeis.toml +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -11,12 +11,12 @@ output = """ ./narrowing_typeis.py:88:20: object is not equivalent to int ./narrowing_typeis.py:105:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:110:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] -./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] +./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] ./narrowing_typeis.py:136:4: Function may exit without returning a value [missing_return] ./narrowing_typeis.py:140:4: Function may exit without returning a value [missing_return] -./narrowing_typeis.py:152:25: Incompatible argument type for f: expected /Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.CallableStrProto (Protocol with members '__call__') but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] -./narrowing_typeis.py:169:16: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeGuardExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.is_int_typeis' [incompatible_argument] -./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.is_int_typeguard' [incompatible_argument] -./narrowing_typeis.py:191:17: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '/Users/jelle/py/typing/conformance/tests/narrowing_typeis.py.bool_typeis' [incompatible_argument] +./narrowing_typeis.py:152:25: Incompatible argument type for f: expected .../tests/narrowing_typeis.py.CallableStrProto (Protocol with members '__call__') but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] +./narrowing_typeis.py:169:16: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeGuardExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeis' [incompatible_argument] +./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeguard' [incompatible_argument] +./narrowing_typeis.py:191:17: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.bool_typeis' [incompatible_argument] ./narrowing_typeis.py:195:26: TypeIs narrowed type str is incompatible with parameter x [typeis_must_be_subtype] """ diff --git a/conformance/results/pycroscope/overloads_definitions.toml b/conformance/results/pycroscope/overloads_definitions.toml index 9327d36e1..0b1c05b80 100644 --- a/conformance/results/pycroscope/overloads_definitions.toml +++ b/conformance/results/pycroscope/overloads_definitions.toml @@ -14,6 +14,6 @@ Line 78: Unexpected errors ['./overloads_definitions.py:78:4: Traceback (most re output = """ ./overloads_definitions.py:73:4: Traceback (most recent call last): ./overloads_definitions.py:78:4: Traceback (most recent call last): -./overloads_definitions.py:84:5: Incompatible argument type for func: expected (...) -> Any[explicit] but got classmethod[/Users/jelle/py/typing/conformance/tests/overloads_definitions.py.C, (x: int, /) -> Any[unannotated], int] [incompatible_argument] +./overloads_definitions.py:84:5: Incompatible argument type for func: expected (...) -> Any[explicit] but got classmethod[.../tests/overloads_definitions.py.C, (x: int, /) -> Any[unannotated], int] [incompatible_argument] ./overloads_definitions.py:203:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 1a3a1610f..5317a8399 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -9,9 +9,9 @@ Line 147: Expected 1 errors Line 17: Unexpected errors ['./protocols_generic.py:17:4: Function may exit without returning a value [missing_return]'] Line 27: Unexpected errors ['./protocols_generic.py:27:4: Function may exit without returning a value [missing_return]'] Line 50: Unexpected errors ['./protocols_generic.py:50:4: Function may exit without returning a value [missing_return]'] -Line 65: Unexpected errors ['./protocols_generic.py:65:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[float | int] [incompatible_assignment]'] +Line 65: Unexpected errors ['./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment]'] Line 79: Unexpected errors ['./protocols_generic.py:79:4: Function may exit without returning a value [missing_return]'] -Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent'] +Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent'] Line 101: Unexpected errors ['./protocols_generic.py:101:4: Function may exit without returning a value [missing_return]'] Line 104: Unexpected errors ['./protocols_generic.py:104:4: Function may exit without returning a value [missing_return]'] """ @@ -19,12 +19,12 @@ output = """ ./protocols_generic.py:17:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:27:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:50:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:56:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Box[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Box[float | int] [incompatible_assignment] -./protocols_generic.py:65:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] -./protocols_generic.py:75:4: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.AttrProto[int], got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] +./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] +./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] +./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] ./protocols_generic.py:79:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:96:12: Literal[] is not equivalent to /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasParent +./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent ./protocols_generic.py:101:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:104:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:146:0: Incompatible assignment: expected /Users/jelle/py/typing/conformance/tests/protocols_generic.py.HasPropertyProto (Protocol with members 'm', 'f'), got /Users/jelle/py/typing/conformance/tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] +./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'm', 'f'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 83d92bfab..a702fb810 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -14,8 +14,8 @@ Line 75: Unexpected errors ['./tuples_type_compat.py:75:20: tuple[int] | Annot Line 76: Unexpected errors ['./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] -Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] +Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] @@ -44,8 +44,8 @@ output = """ ./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] ./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] -./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] +./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] ./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 5ee68d7d2..8f8c1301d 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -12,6 +12,8 @@ import sys from typing import Sequence +CONFORMANCE_ROOT = Path(__file__).resolve().parent.parent + class TypeChecker(ABC): @property @@ -378,6 +380,7 @@ def get_version(self) -> str: @staticmethod def _normalize_output_line(line: str) -> str: + line = line.replace(str(CONFORMANCE_ROOT), "...") # Pycroscope can include object reprs with process-specific addresses # (e.g. "... at 0x10abc1234>"). Normalize these for stable snapshots. return re.sub(r"0x[0-9a-fA-F]+", "0x...", line) From b78feb2e47a5c780c768d3394ab57ab18a78b085 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 10:10:13 -0800 Subject: [PATCH 11/78] . --- .../results/pycroscope/protocols_generic.toml | 2 +- .../results/pycroscope/tuples_type_compat.toml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 5317a8399..493702142 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -26,5 +26,5 @@ output = """ ./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent ./protocols_generic.py:101:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:104:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'm', 'f'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] +./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'f', 'm'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index a702fb810..409e9fdcd 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -12,10 +12,10 @@ Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] Line 75: Unexpected errors ['./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int]'] Line 76: Unexpected errors ['./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] -Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] -Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] +Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] +Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] @@ -42,10 +42,10 @@ output = """ ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] ./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] -./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] -./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] +./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] +./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] ./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] From b054d9ef1de03ec275c467c554927a71c6ff7882 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 11:30:25 -0800 Subject: [PATCH 12/78] progress --- .../pycroscope/aliases_typealiastype.toml | 3 +- .../pycroscope/annotations_forward_refs.toml | 28 ++++++++++------- .../pycroscope/annotations_generators.toml | 4 --- .../pycroscope/callables_annotation.toml | 12 -------- .../pycroscope/callables_subtyping.toml | 10 ------- .../pycroscope/generics_self_protocols.toml | 2 -- .../pycroscope/narrowing_typeguard.toml | 4 --- .../results/pycroscope/narrowing_typeis.toml | 4 --- .../results/pycroscope/protocols_generic.toml | 12 -------- .../protocols_runtime_checkable.toml | 6 ---- .../results/pycroscope/protocols_self.toml | 4 +-- .../pycroscope/protocols_variance.toml | 30 +------------------ .../pycroscope/tuples_type_compat.toml | 16 +++++----- conformance/results/results.html | 2 +- conformance/src/main.py | 23 ++++++++++++-- conformance/src/options.py | 10 +++++-- conformance/src/type_checker.py | 6 ++++ 17 files changed, 65 insertions(+), 111 deletions(-) diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index d9d9c26af..94cfa660c 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -22,7 +22,7 @@ Line 35: Unexpected errors ['./aliases_typealiastype.py:35:4: Unrecognized subsc Line 36: Unexpected errors ['./aliases_typealiastype.py:36:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 37: Unexpected errors ['./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 38: Unexpected errors ['./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]", './aliases_typealiastype.py:39:0: Traceback (most recent call last):'] +Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]"] """ output = """ ./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] @@ -31,7 +31,6 @@ output = """ ./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] -./aliases_typealiastype.py:39:0: Traceback (most recent call last): ./aliases_typealiastype.py:40:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:55:50: Variable i is never accessed [unused_variable] ./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 4212df196..f3d073f55 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -4,28 +4,36 @@ Line 24: Expected 1 errors Line 25: Expected 1 errors Line 41: Expected 1 errors Line 44: Expected 1 errors -Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 47: Expected 1 errors Line 48: Expected 1 errors -Line 49: Expected 1 errors -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 52: Expected 1 errors Line 53: Expected 1 errors Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 1: Unexpected errors ['./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]'] -Line 40: Unexpected errors ['./annotations_forward_refs.py:40:0: Traceback (most recent call last):'] +Line 1: Unexpected errors ['./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]'] Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] Line 103: Unexpected errors ['./annotations_forward_refs.py:103:7: Syntax error in type annotation: '] """ output = """ ./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:40:0: Traceback (most recent call last): +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] +./annotations_forward_refs.py:45:8: Unrecognized annotation [invalid_annotation] +./annotations_forward_refs.py:47:8: Invalid type annotation 0 [invalid_annotation] +./annotations_forward_refs.py:49:8: Invalid type annotation 1 [invalid_annotation] +./annotations_forward_refs.py:50:9: Invalid type annotation True [invalid_annotation] +./annotations_forward_refs.py:51:9: Invalid type annotation 1 [invalid_annotation] +./annotations_forward_refs.py:52:9: Invalid type annotation -1 [invalid_annotation] +./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] ./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] diff --git a/conformance/results/pycroscope/annotations_generators.toml b/conformance/results/pycroscope/annotations_generators.toml index dc1bfd192..d9d0cddee 100644 --- a/conformance/results/pycroscope/annotations_generators.toml +++ b/conformance/results/pycroscope/annotations_generators.toml @@ -1,9 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 51: Expected 1 errors -Line 96: Unexpected errors ['./annotations_generators.py:96:4: Function may exit without returning a value [missing_return]'] Line 100: Unexpected errors ['./annotations_generators.py:100:21: Generator function must return an iterable [generator_return]'] -Line 105: Unexpected errors ['./annotations_generators.py:105:4: Function may exit without returning a value [missing_return]'] Line 109: Unexpected errors ['./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return]'] Line 167: Unexpected errors ['./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] Line 174: Unexpected errors ['./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] @@ -17,9 +15,7 @@ output = """ ./annotations_generators.py:75:4: Cannot assign value of type .../tests/annotations_generators.py.B to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] ./annotations_generators.py:86:20: Generator function must return an iterable [generator_return] ./annotations_generators.py:91:26: Async generator function must return an async iterable [generator_return] -./annotations_generators.py:96:4: Function may exit without returning a value [missing_return] ./annotations_generators.py:100:21: Generator function must return an iterable [generator_return] -./annotations_generators.py:105:4: Function may exit without returning a value [missing_return] ./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return] ./annotations_generators.py:118:4: Cannot yield from collections.abc.Iterator[.../tests/annotations_generators.py.A] (expected .../tests/annotations_generators.py.B) [incompatible_yield] ./annotations_generators.py:119:4: Cannot yield from Literal[[1]] (expected .../tests/annotations_generators.py.B) [incompatible_yield] diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 9e4a6b12b..6ab4a3eeb 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,15 +4,9 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 90: Unexpected errors ['./callables_annotation.py:90:0: Traceback (most recent call last):'] -Line 92: Unexpected errors ['./callables_annotation.py:92:0: Traceback (most recent call last):'] -Line 151: Unexpected errors ['./callables_annotation.py:151:4: Traceback (most recent call last):'] Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] Line 156: Unexpected errors ["./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]"] Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] -Line 175: Unexpected errors ['./callables_annotation.py:175:4: Traceback (most recent call last):'] -Line 186: Unexpected errors ['./callables_annotation.py:186:4: Traceback (most recent call last):'] -Line 188: Unexpected errors ['./callables_annotation.py:188:4: Traceback (most recent call last):'] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -21,19 +15,13 @@ output = """ ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:90:0: Traceback (most recent call last): ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb2' [incompatible_assignment] -./callables_annotation.py:92:0: Traceback (most recent call last): ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb4' [incompatible_assignment] -./callables_annotation.py:151:4: Traceback (most recent call last): ./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] ./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] ./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:159:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto5[Any[explicit]], got .../tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] -./callables_annotation.py:175:4: Traceback (most recent call last): -./callables_annotation.py:186:4: Traceback (most recent call last): ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] -./callables_annotation.py:188:4: Traceback (most recent call last): ./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index b7f3920fd..3d495374c 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -1,11 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 273: Expected 1 errors -Line 259: Unexpected errors ['./callables_subtyping.py:259:4: Function may exit without returning a value [missing_return]'] -Line 263: Unexpected errors ['./callables_subtyping.py:263:4: Function may exit without returning a value [missing_return]'] -Line 267: Unexpected errors ['./callables_subtyping.py:267:4: Function may exit without returning a value [missing_return]'] -Line 288: Unexpected errors ['./callables_subtyping.py:288:4: Function may exit without returning a value [missing_return]'] -Line 292: Unexpected errors ['./callables_subtyping.py:292:4: Function may exit without returning a value [missing_return]'] Line 296: Unexpected errors ["./callables_subtyping.py:296:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ @@ -39,11 +34,6 @@ output = """ ./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:259:4: Function may exit without returning a value [missing_return] -./callables_subtyping.py:263:4: Function may exit without returning a value [missing_return] -./callables_subtyping.py:267:4: Function may exit without returning a value [missing_return] -./callables_subtyping.py:288:4: Function may exit without returning a value [missing_return] -./callables_subtyping.py:292:4: Function may exit without returning a value [missing_return] ./callables_subtyping.py:296:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_self_protocols.toml b/conformance/results/pycroscope/generics_self_protocols.toml index e46c6bbc3..9469faabc 100644 --- a/conformance/results/pycroscope/generics_self_protocols.toml +++ b/conformance/results/pycroscope/generics_self_protocols.toml @@ -1,9 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 64: Expected 1 errors -Line 11: Unexpected errors ['./generics_self_protocols.py:11:4: Function may exit without returning a value [missing_return]'] """ output = """ -./generics_self_protocols.py:11:4: Function may exit without returning a value [missing_return] ./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got .../tests/generics_self_protocols.py.BadReturnType [incompatible_argument] """ diff --git a/conformance/results/pycroscope/narrowing_typeguard.toml b/conformance/results/pycroscope/narrowing_typeguard.toml index 901b98a9f..7f4826d2b 100644 --- a/conformance/results/pycroscope/narrowing_typeguard.toml +++ b/conformance/results/pycroscope/narrowing_typeguard.toml @@ -2,8 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 81: Unexpected errors ['./narrowing_typeguard.py:81:20: object is not equivalent to int'] Line 85: Unexpected errors ['./narrowing_typeguard.py:85:20: object is not equivalent to int'] -Line 132: Unexpected errors ['./narrowing_typeguard.py:132:4: Function may exit without returning a value [missing_return]'] -Line 136: Unexpected errors ['./narrowing_typeguard.py:136:4: Function may exit without returning a value [missing_return]'] """ output = """ ./narrowing_typeguard.py:81:20: object is not equivalent to int @@ -11,7 +9,5 @@ output = """ ./narrowing_typeguard.py:102:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:107:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] -./narrowing_typeguard.py:132:4: Function may exit without returning a value [missing_return] -./narrowing_typeguard.py:136:4: Function may exit without returning a value [missing_return] ./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected .../tests/narrowing_typeguard.py.CallableStrProto (Protocol with members '__call__') but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] """ diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml index 4777e5892..e1f1b0399 100644 --- a/conformance/results/pycroscope/narrowing_typeis.toml +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -3,8 +3,6 @@ errors_diff = """ Line 199: Expected 1 errors Line 84: Unexpected errors ['./narrowing_typeis.py:84:20: object is not equivalent to int'] Line 88: Unexpected errors ['./narrowing_typeis.py:88:20: object is not equivalent to int'] -Line 136: Unexpected errors ['./narrowing_typeis.py:136:4: Function may exit without returning a value [missing_return]'] -Line 140: Unexpected errors ['./narrowing_typeis.py:140:4: Function may exit without returning a value [missing_return]'] """ output = """ ./narrowing_typeis.py:84:20: object is not equivalent to int @@ -12,8 +10,6 @@ output = """ ./narrowing_typeis.py:105:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:110:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] -./narrowing_typeis.py:136:4: Function may exit without returning a value [missing_return] -./narrowing_typeis.py:140:4: Function may exit without returning a value [missing_return] ./narrowing_typeis.py:152:25: Incompatible argument type for f: expected .../tests/narrowing_typeis.py.CallableStrProto (Protocol with members '__call__') but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] ./narrowing_typeis.py:169:16: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeGuardExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeis' [incompatible_argument] ./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeguard' [incompatible_argument] diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 493702142..b4bcff975 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -6,25 +6,13 @@ Line 66: Expected 1 errors Line 74: Expected 1 errors Line 145: Expected 1 errors Line 147: Expected 1 errors -Line 17: Unexpected errors ['./protocols_generic.py:17:4: Function may exit without returning a value [missing_return]'] -Line 27: Unexpected errors ['./protocols_generic.py:27:4: Function may exit without returning a value [missing_return]'] -Line 50: Unexpected errors ['./protocols_generic.py:50:4: Function may exit without returning a value [missing_return]'] Line 65: Unexpected errors ['./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment]'] -Line 79: Unexpected errors ['./protocols_generic.py:79:4: Function may exit without returning a value [missing_return]'] Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent'] -Line 101: Unexpected errors ['./protocols_generic.py:101:4: Function may exit without returning a value [missing_return]'] -Line 104: Unexpected errors ['./protocols_generic.py:104:4: Function may exit without returning a value [missing_return]'] """ output = """ -./protocols_generic.py:17:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:27:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:50:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] ./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] ./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] -./protocols_generic.py:79:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent -./protocols_generic.py:101:4: Function may exit without returning a value [missing_return] -./protocols_generic.py:104:4: Function may exit without returning a value [missing_return] ./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'f', 'm'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_runtime_checkable.toml b/conformance/results/pycroscope/protocols_runtime_checkable.toml index f0c1635e4..58abba848 100644 --- a/conformance/results/pycroscope/protocols_runtime_checkable.toml +++ b/conformance/results/pycroscope/protocols_runtime_checkable.toml @@ -6,12 +6,6 @@ Line 61: Expected 1 errors Line 88: Expected 1 errors Line 92: Expected 1 errors Line 96: Expected 1 errors -Line 38: Unexpected errors ['./protocols_runtime_checkable.py:38:4: Function may exit without returning a value [missing_return]'] -Line 44: Unexpected errors ['./protocols_runtime_checkable.py:44:4: Function may exit without returning a value [missing_return]'] -Line 71: Unexpected errors ['./protocols_runtime_checkable.py:71:4: Function may exit without returning a value [missing_return]'] """ output = """ -./protocols_runtime_checkable.py:38:4: Function may exit without returning a value [missing_return] -./protocols_runtime_checkable.py:44:4: Function may exit without returning a value [missing_return] -./protocols_runtime_checkable.py:71:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_self.toml b/conformance/results/pycroscope/protocols_self.toml index bf70e8cf0..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/protocols_self.toml +++ b/conformance/results/pycroscope/protocols_self.toml @@ -1,7 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 41: Unexpected errors ['./protocols_self.py:41:4: Function may exit without returning a value [missing_return]'] """ output = """ -./protocols_self.py:41:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_variance.toml b/conformance/results/pycroscope/protocols_variance.toml index bceec2d82..a5f099546 100644 --- a/conformance/results/pycroscope/protocols_variance.toml +++ b/conformance/results/pycroscope/protocols_variance.toml @@ -6,35 +6,7 @@ Line 56: Expected 1 errors Line 66: Expected 1 errors Line 104: Expected 1 errors Lines 61, 62: Expected error (tag 'covariant_in_input') -Line 22: Unexpected errors ['./protocols_variance.py:22:4: Function may exit without returning a value [missing_return]'] -Line 27: Unexpected errors ['./protocols_variance.py:27:4: Function may exit without returning a value [missing_return]'] -Line 30: Unexpected errors ['./protocols_variance.py:30:4: Function may exit without returning a value [missing_return]'] -Line 33: Unexpected errors ['./protocols_variance.py:33:4: Function may exit without returning a value [missing_return]'] -Line 36: Unexpected errors ['./protocols_variance.py:36:4: Function may exit without returning a value [missing_return]'] -Line 41: Unexpected errors ['./protocols_variance.py:41:4: Function may exit without returning a value [missing_return]'] -Line 44: Unexpected errors ['./protocols_variance.py:44:4: Function may exit without returning a value [missing_return]'] -Line 47: Unexpected errors ['./protocols_variance.py:47:4: Function may exit without returning a value [missing_return]'] -Line 67: Unexpected errors ['./protocols_variance.py:67:4: Function may exit without returning a value [missing_return]'] -Line 77: Unexpected errors ['./protocols_variance.py:77:4: Function may exit without returning a value [missing_return]'] -Line 85: Unexpected errors ['./protocols_variance.py:85:4: Function may exit without returning a value [missing_return]'] -Line 91: Unexpected errors ['./protocols_variance.py:91:4: Function may exit without returning a value [missing_return]'] -Line 96: Unexpected errors ['./protocols_variance.py:96:4: Function may exit without returning a value [missing_return]'] -Line 120: Unexpected errors ['./protocols_variance.py:120:4: Function may exit without returning a value [missing_return]'] +Lines 71, 72: Expected error (tag 'contravariant_in_output') """ output = """ -./protocols_variance.py:22:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:27:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:30:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:33:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:36:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:41:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:44:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:47:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:67:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:72:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:77:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:85:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:91:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:96:4: Function may exit without returning a value [missing_return] -./protocols_variance.py:120:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 409e9fdcd..a702fb810 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -12,10 +12,10 @@ Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] Line 75: Unexpected errors ['./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int]'] Line 76: Unexpected errors ['./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] -Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] -Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] +Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] +Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] @@ -42,10 +42,10 @@ output = """ ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] ./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] -./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] -./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] +./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] +./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] ./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] diff --git a/conformance/results/results.html b/conformance/results/results.html index 093ce92b0..45a45d6de 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -674,7 +674,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      protocols_subtyping Pass diff --git a/conformance/src/main.py b/conformance/src/main.py index 62a827bc4..005b3bd98 100644 --- a/conformance/src/main.py +++ b/conformance/src/main.py @@ -17,11 +17,15 @@ from test_groups import get_test_cases, get_test_groups from type_checker import TYPE_CHECKERS, TypeChecker +FULL_OUTPUT_KEY = "__full_output__" + def run_tests( root_dir: Path, type_checker: TypeChecker, test_cases: Sequence[Path], + *, + verbose: bool = False, ): print(f"Running tests for {type_checker.name}") @@ -30,8 +34,23 @@ def run_tests( test_duration = time() - test_start_time print(f"Completed tests for {type_checker.name} in {test_duration:.2f} seconds") + if verbose: + print(f"Verbose output for {type_checker.name}:") + full_output = tests_output.get(FULL_OUTPUT_KEY) + if full_output: + print("===== raw =====") + print(full_output, end="" if full_output.endswith("\n") else "\n") + else: + for test_name in sorted(tests_output): + print(f"===== {test_name} =====") + output = tests_output[test_name] + if output: + print(output, end="" if output.endswith("\n") else "\n") + print("") - for _, output in tests_output.items(): + for test_name, output in tests_output.items(): + if test_name.startswith("__"): + continue type_checker.parse_errors(output.splitlines()) results_dir = root_dir / "results" / type_checker.name @@ -265,7 +284,7 @@ def main(): if not type_checker.install(): print(f"Skipping tests for {type_checker.name}") else: - run_tests(root_dir, type_checker, test_cases) + run_tests(root_dir, type_checker, test_cases, verbose=options.verbose) # Generate a summary report. generate_summary(root_dir) diff --git a/conformance/src/options.py b/conformance/src/options.py index 76c2c5beb..854672776 100644 --- a/conformance/src/options.py +++ b/conformance/src/options.py @@ -9,8 +9,9 @@ @dataclass class _Options: - report_only: bool | None + report_only: bool only_run: str | None + verbose: bool def parse_options(argv: list[str]) -> _Options: @@ -24,7 +25,12 @@ def parse_options(argv: list[str]) -> _Options: reporting_group.add_argument( "--only-run", help="Only runs the type checker", - choices=[tc.name for tc in TYPE_CHECKERS] + choices=[tc.name for tc in TYPE_CHECKERS], + ) + parser.add_argument( + "--verbose", + action="store_true", + help="print full output from the type checker", ) ret = _Options(**vars(parser.parse_args(argv))) return ret diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 8f8c1301d..ee858a63d 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -396,6 +396,7 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: ] proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") lines = proc.stderr.splitlines() + full_output_lines: list[str] = [] # Collect results per file and sort for deterministic output. sortable_results: dict[str, list[tuple[int, str, str]]] = {} @@ -403,6 +404,7 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: if not line.strip(): continue line = self._normalize_output_line(line) + full_output_lines.append(line) # Concise output line format: # file.py:12:3: Message text [error_code] match = re.match(r"^(.+?):(\d+)(?::\d+)?:\s(.*)$", line) @@ -417,6 +419,10 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: for file_name, entries in sortable_results.items(): entries.sort(key=lambda item: (item[0], item[1])) results_dict[file_name] = "".join(f"{line}\n" for _, _, line in entries) + if full_output_lines: + results_dict["__full_output__"] = "".join( + f"{line}\n" for line in full_output_lines + ) return results_dict def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: From 2823a34e7d5d33629bd925213b0e6c604a0f74a9 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 11:58:17 -0800 Subject: [PATCH 13/78] more progress --- .../pycroscope/aliases_type_statement.toml | 4 ---- .../results/pycroscope/classes_override.toml | 4 ++-- .../pycroscope/generics_syntax_declarations.toml | 2 -- .../pycroscope/generics_syntax_scoping.toml | 4 ---- .../results/pycroscope/tuples_type_compat.toml | 16 ++++++++-------- .../pycroscope/typeddicts_alt_syntax.toml | 2 +- 6 files changed, 11 insertions(+), 21 deletions(-) diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml index 3d3da64c0..dd78f4ec2 100644 --- a/conformance/results/pycroscope/aliases_type_statement.toml +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -23,16 +23,12 @@ Line 82: Expected 1 errors Line 84: Expected 1 errors Lines 51, 52: Expected error (tag 'TA14') Lines 88, 89: Expected error (tag 'RTA6') -Line 9: Unexpected errors ['./aliases_type_statement.py:9:0: Traceback (most recent call last):'] Line 21: Unexpected errors ["./aliases_type_statement.py:21:6: int has no attribute '__value__' [undefined_attribute]"] -Line 75: Unexpected errors ['./aliases_type_statement.py:75:0: Traceback (most recent call last):'] """ output = """ -./aliases_type_statement.py:9:0: Traceback (most recent call last): ./aliases_type_statement.py:19:0: .GoodAlias1 = int is not callable [not_callable] ./aliases_type_statement.py:21:6: int has no attribute '__value__' [undefined_attribute] ./aliases_type_statement.py:23:6: int has no attribute 'other_attrib' [undefined_attribute] ./aliases_type_statement.py:40:30: Variable i is never accessed [unused_variable] ./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] -./aliases_type_statement.py:75:0: Traceback (most recent call last): """ diff --git a/conformance/results/pycroscope/classes_override.toml b/conformance/results/pycroscope/classes_override.toml index 3a8ad2099..504bf518a 100644 --- a/conformance/results/pycroscope/classes_override.toml +++ b/conformance/results/pycroscope/classes_override.toml @@ -1,6 +1,6 @@ conformance_automated = "Fail" errors_diff = """ -Line 101: Unexpected errors ['./classes_override.py:101:4: Traceback (most recent call last):'] +Line 101: Unexpected errors ['./classes_override.py:101:4: Method does not override any base method [override_does_not_override]'] """ output = """ ./classes_override.py:53:4: Method does not override any base method [override_does_not_override] @@ -8,5 +8,5 @@ output = """ ./classes_override.py:79:4: Method does not override any base method [override_does_not_override] ./classes_override.py:84:4: Method does not override any base method [override_does_not_override] ./classes_override.py:89:4: Method does not override any base method [override_does_not_override] -./classes_override.py:101:4: Traceback (most recent call last): +./classes_override.py:101:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index 694eca53b..df4efb45f 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -5,12 +5,10 @@ Line 25: Expected 1 errors Line 44: Expected 1 errors Line 60: Expected 1 errors Line 64: Expected 1 errors -Line 13: Unexpected errors ['./generics_syntax_declarations.py:13:0: Traceback (most recent call last):'] Line 39: Unexpected errors ['./generics_syntax_declarations.py:39:39: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:13: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] """ output = """ -./generics_syntax_declarations.py:13:0: Traceback (most recent call last): ./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] ./generics_syntax_declarations.py:39:39: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] ./generics_syntax_declarations.py:48:13: Invalid type annotation [, ] [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index 5c67421be..0cecfb42a 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -6,18 +6,14 @@ Line 35: Expected 1 errors Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors -Line 38: Unexpected errors ['./generics_syntax_scoping.py:38:0: Traceback (most recent call last):'] Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] -Line 81: Unexpected errors ['./generics_syntax_scoping.py:81:0: Traceback (most recent call last):'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] Line 121: Unexpected errors ['./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int'] Line 124: Unexpected errors ['./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int'] """ output = """ -./generics_syntax_scoping.py:38:0: Traceback (most recent call last): ./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] -./generics_syntax_scoping.py:81:0: Traceback (most recent call last): ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] ./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int ./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index a702fb810..409e9fdcd 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -12,10 +12,10 @@ Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] Line 75: Unexpected errors ['./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int]'] Line 76: Unexpected errors ['./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] -Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] -Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] +Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] +Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] +Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] @@ -42,10 +42,10 @@ output = """ ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] ./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:80:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] -./tuples_type_compat.py:81:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] | tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] -./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] +./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] +./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] ./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] diff --git a/conformance/results/pycroscope/typeddicts_alt_syntax.toml b/conformance/results/pycroscope/typeddicts_alt_syntax.toml index 33bcb9c76..8c64d3c92 100644 --- a/conformance/results/pycroscope/typeddicts_alt_syntax.toml +++ b/conformance/results/pycroscope/typeddicts_alt_syntax.toml @@ -6,5 +6,5 @@ Line 31: Expected 1 errors """ output = """ ./typeddicts_alt_syntax.py:35:16: In call to typing.TypedDict: Got an unexpected keyword argument 'other' [incompatible_call] -./typeddicts_alt_syntax.py:41:9: In call to typing.TypedDict: Got unexpected keyword arguments 'year', 'name' [incompatible_call] +./typeddicts_alt_syntax.py:41:9: In call to typing.TypedDict: Got unexpected keyword arguments 'name', 'year' [incompatible_call] """ From e3f361435289f889346b45c0eac1547138b1bf73 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 14:29:06 -0800 Subject: [PATCH 14/78] progress --- .../pycroscope/overloads_definitions.toml | 6 +----- .../results/pycroscope/protocols_generic.toml | 2 +- .../results/pycroscope/tuples_type_compat.toml | 18 +++--------------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/conformance/results/pycroscope/overloads_definitions.toml b/conformance/results/pycroscope/overloads_definitions.toml index 0b1c05b80..d55c1d722 100644 --- a/conformance/results/pycroscope/overloads_definitions.toml +++ b/conformance/results/pycroscope/overloads_definitions.toml @@ -3,17 +3,13 @@ errors_diff = """ Lines 15, 16: Expected error (tag 'func1') Lines 27, 28: Expected error (tag 'func2') Lines 58, 59: Expected error (tag 'not_abstract') -Lines 71, 73, 78, 81: Expected exactly one error (tag 'func5') +Lines 71, 73, 78, 81: Expected error (tag 'func5') Lines 122, 123, 124, 128: Expected error (tag 'invalid_final') Lines 137, 138, 139, 143, 144: Expected error (tag 'invalid_final_2') Lines 175, 180, 181, 186, 188: Expected error (tag 'override-final') Lines 226, 227, 228, 231, 232: Expected error (tag 'override_impl') -Line 73: Unexpected errors ['./overloads_definitions.py:73:4: Traceback (most recent call last):'] -Line 78: Unexpected errors ['./overloads_definitions.py:78:4: Traceback (most recent call last):'] """ output = """ -./overloads_definitions.py:73:4: Traceback (most recent call last): -./overloads_definitions.py:78:4: Traceback (most recent call last): ./overloads_definitions.py:84:5: Incompatible argument type for func: expected (...) -> Any[explicit] but got classmethod[.../tests/overloads_definitions.py.C, (x: int, /) -> Any[unannotated], int] [incompatible_argument] ./overloads_definitions.py:203:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index b4bcff975..8a2d88277 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -14,5 +14,5 @@ output = """ ./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] ./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] ./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent -./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'f', 'm'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] +./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'm', 'f'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 409e9fdcd..d9271790a 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -1,8 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Lines 75, 76: Expected exactly one error (tag 'func5_1') -Lines 80, 81: Expected exactly one error (tag 'func5_2') -Lines 85, 86: Expected exactly one error (tag 'func5_3') Lines 101, 102: Expected exactly one error (tag 'func6_1') Lines 106, 107: Expected exactly one error (tag 'func6_2') Lines 111, 112: Expected exactly one error (tag 'func6_3') @@ -10,12 +7,6 @@ Line 24: Unexpected errors ['./tuples_type_compat.py:24:4: Variable v1 is never Line 25: Unexpected errors ['./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable]'] Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable]'] Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] -Line 75: Unexpected errors ['./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int]'] -Line 76: Unexpected errors ['./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 80: Unexpected errors ['./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int]'] -Line 81: Unexpected errors ['./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 85: Unexpected errors ['./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int]'] -Line 86: Unexpected errors ['./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] @@ -40,12 +31,9 @@ output = """ ./tuples_type_compat.py:43:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment] ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] -./tuples_type_compat.py:75:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] -./tuples_type_compat.py:76:20: tuple[int] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:80:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[str, str] | tuple[int, int] -./tuples_type_compat.py:81:20: tuple[str, str] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:85:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int, str, int] -./tuples_type_compat.py:86:20: Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=2), MaxLen(value=2), MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=3), MaxLen(value=3)] | Annotated[tuple[int, *tuple[str, ...], int], MinLen(value=1), MaxLen(value=1), MinLen(value=3), MaxLen(value=3)] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:76:20: tuple[int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:81:20: tuple[str, str] | tuple[int, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:86:20: tuple[int, str, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] ./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] From b9c784e312f70ae56804305f93308359b49762c0 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 16:09:15 -0800 Subject: [PATCH 15/78] more --- conformance/results/pycroscope/aliases_explicit.toml | 2 +- conformance/results/pycroscope/aliases_implicit.toml | 2 -- .../results/pycroscope/aliases_type_statement.toml | 2 +- .../results/pycroscope/aliases_typealiastype.toml | 2 +- .../results/pycroscope/directives_no_type_check.toml | 1 - conformance/results/pycroscope/literals_semantics.toml | 8 +------- conformance/results/pycroscope/qualifiers_annotated.toml | 2 +- .../results/pycroscope/qualifiers_final_annotation.toml | 7 ------- conformance/results/pycroscope/specialtypes_type.toml | 6 ------ conformance/results/pycroscope/tuples_type_compat.toml | 9 --------- conformance/src/type_checker.py | 4 ++++ 11 files changed, 9 insertions(+), 36 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 2df13f028..09d8b2a78 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -6,6 +6,7 @@ Line 71: Expected 1 errors Line 79: Expected 1 errors Line 80: Expected 1 errors Line 81: Expected 1 errors +Line 82: Expected 1 errors Line 83: Expected 1 errors Line 84: Expected 1 errors Line 85: Expected 1 errors @@ -40,7 +41,6 @@ output = """ ./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None ./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_explicit.py:82:29: Variable i is never accessed [unused_variable] ./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 7b048f19e..1af1dbf0a 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -23,7 +23,6 @@ Line 68: Unexpected errors ['./aliases_implicit.py:68:16: (int, str, str, /) - Line 70: Unexpected errors ['./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None'] Line 71: Unexpected errors ['./aliases_implicit.py:71:16: list[bool] | Any[error] is not equivalent to list[bool]'] Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None'] -Line 92: Unexpected errors ['./aliases_implicit.py:92:25: Variable i is never accessed [unused_variable]'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] Line 131: Unexpected errors ['./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int]'] """ @@ -43,7 +42,6 @@ output = """ ./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:78:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:81:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:92:25: Variable i is never accessed [unused_variable] ./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] ./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml index dd78f4ec2..183e44036 100644 --- a/conformance/results/pycroscope/aliases_type_statement.toml +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -6,6 +6,7 @@ Line 31: Expected 1 errors Line 37: Expected 1 errors Line 38: Expected 1 errors Line 39: Expected 1 errors +Line 40: Expected 1 errors Line 41: Expected 1 errors Line 42: Expected 1 errors Line 43: Expected 1 errors @@ -29,6 +30,5 @@ output = """ ./aliases_type_statement.py:19:0: .GoodAlias1 = int is not callable [not_callable] ./aliases_type_statement.py:21:6: int has no attribute '__value__' [undefined_attribute] ./aliases_type_statement.py:23:6: int has no attribute 'other_attrib' [undefined_attribute] -./aliases_type_statement.py:40:30: Variable i is never accessed [unused_variable] ./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] """ diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index 94cfa660c..2fa81a48a 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -9,6 +9,7 @@ Line 48: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors Line 54: Expected 1 errors +Line 55: Expected 1 errors Line 56: Expected 1 errors Line 57: Expected 1 errors Line 58: Expected 1 errors @@ -32,6 +33,5 @@ output = """ ./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] ./aliases_typealiastype.py:40:4: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_typealiastype.py:55:50: Variable i is never accessed [unused_variable] ./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] """ diff --git a/conformance/results/pycroscope/directives_no_type_check.toml b/conformance/results/pycroscope/directives_no_type_check.toml index d9804fa73..869c59892 100644 --- a/conformance/results/pycroscope/directives_no_type_check.toml +++ b/conformance/results/pycroscope/directives_no_type_check.toml @@ -4,7 +4,6 @@ errors_diff = """ output = """ ./directives_no_type_check.py:15:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] ./directives_no_type_check.py:25:8: Unsupported operands for addition: int and str [unsupported_operation] -./directives_no_type_check.py:25:4: Variable c is never accessed [unused_variable] ./directives_no_type_check.py:26:4: Incompatible return type: expected None, got Literal[1] [incompatible_return_value] ./directives_no_type_check.py:29:6: Incompatible argument type for a: expected int but got Literal[b'invalid'] [incompatible_argument] ./directives_no_type_check.py:29:18: Incompatible argument type for b: expected str but got Literal[b'arguments'] [incompatible_argument] diff --git a/conformance/results/pycroscope/literals_semantics.toml b/conformance/results/pycroscope/literals_semantics.toml index 3281bcf48..74d57e35d 100644 --- a/conformance/results/pycroscope/literals_semantics.toml +++ b/conformance/results/pycroscope/literals_semantics.toml @@ -1,15 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 31: Unexpected errors ['./literals_semantics.py:31:4: Variable b is never accessed [unused_variable]'] -Line 32: Unexpected errors ['./literals_semantics.py:32:4: Variable c is never accessed [unused_variable]'] -Line 40: Unexpected errors ['./literals_semantics.py:40:4: Assigned value of a is never accessed [unused_assignment]'] +Line 33: Expected 1 errors """ output = """ ./literals_semantics.py:10:0: Incompatible assignment: expected Literal[3], got Literal[4] [incompatible_assignment] ./literals_semantics.py:24:4: Incompatible assignment: expected Literal[False], got Literal[0] [incompatible_assignment] ./literals_semantics.py:25:4: Incompatible assignment: expected Literal[0], got Literal[False] [incompatible_assignment] -./literals_semantics.py:31:4: Variable b is never accessed [unused_variable] -./literals_semantics.py:32:4: Variable c is never accessed [unused_variable] -./literals_semantics.py:33:4: Assigned value of a is never accessed [unused_assignment] -./literals_semantics.py:40:4: Assigned value of a is never accessed [unused_assignment] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 656ac2d79..5c1903444 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -1,6 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 39: Expected 1 errors +Line 40: Expected 1 errors Line 42: Expected 1 errors Line 43: Expected 1 errors Line 44: Expected 1 errors @@ -16,7 +17,6 @@ Line 108: Unexpected errors ['./qualifiers_annotated.py:108:7: Unexpected NotReq """ output = """ ./qualifiers_annotated.py:38:6: Invalid type annotation [, ] [invalid_annotation] -./qualifiers_annotated.py:40:25: Variable i is never accessed [unused_variable] ./qualifiers_annotated.py:41:6: Invalid type annotation {'a': 'b'} [invalid_annotation] ./qualifiers_annotated.py:45:16: Undefined name: var1 [undefined_name] ./qualifiers_annotated.py:46:6: Invalid type annotation True [invalid_annotation] diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml index c20cf40ed..d9d9cce16 100644 --- a/conformance/results/pycroscope/qualifiers_final_annotation.toml +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -25,17 +25,10 @@ output = """ ./qualifiers_final_annotation.py:134:0: In call to pycroscope.signature.N: Missing required argument 'x' [incompatible_call] ./qualifiers_final_annotation.py:135:4: Incompatible argument type for x: expected int but got Literal[''] [incompatible_argument] ./qualifiers_final_annotation.py:135:10: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument] -./qualifiers_final_annotation.py:145:4: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:145:4: Cannot assign to final name x [incompatible_assignment] -./qualifiers_final_annotation.py:147:9: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:147:9: Cannot assign to final name x [incompatible_assignment] -./qualifiers_final_annotation.py:147:4: Variable a is never accessed [unused_variable] -./qualifiers_final_annotation.py:149:8: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:149:8: Cannot assign to final name x [incompatible_assignment] -./qualifiers_final_annotation.py:152:29: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:152:29: Cannot assign to final name x [incompatible_assignment] -./qualifiers_final_annotation.py:155:8: Assigned value of x is never accessed [unused_assignment] ./qualifiers_final_annotation.py:155:8: Cannot assign to final name x [incompatible_assignment] -./qualifiers_final_annotation.py:155:5: Variable a is never accessed [unused_variable] ./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import] """ diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index 8352cd389..737379b03 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -5,9 +5,6 @@ Line 76: Expected 1 errors Line 143: Expected 1 errors Line 144: Expected 1 errors Line 38: Unexpected errors ['./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] -Line 86: Unexpected errors ['./specialtypes_type.py:86:4: Assigned value of b is never accessed [unused_assignment]'] -Line 87: Unexpected errors ['./specialtypes_type.py:87:4: Assigned value of a is never accessed [unused_assignment]'] -Line 88: Unexpected errors ['./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment]'] Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] Line 152: Unexpected errors ['./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation]'] @@ -17,9 +14,6 @@ Line 161: Unexpected errors ['./specialtypes_type.py:161:12: int | Any[generic output = """ ./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] -./specialtypes_type.py:86:4: Assigned value of b is never accessed [unused_assignment] -./specialtypes_type.py:87:4: Assigned value of a is never accessed [unused_assignment] -./specialtypes_type.py:88:4: Assigned value of b is never accessed [unused_assignment] ./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index d9271790a..7673a824f 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -3,9 +3,6 @@ errors_diff = """ Lines 101, 102: Expected exactly one error (tag 'func6_1') Lines 106, 107: Expected exactly one error (tag 'func6_2') Lines 111, 112: Expected exactly one error (tag 'func6_3') -Line 24: Unexpected errors ['./tuples_type_compat.py:24:4: Variable v1 is never accessed [unused_variable]'] -Line 25: Unexpected errors ['./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable]'] -Line 28: Unexpected errors ['./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable]'] Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] @@ -19,15 +16,9 @@ Line 153: Unexpected errors ['./tuples_type_compat.py:153:16: collections.abc. """ output = """ ./tuples_type_compat.py:15:4: Incompatible assignment: expected tuple[int, int], got tuple[float | int, complex | float | int] [incompatible_assignment] -./tuples_type_compat.py:24:4: Variable v1 is never accessed [unused_variable] -./tuples_type_compat.py:25:4: Variable v1 is never accessed [unused_variable] -./tuples_type_compat.py:28:4: Variable v2 is never accessed [unused_variable] ./tuples_type_compat.py:29:4: Incompatible assignment: expected tuple[int, *tuple[int, ...]], got tuple[int, ...] [incompatible_assignment] -./tuples_type_compat.py:29:4: Variable v2 is never accessed [unused_variable] ./tuples_type_compat.py:32:4: Incompatible assignment: expected tuple[int], got tuple[int, *tuple[int, ...]] [incompatible_assignment] -./tuples_type_compat.py:32:4: Variable v3 is never accessed [unused_variable] ./tuples_type_compat.py:33:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] -./tuples_type_compat.py:33:4: Variable v3 is never accessed [unused_variable] ./tuples_type_compat.py:43:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment] ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index ee858a63d..cd2d27fdb 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -393,6 +393,10 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: "concise", "--disable", "import_failed", + "--disable", + "unused_variable", + "--disable", + "unused_assignment", ] proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") lines = proc.stderr.splitlines() From 13aed2672ef4550e0f422589f22e01dd8e6679f1 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 16:10:28 -0800 Subject: [PATCH 16/78] progress --- .../results/pycroscope/classes_classvar.toml | 3 + .../pycroscope/constructors_call_init.toml | 22 +++---- .../constructors_call_metaclass.toml | 2 + .../pycroscope/constructors_call_new.toml | 14 +++-- .../pycroscope/constructors_callable.toml | 8 +-- .../pycroscope/dataclasses_descriptors.toml | 4 ++ .../results/pycroscope/enums_members.toml | 5 +- .../exceptions_context_managers.toml | 4 +- .../pycroscope/generics_self_usage.toml | 2 +- .../generics_syntax_declarations.toml | 10 ++-- .../pycroscope/narrowing_typeguard.toml | 6 +- .../results/pycroscope/narrowing_typeis.toml | 4 -- .../results/pycroscope/protocols_generic.toml | 2 +- .../pycroscope/protocols_recursive.toml | 10 ++-- .../pycroscope/qualifiers_annotated.toml | 8 --- .../pycroscope/typeddicts_class_syntax.toml | 2 + .../pycroscope/typeddicts_extra_items.toml | 57 ++++++++++--------- .../pycroscope/typeddicts_inheritance.toml | 6 +- .../pycroscope/typeddicts_operations.toml | 8 +-- .../typeddicts_readonly_inheritance.toml | 54 ++++-------------- .../results/pycroscope/typeddicts_usage.toml | 8 ++- conformance/results/results.html | 4 +- 22 files changed, 111 insertions(+), 132 deletions(-) diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 1938da329..a8fffcf67 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -10,6 +10,7 @@ Line 111: Expected 1 errors Line 140: Expected 1 errors Line 81: Unexpected errors ['./classes_classvar.py:81:12: Any[from_another] is not equivalent to int'] Line 82: Unexpected errors ['./classes_classvar.py:82:12: Any[from_another] is not equivalent to list[str]'] +Line 107: Unexpected errors ['./classes_classvar.py:107:33: Undefined name: Starship [undefined_name]', './classes_classvar.py:107:8: Undefined name: Starship [undefined_name]'] """ output = """ ./classes_classvar.py:38:10: Unrecognized annotation object [invalid_annotation] @@ -24,4 +25,6 @@ output = """ ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:81:12: Any[from_another] is not equivalent to int ./classes_classvar.py:82:12: Any[from_another] is not equivalent to list[str] +./classes_classvar.py:107:33: Undefined name: Starship [undefined_name] +./classes_classvar.py:107:8: Undefined name: Starship [undefined_name] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index e2f4e7117..6c13cceb8 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -4,17 +4,17 @@ Line 21: Expected 1 errors Line 42: Expected 1 errors Line 56: Expected 1 errors Line 130: Expected 1 errors -Line 51: Unexpected errors ['./constructors_call_init.py:51:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 61: Unexpected errors ['./constructors_call_init.py:61:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 63: Unexpected errors ['./constructors_call_init.py:63:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 88: Unexpected errors ['./constructors_call_init.py:88:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 96: Unexpected errors ['./constructors_call_init.py:96:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 51: Unexpected errors ['./constructors_call_init.py:51:23: Undefined name: Class4 [undefined_name]'] +Line 61: Unexpected errors ['./constructors_call_init.py:61:23: Undefined name: Class5 [undefined_name]'] +Line 63: Unexpected errors ['./constructors_call_init.py:63:23: Undefined name: Class5 [undefined_name]'] +Line 88: Unexpected errors ['./constructors_call_init.py:88:23: Undefined name: Class6 [undefined_name]'] +Line 96: Unexpected errors ['./constructors_call_init.py:96:23: Undefined name: Class7 [undefined_name]'] """ output = """ -./constructors_call_init.py:51:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_call_init.py:61:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_call_init.py:63:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_call_init.py:88:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_call_init.py:96:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_call_init.py:107:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_init.py:51:23: Undefined name: Class4 [undefined_name] +./constructors_call_init.py:61:23: Undefined name: Class5 [undefined_name] +./constructors_call_init.py:63:23: Undefined name: Class5 [undefined_name] +./constructors_call_init.py:88:23: Undefined name: Class6 [undefined_name] +./constructors_call_init.py:96:23: Undefined name: Class7 [undefined_name] +./constructors_call_init.py:107:23: Undefined name: Class8 [undefined_name] """ diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index fc10c457e..b2693e7f0 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -3,7 +3,9 @@ errors_diff = """ Line 54: Expected 1 errors Line 68: Expected 1 errors Line 26: Unexpected errors ['./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never'] +Line 30: Unexpected errors ['./constructors_call_metaclass.py:30:42: Undefined name: Meta2 [undefined_name]'] """ output = """ ./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never +./constructors_call_metaclass.py:30:42: Undefined name: Meta2 [undefined_name] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 51a219e26..4e40e0e2f 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -3,14 +3,18 @@ errors_diff = """ Line 21: Expected 1 errors Line 148: Expected 1 errors Line 49: Unexpected errors ['./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int'] +Line 57: Unexpected errors ['./constructors_call_new.py:57:24: Undefined name: Class4 [undefined_name]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never'] -Line 113: Unexpected errors ['./constructors_call_new.py:113:41: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 142: Unexpected errors ['./constructors_call_new.py:142:21: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]', './constructors_call_new.py:142:46: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 82: Unexpected errors ['./constructors_call_new.py:82:24: Undefined name: Class6 [undefined_name]'] +Line 113: Unexpected errors ['./constructors_call_new.py:113:41: Undefined name: Class8 [undefined_name]'] +Line 142: Unexpected errors ['./constructors_call_new.py:142:21: Undefined name: Class11 [undefined_name]', './constructors_call_new.py:142:46: Undefined name: Class11 [undefined_name]'] """ output = """ ./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int +./constructors_call_new.py:57:24: Undefined name: Class4 [undefined_name] ./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never -./constructors_call_new.py:113:41: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_call_new.py:142:21: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_call_new.py:142:46: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_call_new.py:82:24: Undefined name: Class6 [undefined_name] +./constructors_call_new.py:113:41: Undefined name: Class8 [undefined_name] +./constructors_call_new.py:142:21: Undefined name: Class11 [undefined_name] +./constructors_call_new.py:142:46: Undefined name: Class11 [undefined_name] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 7cda900ad..fbecd013d 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -15,8 +15,8 @@ Line 197: Expected 1 errors Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[generic_argument] | Any[from_another] is not equivalent to int'] Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[generic_argument] | Any[from_another] is not equivalent to Never'] Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[generic_argument] | Any[from_another] is not equivalent to Never'] -Line 155: Unexpected errors ['./constructors_callable.py:155:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 157: Unexpected errors ['./constructors_callable.py:157:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 155: Unexpected errors ['./constructors_callable.py:155:23: Undefined name: Class7 [undefined_name]'] +Line 157: Unexpected errors ['./constructors_callable.py:157:23: Undefined name: Class7 [undefined_name]'] """ output = """ ./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] @@ -29,8 +29,8 @@ output = """ ./constructors_callable.py:107:16: Any[generic_argument] | Any[from_another] is not equivalent to Never ./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] ./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:155:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./constructors_callable.py:157:23: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./constructors_callable.py:155:23: Undefined name: Class7 [undefined_name] +./constructors_callable.py:157:23: Undefined name: Class7 [undefined_name] ./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] ./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] ./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index 6d27d46c8..73f0191d2 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,5 +1,7 @@ conformance_automated = "Fail" errors_diff = """ +Line 16: Unexpected errors ['./dataclasses_descriptors.py:16:52: Undefined name: Desc1 [undefined_name]'] +Line 23: Unexpected errors ['./dataclasses_descriptors.py:23:61: Undefined name: Desc1 [undefined_name]'] Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int'] Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int]'] Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str]'] @@ -9,6 +11,8 @@ Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: Any[from_anot Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str'] """ output = """ +./dataclasses_descriptors.py:16:52: Undefined name: Desc1 [undefined_name] +./dataclasses_descriptors.py:23:61: Undefined name: Desc1 [undefined_name] ./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int ./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int] ./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str] diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 0c4829605..956595e45 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -6,11 +6,11 @@ Line 83: Expected 1 errors Line 84: Expected 1 errors Line 85: Expected 1 errors Line 116: Expected 1 errors -Line 129: Expected 1 errors Line 27: Unexpected errors ['./enums_members.py:27:12: Any[from_another] is not equivalent to str'] Line 28: Unexpected errors ['./enums_members.py:28:12: Any[from_another] is not equivalent to str'] Line 35: Unexpected errors ['./enums_members.py:35:12: Any[from_another] is not equivalent to str'] Line 36: Unexpected errors ['./enums_members.py:36:12: Any[from_another] is not equivalent to str'] +Line 128: Unexpected errors ['./enums_members.py:128:20: Undefined name: Example2 [undefined_name]'] """ output = """ ./enums_members.py:27:12: Any[from_another] is not equivalent to str @@ -18,6 +18,9 @@ output = """ ./enums_members.py:35:12: Any[from_another] is not equivalent to str ./enums_members.py:36:12: Any[from_another] is not equivalent to str ./enums_members.py:128:20: Revealed type is 'Any[from_another]' [reveal_type] +./enums_members.py:128:20: Undefined name: Example2 [undefined_name] +./enums_members.py:129:20: Undefined name: Example2 [undefined_name] +./enums_members.py:129:42: Undefined name: Example2 [undefined_name] ./enums_members.py:146:12: Any[from_another] is not equivalent to int ./enums_members.py:147:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/exceptions_context_managers.toml b/conformance/results/pycroscope/exceptions_context_managers.toml index d9984ae19..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/exceptions_context_managers.toml +++ b/conformance/results/pycroscope/exceptions_context_managers.toml @@ -1,7 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 85: Unexpected errors ['./exceptions_context_managers.py:85:16: int | str is not equivalent to str'] """ output = """ -./exceptions_context_managers.py:85:16: int | str is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 303f38efb..e304a5ef7 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -2,7 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 76: Expected 1 errors Line 82: Expected 1 errors -Line 87: Expected 1 errors Line 103: Expected 1 errors Line 105: Expected 1 errors Line 108: Expected 1 errors @@ -13,4 +12,5 @@ Line 127: Expected 1 errors """ output = """ ./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] +./generics_self_usage.py:87:15: Undefined name: Foo3 [undefined_name] """ diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index df4efb45f..b72cb3864 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -5,14 +5,16 @@ Line 25: Expected 1 errors Line 44: Expected 1 errors Line 60: Expected 1 errors Line 64: Expected 1 errors -Line 39: Unexpected errors ['./generics_syntax_declarations.py:39:39: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:13: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 39: Unexpected errors ['./generics_syntax_declarations.py:39:16: Undefined name: ForwardReference [undefined_name]', './generics_syntax_declarations.py:39:39: Undefined name: ForwardReference [undefined_name]'] +Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:17: Undefined name: ForwardReference [undefined_name]', './generics_syntax_declarations.py:56:13: Undefined name: ForwardReference [undefined_name]'] """ output = """ ./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] -./generics_syntax_declarations.py:39:39: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_declarations.py:39:16: Undefined name: ForwardReference [undefined_name] +./generics_syntax_declarations.py:39:39: Undefined name: ForwardReference [undefined_name] ./generics_syntax_declarations.py:48:13: Invalid type annotation [, ] [invalid_annotation] -./generics_syntax_declarations.py:56:13: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_declarations.py:56:17: Undefined name: ForwardReference [undefined_name] +./generics_syntax_declarations.py:56:13: Undefined name: ForwardReference [undefined_name] ./generics_syntax_declarations.py:71:13: Invalid type annotation (, ) [invalid_annotation] ./generics_syntax_declarations.py:75:13: Invalid type annotation 3 [invalid_annotation] ./generics_syntax_declarations.py:79:22: Undefined name: S [undefined_name] diff --git a/conformance/results/pycroscope/narrowing_typeguard.toml b/conformance/results/pycroscope/narrowing_typeguard.toml index 7f4826d2b..812407aab 100644 --- a/conformance/results/pycroscope/narrowing_typeguard.toml +++ b/conformance/results/pycroscope/narrowing_typeguard.toml @@ -1,11 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 81: Unexpected errors ['./narrowing_typeguard.py:81:20: object is not equivalent to int'] -Line 85: Unexpected errors ['./narrowing_typeguard.py:85:20: object is not equivalent to int'] """ output = """ -./narrowing_typeguard.py:81:20: object is not equivalent to int -./narrowing_typeguard.py:85:20: object is not equivalent to int ./narrowing_typeguard.py:102:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:107:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml index e1f1b0399..1d18cbfaf 100644 --- a/conformance/results/pycroscope/narrowing_typeis.toml +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -1,12 +1,8 @@ conformance_automated = "Fail" errors_diff = """ Line 199: Expected 1 errors -Line 84: Unexpected errors ['./narrowing_typeis.py:84:20: object is not equivalent to int'] -Line 88: Unexpected errors ['./narrowing_typeis.py:88:20: object is not equivalent to int'] """ output = """ -./narrowing_typeis.py:84:20: object is not equivalent to int -./narrowing_typeis.py:88:20: object is not equivalent to int ./narrowing_typeis.py:105:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:110:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 8a2d88277..b4bcff975 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -14,5 +14,5 @@ output = """ ./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] ./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] ./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent -./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'm', 'f'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] +./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'f', 'm'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index c567a9ba0..7dcdeb784 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,16 +1,18 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Unexpected errors ['./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return]'] -Line 29: Unexpected errors ['./protocols_recursive.py:29:24: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] -Line 42: Unexpected errors ['./protocols_recursive.py:42:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]', './protocols_recursive.py:42:4: Function may exit without returning a value [missing_return]'] +Line 21: Unexpected errors ['./protocols_recursive.py:21:24: Undefined name: SimpleTree [undefined_name]'] +Line 29: Unexpected errors ['./protocols_recursive.py:29:24: Undefined name: Tree [undefined_name]'] +Line 42: Unexpected errors ['./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return]', './protocols_recursive.py:42:25: Undefined name: ProtoA [undefined_name]'] Line 51: Unexpected errors ['./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return]'] Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ ./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return] -./protocols_recursive.py:29:24: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] -./protocols_recursive.py:42:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./protocols_recursive.py:21:24: Undefined name: SimpleTree [undefined_name] +./protocols_recursive.py:29:24: Undefined name: Tree [undefined_name] ./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return] +./protocols_recursive.py:42:25: Undefined name: ProtoA [undefined_name] ./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return] ./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 5c1903444..35c51bfe9 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -10,10 +10,6 @@ Line 59: Expected 1 errors Line 86: Expected 1 errors Line 87: Expected 1 errors Line 88: Expected 1 errors -Line 105: Unexpected errors ['./qualifiers_annotated.py:105:7: Unexpected Required annotation [invalid_annotation]'] -Line 106: Unexpected errors ['./qualifiers_annotated.py:106:7: Unexpected Required annotation [invalid_annotation]'] -Line 107: Unexpected errors ['./qualifiers_annotated.py:107:7: Unexpected NotRequired annotation [invalid_annotation]'] -Line 108: Unexpected errors ['./qualifiers_annotated.py:108:7: Unexpected NotRequired annotation [invalid_annotation]'] """ output = """ ./qualifiers_annotated.py:38:6: Invalid type annotation [, ] [invalid_annotation] @@ -26,8 +22,4 @@ output = """ ./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:79:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[str, '']] [incompatible_argument] ./qualifiers_annotated.py:80:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[int, '']] [incompatible_argument] -./qualifiers_annotated.py:105:7: Unexpected Required annotation [invalid_annotation] -./qualifiers_annotated.py:106:7: Unexpected Required annotation [invalid_annotation] -./qualifiers_annotated.py:107:7: Unexpected NotRequired annotation [invalid_annotation] -./qualifiers_annotated.py:108:7: Unexpected NotRequired annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_class_syntax.toml b/conformance/results/pycroscope/typeddicts_class_syntax.toml index 23f929c29..891f87833 100644 --- a/conformance/results/pycroscope/typeddicts_class_syntax.toml +++ b/conformance/results/pycroscope/typeddicts_class_syntax.toml @@ -5,6 +5,8 @@ Line 44: Expected 1 errors Line 49: Expected 1 errors Lines 33, 34: Expected error (tag 'method2') Lines 38, 39: Expected error (tag 'method3') +Line 15: Unexpected errors ['./typeddicts_class_syntax.py:15:14: Undefined name: Person [undefined_name]'] """ output = """ +./typeddicts_class_syntax.py:15:14: Undefined name: Person [undefined_name] """ diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml index 42024c3ea..ff53f82e7 100644 --- a/conformance/results/pycroscope/typeddicts_extra_items.toml +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -2,14 +2,12 @@ conformance_automated = "Fail" errors_diff = """ Line 15: Expected 1 errors Line 22: Expected 1 errors -Line 39: Expected 1 errors Line 49: Expected 1 errors Line 67: Expected 1 errors Line 73: Expected 1 errors Line 109: Expected 1 errors Line 114: Expected 1 errors Line 117: Expected 1 errors -Line 128: Expected 1 errors Line 143: Expected 1 errors Line 174: Expected 1 errors Line 215: Expected 1 errors @@ -18,40 +16,47 @@ Line 242: Expected 1 errors Line 256: Expected 1 errors Line 257: Expected 1 errors Line 268: Expected 1 errors -Line 278: Expected 1 errors -Line 285: Expected 1 errors -Line 293: Expected 1 errors -Line 303: Expected 1 errors -Line 352: 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 19: Unexpected errors ["./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call]"] -Line 28: Unexpected errors ['./typeddicts_extra_items.py:28:16: Any[from_another] is not equivalent to str'] -Line 29: Unexpected errors ['./typeddicts_extra_items.py:29:16: Any[from_another] is not equivalent to bool'] +Line 29: Unexpected errors ['./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool', "./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key]"] +Line 129: Unexpected errors ["./typeddicts_extra_items.py:129:14: Key Literal['year'] does not exist in TypedDict [invalid_typeddict_key]"] Line 140: Unexpected errors ['./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation]'] Line 141: Unexpected errors ['./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation]'] -Line 191: Unexpected errors ['./typeddicts_extra_items.py:191:10: Unexpected NotRequired annotation [invalid_annotation]'] -Line 212: Unexpected errors ['./typeddicts_extra_items.py:212:10: Unexpected NotRequired annotation [invalid_annotation]'] -Line 233: Unexpected errors ['./typeddicts_extra_items.py:233:10: Unexpected NotRequired annotation [invalid_annotation]'] -Line 310: Unexpected errors ['./typeddicts_extra_items.py:310:16: list[Any[generic_argument]] is not equivalent to list[tuple[str, int | str]]'] -Line 311: Unexpected errors ['./typeddicts_extra_items.py:311:16: list[Any[generic_argument]] is not equivalent to list[int | str]'] -Line 323: Unexpected errors ['./typeddicts_extra_items.py:323:9: Unexpected NotRequired annotation [invalid_annotation]'] -Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[from_another] is not equivalent to tuple[str, int]'] +Line 277: Unexpected errors ['./typeddicts_extra_items.py:277:0: TypedDict({"name": str}) is not callable [not_callable]'] +Line 283: Unexpected errors ['./typeddicts_extra_items.py:283:0: TypedDict({"name": str}) is not callable [not_callable]'] +Line 284: Unexpected errors ['./typeddicts_extra_items.py:284:0: TypedDict({"name": str}) is not callable [not_callable]'] +Line 292: Unexpected errors ['./typeddicts_extra_items.py:292:0: TypedDict({"name": str}) is not callable [not_callable]'] +Line 310: Unexpected errors ['./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]]'] +Line 311: Unexpected errors ['./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str]'] +Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[from_another] | Any[explicit] is not equivalent to tuple[str, int]'] +Line 342: Unexpected errors ['./typeddicts_extra_items.py:342:26: Cannot set unknown key str in TypedDict TypedDict({"num": NotRequired[int]}) [invalid_typeddict_key]'] +Line 343: Unexpected errors ['./typeddicts_extra_items.py:343:30: Key str does not exist in TypedDict [invalid_typeddict_key]'] """ output = """ ./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call] -./typeddicts_extra_items.py:28:16: Any[from_another] is not equivalent to str -./typeddicts_extra_items.py:29:16: Any[from_another] is not equivalent to bool +./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool +./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key] +./typeddicts_extra_items.py:39:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': None}] [incompatible_assignment] +./typeddicts_extra_items.py:128:14: Cannot delete required TypedDict key Literal['name'] [incompatible_argument] +./typeddicts_extra_items.py:129:14: Key Literal['year'] does not exist in TypedDict [invalid_typeddict_key] ./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation] ./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation] -./typeddicts_extra_items.py:188:10: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_extra_items.py:191:10: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_extra_items.py:212:10: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_extra_items.py:233:10: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_extra_items.py:310:16: list[Any[generic_argument]] is not equivalent to list[tuple[str, int | str]] -./typeddicts_extra_items.py:311:16: list[Any[generic_argument]] is not equivalent to list[int | str] -./typeddicts_extra_items.py:323:9: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_extra_items.py:339:12: Any[from_another] is not equivalent to tuple[str, int] +./typeddicts_extra_items.py:277:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:278:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:283:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:284:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:285:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:292:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:293:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:303:0: Incompatible assignment: expected collections.abc.Mapping[str, int], got Any[error] | TypedDict({"name": str}) [incompatible_assignment] +./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]] +./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str] +./typeddicts_extra_items.py:339:12: Any[from_another] | Any[explicit] is not equivalent to tuple[str, int] +./typeddicts_extra_items.py:342:26: Cannot set unknown key str in TypedDict TypedDict({"num": NotRequired[int]}) [invalid_typeddict_key] +./typeddicts_extra_items.py:343:30: Key str does not exist in TypedDict [invalid_typeddict_key] +./typeddicts_extra_items.py:352:4: Incompatible assignment: expected TypedDict({}), got dict[str, int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_inheritance.toml b/conformance/results/pycroscope/typeddicts_inheritance.toml index 599d3bd12..13a56050a 100644 --- a/conformance/results/pycroscope/typeddicts_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_inheritance.toml @@ -1,8 +1,10 @@ conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors -Line 65: Expected 1 errors -Lines 54, 55: Expected error (tag 'Y1') +Line 36: Unexpected errors ['./typeddicts_inheritance.py:36:5: TypedDict({"x": int, "y": str, "z": bool}) is not callable [not_callable]'] """ output = """ +./typeddicts_inheritance.py:36:5: TypedDict({"x": int, "y": str, "z": bool}) is not callable [not_callable] +./typeddicts_inheritance.py:55:3: Incompatible TypedDict override for key 'x' [invalid_annotation] +./typeddicts_inheritance.py:65:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_operations.toml b/conformance/results/pycroscope/typeddicts_operations.toml index 1199ec3be..fde6dae22 100644 --- a/conformance/results/pycroscope/typeddicts_operations.toml +++ b/conformance/results/pycroscope/typeddicts_operations.toml @@ -4,15 +4,15 @@ Line 22: Expected 1 errors Line 23: Expected 1 errors Line 24: Expected 1 errors Line 26: Expected 1 errors -Line 28: Expected 1 errors -Line 29: Expected 1 errors Line 32: Expected 1 errors Line 37: Expected 1 errors Line 47: Expected 1 errors Line 49: Expected 1 errors Line 62: Expected 1 errors -Line 60: Unexpected errors ['./typeddicts_operations.py:60:12: Any[from_another] is not equivalent to str | None'] +Line 60: Unexpected errors ['./typeddicts_operations.py:60:12: Any[from_another] | str | None is not equivalent to str | None'] """ output = """ -./typeddicts_operations.py:60:12: Any[from_another] is not equivalent to str | None +./typeddicts_operations.py:28:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner'}] [incompatible_assignment] +./typeddicts_operations.py:29:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': 1982.1}] [incompatible_assignment] +./typeddicts_operations.py:60:12: Any[from_another] | str | None is not equivalent to str | None """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml index 4bf027776..08076e2d5 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml @@ -1,50 +1,16 @@ conformance_automated = "Fail" errors_diff = """ -Line 36: Expected 1 errors -Line 65: Expected 1 errors +Line 50: Expected 1 errors Line 82: Expected 1 errors -Line 83: Expected 1 errors -Line 84: Expected 1 errors -Line 119: Expected 1 errors -Line 132: Expected 1 errors -Line 15: Unexpected errors ['./typeddicts_readonly_inheritance.py:15:10: Unexpected ReadOnly annotation [invalid_annotation]'] -Line 43: Unexpected errors ['./typeddicts_readonly_inheritance.py:43:12: Unrecognized annotation object [invalid_annotation]'] -Line 44: Unexpected errors ['./typeddicts_readonly_inheritance.py:44:9: Unexpected ReadOnly annotation [invalid_annotation]'] -Line 49: Unexpected errors ['./typeddicts_readonly_inheritance.py:49:12: Unexpected ReadOnly annotation [invalid_annotation]'] -Line 58: Unexpected errors ['./typeddicts_readonly_inheritance.py:58:10: Unexpected NotRequired annotation [invalid_annotation]'] -Line 62: Unexpected errors ['./typeddicts_readonly_inheritance.py:62:10: Unexpected Required annotation [invalid_annotation]'] -Line 72: Unexpected errors ['./typeddicts_readonly_inheritance.py:72:11: Unexpected NotRequired annotation [invalid_annotation]'] -Line 88: Unexpected errors ['./typeddicts_readonly_inheritance.py:88:7: Unexpected Required annotation [invalid_annotation]'] -Line 89: Unexpected errors ['./typeddicts_readonly_inheritance.py:89:7: Unexpected NotRequired annotation [invalid_annotation]'] -Line 90: Unexpected errors ['./typeddicts_readonly_inheritance.py:90:7: Unexpected Required annotation [invalid_annotation]'] -Line 102: Unexpected errors ['./typeddicts_readonly_inheritance.py:102:7: Unexpected Required annotation [invalid_annotation]'] -Line 111: Unexpected errors ['./typeddicts_readonly_inheritance.py:111:7: Unexpected ReadOnly annotation [invalid_annotation]'] -Line 116: Unexpected errors ['./typeddicts_readonly_inheritance.py:116:7: Unexpected ReadOnly annotation [invalid_annotation]'] -Line 123: Unexpected errors ['./typeddicts_readonly_inheritance.py:123:7: Unexpected NotRequired annotation [invalid_annotation]'] -Line 124: Unexpected errors ['./typeddicts_readonly_inheritance.py:124:7: Unexpected Required annotation [invalid_annotation]'] -Line 128: Unexpected errors ['./typeddicts_readonly_inheritance.py:128:7: Unexpected Required annotation [invalid_annotation]'] -Line 129: Unexpected errors ['./typeddicts_readonly_inheritance.py:129:7: Unexpected NotRequired annotation [invalid_annotation]'] """ output = """ -./typeddicts_readonly_inheritance.py:15:10: Unexpected ReadOnly annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:43:12: Unrecognized annotation object [invalid_annotation] -./typeddicts_readonly_inheritance.py:44:9: Unexpected ReadOnly annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:49:12: Unexpected ReadOnly annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:50:9: Unexpected ReadOnly annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:58:10: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:62:10: Unexpected Required annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:72:11: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:88:7: Unexpected Required annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:89:7: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:90:7: Unexpected Required annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:94:7: Unexpected ReadOnly annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:98:7: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:102:7: Unexpected Required annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:106:7: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:111:7: Unexpected ReadOnly annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:116:7: Unexpected ReadOnly annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:123:7: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:124:7: Unexpected Required annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:128:7: Unexpected Required annotation [invalid_annotation] -./typeddicts_readonly_inheritance.py:129:7: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_readonly_inheritance.py:36:3: Cannot set readonly key 'name' in TypedDict TypedDict({"name": Readonly[str], "year": int}) [readonly_typeddict] +./typeddicts_readonly_inheritance.py:65:0: Incompatible assignment: expected TypedDict({"name": Readonly[str]}), got Literal[{}] [incompatible_assignment] +./typeddicts_readonly_inheritance.py:83:0: Incompatible assignment: expected TypedDict({"ident": str}), got Literal[{'ident': 3}] [incompatible_assignment] +./typeddicts_readonly_inheritance.py:84:0: Incompatible assignment: expected TypedDict({"ident": str}), got Literal[{}] [incompatible_assignment] +./typeddicts_readonly_inheritance.py:94:4: Incompatible TypedDict override for key 'a' [invalid_annotation] +./typeddicts_readonly_inheritance.py:98:4: Incompatible TypedDict override for key 'a' [invalid_annotation] +./typeddicts_readonly_inheritance.py:106:4: Incompatible TypedDict override for key 'c' [invalid_annotation] +./typeddicts_readonly_inheritance.py:119:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] +./typeddicts_readonly_inheritance.py:132:0: TypedDict base classes define key 'x' with incompatible requiredness [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_usage.toml b/conformance/results/pycroscope/typeddicts_usage.toml index 4a08d2813..f29c0fa2e 100644 --- a/conformance/results/pycroscope/typeddicts_usage.toml +++ b/conformance/results/pycroscope/typeddicts_usage.toml @@ -1,10 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 23: Expected 1 errors -Line 24: Expected 1 errors -Line 28: Expected 1 errors Line 35: Expected 1 errors Line 40: Expected 1 errors +Line 30: Unexpected errors ['./typeddicts_usage.py:30:4: TypedDict({"name": str, "year": int}) is not callable [not_callable]'] """ output = """ +./typeddicts_usage.py:23:6: Key 'director' does not exist in TypedDict({"name": str, "year": int}) [invalid_typeddict_key] +./typeddicts_usage.py:24:0: Value for key 'year' must be int, not Literal['1982'] [incompatible_argument] +./typeddicts_usage.py:28:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'title': 'Blade Runner', 'year': 1982}] [incompatible_assignment] +./typeddicts_usage.py:30:4: TypedDict({"name": str, "year": int}) is not callable [not_callable] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 45a45d6de..e05d40708 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -812,7 +812,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Some error suppressing context managers are not detected

-Unknown +Pass Dataclasses @@ -1138,7 +1138,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      narrowing_typeis Pass From ead48e28b00ab802c01cdedfa1e94d44899f15a7 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 20:38:48 -0800 Subject: [PATCH 17/78] progress --- .../results/pycroscope/aliases_explicit.toml | 2 -- .../results/pycroscope/aliases_implicit.toml | 2 -- .../pycroscope/aliases_typealiastype.toml | 8 +---- .../pycroscope/annotations_forward_refs.toml | 34 ++++++++++++++++--- .../pycroscope/annotations_typeexpr.toml | 2 +- .../pycroscope/callables_annotation.toml | 18 ++++------ .../pycroscope/callables_subtyping.toml | 8 +++-- .../results/pycroscope/classes_classvar.toml | 2 +- .../results/pycroscope/dataclasses_final.toml | 12 ++++--- .../results/pycroscope/generics_basic.toml | 2 +- .../pycroscope/generics_self_basic.toml | 10 ++++-- .../generics_syntax_infer_variance.toml | 4 +-- .../generics_typevartuple_args.toml | 20 +++++------ .../generics_typevartuple_basic.toml | 4 +-- .../generics_typevartuple_callable.toml | 4 +-- .../pycroscope/generics_upper_bound.toml | 2 +- .../results/pycroscope/generics_variance.toml | 2 +- .../pycroscope/historical_positional.toml | 6 ++-- .../results/pycroscope/overloads_basic.toml | 14 ++++---- .../pycroscope/overloads_consistency.toml | 6 ++-- .../pycroscope/overloads_definitions.toml | 6 +++- .../pycroscope/qualifiers_annotated.toml | 2 +- .../qualifiers_final_annotation.toml | 4 +-- .../results/pycroscope/specialtypes_any.toml | 2 -- .../results/pycroscope/specialtypes_none.toml | 4 +-- .../pycroscope/typeddicts_alt_syntax.toml | 4 +-- .../pycroscope/typeddicts_extra_items.toml | 20 ++++------- .../pycroscope/typeddicts_inheritance.toml | 2 -- .../typeddicts_readonly_inheritance.toml | 12 +++---- .../results/pycroscope/typeddicts_usage.toml | 8 ++--- conformance/results/results.html | 6 ++-- conformance/tests/overloads_basic.py | 11 +++--- 32 files changed, 127 insertions(+), 116 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 09d8b2a78..7cbd4bc25 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -22,7 +22,6 @@ Line 38: Unexpected errors ['./aliases_explicit.py:38:8: Unrecognized annotation Line 52: Unexpected errors ['./aliases_explicit.py:52:16: list[int] | Any[error] is not equivalent to list[int]'] Line 53: Unexpected errors ['./aliases_explicit.py:53:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str]'] Line 54: Unexpected errors ['./aliases_explicit.py:54:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str]'] -Line 55: Unexpected errors ['./aliases_explicit.py:55:16: (...) -> int is not equivalent to (...) -> int'] Line 56: Unexpected errors ['./aliases_explicit.py:56:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str'] Line 57: Unexpected errors ['./aliases_explicit.py:57:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None'] Line 59: Unexpected errors ['./aliases_explicit.py:59:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None'] @@ -34,7 +33,6 @@ output = """ ./aliases_explicit.py:52:16: list[int] | Any[error] is not equivalent to list[int] ./aliases_explicit.py:53:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str] ./aliases_explicit.py:54:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str] -./aliases_explicit.py:55:16: (...) -> int is not equivalent to (...) -> int ./aliases_explicit.py:56:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str ./aliases_explicit.py:57:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None ./aliases_explicit.py:59:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 1af1dbf0a..a2df75183 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -17,7 +17,6 @@ Line 57: Unexpected errors ['./aliases_implicit.py:57:9: Unrecognized annotation Line 63: Unexpected errors ['./aliases_implicit.py:63:16: list[int] | Any[error] is not equivalent to list[int]'] Line 64: Unexpected errors ['./aliases_implicit.py:64:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str]'] Line 65: Unexpected errors ['./aliases_implicit.py:65:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str]'] -Line 66: Unexpected errors ['./aliases_implicit.py:66:16: (...) -> int is not equivalent to (...) -> int'] Line 67: Unexpected errors ['./aliases_implicit.py:67:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str'] Line 68: Unexpected errors ['./aliases_implicit.py:68:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None'] Line 70: Unexpected errors ['./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None'] @@ -33,7 +32,6 @@ output = """ ./aliases_implicit.py:63:16: list[int] | Any[error] is not equivalent to list[int] ./aliases_implicit.py:64:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str] ./aliases_implicit.py:65:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str] -./aliases_implicit.py:66:16: (...) -> int is not equivalent to (...) -> int ./aliases_implicit.py:67:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str ./aliases_implicit.py:68:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None ./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index 2fa81a48a..884dda992 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -1,5 +1,6 @@ conformance_automated = "Fail" errors_diff = """ +Line 40: Expected 1 errors Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors @@ -20,18 +21,11 @@ Line 62: Expected 1 errors Line 64: Expected 1 errors Line 66: Expected 1 errors Line 35: Unexpected errors ['./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation]'] -Line 36: Unexpected errors ['./aliases_typealiastype.py:36:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 37: Unexpected errors ['./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 38: Unexpected errors ['./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]"] """ output = """ ./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] ./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation] -./aliases_typealiastype.py:36:4: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_typealiastype.py:37:4: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_typealiastype.py:38:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] -./aliases_typealiastype.py:40:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] """ diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index f3d073f55..daa7094a5 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -9,7 +9,17 @@ Line 48: Expected 1 errors Line 53: Expected 1 errors Line 54: Expected 1 errors Line 1: Unexpected errors ['./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]'] -Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] +Line 14: Unexpected errors ['./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name]'] +Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name]'] +Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] +Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] +Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] +Line 67: Unexpected errors ['./annotations_forward_refs.py:67:15: Undefined name: ClassB [undefined_name]'] +Line 69: Unexpected errors ['./annotations_forward_refs.py:69:25: Undefined name: ClassB [undefined_name]'] +Line 70: Unexpected errors ['./annotations_forward_refs.py:70:15: Undefined name: ClassB [undefined_name]'] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation]'] +Line 95: Unexpected errors ['./annotations_forward_refs.py:95:12: Any[from_another] is not equivalent to str'] +Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[from_another] is not equivalent to int'] Line 103: Unexpected errors ['./annotations_forward_refs.py:103:7: Syntax error in type annotation: '] """ output = """ @@ -25,6 +35,17 @@ output = """ ./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]] +./annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:22:6: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:23:11: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] ./annotations_forward_refs.py:45:8: Unrecognized annotation [invalid_annotation] @@ -33,9 +54,14 @@ output = """ ./annotations_forward_refs.py:50:9: Invalid type annotation True [invalid_annotation] ./annotations_forward_refs.py:51:9: Invalid type annotation 1 [invalid_annotation] ./annotations_forward_refs.py:52:9: Invalid type annotation -1 [invalid_annotation] -./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:67:15: Undefined name: ClassB [undefined_name] +./annotations_forward_refs.py:69:25: Undefined name: ClassB [undefined_name] +./annotations_forward_refs.py:70:15: Undefined name: ClassB [undefined_name] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] -./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation] +./annotations_forward_refs.py:89:7: Unrecognized annotation (self) -> None [invalid_annotation] +./annotations_forward_refs.py:95:12: Any[from_another] is not equivalent to str +./annotations_forward_refs.py:96:12: Any[from_another] is not equivalent to int ./annotations_forward_refs.py:103:7: Syntax error in type annotation: """ diff --git a/conformance/results/pycroscope/annotations_typeexpr.toml b/conformance/results/pycroscope/annotations_typeexpr.toml index b207f1610..8402c85ee 100644 --- a/conformance/results/pycroscope/annotations_typeexpr.toml +++ b/conformance/results/pycroscope/annotations_typeexpr.toml @@ -16,5 +16,5 @@ output = """ ./annotations_typeexpr.py:97:9: Invalid type annotation True [invalid_annotation] ./annotations_typeexpr.py:98:9: Invalid type annotation 1 [invalid_annotation] ./annotations_typeexpr.py:99:9: Invalid type annotation -1 [invalid_annotation] -./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] +./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 6ab4a3eeb..14581d4f2 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,9 +4,10 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] -Line 156: Unexpected errors ["./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]"] -Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] +Line 159: Expected 1 errors +Line 172: Expected 1 errors +Line 189: Expected 1 errors +Line 74: Unexpected errors ['./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str | () -> str [incompatible_assignment]'] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -15,13 +16,8 @@ output = """ ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb2' [incompatible_assignment] -./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb4' [incompatible_assignment] -./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] -./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] -./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6 (Protocol with members '__call__'), got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:159:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto5[Any[explicit]], got .../tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str | () -> str [incompatible_assignment] +./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] -./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index 3d495374c..aacf75ec4 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -1,7 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 273: Expected 1 errors -Line 296: Unexpected errors ["./callables_subtyping.py:296:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment]"] +Line 255: Unexpected errors ["./callables_subtyping.py:255:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload]"] +Line 282: Unexpected errors ["./callables_subtyping.py:282:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload]"] """ output = """ ./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment] @@ -34,6 +34,8 @@ output = """ ./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:296:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArg10 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:255:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload] +./callables_subtyping.py:273:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArg9 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.Overloaded9 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:282:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload] ./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index a8fffcf67..46c34939c 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 46: Expected 1 errors -Line 54: Expected 1 errors Line 70: Expected 1 errors Line 71: Expected 1 errors Line 77: Expected 1 errors @@ -20,6 +19,7 @@ output = """ ./classes_classvar.py:45:10: Unrecognized annotation object [invalid_annotation] ./classes_classvar.py:47:10: Unrecognized annotation object [invalid_annotation] ./classes_classvar.py:52:4: Incompatible assignment: expected list[str], got Literal[{}] [incompatible_assignment] +./classes_classvar.py:54:10: Unrecognized annotation object [invalid_annotation] ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index 514f280fe..0f7b7a918 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -5,10 +5,14 @@ Line 35: Expected 1 errors Line 36: Expected 1 errors Line 37: Expected 1 errors Line 38: Expected 1 errors -Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Literal[10] is not equivalent to int'] -Line 32: Unexpected errors ["./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str"] +Line 18: Unexpected errors ['./dataclasses_final.py:18:20: Unrecognized annotation object [invalid_annotation]'] +Line 24: Unexpected errors ['./dataclasses_final.py:24:12: Any[from_another] is not equivalent to int'] +Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int'] +Line 32: Unexpected errors ['./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str'] """ output = """ -./dataclasses_final.py:31:12: Literal[10] is not equivalent to int -./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str +./dataclasses_final.py:18:20: Unrecognized annotation object [invalid_annotation] +./dataclasses_final.py:24:12: Any[from_another] is not equivalent to int +./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int +./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index f7463a132..e1a648d07 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -28,7 +28,7 @@ output = """ ./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) | ~AnyStr: (str, bytes) [unsupported_operation] ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] +./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:67:16: Any[inference] | Any[generic_argument] is not equivalent to str ./generics_basic.py:68:16: str | Any[generic_argument] is not equivalent to str ./generics_basic.py:106:20: Any[from_another] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 202939fef..7e032db78 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -1,8 +1,14 @@ conformance_automated = "Fail" errors_diff = """ -Line 20: Expected 1 errors -Line 33: Expected 1 errors +Line 22: Unexpected errors ['./generics_self_basic.py:22:25: Undefined name: Shape [undefined_name]'] +Line 27: Unexpected errors ['./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT]'] +Line 36: Unexpected errors ['./generics_self_basic.py:36:28: Undefined name: Shape [undefined_name]'] """ output = """ +./generics_self_basic.py:20:15: Undefined name: Shape [undefined_name] +./generics_self_basic.py:22:25: Undefined name: Shape [undefined_name] +./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT] +./generics_self_basic.py:33:15: Undefined name: Shape [undefined_name] +./generics_self_basic.py:36:28: Undefined name: Shape [undefined_name] ./generics_self_basic.py:68:25: Unrecognized annotation object [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index 292ed4ccd..363b99ac9 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -21,8 +21,8 @@ Line 89: Unexpected errors ['./generics_syntax_infer_variance.py:89:7: Unrecogni Line 108: Unexpected errors ['./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition]'] """ output = """ -./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:51:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] ./generics_syntax_infer_variance.py:89:7: Unrecognized annotation object [invalid_annotation] ./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition] diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 9823ecab1..97f535151 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -8,23 +8,23 @@ Line 58: Expected 1 errors Line 59: Expected 1 errors Line 67: Expected 1 errors Line 76: Expected 1 errors -Line 16: Unexpected errors ["./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] +Line 16: Unexpected errors ['./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] -Line 27: Unexpected errors ["./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 27: Unexpected errors ['./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation]'] Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[]'] Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] -Line 42: Unexpected errors ["./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation]"] -Line 51: Unexpected errors ["./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] -Line 62: Unexpected errors ["./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 42: Unexpected errors ['./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation]'] +Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation]'] +Line 62: Unexpected errors ['./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation]'] """ output = """ -./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation] ./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[] ./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation] -./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] -./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation] +./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation] +./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation] ./generics_typevartuple_args.py:75:0: Incompatible argument type for args: expected tuple[tuple[Any[explicit]], ...] but got tuple[Literal[(0,)], Literal[(1, 2)]] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 7e4222a01..cb81d05c8 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -10,11 +10,11 @@ Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') -Line 16: Unexpected errors ["./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] +Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[Any[explicit]] is not equivalent to tuple[int]'] """ output = """ -./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] +./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_basic.py:59:23: Invalid type annotation Shape [invalid_annotation] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index bf2113047..c04a5e0f2 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -3,12 +3,12 @@ errors_diff = """ Line 26: Expected 1 errors Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int]'] Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str]'] -Line 45: Unexpected errors ["./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 45: Unexpected errors ['./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation]'] Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ ./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int] ./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str] -./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation] ./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index c7b5c3e9d..6d93bd6d2 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -9,5 +9,5 @@ output = """ ./generics_upper_bound.py:38:12: Any[generic_argument] | Literal[{1}, {1, 2}] is not equivalent to set[int] ./generics_upper_bound.py:43:12: Any[generic_argument] | Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] ./generics_upper_bound.py:51:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] -./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] +./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index 1f9896bd2..a4a903543 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -15,7 +15,7 @@ Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') Line 45: Unexpected errors ['./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation]', './generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation]'] """ output = """ -./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] +./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] ./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] ./generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation] """ diff --git a/conformance/results/pycroscope/historical_positional.toml b/conformance/results/pycroscope/historical_positional.toml index 225aec04c..ae78858de 100644 --- a/conformance/results/pycroscope/historical_positional.toml +++ b/conformance/results/pycroscope/historical_positional.toml @@ -1,9 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 18: Expected 1 errors -Line 26: Expected 1 errors -Line 54: Expected 1 errors Line 59: Expected 1 errors """ output = """ +./historical_positional.py:18:0: Missing required positional argument '__x' [incompatible_call] +./historical_positional.py:26:15: Historical positional-only parameter may not follow a positional-or-keyword parameter [invalid_positional_only] +./historical_positional.py:54:25: Historical positional-only parameter may not follow a positional-or-keyword parameter [invalid_positional_only] """ diff --git a/conformance/results/pycroscope/overloads_basic.toml b/conformance/results/pycroscope/overloads_basic.toml index 5bf8e7a6a..4bcd4f7d1 100644 --- a/conformance/results/pycroscope/overloads_basic.toml +++ b/conformance/results/pycroscope/overloads_basic.toml @@ -1,12 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 37: Unexpected errors ['./overloads_basic.py:37:12: Literal[0] is not equivalent to int'] -Line 38: Unexpected errors ["./overloads_basic.py:38:12: Literal[b''] is not equivalent to bytes"] -Line 59: Unexpected errors ['./overloads_basic.py:59:0: Function may exit without returning a value [missing_return]'] +Line 36: Expected 1 errors +Line 34: Unexpected errors ['./overloads_basic.py:34:12: Any[from_another] is not equivalent to int'] +Line 35: Unexpected errors ['./overloads_basic.py:35:12: Any[from_another] is not equivalent to bytes'] +Line 56: Unexpected errors ['./overloads_basic.py:56:0: Function may exit without returning a value [missing_return]'] """ output = """ -./overloads_basic.py:37:12: Literal[0] is not equivalent to int -./overloads_basic.py:38:12: Literal[b''] is not equivalent to bytes -./overloads_basic.py:39:0: Cannot call overloaded function [incompatible_argument] -./overloads_basic.py:59:0: Function may exit without returning a value [missing_return] +./overloads_basic.py:34:12: Any[from_another] is not equivalent to int +./overloads_basic.py:35:12: Any[from_another] is not equivalent to bytes +./overloads_basic.py:56:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/overloads_consistency.toml b/conformance/results/pycroscope/overloads_consistency.toml index e389cd61b..69bde2f94 100644 --- a/conformance/results/pycroscope/overloads_consistency.toml +++ b/conformance/results/pycroscope/overloads_consistency.toml @@ -1,7 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Lines 25, 28: Expected error (tag 'return_type') -Lines 41, 44: Expected error (tag 'parameter_type') """ output = """ +./overloads_consistency.py:25:0: Overload for 'return_type' is inconsistent with implementation [inconsistent_overload] +./overloads_consistency.py:41:0: Overload for 'parameter_type' is inconsistent with implementation [inconsistent_overload] """ diff --git a/conformance/results/pycroscope/overloads_definitions.toml b/conformance/results/pycroscope/overloads_definitions.toml index d55c1d722..5b9460beb 100644 --- a/conformance/results/pycroscope/overloads_definitions.toml +++ b/conformance/results/pycroscope/overloads_definitions.toml @@ -3,13 +3,17 @@ errors_diff = """ Lines 15, 16: Expected error (tag 'func1') Lines 27, 28: Expected error (tag 'func2') Lines 58, 59: Expected error (tag 'not_abstract') -Lines 71, 73, 78, 81: Expected error (tag 'func5') +Lines 71, 73, 78, 81: Expected exactly one error (tag 'func5') Lines 122, 123, 124, 128: Expected error (tag 'invalid_final') Lines 137, 138, 139, 143, 144: Expected error (tag 'invalid_final_2') Lines 175, 180, 181, 186, 188: Expected error (tag 'override-final') Lines 226, 227, 228, 231, 232: Expected error (tag 'override_impl') +Line 73: Unexpected errors ["./overloads_definitions.py:73:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload]"] +Line 78: Unexpected errors ["./overloads_definitions.py:78:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload]"] """ output = """ +./overloads_definitions.py:73:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload] +./overloads_definitions.py:78:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload] ./overloads_definitions.py:84:5: Incompatible argument type for func: expected (...) -> Any[explicit] but got classmethod[.../tests/overloads_definitions.py.C, (x: int, /) -> Any[unannotated], int] [incompatible_argument] ./overloads_definitions.py:203:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 35c51bfe9..595a8c60d 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -7,7 +7,6 @@ Line 43: Expected 1 errors Line 44: Expected 1 errors Line 49: Expected 1 errors Line 59: Expected 1 errors -Line 86: Expected 1 errors Line 87: Expected 1 errors Line 88: Expected 1 errors """ @@ -22,4 +21,5 @@ output = """ ./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:79:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[str, '']] [incompatible_argument] ./qualifiers_annotated.py:80:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[int, '']] [incompatible_argument] +./qualifiers_annotated.py:86:0: Traceback (most recent call last): """ diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml index d9d9cce16..532bda741 100644 --- a/conformance/results/pycroscope/qualifiers_final_annotation.toml +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -10,8 +10,6 @@ Line 65: Expected 1 errors Line 67: Expected 1 errors Line 81: Expected 1 errors Line 94: Expected 1 errors -Line 107: Expected 1 errors -Line 108: Expected 1 errors Line 141: Expected 1 errors Line 166: Expected 1 errors Line 170: Expected 1 errors @@ -20,6 +18,8 @@ Line 168: Unexpected errors ["./qualifiers_final_annotation.py:168:0: Cannot imp output = """ ./qualifiers_final_annotation.py:18:6: Unrecognized annotation object [invalid_annotation] ./qualifiers_final_annotation.py:71:0: Cannot assign to final name RATE [incompatible_assignment] +./qualifiers_final_annotation.py:107:12: Unrecognized annotation object [invalid_annotation] +./qualifiers_final_annotation.py:108:12: Unrecognized annotation object [invalid_annotation] ./qualifiers_final_annotation.py:118:3: Unrecognized annotation typing.Final[] [invalid_annotation] ./qualifiers_final_annotation.py:121:13: Unexpected Final annotation [invalid_annotation] ./qualifiers_final_annotation.py:134:0: In call to pycroscope.signature.N: Missing required argument 'x' [incompatible_call] diff --git a/conformance/results/pycroscope/specialtypes_any.toml b/conformance/results/pycroscope/specialtypes_any.toml index cd09044b5..457a71e89 100644 --- a/conformance/results/pycroscope/specialtypes_any.toml +++ b/conformance/results/pycroscope/specialtypes_any.toml @@ -1,9 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 72: Unexpected errors ['./specialtypes_any.py:72:16: (...) -> Any[explicit] is not equivalent to (...) -> Any[explicit]'] Line 86: Unexpected errors ['./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int'] """ output = """ -./specialtypes_any.py:72:16: (...) -> Any[explicit] is not equivalent to (...) -> Any[explicit] ./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/specialtypes_none.toml b/conformance/results/pycroscope/specialtypes_none.toml index 14beedc0a..56430ab4c 100644 --- a/conformance/results/pycroscope/specialtypes_none.toml +++ b/conformance/results/pycroscope/specialtypes_none.toml @@ -1,8 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 41: Expected 1 errors """ output = """ ./specialtypes_none.py:21:6: Incompatible argument type for val1: expected None but got type [incompatible_argument] ./specialtypes_none.py:27:0: Incompatible assignment: expected collections.abc.Iterable (Protocol with members '__iter__'), got None [incompatible_assignment] +./specialtypes_none.py:41:6: Incompatible argument type for val1: expected type[NoneType] but got None [incompatible_argument] """ diff --git a/conformance/results/pycroscope/typeddicts_alt_syntax.toml b/conformance/results/pycroscope/typeddicts_alt_syntax.toml index 8c64d3c92..929b2b250 100644 --- a/conformance/results/pycroscope/typeddicts_alt_syntax.toml +++ b/conformance/results/pycroscope/typeddicts_alt_syntax.toml @@ -5,6 +5,6 @@ Line 27: Expected 1 errors Line 31: Expected 1 errors """ output = """ -./typeddicts_alt_syntax.py:35:16: In call to typing.TypedDict: Got an unexpected keyword argument 'other' [incompatible_call] -./typeddicts_alt_syntax.py:41:9: In call to typing.TypedDict: Got unexpected keyword arguments 'name', 'year' [incompatible_call] +./typeddicts_alt_syntax.py:35:16: Error calling (typename, fields=None, /, *, total=Literal[True], **kwargs) -> Any[unannotated]: TypedDict takes either a dict or keyword arguments, but not both [incompatible_call] +./typeddicts_alt_syntax.py:45:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': ''}] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml index ff53f82e7..d39c67f7b 100644 --- a/conformance/results/pycroscope/typeddicts_extra_items.toml +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 15: Expected 1 errors -Line 22: Expected 1 errors Line 49: Expected 1 errors Line 67: Expected 1 errors Line 73: Expected 1 errors @@ -21,15 +20,11 @@ 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 19: Unexpected errors ["./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call]"] Line 29: Unexpected errors ['./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool', "./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key]"] Line 129: Unexpected errors ["./typeddicts_extra_items.py:129:14: Key Literal['year'] does not exist in TypedDict [invalid_typeddict_key]"] Line 140: Unexpected errors ['./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation]'] Line 141: Unexpected errors ['./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation]'] -Line 277: Unexpected errors ['./typeddicts_extra_items.py:277:0: TypedDict({"name": str}) is not callable [not_callable]'] -Line 283: Unexpected errors ['./typeddicts_extra_items.py:283:0: TypedDict({"name": str}) is not callable [not_callable]'] -Line 284: Unexpected errors ['./typeddicts_extra_items.py:284:0: TypedDict({"name": str}) is not callable [not_callable]'] -Line 292: Unexpected errors ['./typeddicts_extra_items.py:292:0: TypedDict({"name": str}) is not callable [not_callable]'] +Line 284: Unexpected errors ["./typeddicts_extra_items.py:284:0: Got an unexpected keyword argument 'year' [incompatible_call]"] Line 310: Unexpected errors ['./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]]'] Line 311: Unexpected errors ['./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str]'] Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[from_another] | Any[explicit] is not equivalent to tuple[str, int]'] @@ -37,7 +32,7 @@ Line 342: Unexpected errors ['./typeddicts_extra_items.py:342:26: Cannot set unk Line 343: Unexpected errors ['./typeddicts_extra_items.py:343:30: Key str does not exist in TypedDict [invalid_typeddict_key]'] """ output = """ -./typeddicts_extra_items.py:19:18: In call to typing.TypedDict: Got an unexpected keyword argument 'extra_items' [incompatible_call] +./typeddicts_extra_items.py:22:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": bool}, closed=True), got Literal[{'name': 'Blade Runner', 'year': 1982}] [incompatible_assignment] ./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool ./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key] ./typeddicts_extra_items.py:39:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': None}] [incompatible_assignment] @@ -45,13 +40,10 @@ output = """ ./typeddicts_extra_items.py:129:14: Key Literal['year'] does not exist in TypedDict [invalid_typeddict_key] ./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation] ./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation] -./typeddicts_extra_items.py:277:0: TypedDict({"name": str}) is not callable [not_callable] -./typeddicts_extra_items.py:278:0: TypedDict({"name": str}) is not callable [not_callable] -./typeddicts_extra_items.py:283:0: TypedDict({"name": str}) is not callable [not_callable] -./typeddicts_extra_items.py:284:0: TypedDict({"name": str}) is not callable [not_callable] -./typeddicts_extra_items.py:285:0: TypedDict({"name": str}) is not callable [not_callable] -./typeddicts_extra_items.py:292:0: TypedDict({"name": str}) is not callable [not_callable] -./typeddicts_extra_items.py:293:0: TypedDict({"name": str}) is not callable [not_callable] +./typeddicts_extra_items.py:278:0: Got an unexpected keyword argument 'year' [incompatible_call] +./typeddicts_extra_items.py:284:0: Got an unexpected keyword argument 'year' [incompatible_call] +./typeddicts_extra_items.py:285:0: Got an unexpected keyword argument 'language' [incompatible_call] +./typeddicts_extra_items.py:293:0: Got an unexpected keyword argument 'year' [incompatible_call] ./typeddicts_extra_items.py:303:0: Incompatible assignment: expected collections.abc.Mapping[str, int], got Any[error] | TypedDict({"name": str}) [incompatible_assignment] ./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]] ./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str] diff --git a/conformance/results/pycroscope/typeddicts_inheritance.toml b/conformance/results/pycroscope/typeddicts_inheritance.toml index 13a56050a..815460c58 100644 --- a/conformance/results/pycroscope/typeddicts_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_inheritance.toml @@ -1,10 +1,8 @@ conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors -Line 36: Unexpected errors ['./typeddicts_inheritance.py:36:5: TypedDict({"x": int, "y": str, "z": bool}) is not callable [not_callable]'] """ output = """ -./typeddicts_inheritance.py:36:5: TypedDict({"x": int, "y": str, "z": bool}) is not callable [not_callable] ./typeddicts_inheritance.py:55:3: Incompatible TypedDict override for key 'x' [invalid_annotation] ./typeddicts_inheritance.py:65:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml index 08076e2d5..2407d2ba3 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml @@ -1,16 +1,16 @@ conformance_automated = "Fail" errors_diff = """ Line 50: Expected 1 errors -Line 82: Expected 1 errors +Line 94: Expected 1 errors +Line 98: Expected 1 errors +Line 106: Expected 1 errors +Line 119: Expected 1 errors +Line 132: Expected 1 errors """ output = """ ./typeddicts_readonly_inheritance.py:36:3: Cannot set readonly key 'name' in TypedDict TypedDict({"name": Readonly[str], "year": int}) [readonly_typeddict] ./typeddicts_readonly_inheritance.py:65:0: Incompatible assignment: expected TypedDict({"name": Readonly[str]}), got Literal[{}] [incompatible_assignment] +./typeddicts_readonly_inheritance.py:82:0: Value for key 'ident' must be str, not Literal[3] [incompatible_argument] ./typeddicts_readonly_inheritance.py:83:0: Incompatible assignment: expected TypedDict({"ident": str}), got Literal[{'ident': 3}] [incompatible_assignment] ./typeddicts_readonly_inheritance.py:84:0: Incompatible assignment: expected TypedDict({"ident": str}), got Literal[{}] [incompatible_assignment] -./typeddicts_readonly_inheritance.py:94:4: Incompatible TypedDict override for key 'a' [invalid_annotation] -./typeddicts_readonly_inheritance.py:98:4: Incompatible TypedDict override for key 'a' [invalid_annotation] -./typeddicts_readonly_inheritance.py:106:4: Incompatible TypedDict override for key 'c' [invalid_annotation] -./typeddicts_readonly_inheritance.py:119:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] -./typeddicts_readonly_inheritance.py:132:0: TypedDict base classes define key 'x' with incompatible requiredness [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_usage.toml b/conformance/results/pycroscope/typeddicts_usage.toml index f29c0fa2e..0c836ae99 100644 --- a/conformance/results/pycroscope/typeddicts_usage.toml +++ b/conformance/results/pycroscope/typeddicts_usage.toml @@ -1,12 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 35: Expected 1 errors -Line 40: Expected 1 errors -Line 30: Unexpected errors ['./typeddicts_usage.py:30:4: TypedDict({"name": str, "year": int}) is not callable [not_callable]'] """ output = """ ./typeddicts_usage.py:23:6: Key 'director' does not exist in TypedDict({"name": str, "year": int}) [invalid_typeddict_key] ./typeddicts_usage.py:24:0: Value for key 'year' must be int, not Literal['1982'] [incompatible_argument] ./typeddicts_usage.py:28:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'title': 'Blade Runner', 'year': 1982}] [incompatible_assignment] -./typeddicts_usage.py:30:4: TypedDict({"name": str, "year": int}) is not callable [not_callable] +./typeddicts_usage.py:35:21: Second argument to "isinstance" cannot be a TypedDict [incompatible_argument] +./typeddicts_usage.py:40:23: TypedDict cannot be used as a TypeVar bound [invalid_annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index e05d40708..4eb6dd2fc 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -253,7 +253,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      specialtypes_promotions Pass @@ -781,7 +781,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      overloads_definitions
Partial

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

@@ -1028,7 +1028,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Tuples diff --git a/conformance/tests/overloads_basic.py b/conformance/tests/overloads_basic.py index 7aee51d87..e4a94aeb4 100644 --- a/conformance/tests/overloads_basic.py +++ b/conformance/tests/overloads_basic.py @@ -19,18 +19,15 @@ class Bytes: ... @overload - def __getitem__(self, __i: int) -> int: + def __getitem__(self, i: int, /) -> int: ... @overload - def __getitem__(self, __s: slice) -> bytes: + def __getitem__(self, s: slice, /) -> bytes: ... - def __getitem__(self, __i_or_s: int | slice) -> int | bytes: - if isinstance(__i_or_s, int): - return 0 - else: - return b"" + def __getitem__(self, i_or_s: int | slice, /) -> int | bytes: + raise NotImplementedError b = Bytes() From bb68f8ae04bcfe501a97352e2ac3a753453ebc22 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 21:53:56 -0800 Subject: [PATCH 18/78] progress --- .../pycroscope/annotations_forward_refs.toml | 12 +--- .../pycroscope/callables_annotation.toml | 14 ++++ .../pycroscope/callables_protocol.toml | 68 +++++++++++++++---- .../pycroscope/callables_subtyping.toml | 6 +- .../results/pycroscope/classes_classvar.toml | 10 +-- .../pycroscope/constructors_call_init.toml | 14 +--- .../constructors_call_metaclass.toml | 8 ++- .../pycroscope/constructors_call_new.toml | 15 ++-- .../pycroscope/constructors_callable.toml | 66 ++++++++++++------ .../pycroscope/dataclasses_descriptors.toml | 4 -- .../results/pycroscope/dataclasses_final.toml | 4 +- .../pycroscope/dataclasses_match_args.toml | 21 +++--- .../results/pycroscope/dataclasses_slots.toml | 4 +- .../dataclasses_transform_converter.toml | 2 + .../results/pycroscope/dataclasses_usage.toml | 4 +- .../pycroscope/directives_deprecated.toml | 6 +- .../results/pycroscope/enums_behaviors.toml | 16 ++++- .../pycroscope/enums_member_values.toml | 17 +++-- .../results/pycroscope/enums_members.toml | 30 ++++---- .../pycroscope/generics_base_class.toml | 6 +- .../results/pycroscope/generics_basic.toml | 17 +++-- .../results/pycroscope/generics_defaults.toml | 10 +++ .../generics_defaults_specialization.toml | 2 + .../pycroscope/generics_self_advanced.toml | 4 ++ .../pycroscope/generics_self_basic.toml | 18 +++-- .../pycroscope/generics_self_usage.toml | 4 +- .../generics_syntax_infer_variance.toml | 32 ++++++--- .../pycroscope/generics_syntax_scoping.toml | 8 +++ .../pycroscope/namedtuples_define_class.toml | 10 +++ .../pycroscope/overloads_evaluation.toml | 6 ++ .../pycroscope/protocols_class_objects.toml | 18 +++-- .../results/pycroscope/protocols_merging.toml | 4 ++ .../pycroscope/protocols_recursive.toml | 7 +- .../pycroscope/protocols_subtyping.toml | 10 ++- .../pycroscope/qualifiers_annotated.toml | 2 +- .../results/pycroscope/specialtypes_any.toml | 2 + .../results/pycroscope/specialtypes_type.toml | 12 ++++ conformance/results/results.html | 2 +- 38 files changed, 337 insertions(+), 158 deletions(-) diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index daa7094a5..bc334d242 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -14,12 +14,8 @@ Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] -Line 67: Unexpected errors ['./annotations_forward_refs.py:67:15: Undefined name: ClassB [undefined_name]'] -Line 69: Unexpected errors ['./annotations_forward_refs.py:69:25: Undefined name: ClassB [undefined_name]'] -Line 70: Unexpected errors ['./annotations_forward_refs.py:70:15: Undefined name: ClassB [undefined_name]'] Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation]'] -Line 95: Unexpected errors ['./annotations_forward_refs.py:95:12: Any[from_another] is not equivalent to str'] -Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[from_another] is not equivalent to int'] +Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] Line 103: Unexpected errors ['./annotations_forward_refs.py:103:7: Syntax error in type annotation: '] """ output = """ @@ -55,13 +51,9 @@ output = """ ./annotations_forward_refs.py:51:9: Invalid type annotation 1 [invalid_annotation] ./annotations_forward_refs.py:52:9: Invalid type annotation -1 [invalid_annotation] ./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:67:15: Undefined name: ClassB [undefined_name] -./annotations_forward_refs.py:69:25: Undefined name: ClassB [undefined_name] -./annotations_forward_refs.py:70:15: Undefined name: ClassB [undefined_name] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] ./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation] ./annotations_forward_refs.py:89:7: Unrecognized annotation (self) -> None [invalid_annotation] -./annotations_forward_refs.py:95:12: Any[from_another] is not equivalent to str -./annotations_forward_refs.py:96:12: Any[from_another] is not equivalent to int +./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int ./annotations_forward_refs.py:103:7: Syntax error in type annotation: """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 14581d4f2..7ddcc2a4f 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -8,6 +8,13 @@ Line 159: Expected 1 errors Line 172: Expected 1 errors Line 189: Expected 1 errors Line 74: Unexpected errors ['./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str | () -> str [incompatible_assignment]'] +Line 147: Unexpected errors ['./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment]'] +Line 148: Unexpected errors ['./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1, got (...) -> None [incompatible_assignment]'] +Line 151: Unexpected errors ['./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 [incompatible_assignment]'] +Line 152: Unexpected errors ['./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment]'] +Line 153: Unexpected errors ['./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 [incompatible_assignment]'] +Line 154: Unexpected errors ['./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3, got (...) -> None [incompatible_assignment]'] +Line 157: Unexpected errors ['./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6, got ./callables_annotation.py.Proto7 [incompatible_assignment]'] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -19,5 +26,12 @@ output = """ ./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str | () -> str [incompatible_assignment] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] +./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment] +./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1, got (...) -> None [incompatible_assignment] +./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 [incompatible_assignment] +./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment] +./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 [incompatible_assignment] +./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3, got (...) -> None [incompatible_assignment] +./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6, got ./callables_annotation.py.Proto7 [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 07c877bb3..e2500d13c 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -1,48 +1,88 @@ conformance_automated = "Fail" errors_diff = """ -Line 35: Expected 1 errors -Line 36: Expected 1 errors -Line 37: Expected 1 errors -Line 67: Expected 1 errors -Line 68: Expected 1 errors -Line 69: Expected 1 errors -Line 70: Expected 1 errors -Line 97: Expected 1 errors -Line 121: Expected 1 errors -Line 169: Expected 1 errors Line 186: Expected 1 errors Line 187: Expected 1 errors Line 197: Expected 1 errors -Line 238: Expected 1 errors -Line 260: Expected 1 errors -Line 284: Expected 1 errors -Line 311: Expected 1 errors Line 14: Unexpected errors ['./callables_protocol.py:14:4: Function may exit without returning a value [missing_return]'] +Line 34: Unexpected errors ['./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment]'] +Line 65: Unexpected errors ['./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] +Line 78: Unexpected errors ['./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] +Line 79: Unexpected errors ['./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment]'] +Line 80: Unexpected errors ['./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] +Line 81: Unexpected errors ['./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment]'] +Line 82: Unexpected errors ['./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] Line 101: Unexpected errors ['./callables_protocol.py:101:4: Function may exit without returning a value [missing_return]'] +Line 109: Unexpected errors ['./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5, got (a: int, b: str) -> int [incompatible_assignment]'] Line 125: Unexpected errors ['./callables_protocol.py:125:4: Function may exit without returning a value [missing_return]'] Line 156: Unexpected errors ['./callables_protocol.py:156:4: Function may exit without returning a value [missing_return]'] +Line 168: Unexpected errors ['./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]'] Line 179: Unexpected errors ['./callables_protocol.py:179:4: Function may exit without returning a value [missing_return]'] +Line 216: Unexpected errors ['./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment]'] Line 220: Unexpected errors ['./callables_protocol.py:220:4: Function may exit without returning a value [missing_return]'] Line 224: Unexpected errors ['./callables_protocol.py:224:0: Function may exit without returning a value [missing_return]'] Line 228: Unexpected errors ['./callables_protocol.py:228:0: Function may exit without returning a value [missing_return]'] Line 232: Unexpected errors ['./callables_protocol.py:232:0: Function may exit without returning a value [missing_return]'] +Line 236: Unexpected errors ['./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]'] +Line 237: Unexpected errors ['./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]'] +Line 258: Unexpected errors ['./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment]'] +Line 259: Unexpected errors ['./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment]'] Line 265: Unexpected errors ['./callables_protocol.py:265:4: Function may exit without returning a value [missing_return]'] Line 271: Unexpected errors ['./callables_protocol.py:271:4: Function may exit without returning a value [missing_return]'] +Line 283: Unexpected errors ["./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str = Literal['']) -> str [incompatible_assignment]"] +Line 286: Unexpected errors ["./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str = Literal['']) -> str [incompatible_assignment]"] +Line 287: Unexpected errors ['./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str) -> str [incompatible_assignment]'] Line 292: Unexpected errors ['./callables_protocol.py:292:4: Function may exit without returning a value [missing_return]'] Line 298: Unexpected errors ['./callables_protocol.py:298:4: Function may exit without returning a value [missing_return]'] +Line 310: Unexpected errors ["./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default, got (*, path: str = Literal['']) -> str [incompatible_assignment]"] +Line 312: Unexpected errors ["./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str = Literal['']) -> str [incompatible_assignment]"] +Line 313: Unexpected errors ['./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str) -> str [incompatible_assignment]'] """ output = """ ./callables_protocol.py:14:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:36:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...]) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:37:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_len: str | None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:67:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:68:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:69:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:70:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4, got (x: int) -> None [incompatible_assignment] ./callables_protocol.py:101:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5, got (a: int, b: str) -> int [incompatible_assignment] +./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:125:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:156:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:179:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment] ./callables_protocol.py:220:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:224:0: Function may exit without returning a value [missing_return] ./callables_protocol.py:228:0: Function may exit without returning a value [missing_return] ./callables_protocol.py:232:0: Function may exit without returning a value [missing_return] +./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment] +./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment] +./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] ./callables_protocol.py:265:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:271:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str) -> str [incompatible_assignment] +./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str) -> str [incompatible_assignment] ./callables_protocol.py:292:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:298:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default, got (*, path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:311:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default, got (*, path: str) -> str [incompatible_assignment] +./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index aacf75ec4..d4f6c88e3 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -1,7 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 255: Unexpected errors ["./callables_subtyping.py:255:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload]"] -Line 282: Unexpected errors ["./callables_subtyping.py:282:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload]"] """ output = """ ./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment] @@ -34,8 +32,6 @@ output = """ ./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] ./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:255:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload] ./callables_subtyping.py:273:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArg9 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.Overloaded9 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:282:4: Overload for '__call__' is inconsistent with implementation [inconsistent_overload] ./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 46c34939c..533bfe32a 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -7,9 +7,7 @@ Line 77: Expected 1 errors Line 78: Expected 1 errors Line 111: Expected 1 errors Line 140: Expected 1 errors -Line 81: Unexpected errors ['./classes_classvar.py:81:12: Any[from_another] is not equivalent to int'] -Line 82: Unexpected errors ['./classes_classvar.py:82:12: Any[from_another] is not equivalent to list[str]'] -Line 107: Unexpected errors ['./classes_classvar.py:107:33: Undefined name: Starship [undefined_name]', './classes_classvar.py:107:8: Undefined name: Starship [undefined_name]'] +Line 107: Unexpected errors ["./classes_classvar.py:107:33: Starship has no attribute 'stats' [undefined_attribute]", "./classes_classvar.py:107:8: Starship has no attribute 'stats' [undefined_attribute]"] """ output = """ ./classes_classvar.py:38:10: Unrecognized annotation object [invalid_annotation] @@ -23,8 +21,6 @@ output = """ ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] -./classes_classvar.py:81:12: Any[from_another] is not equivalent to int -./classes_classvar.py:82:12: Any[from_another] is not equivalent to list[str] -./classes_classvar.py:107:33: Undefined name: Starship [undefined_name] -./classes_classvar.py:107:8: Undefined name: Starship [undefined_name] +./classes_classvar.py:107:33: Starship has no attribute 'stats' [undefined_attribute] +./classes_classvar.py:107:8: Starship has no attribute 'stats' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 6c13cceb8..10da00ee5 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -3,18 +3,10 @@ errors_diff = """ Line 21: Expected 1 errors Line 42: Expected 1 errors Line 56: Expected 1 errors +Line 107: Expected 1 errors Line 130: Expected 1 errors -Line 51: Unexpected errors ['./constructors_call_init.py:51:23: Undefined name: Class4 [undefined_name]'] -Line 61: Unexpected errors ['./constructors_call_init.py:61:23: Undefined name: Class5 [undefined_name]'] -Line 63: Unexpected errors ['./constructors_call_init.py:63:23: Undefined name: Class5 [undefined_name]'] -Line 88: Unexpected errors ['./constructors_call_init.py:88:23: Undefined name: Class6 [undefined_name]'] -Line 96: Unexpected errors ['./constructors_call_init.py:96:23: Undefined name: Class7 [undefined_name]'] +Line 129: Unexpected errors ['./constructors_call_init.py:129:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class11'] """ output = """ -./constructors_call_init.py:51:23: Undefined name: Class4 [undefined_name] -./constructors_call_init.py:61:23: Undefined name: Class5 [undefined_name] -./constructors_call_init.py:63:23: Undefined name: Class5 [undefined_name] -./constructors_call_init.py:88:23: Undefined name: Class6 [undefined_name] -./constructors_call_init.py:96:23: Undefined name: Class7 [undefined_name] -./constructors_call_init.py:107:23: Undefined name: Class8 [undefined_name] +./constructors_call_init.py:129:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class11 """ diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index b2693e7f0..03a713be9 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -3,9 +3,13 @@ errors_diff = """ Line 54: Expected 1 errors Line 68: Expected 1 errors Line 26: Unexpected errors ['./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never'] -Line 30: Unexpected errors ['./constructors_call_metaclass.py:30:42: Undefined name: Meta2 [undefined_name]'] +Line 39: Unexpected errors ['./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 55: Unexpected errors ['./constructors_call_metaclass.py:55:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class3'] +Line 69: Unexpected errors ['./constructors_call_metaclass.py:69:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class4'] """ output = """ ./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never -./constructors_call_metaclass.py:30:42: Undefined name: Meta2 [undefined_name] +./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_metaclass.py:55:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class3 +./constructors_call_metaclass.py:69:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class4 """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 4e40e0e2f..31ec0d34f 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -3,18 +3,15 @@ errors_diff = """ Line 21: Expected 1 errors Line 148: Expected 1 errors Line 49: Unexpected errors ['./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int'] -Line 57: Unexpected errors ['./constructors_call_new.py:57:24: Undefined name: Class4 [undefined_name]'] +Line 64: Unexpected errors ['./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never'] -Line 82: Unexpected errors ['./constructors_call_new.py:82:24: Undefined name: Class6 [undefined_name]'] -Line 113: Unexpected errors ['./constructors_call_new.py:113:41: Undefined name: Class8 [undefined_name]'] -Line 142: Unexpected errors ['./constructors_call_new.py:142:21: Undefined name: Class11 [undefined_name]', './constructors_call_new.py:142:46: Undefined name: Class11 [undefined_name]'] +Line 89: Unexpected errors ['./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 104: Unexpected errors ['./constructors_call_new.py:104:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class7'] """ output = """ ./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int -./constructors_call_new.py:57:24: Undefined name: Class4 [undefined_name] +./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never -./constructors_call_new.py:82:24: Undefined name: Class6 [undefined_name] -./constructors_call_new.py:113:41: Undefined name: Class8 [undefined_name] -./constructors_call_new.py:142:21: Undefined name: Class11 [undefined_name] -./constructors_call_new.py:142:46: Undefined name: Class11 [undefined_name] +./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_new.py:104:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class7 """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index fbecd013d..84df75827 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -12,26 +12,52 @@ Line 129: Expected 1 errors Line 146: Expected 1 errors Line 186: Expected 1 errors Line 197: Expected 1 errors -Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[generic_argument] | Any[from_another] is not equivalent to int'] -Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[generic_argument] | Any[from_another] is not equivalent to Never'] -Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[generic_argument] | Any[from_another] is not equivalent to Never'] -Line 155: Unexpected errors ['./constructors_callable.py:155:23: Undefined name: Class7 [undefined_name]'] -Line 157: Unexpected errors ['./constructors_callable.py:157:23: Undefined name: Class7 [undefined_name]'] +Line 35: Unexpected errors ['./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument]'] +Line 37: Unexpected errors ['./constructors_callable.py:37:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class1'] +Line 48: Unexpected errors ['./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument]'] +Line 50: Unexpected errors ['./constructors_callable.py:50:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class2'] +Line 63: Unexpected errors ['./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument]'] +Line 65: Unexpected errors ['./constructors_callable.py:65:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class3'] +Line 78: Unexpected errors ['./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument]'] +Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to int'] +Line 98: Unexpected errors ['./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument]'] +Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never'] +Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never'] +Line 126: Unexpected errors ['./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument]'] +Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class6Proxy'] +Line 143: Unexpected errors ['./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument]'] +Line 162: Unexpected errors ['./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument]'] +Line 183: Unexpected errors ['./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument]'] +Line 194: Unexpected errors ['./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument]'] +Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class9'] """ output = """ -./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:80:12: Any[generic_argument] | Any[from_another] is not equivalent to int -./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:102:16: Any[generic_argument] | Any[from_another] is not equivalent to Never -./constructors_callable.py:107:16: Any[generic_argument] | Any[from_another] is not equivalent to Never -./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:155:23: Undefined name: Class7 [undefined_name] -./constructors_callable.py:157:23: Undefined name: Class7 [undefined_name] -./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] -./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[generic_argument] | Any[unannotated]' [reveal_type] +./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument] +./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:37:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class1 +./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument] +./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:50:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class2 +./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument] +./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:65:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class3 +./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument] +./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:80:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to int +./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument] +./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:102:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never +./constructors_callable.py:107:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never +./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument] +./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:128:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class6Proxy +./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument] +./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument] +./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument] +./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument] +./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:196:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class9 """ diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index 73f0191d2..6d27d46c8 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,7 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 16: Unexpected errors ['./dataclasses_descriptors.py:16:52: Undefined name: Desc1 [undefined_name]'] -Line 23: Unexpected errors ['./dataclasses_descriptors.py:23:61: Undefined name: Desc1 [undefined_name]'] Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int'] Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int]'] Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str]'] @@ -11,8 +9,6 @@ Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: Any[from_anot Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str'] """ output = """ -./dataclasses_descriptors.py:16:52: Undefined name: Desc1 [undefined_name] -./dataclasses_descriptors.py:23:61: Undefined name: Desc1 [undefined_name] ./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int ./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int] ./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str] diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index 0f7b7a918..365a4d1bb 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -6,13 +6,13 @@ Line 36: Expected 1 errors Line 37: Expected 1 errors Line 38: Expected 1 errors Line 18: Unexpected errors ['./dataclasses_final.py:18:20: Unrecognized annotation object [invalid_annotation]'] -Line 24: Unexpected errors ['./dataclasses_final.py:24:12: Any[from_another] is not equivalent to int'] +Line 24: Unexpected errors ['./dataclasses_final.py:24:12: Any[error] is not equivalent to int'] Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int'] Line 32: Unexpected errors ['./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str'] """ output = """ ./dataclasses_final.py:18:20: Unrecognized annotation object [invalid_annotation] -./dataclasses_final.py:24:12: Any[from_another] is not equivalent to int +./dataclasses_final.py:24:12: Any[error] is not equivalent to int ./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int ./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml index e25297547..8673d79cb 100644 --- a/conformance/results/pycroscope/dataclasses_match_args.toml +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -1,16 +1,19 @@ conformance_automated = "Fail" errors_diff = """ -Line 42: Expected 1 errors Line 15: Unexpected errors ['./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation]'] -Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] -Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] -Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[from_another] is not equivalent to tuple[Literal['x']]"] -Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Any[from_another] is not equivalent to tuple[]'] +Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:18:12: DC1 has no attribute '__match_args__' [undefined_attribute]"] +Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:26:12: DC2 has no attribute '__match_args__' [undefined_attribute]"] +Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:34:12: DC3 has no attribute '__match_args__' [undefined_attribute]"] +Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[]'] """ output = """ ./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation] -./dataclasses_match_args.py:18:12: Any[from_another] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:26:12: Any[from_another] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:34:12: Any[from_another] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:49:12: Any[from_another] is not equivalent to tuple[] +./dataclasses_match_args.py:18:12: Any[error] is not equivalent to tuple[Literal['x']] +./dataclasses_match_args.py:18:12: DC1 has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']] +./dataclasses_match_args.py:26:12: DC2 has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']] +./dataclasses_match_args.py:34:12: DC3 has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:42:0: DC4 has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[] """ diff --git a/conformance/results/pycroscope/dataclasses_slots.toml b/conformance/results/pycroscope/dataclasses_slots.toml index f6dc3e870..840f0dcbd 100644 --- a/conformance/results/pycroscope/dataclasses_slots.toml +++ b/conformance/results/pycroscope/dataclasses_slots.toml @@ -2,9 +2,11 @@ conformance_automated = "Fail" errors_diff = """ Line 25: Expected 1 errors Line 38: Expected 1 errors -Line 66: Expected 1 errors Line 69: Expected 1 errors Lines 10, 11: Expected error (tag 'DC1') +Line 56: Unexpected errors ["./dataclasses_slots.py:56:0: DC5 has no attribute '__slots__' [undefined_attribute]"] """ output = """ +./dataclasses_slots.py:56:0: DC5 has no attribute '__slots__' [undefined_attribute] +./dataclasses_slots.py:66:0: DC6 has no attribute '__slots__' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index 280d258c6..a2bdb7962 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -5,11 +5,13 @@ Line 108: Expected 1 errors Line 109: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors +Line 102: Unexpected errors ['./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument]'] Line 103: Unexpected errors ['./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str | Any[generic_argument] [incompatible_assignment]'] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] +./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument] ./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str | Any[generic_argument] [incompatible_assignment] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 297428321..07aea5d59 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -14,12 +14,12 @@ Line 46: Unexpected errors ['./dataclasses_usage.py:46:12: Any[from_another] i Line 47: Unexpected errors ['./dataclasses_usage.py:47:12: Any[from_another] is not equivalent to float | int'] Line 48: Unexpected errors ['./dataclasses_usage.py:48:12: Any[from_another] is not equivalent to int'] Line 103: Unexpected errors ['./dataclasses_usage.py:103:12: Any[from_another] is not equivalent to int'] -Line 104: Unexpected errors ['./dataclasses_usage.py:104:12: Any[from_another] is not equivalent to int'] Line 105: Unexpected errors ['./dataclasses_usage.py:105:12: Any[from_another] is not equivalent to str'] Line 106: Unexpected errors ['./dataclasses_usage.py:106:12: Any[from_another] is not equivalent to (str, /) -> int'] Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] Line 197: Unexpected errors ['./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str'] Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str'] +Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] """ output = """ ./dataclasses_usage.py:46:12: Any[from_another] is not equivalent to str @@ -27,10 +27,10 @@ output = """ ./dataclasses_usage.py:48:12: Any[from_another] is not equivalent to int ./dataclasses_usage.py:88:4: Incompatible assignment: expected int, got str [incompatible_assignment] ./dataclasses_usage.py:103:12: Any[from_another] is not equivalent to int -./dataclasses_usage.py:104:12: Any[from_another] is not equivalent to int ./dataclasses_usage.py:105:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:106:12: Any[from_another] is not equivalent to (str, /) -> int ./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str +./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index c4dc3c52b..eeff20fb4 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -11,8 +11,12 @@ Line 47: Expected 1 errors Line 48: Expected 1 errors Line 58: Expected 1 errors Line 69: Expected 1 errors -Line 98: Expected 1 errors +Line 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute]"] +Line 119: Unexpected errors ['./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument]'] """ output = """ ./directives_deprecated.py:90:4: @override decorator in invalid location [invalid_override_decorator] +./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] +./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] +./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument] """ diff --git a/conformance/results/pycroscope/enums_behaviors.toml b/conformance/results/pycroscope/enums_behaviors.toml index 8e572589b..828e87ad5 100644 --- a/conformance/results/pycroscope/enums_behaviors.toml +++ b/conformance/results/pycroscope/enums_behaviors.toml @@ -1,8 +1,20 @@ conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors -Lines 27, 28: Expected error (tag 'red') -Lines 31, 32: Expected error (tag 'blue') +Lines 27, 28: Expected exactly one error (tag 'red') +Lines 31, 32: Expected exactly one error (tag 'blue') +Line 20: Unexpected errors ['./enums_behaviors.py:20:16: Any[generic_argument] is not equivalent to ./enums_behaviors.py.Color'] +Line 27: Unexpected errors ['./enums_behaviors.py:27:12: Any[error] is not equivalent to ./enums_behaviors.py.Color', './enums_behaviors.py:27:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call]'] +Line 28: Unexpected errors ['./enums_behaviors.py:28:12: Any[error] is not equivalent to Literal[1]', './enums_behaviors.py:28:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call]'] +Line 31: Unexpected errors ['./enums_behaviors.py:31:12: Any[from_another] is not equivalent to ./enums_behaviors.py.Color'] +Line 32: Unexpected errors ['./enums_behaviors.py:32:12: Any[from_another] is not equivalent to Literal[3]'] """ output = """ +./enums_behaviors.py:20:16: Any[generic_argument] is not equivalent to ./enums_behaviors.py.Color +./enums_behaviors.py:27:12: Any[error] is not equivalent to ./enums_behaviors.py.Color +./enums_behaviors.py:27:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call] +./enums_behaviors.py:28:12: Any[error] is not equivalent to Literal[1] +./enums_behaviors.py:28:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call] +./enums_behaviors.py:31:12: Any[from_another] is not equivalent to ./enums_behaviors.py.Color +./enums_behaviors.py:32:12: Any[from_another] is not equivalent to Literal[3] """ diff --git a/conformance/results/pycroscope/enums_member_values.toml b/conformance/results/pycroscope/enums_member_values.toml index 97f68dc76..97735dbae 100644 --- a/conformance/results/pycroscope/enums_member_values.toml +++ b/conformance/results/pycroscope/enums_member_values.toml @@ -4,11 +4,16 @@ Line 78: Expected 1 errors Line 85: Expected 1 errors """ output = """ -./enums_member_values.py:21:12: Any[from_another] is not equivalent to Literal[1] -./enums_member_values.py:22:12: Any[from_another] is not equivalent to Literal[1] -./enums_member_values.py:26:16: Any[from_another] is not equivalent to Literal[1, 3] -./enums_member_values.py:30:16: Any[from_another] is not equivalent to Literal[1, 2, 3] -./enums_member_values.py:54:12: Any[from_another] is not equivalent to Literal[1] -./enums_member_values.py:68:12: Any[from_another] is not equivalent to Literal[1] +./enums_member_values.py:21:12: Any[error] is not equivalent to Literal[1] +./enums_member_values.py:21:12: Literal[1] has no attribute '_value_' [undefined_attribute] +./enums_member_values.py:22:12: Any[error] is not equivalent to Literal[1] +./enums_member_values.py:22:12: Literal[1] has no attribute 'value' [undefined_attribute] +./enums_member_values.py:26:16: Any[error] is not equivalent to Literal[1, 3] +./enums_member_values.py:26:16: Literal[1] has no attribute 'value' [undefined_attribute] +./enums_member_values.py:30:16: Any[error] is not equivalent to Literal[1, 2, 3] +./enums_member_values.py:30:16: ./enums_member_values.py.Color has no attribute 'value' [undefined_attribute] +./enums_member_values.py:54:12: Any[error] is not equivalent to Literal[1] +./enums_member_values.py:54:12: Literal[(1, 3.303e+23, 2439700.0)] has no attribute 'value' [undefined_attribute] +./enums_member_values.py:68:12: Any[explicit] is not equivalent to Literal[1] ./enums_member_values.py:96:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 956595e45..660012a70 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -5,22 +5,28 @@ Line 82: Expected 1 errors Line 83: Expected 1 errors Line 84: Expected 1 errors Line 85: Expected 1 errors -Line 116: Expected 1 errors -Line 27: Unexpected errors ['./enums_members.py:27:12: Any[from_another] is not equivalent to str'] -Line 28: Unexpected errors ['./enums_members.py:28:12: Any[from_another] is not equivalent to str'] +Line 29: Unexpected errors ["./enums_members.py:29:12: Literal[('felis', 'catus')] is not equivalent to Literal['felis', 'catus']"] +Line 30: Unexpected errors ["./enums_members.py:30:12: Literal[('canis', 'lupus')] is not equivalent to Literal['canis', 'lupus']"] Line 35: Unexpected errors ['./enums_members.py:35:12: Any[from_another] is not equivalent to str'] Line 36: Unexpected errors ['./enums_members.py:36:12: Any[from_another] is not equivalent to str'] -Line 128: Unexpected errors ['./enums_members.py:128:20: Undefined name: Example2 [undefined_name]'] +Line 77: Unexpected errors ['./enums_members.py:77:4: Name Nested is already defined [class_variable_redefinition]'] +Line 115: Unexpected errors ['./enums_members.py:115:12: enum.member[Literal[1]] is not equivalent to Any[unannotated]'] +Line 117: Unexpected errors ['./enums_members.py:117:12: enum.member[(self) -> None] is not equivalent to Any[unannotated]'] +Line 128: Unexpected errors ["./enums_members.py:128:20: Example2 has no attribute '__B' [undefined_attribute]"] """ output = """ -./enums_members.py:27:12: Any[from_another] is not equivalent to str -./enums_members.py:28:12: Any[from_another] is not equivalent to str +./enums_members.py:29:12: Literal[('felis', 'catus')] is not equivalent to Literal['felis', 'catus'] +./enums_members.py:30:12: Literal[('canis', 'lupus')] is not equivalent to Literal['canis', 'lupus'] ./enums_members.py:35:12: Any[from_another] is not equivalent to str ./enums_members.py:36:12: Any[from_another] is not equivalent to str -./enums_members.py:128:20: Revealed type is 'Any[from_another]' [reveal_type] -./enums_members.py:128:20: Undefined name: Example2 [undefined_name] -./enums_members.py:129:20: Undefined name: Example2 [undefined_name] -./enums_members.py:129:42: Undefined name: Example2 [undefined_name] -./enums_members.py:146:12: Any[from_another] is not equivalent to int -./enums_members.py:147:12: Any[from_another] is not equivalent to int +./enums_members.py:77:4: Name Nested is already defined [class_variable_redefinition] +./enums_members.py:115:12: enum.member[Literal[1]] is not equivalent to Any[unannotated] +./enums_members.py:116:12: enum.nonmember[Literal[2]] is not equivalent to Any[unannotated] +./enums_members.py:117:12: enum.member[(self) -> None] is not equivalent to Any[unannotated] +./enums_members.py:128:20: Example2 has no attribute '__B' [undefined_attribute] +./enums_members.py:128:20: Revealed type is 'Any[error]' [reveal_type] +./enums_members.py:129:20: Example2 has no attribute '__B' [undefined_attribute] +./enums_members.py:129:42: Example2 has no attribute '__B' [undefined_attribute] +./enums_members.py:146:12: Literal[2] is not equivalent to int +./enums_members.py:147:12: Literal[3] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index 5e96fff43..ca9ef0915 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -1,17 +1,21 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors Line 29: Expected 1 errors Line 30: Expected 1 errors Line 49: Expected 1 errors Line 61: Expected 1 errors Line 68: Expected 1 errors Line 98: Expected 1 errors +Line 24: Unexpected errors ['./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] +Line 25: Unexpected errors ['./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[Any[explicit]]] but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int]'] Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool'] Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[from_another] is not equivalent to int'] """ output = """ +./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument] +./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[Any[explicit]]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] +./generics_base_class.py:26:25: Incompatible argument type for x: expected dict[str, list[object]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] ./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int] ./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool ./generics_base_class.py:58:16: Any[from_another] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index e1a648d07..a1c86e93a 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 55: Expected 1 errors -Line 69: Expected 1 errors Line 121: Expected 1 errors Line 157: Expected 1 errors Line 158: Expected 1 errors @@ -13,14 +12,14 @@ Line 208: Expected 1 errors Line 23: Unexpected errors ['./generics_basic.py:23:16: int | Any[generic_argument] is not equivalent to int'] Line 24: Unexpected errors ['./generics_basic.py:24:16: str | Any[generic_argument] is not equivalent to str'] Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) | ~AnyStr: (str, bytes) [unsupported_operation]'] -Line 67: Unexpected errors ['./generics_basic.py:67:16: Any[inference] | Any[generic_argument] is not equivalent to str'] -Line 68: Unexpected errors ['./generics_basic.py:68:16: str | Any[generic_argument] is not equivalent to str'] +Line 67: Unexpected errors ['./generics_basic.py:67:16: Any[error] is not equivalent to str', './generics_basic.py:67:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument]'] +Line 68: Unexpected errors ['./generics_basic.py:68:16: Any[error] is not equivalent to str', './generics_basic.py:68:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument]'] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int'] Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[from_another] is not equivalent to int'] Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[from_another] is not equivalent to int'] -Line 199: Unexpected errors ['./generics_basic.py:199:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[Any[explicit]]'] +Line 199: Unexpected errors ['./generics_basic.py:199:16: Any[error] is not equivalent to collections.abc.Iterator[Any[explicit]]', './generics_basic.py:199:16: Cannot call overloaded function [incompatible_argument]'] """ output = """ ./generics_basic.py:23:16: int | Any[generic_argument] is not equivalent to int @@ -29,12 +28,16 @@ output = """ ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] -./generics_basic.py:67:16: Any[inference] | Any[generic_argument] is not equivalent to str -./generics_basic.py:68:16: str | Any[generic_argument] is not equivalent to str +./generics_basic.py:67:16: Any[error] is not equivalent to str +./generics_basic.py:67:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument] +./generics_basic.py:68:16: Any[error] is not equivalent to str +./generics_basic.py:68:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument] +./generics_basic.py:69:11: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument] ./generics_basic.py:106:20: Any[from_another] is not equivalent to int ./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:154:16: Any[from_another] is not equivalent to int ./generics_basic.py:155:16: Any[from_another] is not equivalent to int -./generics_basic.py:199:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[Any[explicit]] +./generics_basic.py:199:16: Any[error] is not equivalent to collections.abc.Iterator[Any[explicit]] +./generics_basic.py:199:16: Cannot call overloaded function [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 4da7d19cd..2b862d120 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -5,9 +5,19 @@ Line 50: Expected 1 errors Line 107: Expected 1 errors Line 114: Expected 1 errors Line 143: Expected 1 errors +Line 30: Unexpected errors ['./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference]'] +Line 45: Unexpected errors ['./generics_defaults.py:45:12: AllTheDefaults is not equivalent to Any[inference]'] +Line 79: Unexpected errors ['./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference]'] +Line 94: Unexpected errors ['./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference]'] +Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[from_another]'] Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[from_another] is not equivalent to int'] """ output = """ +./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference] +./generics_defaults.py:45:12: AllTheDefaults is not equivalent to Any[inference] +./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference] +./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int +./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[from_another] ./generics_defaults.py:173:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index 379db9816..b77f17369 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -2,8 +2,10 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 55: Expected 1 errors +Line 45: Unexpected errors ['./generics_defaults_specialization.py:45:12: Bar is not equivalent to Any[inference]'] Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str'] """ output = """ +./generics_defaults_specialization.py:45:12: Bar is not equivalent to Any[inference] ./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index fd4db8513..75d5d1a14 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -1,10 +1,14 @@ conformance_automated = "Fail" errors_diff = """ +Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ParentA'] +Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ChildA'] Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT]'] Line 42: Unexpected errors ['./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT]'] Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT]'] """ output = """ +./generics_self_advanced.py:18:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ParentA +./generics_self_advanced.py:19:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ChildA ./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT] ./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT] ./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT] diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 7e032db78..6e2691fcf 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -1,14 +1,20 @@ conformance_automated = "Fail" errors_diff = """ -Line 22: Unexpected errors ['./generics_self_basic.py:22:25: Undefined name: Shape [undefined_name]'] +Line 20: Expected 1 errors +Line 33: Expected 1 errors Line 27: Unexpected errors ['./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT]'] -Line 36: Unexpected errors ['./generics_self_basic.py:36:28: Undefined name: Shape [undefined_name]'] +Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape'] +Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle'] +Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] +Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] """ output = """ -./generics_self_basic.py:20:15: Undefined name: Shape [undefined_name] -./generics_self_basic.py:22:25: Undefined name: Shape [undefined_name] ./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT] -./generics_self_basic.py:33:15: Undefined name: Shape [undefined_name] -./generics_self_basic.py:36:28: Undefined name: Shape [undefined_name] +./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape +./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle +./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape +./generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] +./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle +./generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized annotation object [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index e304a5ef7..d52fc181d 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -2,6 +2,7 @@ conformance_automated = "Fail" errors_diff = """ Line 76: Expected 1 errors Line 82: Expected 1 errors +Line 87: Expected 1 errors Line 103: Expected 1 errors Line 105: Expected 1 errors Line 108: Expected 1 errors @@ -9,8 +10,9 @@ Line 113: Expected 1 errors Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors +Line 67: Unexpected errors ['./generics_self_usage.py:67:4: Name Inner is already defined [class_variable_redefinition]'] """ output = """ +./generics_self_usage.py:67:4: Name Inner is already defined [class_variable_redefinition] ./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] -./generics_self_usage.py:87:15: Undefined name: Foo3 [undefined_name] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index 363b99ac9..418f1dad7 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,7 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 29: Expected 1 errors -Line 47: Expected 1 errors Line 56: Expected 1 errors Line 85: Expected 1 errors Line 96: Expected 1 errors @@ -9,21 +7,35 @@ Line 112: Expected 1 errors Line 113: Expected 1 errors Line 127: Expected 1 errors Line 128: Expected 1 errors -Line 135: Expected 1 errors -Line 136: Expected 1 errors -Line 137: Expected 1 errors -Line 138: Expected 1 errors -Line 146: Expected 1 errors -Line 154: Expected 1 errors Line 165: Expected 1 errors -Line 51: Unexpected errors ['./generics_syntax_infer_variance.py:51:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation]'] +Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument]"] +Line 46: Unexpected errors ["./generics_syntax_infer_variance.py:46:27: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:46:55: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument]"] Line 89: Unexpected errors ['./generics_syntax_infer_variance.py:89:7: Unrecognized annotation object [invalid_annotation]'] Line 108: Unexpected errors ['./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition]'] """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:51:25: Cannot resolve subscripted annotation: Any[inference] [invalid_annotation] +./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] +./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] +./generics_syntax_infer_variance.py:29:53: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] +./generics_syntax_infer_variance.py:29:27: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] +./generics_syntax_infer_variance.py:46:27: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument] +./generics_syntax_infer_variance.py:46:55: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument] +./generics_syntax_infer_variance.py:47:53: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument] +./generics_syntax_infer_variance.py:47:27: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument] ./generics_syntax_infer_variance.py:89:7: Unrecognized annotation object [invalid_annotation] ./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition] +./generics_syntax_infer_variance.py:135:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:135:42: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:136:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:136:40: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:137:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:137:42: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:138:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:138:40: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:146:9: Object ShouldBeInvariant4 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:146:37: Object ShouldBeInvariant4 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:154:9: Object ShouldBeInvariant5 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:154:37: Object ShouldBeInvariant5 does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index 0cecfb42a..0c339e7c1 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -6,15 +6,23 @@ Line 35: Expected 1 errors Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors +Line 31: Unexpected errors ['./generics_syntax_scoping.py:31:16: Object BaseClassC does not support subscripting [unsupported_operation]', './generics_syntax_scoping.py:31:37: Object Foo does not support subscripting [unsupported_operation]'] +Line 71: Unexpected errors ['./generics_syntax_scoping.py:71:4: Name Private is already defined [class_variable_redefinition]'] Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] +Line 110: Unexpected errors ['./generics_syntax_scoping.py:110:4: Name Inner1 is already defined [class_variable_redefinition]'] Line 121: Unexpected errors ['./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int'] Line 124: Unexpected errors ['./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int'] """ output = """ +./generics_syntax_scoping.py:31:16: Object BaseClassC does not support subscripting [unsupported_operation] +./generics_syntax_scoping.py:31:37: Object Foo does not support subscripting [unsupported_operation] +./generics_syntax_scoping.py:44:12: Object Foo does not support subscripting [unsupported_operation] ./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] +./generics_syntax_scoping.py:71:4: Name Private is already defined [class_variable_redefinition] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] +./generics_syntax_scoping.py:110:4: Name Inner1 is already defined [class_variable_redefinition] ./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int ./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index f0cd44073..cbf205240 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -14,6 +14,7 @@ Line 86: Expected 1 errors Line 106: Expected 1 errors Line 125: Expected 1 errors Line 132: Expected 1 errors +Line 22: Unexpected errors ['./namedtuples_define_class.py:22:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] Line 23: Unexpected errors ['./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int'] Line 24: Unexpected errors ['./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int'] Line 25: Unexpected errors ['./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str'] @@ -22,11 +23,16 @@ Line 27: Unexpected errors ['./namedtuples_define_class.py:27:12: Any[from_ano Line 28: Unexpected errors ['./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int'] Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int]'] Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str]'] +Line 36: Unexpected errors ['./namedtuples_define_class.py:36:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] +Line 39: Unexpected errors ['./namedtuples_define_class.py:39:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] +Line 42: Unexpected errors ['./namedtuples_define_class.py:42:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] +Line 66: Unexpected errors ['./namedtuples_define_class.py:66:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point2'] Line 101: Unexpected errors ['./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str'] Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int'] Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int'] """ output = """ +./namedtuples_define_class.py:22:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point ./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int ./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int ./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str @@ -35,6 +41,10 @@ output = """ ./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int ./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int] ./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str] +./namedtuples_define_class.py:36:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:39:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:42:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:66:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point2 ./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str ./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int ./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int diff --git a/conformance/results/pycroscope/overloads_evaluation.toml b/conformance/results/pycroscope/overloads_evaluation.toml index b21b70df4..fabf79e88 100644 --- a/conformance/results/pycroscope/overloads_evaluation.toml +++ b/conformance/results/pycroscope/overloads_evaluation.toml @@ -6,6 +6,9 @@ Line 49: Unexpected errors ['./overloads_evaluation.py:49:12: int | str is not Line 67: Unexpected errors ['./overloads_evaluation.py:67:16: float | int is not equivalent to int'] Line 93: Unexpected errors ['./overloads_evaluation.py:93:12: int | str is not equivalent to int'] Line 136: Unexpected errors ['./overloads_evaluation.py:136:16: int is not equivalent to Literal[0, 1]'] +Line 149: Unexpected errors ["./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] +Line 153: Unexpected errors ["./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] +Line 157: Unexpected errors ["./overloads_evaluation.py:157:11: ./overloads_evaluation.py.Color has no attribute 'value' [undefined_attribute]"] Line 162: Unexpected errors ['./overloads_evaluation.py:162:16: int is not equivalent to Literal[0, 1]'] Line 235: Unexpected errors ['./overloads_evaluation.py:235:16: int | str is not equivalent to int'] Line 262: Unexpected errors ['./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int]'] @@ -29,6 +32,9 @@ output = """ ./overloads_evaluation.py:93:12: int | str is not equivalent to int ./overloads_evaluation.py:116:13: Incompatible argument type for x: expected int but got int | str [incompatible_argument] ./overloads_evaluation.py:136:16: int is not equivalent to Literal[0, 1] +./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] +./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] +./overloads_evaluation.py:157:11: ./overloads_evaluation.py.Color has no attribute 'value' [undefined_attribute] ./overloads_evaluation.py:162:16: int is not equivalent to Literal[0, 1] ./overloads_evaluation.py:235:16: int | str is not equivalent to int ./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int] diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index eca607810..9adf2d1bd 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -2,18 +2,24 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors Line 34: Expected 1 errors -Line 58: Expected 1 errors -Line 74: Expected 1 errors -Line 104: Expected 1 errors -Line 106: Expected 1 errors -Line 107: Expected 1 errors -Line 108: Expected 1 errors Line 44: Unexpected errors ['./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return]'] Line 49: Unexpected errors ['./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return]'] +Line 59: Unexpected errors ['./protocols_class_objects.py:59:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA2, got ConcreteA [incompatible_assignment]'] Line 64: Unexpected errors ['./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return]'] +Line 105: Unexpected errors ['./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC1 [incompatible_assignment]'] +Line 109: Unexpected errors ['./protocols_class_objects.py:109:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC3 [incompatible_assignment]'] """ output = """ ./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return] ./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return] +./protocols_class_objects.py:58:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA1, got ConcreteA [incompatible_assignment] +./protocols_class_objects.py:59:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA2, got ConcreteA [incompatible_assignment] ./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return] +./protocols_class_objects.py:74:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoB1, got ConcreteB [incompatible_assignment] +./protocols_class_objects.py:104:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got ConcreteC1 [incompatible_assignment] +./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC1 [incompatible_assignment] +./protocols_class_objects.py:106:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got ConcreteC2 [incompatible_assignment] +./protocols_class_objects.py:107:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC2 [incompatible_assignment] +./protocols_class_objects.py:108:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got ConcreteC3 [incompatible_assignment] +./protocols_class_objects.py:109:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index ab213110d..00d9d84e9 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,7 +7,11 @@ Line 67: Expected 1 errors Line 82: Expected 1 errors Line 83: Expected 1 errors Line 18: Unexpected errors ['./protocols_merging.py:18:4: Function may exit without returning a value [missing_return]'] +Line 59: Unexpected errors ['./protocols_merging.py:59:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got ./protocols_merging.py.SizedAndClosable1 [incompatible_assignment]'] +Line 60: Unexpected errors ['./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got ./protocols_merging.py.SizedAndClosable2 [incompatible_assignment]'] """ output = """ ./protocols_merging.py:18:4: Function may exit without returning a value [missing_return] +./protocols_merging.py:59:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got ./protocols_merging.py.SizedAndClosable1 [incompatible_assignment] +./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got ./protocols_merging.py.SizedAndClosable2 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index 7dcdeb784..fc7200885 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,18 +1,13 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Unexpected errors ['./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return]'] -Line 21: Unexpected errors ['./protocols_recursive.py:21:24: Undefined name: SimpleTree [undefined_name]'] -Line 29: Unexpected errors ['./protocols_recursive.py:29:24: Undefined name: Tree [undefined_name]'] -Line 42: Unexpected errors ['./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return]', './protocols_recursive.py:42:25: Undefined name: ProtoA [undefined_name]'] +Line 42: Unexpected errors ['./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return]'] Line 51: Unexpected errors ['./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return]'] Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ ./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return] -./protocols_recursive.py:21:24: Undefined name: SimpleTree [undefined_name] -./protocols_recursive.py:29:24: Undefined name: Tree [undefined_name] ./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return] -./protocols_recursive.py:42:25: Undefined name: ProtoA [undefined_name] ./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return] ./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index 3457a8100..d5f640131 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -1,24 +1,30 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors -Line 38: Expected 1 errors -Line 55: Expected 1 errors Line 79: Expected 1 errors Line 80: Expected 1 errors Line 102: Expected 1 errors Line 103: Expected 1 errors +Line 37: Unexpected errors ['./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Concrete2 [incompatible_assignment]'] +Line 54: Unexpected errors ['./protocols_subtyping.py:54:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Proto3 [incompatible_assignment]'] Line 67: Unexpected errors ['./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return]'] Line 72: Unexpected errors ['./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return]'] Line 88: Unexpected errors ['./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return]'] Line 93: Unexpected errors ['./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return]'] Line 110: Unexpected errors ['./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return]'] Line 115: Unexpected errors ['./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return]'] +Line 142: Unexpected errors ['./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument]'] """ output = """ +./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] +./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 [incompatible_assignment] +./protocols_subtyping.py:54:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Proto3 [incompatible_assignment] +./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3, got ./protocols_subtyping.py.Proto2 [incompatible_assignment] ./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 595a8c60d..35c51bfe9 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -7,6 +7,7 @@ Line 43: Expected 1 errors Line 44: Expected 1 errors Line 49: Expected 1 errors Line 59: Expected 1 errors +Line 86: Expected 1 errors Line 87: Expected 1 errors Line 88: Expected 1 errors """ @@ -21,5 +22,4 @@ output = """ ./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:79:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[str, '']] [incompatible_argument] ./qualifiers_annotated.py:80:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[int, '']] [incompatible_argument] -./qualifiers_annotated.py:86:0: Traceback (most recent call last): """ diff --git a/conformance/results/pycroscope/specialtypes_any.toml b/conformance/results/pycroscope/specialtypes_any.toml index 457a71e89..338ae60e2 100644 --- a/conformance/results/pycroscope/specialtypes_any.toml +++ b/conformance/results/pycroscope/specialtypes_any.toml @@ -1,7 +1,9 @@ conformance_automated = "Fail" errors_diff = """ Line 86: Unexpected errors ['./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int'] +Line 88: Unexpected errors ["./specialtypes_any.py:88:12: ClassA has no attribute 'method3' [undefined_attribute]"] """ output = """ ./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int +./specialtypes_any.py:88:12: ClassA has no attribute 'method3' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index 737379b03..b5562bf44 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -5,19 +5,31 @@ Line 76: Expected 1 errors Line 143: Expected 1 errors Line 144: Expected 1 errors Line 38: Unexpected errors ['./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] +Line 42: Unexpected errors ['./specialtypes_type.py:42:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] +Line 43: Unexpected errors ['./specialtypes_type.py:43:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] +Line 44: Unexpected errors ['./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser'] +Line 54: Unexpected errors ['./specialtypes_type.py:54:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] +Line 55: Unexpected errors ['./specialtypes_type.py:55:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] +Line 127: Unexpected errors ['./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser'] Line 152: Unexpected errors ['./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 160: Unexpected errors ['./specialtypes_type.py:160:12: int | Any[generic_argument] is not equivalent to int'] Line 161: Unexpected errors ['./specialtypes_type.py:161:12: int | Any[generic_argument] is not equivalent to int'] """ output = """ ./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] +./specialtypes_type.py:42:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User +./specialtypes_type.py:43:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User +./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser +./specialtypes_type.py:54:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User +./specialtypes_type.py:55:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] ./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str ./specialtypes_type.py:120:4: type[object] has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser ./specialtypes_type.py:145:0: type 'type' has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:146:0: Literal[type[typing.Any]] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation] diff --git a/conformance/results/results.html b/conformance/results/results.html index 4eb6dd2fc..a09ed249b 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -719,7 +719,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Constructors From db6e99a74754b99a3c4f34cad72033a882171bc5 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 21 Feb 2026 22:30:45 -0800 Subject: [PATCH 19/78] one more fixed --- .../results/pycroscope/aliases_explicit.toml | 20 +----- .../results/pycroscope/aliases_implicit.toml | 26 +------- .../pycroscope/callables_annotation.toml | 14 ++-- .../pycroscope/callables_protocol.toml | 6 ++ .../results/pycroscope/classes_classvar.toml | 6 +- .../pycroscope/constructors_call_init.toml | 37 ++++++++++- .../pycroscope/constructors_call_new.toml | 30 ++++++++- .../pycroscope/constructors_callable.toml | 58 +++++++++-------- .../pycroscope/dataclasses_descriptors.toml | 18 +++-- .../dataclasses_transform_class.toml | 2 + .../dataclasses_transform_converter.toml | 4 +- .../results/pycroscope/dataclasses_usage.toml | 4 ++ .../pycroscope/directives_deprecated.toml | 2 - .../pycroscope/generics_base_class.toml | 11 +++- .../results/pycroscope/generics_basic.toml | 10 +-- .../results/pycroscope/generics_defaults.toml | 51 +++++++++++++-- .../generics_defaults_specialization.toml | 12 ++++ .../generics_paramspec_semantics.toml | 22 +------ .../pycroscope/generics_self_basic.toml | 6 ++ .../pycroscope/generics_self_usage.toml | 2 +- .../generics_syntax_infer_variance.toml | 44 +++++++++---- .../pycroscope/generics_type_erasure.toml | 37 +++++++++-- .../generics_typevartuple_basic.toml | 4 +- .../generics_typevartuple_specialization.toml | 20 +++--- .../pycroscope/generics_upper_bound.toml | 10 +-- .../results/pycroscope/generics_variance.toml | 65 ++++++++++++++++--- .../pycroscope/namedtuples_define_class.toml | 4 +- .../pycroscope/overloads_evaluation.toml | 16 ++--- .../pycroscope/protocols_recursive.toml | 2 + .../pycroscope/protocols_subtyping.toml | 20 ++++-- .../results/pycroscope/specialtypes_any.toml | 6 +- .../results/pycroscope/specialtypes_type.toml | 22 +++---- .../pycroscope/tuples_type_compat.toml | 6 -- .../pycroscope/typeddicts_extra_items.toml | 10 +-- .../pycroscope/typeddicts_operations.toml | 2 - conformance/results/results.html | 2 +- 36 files changed, 394 insertions(+), 217 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 7cbd4bc25..39af3692c 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -17,26 +17,10 @@ Line 89: Expected 1 errors Line 91: Expected 1 errors Line 100: Expected 1 errors Line 102: Expected 1 errors -Line 36: Unexpected errors ['./aliases_explicit.py:36:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 38: Unexpected errors ['./aliases_explicit.py:38:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 52: Unexpected errors ['./aliases_explicit.py:52:16: list[int] | Any[error] is not equivalent to list[int]'] -Line 53: Unexpected errors ['./aliases_explicit.py:53:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str]'] -Line 54: Unexpected errors ['./aliases_explicit.py:54:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str]'] -Line 56: Unexpected errors ['./aliases_explicit.py:56:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str'] -Line 57: Unexpected errors ['./aliases_explicit.py:57:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None'] -Line 59: Unexpected errors ['./aliases_explicit.py:59:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None'] -Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None'] +Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] """ output = """ -./aliases_explicit.py:36:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_explicit.py:38:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_explicit.py:52:16: list[int] | Any[error] is not equivalent to list[int] -./aliases_explicit.py:53:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str] -./aliases_explicit.py:54:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str] -./aliases_explicit.py:56:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str -./aliases_explicit.py:57:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None -./aliases_explicit.py:59:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None -./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None +./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None ./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index a2df75183..a9f8c7cfd 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -3,6 +3,7 @@ errors_diff = """ Line 76: Expected 1 errors Line 79: Expected 1 errors Line 80: Expected 1 errors +Line 81: Expected 1 errors Line 106: Expected 1 errors Line 111: Expected 1 errors Line 112: Expected 1 errors @@ -11,35 +12,14 @@ Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors Line 135: Expected 1 errors -Line 49: Unexpected errors ['./aliases_implicit.py:49:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 51: Unexpected errors ['./aliases_implicit.py:51:8: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 57: Unexpected errors ['./aliases_implicit.py:57:9: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 63: Unexpected errors ['./aliases_implicit.py:63:16: list[int] | Any[error] is not equivalent to list[int]'] -Line 64: Unexpected errors ['./aliases_implicit.py:64:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str]'] -Line 65: Unexpected errors ['./aliases_implicit.py:65:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str]'] -Line 67: Unexpected errors ['./aliases_implicit.py:67:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str'] -Line 68: Unexpected errors ['./aliases_implicit.py:68:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None'] -Line 70: Unexpected errors ['./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None'] -Line 71: Unexpected errors ['./aliases_implicit.py:71:16: list[bool] | Any[error] is not equivalent to list[bool]'] -Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None'] +Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] Line 131: Unexpected errors ['./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int]'] """ output = """ -./aliases_implicit.py:49:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:51:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:57:9: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:63:16: list[int] | Any[error] is not equivalent to list[int] -./aliases_implicit.py:64:16: tuple[str, ...] | list[str] | Any[from_another] is not equivalent to tuple[str, ...] | list[str] -./aliases_implicit.py:65:16: tuple[int, int, int, str] | Any[error] is not equivalent to tuple[int, int, int, str] -./aliases_implicit.py:67:16: (int, str, /) -> str | Any[from_another] is not equivalent to (int, str, /) -> str -./aliases_implicit.py:68:16: (int, str, str, /) -> None | Any[from_another] is not equivalent to (int, str, str, /) -> None -./aliases_implicit.py:70:16: int | str | list[list[int]] | list[Any[explicit]] | None is not equivalent to int | str | list[list[int]] | None -./aliases_implicit.py:71:16: list[bool] | Any[error] is not equivalent to list[bool] -./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None | Any[unannotated] is not equivalent to (...) -> None +./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None ./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:78:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:81:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] ./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 7ddcc2a4f..876dead7c 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,16 +4,15 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 159: Expected 1 errors -Line 172: Expected 1 errors -Line 189: Expected 1 errors -Line 74: Unexpected errors ['./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str | () -> str [incompatible_assignment]'] +Line 74: Unexpected errors ['./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str [incompatible_assignment]'] Line 147: Unexpected errors ['./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment]'] Line 148: Unexpected errors ['./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1, got (...) -> None [incompatible_assignment]'] +Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] Line 151: Unexpected errors ['./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 [incompatible_assignment]'] Line 152: Unexpected errors ['./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment]'] Line 153: Unexpected errors ['./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 [incompatible_assignment]'] Line 154: Unexpected errors ['./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3, got (...) -> None [incompatible_assignment]'] +Line 155: Unexpected errors ['./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation]'] Line 157: Unexpected errors ['./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6, got ./callables_annotation.py.Proto7 [incompatible_assignment]'] """ output = """ @@ -23,15 +22,20 @@ output = """ ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str | () -> str [incompatible_assignment] +./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str [incompatible_assignment] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] ./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment] ./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1, got (...) -> None [incompatible_assignment] +./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation] ./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 [incompatible_assignment] ./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment] ./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 [incompatible_assignment] ./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3, got (...) -> None [incompatible_assignment] +./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation] ./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6, got ./callables_annotation.py.Proto7 [incompatible_assignment] +./callables_annotation.py:159:10: Object Proto5 does not support subscripting [unsupported_operation] +./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] +./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index e2500d13c..bc0d7615f 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -14,9 +14,12 @@ Line 82: Unexpected errors ['./callables_protocol.py:82:0: Incompatible assignme Line 101: Unexpected errors ['./callables_protocol.py:101:4: Function may exit without returning a value [missing_return]'] Line 109: Unexpected errors ['./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5, got (a: int, b: str) -> int [incompatible_assignment]'] Line 125: Unexpected errors ['./callables_protocol.py:125:4: Function may exit without returning a value [missing_return]'] +Line 135: Unexpected errors ['./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation]'] +Line 144: Unexpected errors ['./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation]'] Line 156: Unexpected errors ['./callables_protocol.py:156:4: Function may exit without returning a value [missing_return]'] Line 168: Unexpected errors ['./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]'] Line 179: Unexpected errors ['./callables_protocol.py:179:4: Function may exit without returning a value [missing_return]'] +Line 184: Unexpected errors ['./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation]'] Line 216: Unexpected errors ['./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment]'] Line 220: Unexpected errors ['./callables_protocol.py:220:4: Function may exit without returning a value [missing_return]'] Line 224: Unexpected errors ['./callables_protocol.py:224:0: Function may exit without returning a value [missing_return]'] @@ -58,10 +61,13 @@ output = """ ./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5, got (a: int, b: str) -> int [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:125:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation] +./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation] ./callables_protocol.py:156:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:179:4: Function may exit without returning a value [missing_return] +./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation] ./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment] ./callables_protocol.py:220:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:224:0: Function may exit without returning a value [missing_return] diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 533bfe32a..cb14ce219 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -1,12 +1,15 @@ conformance_automated = "Fail" errors_diff = """ +Line 45: Expected 1 errors Line 46: Expected 1 errors +Line 47: Expected 1 errors Line 70: Expected 1 errors Line 71: Expected 1 errors Line 77: Expected 1 errors Line 78: Expected 1 errors Line 111: Expected 1 errors Line 140: Expected 1 errors +Line 84: Unexpected errors ["./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute]"] Line 107: Unexpected errors ["./classes_classvar.py:107:33: Starship has no attribute 'stats' [undefined_attribute]", "./classes_classvar.py:107:8: Starship has no attribute 'stats' [undefined_attribute]"] """ output = """ @@ -14,13 +17,12 @@ output = """ ./classes_classvar.py:39:10: Invalid type annotation 3 [invalid_annotation] ./classes_classvar.py:40:13: Undefined name: var [undefined_name] ./classes_classvar.py:40:10: Unrecognized annotation object [invalid_annotation] -./classes_classvar.py:45:10: Unrecognized annotation object [invalid_annotation] -./classes_classvar.py:47:10: Unrecognized annotation object [invalid_annotation] ./classes_classvar.py:52:4: Incompatible assignment: expected list[str], got Literal[{}] [incompatible_assignment] ./classes_classvar.py:54:10: Unrecognized annotation object [invalid_annotation] ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] +./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute] ./classes_classvar.py:107:33: Starship has no attribute 'stats' [undefined_attribute] ./classes_classvar.py:107:8: Starship has no attribute 'stats' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 10da00ee5..7c865f717 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,12 +1,45 @@ conformance_automated = "Fail" errors_diff = """ -Line 21: Expected 1 errors Line 42: Expected 1 errors -Line 56: Expected 1 errors Line 107: Expected 1 errors Line 130: Expected 1 errors +Line 19: Unexpected errors ['./constructors_call_init.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] +Line 20: Unexpected errors ['./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] +Line 24: Unexpected errors ['./constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation]'] +Line 25: Unexpected errors ['./constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation]'] +Line 37: Unexpected errors ['./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation]'] +Line 55: Unexpected errors ['./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation]'] +Line 72: Unexpected errors ['./constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation]'] +Line 73: Unexpected errors ['./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation]', './constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation]'] +Line 74: Unexpected errors ['./constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation]'] +Line 75: Unexpected errors ['./constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation]'] +Line 91: Unexpected errors ['./constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation]'] +Line 92: Unexpected errors ['./constructors_call_init.py:92:12: Object Class6 does not support subscripting [unsupported_operation]', './constructors_call_init.py:92:37: Object Class6 does not support subscripting [unsupported_operation]'] +Line 99: Unexpected errors ['./constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation]'] +Line 100: Unexpected errors ['./constructors_call_init.py:100:12: Object Class7 does not support subscripting [unsupported_operation]', './constructors_call_init.py:100:37: Object Class7 does not support subscripting [unsupported_operation]'] Line 129: Unexpected errors ['./constructors_call_init.py:129:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class11'] """ output = """ +./constructors_call_init.py:19:12: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:19:28: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:21:0: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation] +./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation] +./constructors_call_init.py:56:0: Object Class4 does not support subscripting [unsupported_operation] +./constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation] +./constructors_call_init.py:92:12: Object Class6 does not support subscripting [unsupported_operation] +./constructors_call_init.py:92:37: Object Class6 does not support subscripting [unsupported_operation] +./constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation] +./constructors_call_init.py:100:12: Object Class7 does not support subscripting [unsupported_operation] +./constructors_call_init.py:100:37: Object Class7 does not support subscripting [unsupported_operation] ./constructors_call_init.py:129:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class11 """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 31ec0d34f..338ad710f 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,17 +1,43 @@ conformance_automated = "Fail" errors_diff = """ -Line 21: Expected 1 errors -Line 148: Expected 1 errors +Line 19: Unexpected errors ['./constructors_call_new.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] +Line 20: Unexpected errors ['./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] +Line 23: Unexpected errors ['./constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation]'] +Line 24: Unexpected errors ['./constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation]'] +Line 35: Unexpected errors ['./constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] +Line 36: Unexpected errors ['./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] Line 49: Unexpected errors ['./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int'] Line 64: Unexpected errors ['./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never'] Line 89: Unexpected errors ['./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 104: Unexpected errors ['./constructors_call_new.py:104:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class7'] +Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation]'] +Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation]'] +Line 130: Unexpected errors ['./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation]'] +Line 134: Unexpected errors ['./constructors_call_new.py:134:5: Object Class9 does not support subscripting [unsupported_operation]'] +Line 147: Unexpected errors ['./constructors_call_new.py:147:0: Object Class11 does not support subscripting [unsupported_operation]'] """ output = """ +./constructors_call_new.py:19:12: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:19:28: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:21:0: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation] +./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation] ./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:104:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class7 +./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation] +./constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation] +./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation] +./constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation] +./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation] +./constructors_call_new.py:134:5: Object Class9 does not support subscripting [unsupported_operation] +./constructors_call_new.py:147:0: Object Class11 does not support subscripting [unsupported_operation] +./constructors_call_new.py:148:0: Object Class11 does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 84df75827..cc63a25fd 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -13,51 +13,57 @@ Line 146: Expected 1 errors Line 186: Expected 1 errors Line 197: Expected 1 errors Line 35: Unexpected errors ['./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument]'] -Line 37: Unexpected errors ['./constructors_callable.py:37:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class1'] +Line 37: Unexpected errors ['./constructors_callable.py:37:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class1'] Line 48: Unexpected errors ['./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument]'] -Line 50: Unexpected errors ['./constructors_callable.py:50:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class2'] +Line 50: Unexpected errors ['./constructors_callable.py:50:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class2'] Line 63: Unexpected errors ['./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument]'] -Line 65: Unexpected errors ['./constructors_callable.py:65:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class3'] +Line 65: Unexpected errors ['./constructors_callable.py:65:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class3'] Line 78: Unexpected errors ['./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument]'] -Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to int'] +Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[generic_argument] is not equivalent to int'] Line 98: Unexpected errors ['./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument]'] -Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never'] -Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never'] +Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[generic_argument] is not equivalent to Never'] +Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[generic_argument] is not equivalent to Never'] Line 126: Unexpected errors ['./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument]'] -Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class6Proxy'] +Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class6Proxy'] Line 143: Unexpected errors ['./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument]'] Line 162: Unexpected errors ['./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument]'] +Line 166: Unexpected errors ['./constructors_callable.py:166:19: Object Class7 does not support subscripting [unsupported_operation]'] +Line 167: Unexpected errors ['./constructors_callable.py:167:20: Object Class7 does not support subscripting [unsupported_operation]'] Line 183: Unexpected errors ['./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument]'] +Line 185: Unexpected errors ['./constructors_callable.py:185:28: Object Class8 does not support subscripting [unsupported_operation]'] Line 194: Unexpected errors ['./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument]'] -Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class9'] +Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class9'] """ output = """ ./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument] -./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] -./constructors_callable.py:37:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class1 +./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:37:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class1 ./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument] -./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] -./constructors_callable.py:50:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class2 +./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:50:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class2 ./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument] -./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] -./constructors_callable.py:65:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class3 +./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:65:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class3 ./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument] -./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] -./constructors_callable.py:80:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to int +./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:80:12: Any[generic_argument] is not equivalent to int ./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument] -./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] -./constructors_callable.py:102:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never -./constructors_callable.py:107:16: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to Never +./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:102:16: Any[generic_argument] is not equivalent to Never +./constructors_callable.py:107:16: Any[generic_argument] is not equivalent to Never ./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument] -./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] -./constructors_callable.py:128:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class6Proxy +./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:128:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class6Proxy ./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument] -./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] ./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument] -./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:166:19: Object Class7 does not support subscripting [unsupported_operation] +./constructors_callable.py:167:20: Object Class7 does not support subscripting [unsupported_operation] ./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument] -./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] +./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:185:28: Object Class8 does not support subscripting [unsupported_operation] ./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument] -./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[generic_argument] | (__P) -> Any[error] | Any[unannotated]' [reveal_type] -./constructors_callable.py:196:12: Any[generic_argument] | Any[error] | Any[from_another] is not equivalent to ./constructors_callable.py.Class9 +./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:196:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class9 """ diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index 6d27d46c8..7dde00477 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,18 +1,24 @@ conformance_automated = "Fail" errors_diff = """ Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int'] -Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int]'] -Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str]'] -Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: Any[from_another] is not equivalent to list[str]'] +Line 56: Unexpected errors ['./dataclasses_descriptors.py:56:7: Object Desc2 does not support subscripting [unsupported_operation]'] +Line 57: Unexpected errors ['./dataclasses_descriptors.py:57:7: Object Desc2 does not support subscripting [unsupported_operation]'] +Line 58: Unexpected errors ['./dataclasses_descriptors.py:58:7: Object Desc2 does not support subscripting [unsupported_operation]'] +Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int]'] +Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str]'] +Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str]'] Line 66: Unexpected errors ['./dataclasses_descriptors.py:66:12: Any[from_another] is not equivalent to int'] Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: Any[from_another] is not equivalent to str'] Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str'] """ output = """ ./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int -./dataclasses_descriptors.py:61:12: Any[from_another] is not equivalent to list[int] -./dataclasses_descriptors.py:62:12: Any[from_another] is not equivalent to list[str] -./dataclasses_descriptors.py:63:12: Any[from_another] is not equivalent to list[str] +./dataclasses_descriptors.py:56:7: Object Desc2 does not support subscripting [unsupported_operation] +./dataclasses_descriptors.py:57:7: Object Desc2 does not support subscripting [unsupported_operation] +./dataclasses_descriptors.py:58:7: Object Desc2 does not support subscripting [unsupported_operation] +./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int] +./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str] +./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str] ./dataclasses_descriptors.py:66:12: Any[from_another] is not equivalent to int ./dataclasses_descriptors.py:67:12: Any[from_another] is not equivalent to str ./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 8d09eb0f0..5cd0606f3 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -7,7 +7,9 @@ Line 72: Expected 1 errors Line 82: Expected 1 errors Line 122: Expected 1 errors Line 17: Unexpected errors ['./dataclasses_transform_class.py:17:0: Function may exit without returning a value [missing_return]'] +Line 102: Unexpected errors ['./dataclasses_transform_class.py:102:22: Object GenericModelBase does not support subscripting [unsupported_operation]'] """ output = """ ./dataclasses_transform_class.py:17:0: Function may exit without returning a value [missing_return] +./dataclasses_transform_class.py:102:22: Object GenericModelBase does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index a2bdb7962..9546df317 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -6,13 +6,13 @@ Line 109: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors Line 102: Unexpected errors ['./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument]'] -Line 103: Unexpected errors ['./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str | Any[generic_argument] [incompatible_assignment]'] +Line 103: Unexpected errors ['./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str [incompatible_assignment]'] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] ./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument] -./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str | Any[generic_argument] [incompatible_assignment] +./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str [incompatible_assignment] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 07aea5d59..1927c70d2 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -19,6 +19,8 @@ Line 106: Unexpected errors ['./dataclasses_usage.py:106:12: Any[from_another] Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] Line 197: Unexpected errors ['./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str'] Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str'] +Line 213: Unexpected errors ['./dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation]'] +Line 216: Unexpected errors ['./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation]'] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] """ output = """ @@ -32,5 +34,7 @@ output = """ ./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str +./dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation] +./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index eeff20fb4..58d74eaf5 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -12,11 +12,9 @@ Line 48: Expected 1 errors Line 58: Expected 1 errors Line 69: Expected 1 errors Line 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute]"] -Line 119: Unexpected errors ['./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument]'] """ output = """ ./directives_deprecated.py:90:4: @override decorator in invalid location [invalid_override_decorator] ./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] ./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] -./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index ca9ef0915..4166a789d 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -2,15 +2,14 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors Line 30: Expected 1 errors -Line 49: Expected 1 errors -Line 61: Expected 1 errors Line 68: Expected 1 errors -Line 98: Expected 1 errors Line 24: Unexpected errors ['./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] Line 25: Unexpected errors ['./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[Any[explicit]]] but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int]'] Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool'] Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[from_another] is not equivalent to int'] +Line 84: Unexpected errors ['./generics_base_class.py:84:12: Object Parent1 does not support subscripting [unsupported_operation]', './generics_base_class.py:84:29: Object Parent2 does not support subscripting [unsupported_operation]'] +Line 97: Unexpected errors ['./generics_base_class.py:97:13: Object Grandparent does not support subscripting [unsupported_operation]'] """ output = """ ./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument] @@ -18,5 +17,11 @@ output = """ ./generics_base_class.py:26:25: Incompatible argument type for x: expected dict[str, list[object]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] ./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int] ./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool +./generics_base_class.py:49:21: Object LinkedList does not support subscripting [unsupported_operation] ./generics_base_class.py:58:16: Any[from_another] is not equivalent to int +./generics_base_class.py:61:17: Object MyDict does not support subscripting [unsupported_operation] +./generics_base_class.py:84:12: Object Parent1 does not support subscripting [unsupported_operation] +./generics_base_class.py:84:29: Object Parent2 does not support subscripting [unsupported_operation] +./generics_base_class.py:97:13: Object Grandparent does not support subscripting [unsupported_operation] +./generics_base_class.py:98:31: Object Grandparent does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index a1c86e93a..706dbbed7 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -8,10 +8,7 @@ Line 162: Expected 1 errors Line 163: Expected 1 errors Line 171: Expected 1 errors Line 172: Expected 1 errors -Line 208: Expected 1 errors -Line 23: Unexpected errors ['./generics_basic.py:23:16: int | Any[generic_argument] is not equivalent to int'] -Line 24: Unexpected errors ['./generics_basic.py:24:16: str | Any[generic_argument] is not equivalent to str'] -Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) | ~AnyStr: (str, bytes) [unsupported_operation]'] +Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] Line 67: Unexpected errors ['./generics_basic.py:67:16: Any[error] is not equivalent to str', './generics_basic.py:67:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument]'] Line 68: Unexpected errors ['./generics_basic.py:68:16: Any[error] is not equivalent to str', './generics_basic.py:68:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument]'] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] @@ -22,9 +19,7 @@ Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[from_another] is Line 199: Unexpected errors ['./generics_basic.py:199:16: Any[error] is not equivalent to collections.abc.Iterator[Any[explicit]]', './generics_basic.py:199:16: Cannot call overloaded function [incompatible_argument]'] """ output = """ -./generics_basic.py:23:16: int | Any[generic_argument] is not equivalent to int -./generics_basic.py:24:16: str | Any[generic_argument] is not equivalent to str -./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) | ~AnyStr: (str, bytes) [unsupported_operation] +./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation] ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] @@ -40,4 +35,5 @@ output = """ ./generics_basic.py:155:16: Any[from_another] is not equivalent to int ./generics_basic.py:199:16: Any[error] is not equivalent to collections.abc.Iterator[Any[explicit]] ./generics_basic.py:199:16: Cannot call overloaded function [incompatible_argument] +./generics_basic.py:208:36: Object GenericMeta does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 2b862d120..ec972d634 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,23 +1,62 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors -Line 50: Expected 1 errors Line 107: Expected 1 errors Line 114: Expected 1 errors Line 143: Expected 1 errors -Line 30: Unexpected errors ['./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference]'] -Line 45: Unexpected errors ['./generics_defaults.py:45:12: AllTheDefaults is not equivalent to Any[inference]'] -Line 79: Unexpected errors ['./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference]'] +Line 30: Unexpected errors ['./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference]', './generics_defaults.py:30:32: Object NoNonDefaults does not support subscripting [unsupported_operation]'] +Line 31: Unexpected errors ['./generics_defaults.py:31:12: Object NoNonDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:31:37: Object NoNonDefaults does not support subscripting [unsupported_operation]'] +Line 32: Unexpected errors ['./generics_defaults.py:32:12: Object NoNonDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:32:42: Object NoNonDefaults does not support subscripting [unsupported_operation]'] +Line 38: Unexpected errors ['./generics_defaults.py:38:12: Object OneDefault does not support subscripting [unsupported_operation]', './generics_defaults.py:38:36: Object OneDefault does not support subscripting [unsupported_operation]'] +Line 39: Unexpected errors ['./generics_defaults.py:39:12: Object OneDefault does not support subscripting [unsupported_operation]', './generics_defaults.py:39:33: Object OneDefault does not support subscripting [unsupported_operation]'] +Line 45: Unexpected errors ['./generics_defaults.py:45:12: AllTheDefaults is not equivalent to Any[inference]', './generics_defaults.py:45:33: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 47: Unexpected errors ['./generics_defaults.py:47:4: Object AllTheDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:47:39: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 53: Unexpected errors ['./generics_defaults.py:53:4: Object AllTheDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:53:39: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 56: Unexpected errors ['./generics_defaults.py:56:4: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 57: Unexpected errors ['./generics_defaults.py:57:9: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 60: Unexpected errors ['./generics_defaults.py:60:4: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 61: Unexpected errors ['./generics_defaults.py:61:9: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 64: Unexpected errors ['./generics_defaults.py:64:4: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 65: Unexpected errors ['./generics_defaults.py:65:9: Object AllTheDefaults does not support subscripting [unsupported_operation]'] +Line 79: Unexpected errors ['./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference]', './generics_defaults.py:79:34: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] +Line 80: Unexpected errors ['./generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] +Line 81: Unexpected errors ['./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation]', './generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] Line 94: Unexpected errors ['./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference]'] -Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[from_another]'] +Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error]', './generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation]'] Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[from_another] is not equivalent to int'] """ output = """ ./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference] +./generics_defaults.py:30:32: Object NoNonDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:31:12: Object NoNonDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:31:37: Object NoNonDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:32:12: Object NoNonDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:32:42: Object NoNonDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:38:12: Object OneDefault does not support subscripting [unsupported_operation] +./generics_defaults.py:38:36: Object OneDefault does not support subscripting [unsupported_operation] +./generics_defaults.py:39:12: Object OneDefault does not support subscripting [unsupported_operation] +./generics_defaults.py:39:33: Object OneDefault does not support subscripting [unsupported_operation] ./generics_defaults.py:45:12: AllTheDefaults is not equivalent to Any[inference] +./generics_defaults.py:45:33: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:47:4: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:47:39: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:50:0: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:53:4: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:53:39: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:56:4: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:57:9: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:60:4: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:61:9: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:64:4: Object AllTheDefaults does not support subscripting [unsupported_operation] +./generics_defaults.py:65:9: Object AllTheDefaults does not support subscripting [unsupported_operation] ./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference] +./generics_defaults.py:79:34: Object Class_ParamSpec does not support subscripting [unsupported_operation] +./generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation] +./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation] +./generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation] ./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int -./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[from_another] +./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error] +./generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation] ./generics_defaults.py:173:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index b77f17369..a2aa90fad 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -2,10 +2,22 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 55: Expected 1 errors +Line 22: Unexpected errors ['./generics_defaults_specialization.py:22:21: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation]'] +Line 26: Unexpected errors ['./generics_defaults_specialization.py:26:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation]'] +Line 27: Unexpected errors ['./generics_defaults_specialization.py:27:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation]'] +Line 42: Unexpected errors ['./generics_defaults_specialization.py:42:10: Object SubclassMe does not support subscripting [unsupported_operation]'] Line 45: Unexpected errors ['./generics_defaults_specialization.py:45:12: Bar is not equivalent to Any[inference]'] +Line 50: Unexpected errors ['./generics_defaults_specialization.py:50:10: Object SubclassMe does not support subscripting [unsupported_operation]'] Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str'] +Line 65: Unexpected errors ['./generics_defaults_specialization.py:65:4: Object Baz does not support subscripting [unsupported_operation]'] """ output = """ +./generics_defaults_specialization.py:22:21: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:26:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:27:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:42:10: Object SubclassMe does not support subscripting [unsupported_operation] ./generics_defaults_specialization.py:45:12: Bar is not equivalent to Any[inference] +./generics_defaults_specialization.py:50:10: Object SubclassMe does not support subscripting [unsupported_operation] ./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str +./generics_defaults_specialization.py:65:4: Object Baz does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index 421b6a2f4..b49f7e5ba 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -1,35 +1,17 @@ conformance_automated = "Fail" errors_diff = """ -Line 22: Unexpected errors ['./generics_paramspec_semantics.py:22:12: (a: str, b: bool, /) -> str | Any[unannotated] is not equivalent to (str, bool, /) -> str'] -Line 25: Unexpected errors ['./generics_paramspec_semantics.py:25:12: str | Any[from_another] is not equivalent to str'] -Line 43: Unexpected errors ['./generics_paramspec_semantics.py:43:12: bool | Any[from_another] is not equivalent to bool'] -Line 44: Unexpected errors ['./generics_paramspec_semantics.py:44:12: bool | Any[from_another] is not equivalent to bool'] +Line 82: Unexpected errors ['./generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation]'] Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: Any[from_another] is not equivalent to (int, /) -> str'] -Line 96: Unexpected errors ['./generics_paramspec_semantics.py:96:12: bool | Any[from_another] is not equivalent to bool'] -Line 97: Unexpected errors ['./generics_paramspec_semantics.py:97:12: bool | Any[from_another] is not equivalent to bool'] -Line 106: Unexpected errors ['./generics_paramspec_semantics.py:106:12: bool | Any[from_another] is not equivalent to bool'] -Line 107: Unexpected errors ['./generics_paramspec_semantics.py:107:12: bool | Any[from_another] is not equivalent to bool'] -Line 118: Unexpected errors ['./generics_paramspec_semantics.py:118:12: bool | Any[from_another] is not equivalent to bool'] -Line 119: Unexpected errors ['./generics_paramspec_semantics.py:119:12: bool | Any[from_another] is not equivalent to bool'] """ output = """ -./generics_paramspec_semantics.py:22:12: (a: str, b: bool, /) -> str | Any[unannotated] is not equivalent to (str, bool, /) -> str -./generics_paramspec_semantics.py:25:12: str | Any[from_another] is not equivalent to str ./generics_paramspec_semantics.py:26:0: Missing required positional argument 'a' [incompatible_call] ./generics_paramspec_semantics.py:27:8: Incompatible argument type for b: expected bool but got Literal['A'] [incompatible_argument] -./generics_paramspec_semantics.py:43:12: bool | Any[from_another] is not equivalent to bool -./generics_paramspec_semantics.py:44:12: bool | Any[from_another] is not equivalent to bool ./generics_paramspec_semantics.py:46:5: Cannot resolve type variables [incompatible_call] ./generics_paramspec_semantics.py:61:0: Cannot resolve type variables [incompatible_call] +./generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation] ./generics_paramspec_semantics.py:84:16: Any[from_another] is not equivalent to (int, /) -> str -./generics_paramspec_semantics.py:96:12: bool | Any[from_another] is not equivalent to bool -./generics_paramspec_semantics.py:97:12: bool | Any[from_another] is not equivalent to bool ./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] -./generics_paramspec_semantics.py:106:12: bool | Any[from_another] is not equivalent to bool -./generics_paramspec_semantics.py:107:12: bool | Any[from_another] is not equivalent to bool ./generics_paramspec_semantics.py:108:0: Incompatible argument type for args: expected tuple[bool, ...] but got tuple[Literal[1]] [incompatible_argument] -./generics_paramspec_semantics.py:118:12: bool | Any[from_another] is not equivalent to bool -./generics_paramspec_semantics.py:119:12: bool | Any[from_another] is not equivalent to bool ./generics_paramspec_semantics.py:120:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] ./generics_paramspec_semantics.py:127:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (x: str) -> int [incompatible_argument] ./generics_paramspec_semantics.py:132:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (*, x: int) -> int [incompatible_argument] diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 6e2691fcf..9bd1f61e7 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -7,6 +7,9 @@ Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle'] Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] +Line 75: Unexpected errors ['./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation]'] +Line 76: Unexpected errors ['./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation]'] +Line 84: Unexpected errors ['./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation]'] """ output = """ ./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT] @@ -17,4 +20,7 @@ output = """ ./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle ./generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized annotation object [invalid_annotation] +./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation] +./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation] +./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index d52fc181d..17ba274c3 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -3,7 +3,6 @@ errors_diff = """ Line 76: Expected 1 errors Line 82: Expected 1 errors Line 87: Expected 1 errors -Line 103: Expected 1 errors Line 105: Expected 1 errors Line 108: Expected 1 errors Line 113: Expected 1 errors @@ -15,4 +14,5 @@ Line 67: Unexpected errors ['./generics_self_usage.py:67:4: Name Inner is alread output = """ ./generics_self_usage.py:67:4: Name Inner is already defined [class_variable_redefinition] ./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] +./generics_self_usage.py:103:10: Object Bar does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index 418f1dad7..b7eb6f606 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,17 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 56: Expected 1 errors -Line 85: Expected 1 errors -Line 96: Expected 1 errors -Line 112: Expected 1 errors -Line 113: Expected 1 errors -Line 127: Expected 1 errors -Line 128: Expected 1 errors -Line 165: Expected 1 errors Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument]"] -Line 46: Unexpected errors ["./generics_syntax_infer_variance.py:46:27: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:46:55: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument]"] -Line 89: Unexpected errors ['./generics_syntax_infer_variance.py:89:7: Unrecognized annotation object [invalid_annotation]'] +Line 46: Unexpected errors ["./generics_syntax_infer_variance.py:46:27: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:46:55: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument]", './generics_syntax_infer_variance.py:46:8: Unrecognized annotation collections.abc.Sequence[Any[generic_argument]] [invalid_annotation]', './generics_syntax_infer_variance.py:46:36: collections.abc.Sequence[Any[generic_argument]] is not callable [not_callable]'] +Line 55: Unexpected errors ['./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]'] +Line 84: Unexpected errors ['./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]'] +Line 95: Unexpected errors ['./generics_syntax_infer_variance.py:95:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:95:35: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]'] Line 108: Unexpected errors ['./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition]'] +Line 166: Unexpected errors ['./generics_syntax_infer_variance.py:166:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:166:42: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]'] """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] @@ -22,10 +17,33 @@ output = """ ./generics_syntax_infer_variance.py:29:27: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] ./generics_syntax_infer_variance.py:46:27: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument] ./generics_syntax_infer_variance.py:46:55: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument] +./generics_syntax_infer_variance.py:46:8: Unrecognized annotation collections.abc.Sequence[Any[generic_argument]] [invalid_annotation] +./generics_syntax_infer_variance.py:46:36: collections.abc.Sequence[Any[generic_argument]] is not callable [not_callable] ./generics_syntax_infer_variance.py:47:53: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument] ./generics_syntax_infer_variance.py:47:27: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument] -./generics_syntax_infer_variance.py:89:7: Unrecognized annotation object [invalid_annotation] +./generics_syntax_infer_variance.py:47:8: Unrecognized annotation collections.abc.Sequence[Any[generic_argument]] [invalid_annotation] +./generics_syntax_infer_variance.py:47:34: collections.abc.Sequence[Any[generic_argument]] is not callable [not_callable] +./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:56:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:56:34: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:85:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:85:33: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:95:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:95:35: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:96:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:96:33: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition] +./generics_syntax_infer_variance.py:112:9: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:112:37: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:113:9: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:113:35: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:127:9: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:127:37: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:128:9: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:128:35: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:135:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:135:42: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:136:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] @@ -38,4 +56,8 @@ output = """ ./generics_syntax_infer_variance.py:146:37: Object ShouldBeInvariant4 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:154:9: Object ShouldBeInvariant5 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:154:37: Object ShouldBeInvariant5 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:165:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:165:44: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:166:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:166:42: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index 43eaaed06..4ca94b9c1 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -1,20 +1,47 @@ conformance_automated = "Fail" errors_diff = """ -Line 38: Expected 1 errors -Line 40: Expected 1 errors -Line 42: Expected 1 errors -Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors +Line 17: Unexpected errors ['./generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation]'] +Line 18: Unexpected errors ['./generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation]'] +Line 19: Unexpected errors ['./generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation]'] Line 21: Unexpected errors ['./generics_type_erasure.py:21:12: Any[from_another] is not equivalent to int'] +Line 27: Unexpected errors ['./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation]'] +Line 28: Unexpected errors ['./generics_type_erasure.py:28:16: Object Node does not support subscripting [unsupported_operation]'] +Line 29: Unexpected errors ['./generics_type_erasure.py:29:4: Object Node does not support subscripting [unsupported_operation]'] +Line 30: Unexpected errors ['./generics_type_erasure.py:30:16: Object Node does not support subscripting [unsupported_operation]'] +Line 32: Unexpected errors ['./generics_type_erasure.py:32:5: Object Node does not support subscripting [unsupported_operation]'] +Line 33: Unexpected errors ['./generics_type_erasure.py:33:16: Object Node does not support subscripting [unsupported_operation]'] +Line 34: Unexpected errors ['./generics_type_erasure.py:34:5: Object Node does not support subscripting [unsupported_operation]'] +Line 35: Unexpected errors ['./generics_type_erasure.py:35:16: Object Node does not support subscripting [unsupported_operation]'] +Line 37: Unexpected errors ['./generics_type_erasure.py:37:5: Object Node does not support subscripting [unsupported_operation]'] +Line 39: Unexpected errors ['./generics_type_erasure.py:39:5: Object Node does not support subscripting [unsupported_operation]'] Line 47: Unexpected errors ['./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int'] -Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int'] +Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int', './generics_type_erasure.py:48:12: Object Node does not support subscripting [unsupported_operation]'] Line 56: Unexpected errors ['./generics_type_erasure.py:56:12: Any[from_another] is not equivalent to bytes'] """ output = """ +./generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation] ./generics_type_erasure.py:21:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:28:16: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:29:4: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:30:16: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:32:5: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:33:16: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:34:5: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:35:16: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:37:5: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:38:5: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:39:5: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:40:5: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:42:0: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:43:0: Object Node does not support subscripting [unsupported_operation] ./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int ./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:48:12: Object Node does not support subscripting [unsupported_operation] ./generics_type_erasure.py:56:12: Any[from_another] is not equivalent to bytes """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index cb81d05c8..3b6c1d2c4 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -3,8 +3,6 @@ errors_diff = """ Line 42: Expected 1 errors Line 43: Expected 1 errors Line 52: Expected 1 errors -Line 53: Expected 1 errors -Line 56: Expected 1 errors Line 89: Expected 1 errors Line 99: Expected 1 errors Line 100: Expected 1 errors @@ -15,6 +13,8 @@ Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[Any """ output = """ ./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] +./generics_typevartuple_basic.py:53:30: Invalid type annotation Shape [invalid_annotation] +./generics_typevartuple_basic.py:56:27: Invalid type annotation Shape [invalid_annotation] ./generics_typevartuple_basic.py:59:23: Invalid type annotation Shape [invalid_annotation] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 3ed20643e..8389e53e8 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -17,13 +17,13 @@ Line 94: Unexpected errors ['./generics_typevartuple_specialization.py:94:16: Line 95: Unexpected errors ['./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]]'] Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 134: Unexpected errors ['./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool]'] -Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str], bool, float | int]'] -Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] +Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] +Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] +Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 147: Unexpected errors ['./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool, float | int]'] -Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] +Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] +Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 157: Unexpected errors ['./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int]'] Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] @@ -48,14 +48,14 @@ output = """ ./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool] -./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str], bool, float | int] -./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[str, bool], float | int, int] +./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] +./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] +./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] ./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[], str, bool, float | int] -./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] | tuple[Any[explicit]] is not equivalent to tuple[tuple[bool], str, float | int, int] +./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] +./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] ./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index 6d93bd6d2..6b356655f 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -1,13 +1,13 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors -Line 37: Unexpected errors ['./generics_upper_bound.py:37:12: Any[generic_argument] | Literal[[1], [1, 2]] is not equivalent to list[int]'] -Line 38: Unexpected errors ['./generics_upper_bound.py:38:12: Any[generic_argument] | Literal[{1}, {1, 2}] is not equivalent to set[int]'] +Line 37: Unexpected errors ['./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int]'] +Line 38: Unexpected errors ['./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int]'] """ output = """ -./generics_upper_bound.py:37:12: Any[generic_argument] | Literal[[1], [1, 2]] is not equivalent to list[int] -./generics_upper_bound.py:38:12: Any[generic_argument] | Literal[{1}, {1, 2}] is not equivalent to set[int] -./generics_upper_bound.py:43:12: Any[generic_argument] | Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] +./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int] +./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int] +./generics_upper_bound.py:43:12: Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] ./generics_upper_bound.py:51:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] ./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index a4a903543..a93c4f496 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -1,21 +1,66 @@ conformance_automated = "Fail" errors_diff = """ -Line 77: Expected 1 errors -Line 81: Expected 1 errors -Line 93: Expected 1 errors -Line 105: Expected 1 errors -Line 113: Expected 1 errors -Line 163: Expected 1 errors -Line 167: Expected 1 errors Line 191: Expected 1 errors -Lines 125, 126: Expected error (tag 'CoContra_Child2') -Lines 131, 132: Expected error (tag 'CoContra_Child3') -Lines 141, 142: Expected error (tag 'CoContra_Child5') Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') +Line 38: Unexpected errors ['./generics_variance.py:38:10: Object ImmutableList does not support subscripting [unsupported_operation]'] +Line 39: Unexpected errors ['./generics_variance.py:39:11: Object ImmutableList does not support subscripting [unsupported_operation]'] Line 45: Unexpected errors ['./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation]', './generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation]'] +Line 85: Unexpected errors ['./generics_variance.py:85:16: Object Co does not support subscripting [unsupported_operation]'] +Line 89: Unexpected errors ['./generics_variance.py:89:16: Object Co does not support subscripting [unsupported_operation]'] +Line 97: Unexpected errors ['./generics_variance.py:97:20: Object Contra does not support subscripting [unsupported_operation]'] +Line 101: Unexpected errors ['./generics_variance.py:101:20: Object Contra does not support subscripting [unsupported_operation]'] +Line 109: Unexpected errors ['./generics_variance.py:109:27: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:109:20: Object Contra does not support subscripting [unsupported_operation]'] +Line 117: Unexpected errors ['./generics_variance.py:117:27: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:117:20: Object Contra does not support subscripting [unsupported_operation]'] +Line 121: Unexpected errors ['./generics_variance.py:121:22: Object CoContra does not support subscripting [unsupported_operation]'] +Line 137: Unexpected errors ['./generics_variance.py:137:22: Object CoContra does not support subscripting [unsupported_operation]'] +Line 147: Unexpected errors ['./generics_variance.py:147:24: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:147:17: Object Contra does not support subscripting [unsupported_operation]'] +Line 151: Unexpected errors ['./generics_variance.py:151:28: Object Contra does not support subscripting [unsupported_operation]', './generics_variance.py:151:21: Object Contra does not support subscripting [unsupported_operation]'] +Line 155: Unexpected errors ['./generics_variance.py:155:16: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:155:13: Object Co does not support subscripting [unsupported_operation]'] +Line 159: Unexpected errors ['./generics_variance.py:159:17: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:159:20: Object Contra does not support subscripting [unsupported_operation]'] +Line 171: Unexpected errors ['./generics_variance.py:171:8: Object Co does not support subscripting [unsupported_operation]'] +Line 172: Unexpected errors ['./generics_variance.py:172:12: Object Contra does not support subscripting [unsupported_operation]'] """ output = """ ./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] +./generics_variance.py:38:10: Object ImmutableList does not support subscripting [unsupported_operation] +./generics_variance.py:39:11: Object ImmutableList does not support subscripting [unsupported_operation] ./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] ./generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation] +./generics_variance.py:77:13: Object Inv does not support subscripting [unsupported_operation] +./generics_variance.py:81:13: Object Inv does not support subscripting [unsupported_operation] +./generics_variance.py:85:16: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:89:16: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:93:16: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:97:20: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:101:20: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:105:20: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:109:27: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:109:20: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:113:27: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:113:20: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:117:27: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:117:20: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:121:22: Object CoContra does not support subscripting [unsupported_operation] +./generics_variance.py:126:4: Object CoContra does not support subscripting [unsupported_operation] +./generics_variance.py:132:4: Object CoContra does not support subscripting [unsupported_operation] +./generics_variance.py:137:22: Object CoContra does not support subscripting [unsupported_operation] +./generics_variance.py:142:13: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:142:23: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:142:4: Object CoContra does not support subscripting [unsupported_operation] +./generics_variance.py:147:24: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:147:17: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:151:28: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:151:21: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:155:16: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:155:13: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:159:17: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:159:20: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:163:32: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:163:35: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:163:25: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:167:43: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:167:36: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:167:29: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:171:8: Object Co does not support subscripting [unsupported_operation] +./generics_variance.py:172:12: Object Contra does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index cbf205240..823b18651 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -12,7 +12,6 @@ Line 69: Expected 1 errors Line 76: Expected 1 errors Line 86: Expected 1 errors Line 106: Expected 1 errors -Line 125: Expected 1 errors Line 132: Expected 1 errors Line 22: Unexpected errors ['./namedtuples_define_class.py:22:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] Line 23: Unexpected errors ['./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int'] @@ -28,6 +27,7 @@ Line 39: Unexpected errors ['./namedtuples_define_class.py:39:12: Any[from_ano Line 42: Unexpected errors ['./namedtuples_define_class.py:42:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] Line 66: Unexpected errors ['./namedtuples_define_class.py:66:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point2'] Line 101: Unexpected errors ['./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str'] +Line 121: Unexpected errors ['./namedtuples_define_class.py:121:17: Object Property does not support subscripting [unsupported_operation]'] Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int'] Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int'] """ @@ -46,6 +46,8 @@ output = """ ./namedtuples_define_class.py:42:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point ./namedtuples_define_class.py:66:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point2 ./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str +./namedtuples_define_class.py:121:17: Object Property does not support subscripting [unsupported_operation] ./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int ./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int +./namedtuples_define_class.py:125:0: Object Property does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/overloads_evaluation.toml b/conformance/results/pycroscope/overloads_evaluation.toml index fabf79e88..b89394780 100644 --- a/conformance/results/pycroscope/overloads_evaluation.toml +++ b/conformance/results/pycroscope/overloads_evaluation.toml @@ -14,11 +14,9 @@ Line 235: Unexpected errors ['./overloads_evaluation.py:235:16: int | str is n Line 262: Unexpected errors ['./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int]'] Line 265: Unexpected errors ['./overloads_evaluation.py:265:16: list[int] | list[str] is not equivalent to Any[explicit]'] Line 281: Unexpected errors ['./overloads_evaluation.py:281:16: list[Any[explicit]] is not equivalent to Any[explicit]'] -Line 303: Unexpected errors ['./overloads_evaluation.py:303:16: list[Any[explicit]] | Any[generic_argument] is not equivalent to float | int'] -Line 309: Unexpected errors ['./overloads_evaluation.py:309:16: Any[explicit] | Any[generic_argument] is not equivalent to float | int'] -Line 315: Unexpected errors ['./overloads_evaluation.py:315:16: list[int] | Any[generic_argument] is not equivalent to float | int'] -Line 318: Unexpected errors ['./overloads_evaluation.py:318:16: str | Any[generic_argument] is not equivalent to str'] -Line 324: Unexpected errors ['./overloads_evaluation.py:324:16: list[int] | Any[generic_argument] is not equivalent to list[int]'] +Line 303: Unexpected errors ['./overloads_evaluation.py:303:16: list[Any[explicit]] is not equivalent to float | int'] +Line 309: Unexpected errors ['./overloads_evaluation.py:309:16: Any[explicit] is not equivalent to float | int'] +Line 315: Unexpected errors ['./overloads_evaluation.py:315:16: list[int] is not equivalent to float | int'] Line 341: Unexpected errors ['./overloads_evaluation.py:341:16: list[int] | list[str] is not equivalent to list[int]'] Line 344: Unexpected errors ['./overloads_evaluation.py:344:16: list[int] | list[str] is not equivalent to list[str]'] Line 347: Unexpected errors ['./overloads_evaluation.py:347:16: list[int] | list[str] is not equivalent to Any[explicit]'] @@ -40,11 +38,9 @@ output = """ ./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int] ./overloads_evaluation.py:265:16: list[int] | list[str] is not equivalent to Any[explicit] ./overloads_evaluation.py:281:16: list[Any[explicit]] is not equivalent to Any[explicit] -./overloads_evaluation.py:303:16: list[Any[explicit]] | Any[generic_argument] is not equivalent to float | int -./overloads_evaluation.py:309:16: Any[explicit] | Any[generic_argument] is not equivalent to float | int -./overloads_evaluation.py:315:16: list[int] | Any[generic_argument] is not equivalent to float | int -./overloads_evaluation.py:318:16: str | Any[generic_argument] is not equivalent to str -./overloads_evaluation.py:324:16: list[int] | Any[generic_argument] is not equivalent to list[int] +./overloads_evaluation.py:303:16: list[Any[explicit]] is not equivalent to float | int +./overloads_evaluation.py:309:16: Any[explicit] is not equivalent to float | int +./overloads_evaluation.py:315:16: list[int] is not equivalent to float | int ./overloads_evaluation.py:341:16: list[int] | list[str] is not equivalent to list[int] ./overloads_evaluation.py:344:16: list[int] | list[str] is not equivalent to list[str] ./overloads_evaluation.py:347:16: list[int] | list[str] is not equivalent to Any[explicit] diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index fc7200885..92f03507a 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,12 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Unexpected errors ['./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return]'] +Line 37: Unexpected errors ['./protocols_recursive.py:37:6: Object Tree does not support subscripting [unsupported_operation]'] Line 42: Unexpected errors ['./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return]'] Line 51: Unexpected errors ['./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return]'] Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ ./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return] +./protocols_recursive.py:37:6: Object Tree does not support subscripting [unsupported_operation] ./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return] ./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return] ./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index d5f640131..1b716b2ac 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -1,19 +1,19 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors -Line 79: Expected 1 errors -Line 80: Expected 1 errors -Line 102: Expected 1 errors -Line 103: Expected 1 errors Line 37: Unexpected errors ['./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Concrete2 [incompatible_assignment]'] Line 54: Unexpected errors ['./protocols_subtyping.py:54:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Proto3 [incompatible_assignment]'] Line 67: Unexpected errors ['./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return]'] Line 72: Unexpected errors ['./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return]'] +Line 77: Unexpected errors ['./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation]'] +Line 78: Unexpected errors ['./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation]'] Line 88: Unexpected errors ['./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return]'] Line 93: Unexpected errors ['./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return]'] +Line 98: Unexpected errors ['./protocols_subtyping.py:98:8: Object Proto7 does not support subscripting [unsupported_operation]'] +Line 99: Unexpected errors ['./protocols_subtyping.py:99:8: Object Proto7 does not support subscripting [unsupported_operation]'] +Line 100: Unexpected errors ['./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation]'] Line 110: Unexpected errors ['./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return]'] Line 115: Unexpected errors ['./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return]'] -Line 142: Unexpected errors ['./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument]'] """ output = """ ./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] @@ -22,9 +22,17 @@ output = """ ./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3, got ./protocols_subtyping.py.Proto2 [incompatible_assignment] ./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:79:8: Object Proto4 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:80:8: Object Proto5 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:98:8: Object Proto7 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:99:8: Object Proto7 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:102:8: Object Proto7 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:103:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return] -./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/specialtypes_any.toml b/conformance/results/pycroscope/specialtypes_any.toml index 338ae60e2..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/specialtypes_any.toml +++ b/conformance/results/pycroscope/specialtypes_any.toml @@ -1,9 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 86: Unexpected errors ['./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int'] -Line 88: Unexpected errors ["./specialtypes_any.py:88:12: ClassA has no attribute 'method3' [undefined_attribute]"] """ output = """ -./specialtypes_any.py:86:12: Any[from_another] is not equivalent to int -./specialtypes_any.py:88:12: ClassA has no attribute 'method3' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index b5562bf44..35a2cf572 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -5,25 +5,22 @@ Line 76: Expected 1 errors Line 143: Expected 1 errors Line 144: Expected 1 errors Line 38: Unexpected errors ['./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] -Line 42: Unexpected errors ['./specialtypes_type.py:42:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] -Line 43: Unexpected errors ['./specialtypes_type.py:43:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] +Line 42: Unexpected errors ['./specialtypes_type.py:42:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] +Line 43: Unexpected errors ['./specialtypes_type.py:43:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] Line 44: Unexpected errors ['./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser'] -Line 54: Unexpected errors ['./specialtypes_type.py:54:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] -Line 55: Unexpected errors ['./specialtypes_type.py:55:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User'] +Line 54: Unexpected errors ['./specialtypes_type.py:54:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] +Line 55: Unexpected errors ['./specialtypes_type.py:55:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] Line 127: Unexpected errors ['./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser'] -Line 152: Unexpected errors ['./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 160: Unexpected errors ['./specialtypes_type.py:160:12: int | Any[generic_argument] is not equivalent to int'] -Line 161: Unexpected errors ['./specialtypes_type.py:161:12: int | Any[generic_argument] is not equivalent to int'] """ output = """ ./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] -./specialtypes_type.py:42:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User -./specialtypes_type.py:43:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User +./specialtypes_type.py:42:12: Any[error] is not equivalent to ./specialtypes_type.py.User +./specialtypes_type.py:43:12: Any[error] is not equivalent to ./specialtypes_type.py.User ./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser -./specialtypes_type.py:54:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User -./specialtypes_type.py:55:12: Any[error] | ./specialtypes_type.py.User is not equivalent to ./specialtypes_type.py.User +./specialtypes_type.py:54:12: Any[error] is not equivalent to ./specialtypes_type.py.User +./specialtypes_type.py:55:12: Any[error] is not equivalent to ./specialtypes_type.py.User ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] ./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] @@ -32,7 +29,4 @@ output = """ ./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser ./specialtypes_type.py:145:0: type 'type' has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:146:0: Literal[type[typing.Any]] has no attribute 'unknown' [undefined_attribute] -./specialtypes_type.py:152:15: Unrecognized annotation types.GenericAlias [invalid_annotation] -./specialtypes_type.py:160:12: int | Any[generic_argument] is not equivalent to int -./specialtypes_type.py:161:12: int | Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 7673a824f..346c17b04 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -10,9 +10,6 @@ Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] Line 107: Unexpected errors ['./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] Line 111: Unexpected errors ['./tuples_type_compat.py:111:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int, str, int]'] Line 112: Unexpected errors ['./tuples_type_compat.py:112:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 150: Unexpected errors ['./tuples_type_compat.py:150:8: collections.abc.Sequence[complex | float | int | list[int]] | Any[unannotated] is not equivalent to collections.abc.Sequence[complex | float | int | list[int]]'] -Line 152: Unexpected errors ['./tuples_type_compat.py:152:16: collections.abc.Sequence[int | str] | Any[unannotated] is not equivalent to collections.abc.Sequence[int | str]'] -Line 153: Unexpected errors ['./tuples_type_compat.py:153:16: collections.abc.Sequence[Never] | Any[unannotated] is not equivalent to collections.abc.Sequence[Never]'] """ output = """ ./tuples_type_compat.py:15:4: Incompatible assignment: expected tuple[int, int], got tuple[float | int, complex | float | int] [incompatible_assignment] @@ -33,9 +30,6 @@ output = """ ./tuples_type_compat.py:112:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:126:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, str] ./tuples_type_compat.py:129:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, int] -./tuples_type_compat.py:150:8: collections.abc.Sequence[complex | float | int | list[int]] | Any[unannotated] is not equivalent to collections.abc.Sequence[complex | float | int | list[int]] -./tuples_type_compat.py:152:16: collections.abc.Sequence[int | str] | Any[unannotated] is not equivalent to collections.abc.Sequence[int | str] -./tuples_type_compat.py:153:16: collections.abc.Sequence[Never] | Any[unannotated] is not equivalent to collections.abc.Sequence[Never] ./tuples_type_compat.py:157:0: Incompatible assignment: expected tuple[int, str], got Literal[(1, '', '')] [incompatible_assignment] ./tuples_type_compat.py:162:0: Incompatible assignment: expected tuple[int, *tuple[str, ...]], got Literal[(1, 1, '')] [incompatible_assignment] ./tuples_type_compat.py:163:0: Incompatible assignment: expected tuple[int, *tuple[str, ...]], got Literal[(1, '', 1)] [incompatible_assignment] diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml index d39c67f7b..74bfee986 100644 --- a/conformance/results/pycroscope/typeddicts_extra_items.toml +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -1,6 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 15: Expected 1 errors +Line 22: Expected 1 errors Line 49: Expected 1 errors Line 67: Expected 1 errors Line 73: Expected 1 errors @@ -20,6 +21,7 @@ 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 19: Unexpected errors ['./typeddicts_extra_items.py:19:18: Error calling (typename, fields=None, /, *, total=Literal[True], **kwargs) -> Any[unannotated]: TypedDict takes either a dict or keyword arguments, but not both [incompatible_call]'] Line 29: Unexpected errors ['./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool', "./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key]"] Line 129: Unexpected errors ["./typeddicts_extra_items.py:129:14: Key Literal['year'] does not exist in TypedDict [invalid_typeddict_key]"] Line 140: Unexpected errors ['./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation]'] @@ -27,12 +29,12 @@ Line 141: Unexpected errors ['./typeddicts_extra_items.py:141:27: Unrecognized a Line 284: Unexpected errors ["./typeddicts_extra_items.py:284:0: Got an unexpected keyword argument 'year' [incompatible_call]"] Line 310: Unexpected errors ['./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]]'] Line 311: Unexpected errors ['./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str]'] -Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[from_another] | Any[explicit] is not equivalent to tuple[str, int]'] +Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[explicit] is not equivalent to tuple[str, int]'] Line 342: Unexpected errors ['./typeddicts_extra_items.py:342:26: Cannot set unknown key str in TypedDict TypedDict({"num": NotRequired[int]}) [invalid_typeddict_key]'] Line 343: Unexpected errors ['./typeddicts_extra_items.py:343:30: Key str does not exist in TypedDict [invalid_typeddict_key]'] """ output = """ -./typeddicts_extra_items.py:22:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": bool}, closed=True), got Literal[{'name': 'Blade Runner', 'year': 1982}] [incompatible_assignment] +./typeddicts_extra_items.py:19:18: Error calling (typename, fields=None, /, *, total=Literal[True], **kwargs) -> Any[unannotated]: TypedDict takes either a dict or keyword arguments, but not both [incompatible_call] ./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool ./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key] ./typeddicts_extra_items.py:39:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': None}] [incompatible_assignment] @@ -44,10 +46,10 @@ output = """ ./typeddicts_extra_items.py:284:0: Got an unexpected keyword argument 'year' [incompatible_call] ./typeddicts_extra_items.py:285:0: Got an unexpected keyword argument 'language' [incompatible_call] ./typeddicts_extra_items.py:293:0: Got an unexpected keyword argument 'year' [incompatible_call] -./typeddicts_extra_items.py:303:0: Incompatible assignment: expected collections.abc.Mapping[str, int], got Any[error] | TypedDict({"name": str}) [incompatible_assignment] +./typeddicts_extra_items.py:303:0: Incompatible assignment: expected collections.abc.Mapping[str, int], got TypedDict({"name": str}) [incompatible_assignment] ./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]] ./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str] -./typeddicts_extra_items.py:339:12: Any[from_another] | Any[explicit] is not equivalent to tuple[str, int] +./typeddicts_extra_items.py:339:12: Any[explicit] is not equivalent to tuple[str, int] ./typeddicts_extra_items.py:342:26: Cannot set unknown key str in TypedDict TypedDict({"num": NotRequired[int]}) [invalid_typeddict_key] ./typeddicts_extra_items.py:343:30: Key str does not exist in TypedDict [invalid_typeddict_key] ./typeddicts_extra_items.py:352:4: Incompatible assignment: expected TypedDict({}), got dict[str, int] [incompatible_assignment] diff --git a/conformance/results/pycroscope/typeddicts_operations.toml b/conformance/results/pycroscope/typeddicts_operations.toml index fde6dae22..444a8f633 100644 --- a/conformance/results/pycroscope/typeddicts_operations.toml +++ b/conformance/results/pycroscope/typeddicts_operations.toml @@ -9,10 +9,8 @@ Line 37: Expected 1 errors Line 47: Expected 1 errors Line 49: Expected 1 errors Line 62: Expected 1 errors -Line 60: Unexpected errors ['./typeddicts_operations.py:60:12: Any[from_another] | str | None is not equivalent to str | None'] """ output = """ ./typeddicts_operations.py:28:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner'}] [incompatible_assignment] ./typeddicts_operations.py:29:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': 1982.1}] [incompatible_assignment] -./typeddicts_operations.py:60:12: Any[from_another] | str | None is not equivalent to str | None """ diff --git a/conformance/results/results.html b/conformance/results/results.html index a09ed249b..02993a3bf 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -239,7 +239,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      specialtypes_never Pass From 78756bcbe296e4d412760042c0137c4be5199dd0 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 22 Feb 2026 17:14:26 -0800 Subject: [PATCH 20/78] some more fixed --- .../pycroscope/aliases_typealiastype.toml | 2 - .../results/pycroscope/callables_kwargs.toml | 6 +- .../pycroscope/callables_subtyping.toml | 60 +++++++++---------- .../results/pycroscope/protocols_generic.toml | 4 +- .../results/pycroscope/specialtypes_none.toml | 2 +- .../pycroscope/typeddicts_required.toml | 6 +- .../pycroscope/typeforms_typeform.toml | 7 --- conformance/results/results.html | 2 +- 8 files changed, 41 insertions(+), 48 deletions(-) diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index 884dda992..9aa24aff2 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -20,12 +20,10 @@ Line 61: Expected 1 errors Line 62: Expected 1 errors Line 64: Expected 1 errors Line 66: Expected 1 errors -Line 35: Unexpected errors ['./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation]'] Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]"] """ output = """ ./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] -./aliases_typealiastype.py:35:4: Unrecognized subscripted annotation: GoodAlias4 [invalid_annotation] ./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] ./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] """ diff --git a/conformance/results/pycroscope/callables_kwargs.toml b/conformance/results/pycroscope/callables_kwargs.toml index 2db8aab2f..6d9e7c9f8 100644 --- a/conformance/results/pycroscope/callables_kwargs.toml +++ b/conformance/results/pycroscope/callables_kwargs.toml @@ -13,7 +13,7 @@ output = """ ./callables_kwargs.py:63:4: Multiple values provided for argument 'v1' [incompatible_call] ./callables_kwargs.py:64:4: In call to .../tests/callables_kwargs.py.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] ./callables_kwargs.py:65:4: Multiple values provided for argument 'v1' [incompatible_call] -./callables_kwargs.py:101:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol3 (Protocol with members '__call__'), got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] -./callables_kwargs.py:102:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol4 (Protocol with members '__call__'), got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] -./callables_kwargs.py:103:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol5 (Protocol with members '__call__'), got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:101:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol3, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:102:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol4, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:103:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol5, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index d4f6c88e3..a89204bf1 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -4,34 +4,34 @@ errors_diff = """ output = """ ./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment] ./callables_subtyping.py:29:4: Incompatible assignment: expected (int, /) -> int, got (float | int, /) -> float | int [incompatible_assignment] -./callables_subtyping.py:51:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:52:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:55:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:58:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:82:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:85:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:86:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:116:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:119:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:120:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:122:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:124:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:125:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:126:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:151:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:154:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:155:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:187:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:190:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:191:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:193:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:195:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:196:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:197:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:236:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:273:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArg9 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.Overloaded9 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10 (Protocol with members '__call__'), got .../tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:51:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:52:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:55:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly2, got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:58:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly2, got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:82:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs3, got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:85:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:86:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:116:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly4, got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:119:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:120:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:122:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrArgs4, got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:124:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs4, got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:125:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:126:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:151:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:154:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:155:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:187:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly6, got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:190:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:191:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:193:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:195:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:196:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:197:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:236:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8, got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8, got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:273:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArg9, got .../tests/callables_subtyping.py.Overloaded9 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10, got .../tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index b4bcff975..3655c1d7c 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -6,13 +6,15 @@ Line 66: Expected 1 errors Line 74: Expected 1 errors Line 145: Expected 1 errors Line 147: Expected 1 errors +Line 39: Unexpected errors ['./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment]'] Line 65: Unexpected errors ['./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment]'] Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent'] """ output = """ +./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment] ./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] ./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] ./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] ./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent -./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto (Protocol with members 'f', 'm'), got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] +./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/specialtypes_none.toml b/conformance/results/pycroscope/specialtypes_none.toml index 56430ab4c..0aa764fdd 100644 --- a/conformance/results/pycroscope/specialtypes_none.toml +++ b/conformance/results/pycroscope/specialtypes_none.toml @@ -3,6 +3,6 @@ errors_diff = """ """ output = """ ./specialtypes_none.py:21:6: Incompatible argument type for val1: expected None but got type [incompatible_argument] -./specialtypes_none.py:27:0: Incompatible assignment: expected collections.abc.Iterable (Protocol with members '__iter__'), got None [incompatible_assignment] +./specialtypes_none.py:27:0: Incompatible assignment: expected collections.abc.Iterable, got None [incompatible_assignment] ./specialtypes_none.py:41:6: Incompatible argument type for val1: expected type[NoneType] but got None [incompatible_argument] """ diff --git a/conformance/results/pycroscope/typeddicts_required.toml b/conformance/results/pycroscope/typeddicts_required.toml index beb18fdb5..d090f9a38 100644 --- a/conformance/results/pycroscope/typeddicts_required.toml +++ b/conformance/results/pycroscope/typeddicts_required.toml @@ -1,9 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 59: Expected 1 errors -Line 60: Expected 1 errors """ output = """ ./typeddicts_required.py:12:7: Unexpected Required annotation [invalid_annotation] ./typeddicts_required.py:16:7: Unexpected NotRequired annotation [invalid_annotation] +./typeddicts_required.py:59:7: Required[] cannot be nested [invalid_annotation] +./typeddicts_required.py:60:7: Required[] and NotRequired[] cannot be nested [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeforms_typeform.toml b/conformance/results/pycroscope/typeforms_typeform.toml index f554fe353..17a8a1d1d 100644 --- a/conformance/results/pycroscope/typeforms_typeform.toml +++ b/conformance/results/pycroscope/typeforms_typeform.toml @@ -2,13 +2,8 @@ conformance_automated = "Fail" errors_diff = """ Line 59: Expected 1 errors Line 60: Expected 1 errors -Line 1: Unexpected errors ['./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation]', './typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation]'] -Line 71: Unexpected errors ['./typeforms_typeform.py:71:12: Literal[str | None] is not equivalent to TypeForm[str | None]'] -Line 74: Unexpected errors ["./typeforms_typeform.py:74:12: Literal['list[int]'] is not equivalent to TypeForm[list[int]]"] """ output = """ -./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation] -./typeforms_typeform.py:1:0: Invalid type annotation [invalid_annotation] ./typeforms_typeform.py:23:0: Incompatible assignment: expected TypeForm[str | None], got Literal[str | int] [incompatible_assignment] ./typeforms_typeform.py:24:0: Incompatible assignment: expected TypeForm[str | None], got Literal[list[str | None]] [incompatible_assignment] ./typeforms_typeform.py:55:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[()] [incompatible_assignment] @@ -20,8 +15,6 @@ output = """ ./typeforms_typeform.py:63:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Unpack[Ts]] [incompatible_assignment] ./typeforms_typeform.py:64:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Optional] [incompatible_assignment] ./typeforms_typeform.py:65:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal['int + str'] [incompatible_assignment] -./typeforms_typeform.py:71:12: Literal[str | None] is not equivalent to TypeForm[str | None] -./typeforms_typeform.py:74:12: Literal['list[int]'] is not equivalent to TypeForm[list[int]] ./typeforms_typeform.py:76:5: Unrecognized annotation type [invalid_annotation] ./typeforms_typeform.py:78:5: Unrecognized annotation type [invalid_annotation] ./typeforms_typeform.py:88:0: Incompatible assignment: expected TypeForm[str], got TypeForm[int] [incompatible_assignment] diff --git a/conformance/results/results.html b/conformance/results/results.html index 02993a3bf..e90eb3c3e 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -1014,7 +1014,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_type_consistency Pass From 3ddb5854761339b507aad41ffc2b94436c7069b7 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 23 Feb 2026 09:09:49 -0800 Subject: [PATCH 21/78] progress --- .../pycroscope/annotations_forward_refs.toml | 27 ++----- .../pycroscope/callables_annotation.toml | 2 - .../results/pycroscope/classes_classvar.toml | 5 +- .../pycroscope/constructors_callable.toml | 52 ++++++------- .../results/pycroscope/dataclasses_final.toml | 4 - .../pycroscope/directives_deprecated.toml | 2 + .../pycroscope/generics_self_basic.toml | 2 +- .../pycroscope/protocols_subtyping.toml | 2 + .../qualifiers_final_annotation.toml | 6 +- .../results/pycroscope/specialtypes_type.toml | 8 -- .../pycroscope/typeddicts_alt_syntax.toml | 10 +-- .../pycroscope/typeddicts_class_syntax.toml | 2 - .../pycroscope/typeddicts_extra_items.toml | 77 +++++++------------ .../pycroscope/typeddicts_inheritance.toml | 4 +- .../pycroscope/typeddicts_operations.toml | 21 ++--- .../typeddicts_type_consistency.toml | 2 +- conformance/results/results.html | 8 +- 17 files changed, 92 insertions(+), 142 deletions(-) diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index bc334d242..d0cdc84b0 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -2,13 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors Line 25: Expected 1 errors -Line 41: Expected 1 errors -Line 44: Expected 1 errors -Line 46: Expected 1 errors -Line 48: Expected 1 errors -Line 53: Expected 1 errors -Line 54: Expected 1 errors -Line 1: Unexpected errors ['./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]', './annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation]'] Line 14: Unexpected errors ['./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name]'] Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name]'] Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] @@ -16,21 +9,8 @@ Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation]'] Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] -Line 103: Unexpected errors ['./annotations_forward_refs.py:103:7: Syntax error in type annotation: '] """ output = """ -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:1:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name] @@ -42,18 +22,23 @@ output = """ ./annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:22:6: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:23:11: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:41:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] +./annotations_forward_refs.py:44:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:45:8: Unrecognized annotation [invalid_annotation] +./annotations_forward_refs.py:46:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:47:8: Invalid type annotation 0 [invalid_annotation] +./annotations_forward_refs.py:48:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:49:8: Invalid type annotation 1 [invalid_annotation] ./annotations_forward_refs.py:50:9: Invalid type annotation True [invalid_annotation] ./annotations_forward_refs.py:51:9: Invalid type annotation 1 [invalid_annotation] ./annotations_forward_refs.py:52:9: Invalid type annotation -1 [invalid_annotation] +./annotations_forward_refs.py:53:0: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:54:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] ./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation] ./annotations_forward_refs.py:89:7: Unrecognized annotation (self) -> None [invalid_annotation] ./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int -./annotations_forward_refs.py:103:7: Syntax error in type annotation: """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 876dead7c..561e20f14 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,7 +4,6 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 74: Unexpected errors ['./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str [incompatible_assignment]'] Line 147: Unexpected errors ['./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment]'] Line 148: Unexpected errors ['./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1, got (...) -> None [incompatible_assignment]'] Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] @@ -22,7 +21,6 @@ output = """ ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:74:0: Incompatible assignment: expected () -> str, got (x: int) -> str [incompatible_assignment] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] ./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment] diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index cb14ce219..eff7c1791 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -13,12 +13,11 @@ Line 84: Unexpected errors ["./classes_classvar.py:84:12: ClassA has no attribut Line 107: Unexpected errors ["./classes_classvar.py:107:33: Starship has no attribute 'stats' [undefined_attribute]", "./classes_classvar.py:107:8: Starship has no attribute 'stats' [undefined_attribute]"] """ output = """ -./classes_classvar.py:38:10: Unrecognized annotation object [invalid_annotation] +./classes_classvar.py:38:10: Invalid type annotation (, ) [invalid_annotation] ./classes_classvar.py:39:10: Invalid type annotation 3 [invalid_annotation] ./classes_classvar.py:40:13: Undefined name: var [undefined_name] -./classes_classvar.py:40:10: Unrecognized annotation object [invalid_annotation] ./classes_classvar.py:52:4: Incompatible assignment: expected list[str], got Literal[{}] [incompatible_assignment] -./classes_classvar.py:54:10: Unrecognized annotation object [invalid_annotation] +./classes_classvar.py:54:10: Unrecognized subscripted annotation: typing.Final [invalid_annotation] ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index cc63a25fd..1f622be1b 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -13,18 +13,18 @@ Line 146: Expected 1 errors Line 186: Expected 1 errors Line 197: Expected 1 errors Line 35: Unexpected errors ['./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument]'] -Line 37: Unexpected errors ['./constructors_callable.py:37:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class1'] +Line 37: Unexpected errors ['./constructors_callable.py:37:12: Any[error] is not equivalent to ./constructors_callable.py.Class1'] Line 48: Unexpected errors ['./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument]'] -Line 50: Unexpected errors ['./constructors_callable.py:50:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class2'] +Line 50: Unexpected errors ['./constructors_callable.py:50:12: Any[error] is not equivalent to ./constructors_callable.py.Class2'] Line 63: Unexpected errors ['./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument]'] -Line 65: Unexpected errors ['./constructors_callable.py:65:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class3'] +Line 65: Unexpected errors ['./constructors_callable.py:65:12: Any[error] is not equivalent to ./constructors_callable.py.Class3'] Line 78: Unexpected errors ['./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument]'] -Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[generic_argument] is not equivalent to int'] +Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[error] is not equivalent to int'] Line 98: Unexpected errors ['./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument]'] -Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[generic_argument] is not equivalent to Never'] -Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[generic_argument] is not equivalent to Never'] +Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[error] is not equivalent to Never'] +Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[error] is not equivalent to Never'] Line 126: Unexpected errors ['./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument]'] -Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class6Proxy'] +Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[error] is not equivalent to ./constructors_callable.py.Class6Proxy'] Line 143: Unexpected errors ['./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument]'] Line 162: Unexpected errors ['./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument]'] Line 166: Unexpected errors ['./constructors_callable.py:166:19: Object Class7 does not support subscripting [unsupported_operation]'] @@ -32,38 +32,38 @@ Line 167: Unexpected errors ['./constructors_callable.py:167:20: Object Class7 d Line 183: Unexpected errors ['./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument]'] Line 185: Unexpected errors ['./constructors_callable.py:185:28: Object Class8 does not support subscripting [unsupported_operation]'] Line 194: Unexpected errors ['./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument]'] -Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class9'] +Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9'] """ output = """ ./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument] -./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] -./constructors_callable.py:37:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class1 +./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[error]' [reveal_type] +./constructors_callable.py:37:12: Any[error] is not equivalent to ./constructors_callable.py.Class1 ./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument] -./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] -./constructors_callable.py:50:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class2 +./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[error]' [reveal_type] +./constructors_callable.py:50:12: Any[error] is not equivalent to ./constructors_callable.py.Class2 ./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument] -./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] -./constructors_callable.py:65:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class3 +./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[error]' [reveal_type] +./constructors_callable.py:65:12: Any[error] is not equivalent to ./constructors_callable.py.Class3 ./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument] -./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] -./constructors_callable.py:80:12: Any[generic_argument] is not equivalent to int +./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[error]' [reveal_type] +./constructors_callable.py:80:12: Any[error] is not equivalent to int ./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument] -./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] -./constructors_callable.py:102:16: Any[generic_argument] is not equivalent to Never -./constructors_callable.py:107:16: Any[generic_argument] is not equivalent to Never +./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[error]' [reveal_type] +./constructors_callable.py:102:16: Any[error] is not equivalent to Never +./constructors_callable.py:107:16: Any[error] is not equivalent to Never ./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument] -./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] -./constructors_callable.py:128:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class6Proxy +./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[error]' [reveal_type] +./constructors_callable.py:128:12: Any[error] is not equivalent to ./constructors_callable.py.Class6Proxy ./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument] -./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument] -./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:166:19: Object Class7 does not support subscripting [unsupported_operation] ./constructors_callable.py:167:20: Object Class7 does not support subscripting [unsupported_operation] ./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument] -./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] +./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:185:28: Object Class8 does not support subscripting [unsupported_operation] ./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument] -./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[generic_argument]' [reveal_type] -./constructors_callable.py:196:12: Any[generic_argument] is not equivalent to ./constructors_callable.py.Class9 +./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[error]' [reveal_type] +./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9 """ diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index 365a4d1bb..23b9be5b1 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -5,14 +5,10 @@ Line 35: Expected 1 errors Line 36: Expected 1 errors Line 37: Expected 1 errors Line 38: Expected 1 errors -Line 18: Unexpected errors ['./dataclasses_final.py:18:20: Unrecognized annotation object [invalid_annotation]'] -Line 24: Unexpected errors ['./dataclasses_final.py:24:12: Any[error] is not equivalent to int'] Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int'] Line 32: Unexpected errors ['./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str'] """ output = """ -./dataclasses_final.py:18:20: Unrecognized annotation object [invalid_annotation] -./dataclasses_final.py:24:12: Any[error] is not equivalent to int ./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int ./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 58d74eaf5..eeff20fb4 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -12,9 +12,11 @@ Line 48: Expected 1 errors Line 58: Expected 1 errors Line 69: Expected 1 errors Line 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute]"] +Line 119: Unexpected errors ['./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument]'] """ output = """ ./directives_deprecated.py:90:4: @override decorator in invalid location [invalid_override_decorator] ./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] ./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] +./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 9bd1f61e7..ec44a4fff 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -19,7 +19,7 @@ output = """ ./generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle ./generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] -./generics_self_basic.py:68:25: Unrecognized annotation object [invalid_annotation] +./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] ./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation] ./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation] ./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index 1b716b2ac..c2ab99f6b 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -14,6 +14,7 @@ Line 99: Unexpected errors ['./protocols_subtyping.py:99:8: Object Proto7 does n Line 100: Unexpected errors ['./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation]'] Line 110: Unexpected errors ['./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return]'] Line 115: Unexpected errors ['./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return]'] +Line 142: Unexpected errors ['./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument]'] """ output = """ ./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] @@ -35,4 +36,5 @@ output = """ ./protocols_subtyping.py:103:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return] +./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml index 532bda741..3998c0a96 100644 --- a/conformance/results/pycroscope/qualifiers_final_annotation.toml +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -10,16 +10,16 @@ Line 65: Expected 1 errors Line 67: Expected 1 errors Line 81: Expected 1 errors Line 94: Expected 1 errors +Line 107: Expected 1 errors Line 141: Expected 1 errors Line 166: Expected 1 errors Line 170: Expected 1 errors Line 168: Unexpected errors ["./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import]"] """ output = """ -./qualifiers_final_annotation.py:18:6: Unrecognized annotation object [invalid_annotation] +./qualifiers_final_annotation.py:18:6: Unrecognized subscripted annotation: typing.Final [invalid_annotation] ./qualifiers_final_annotation.py:71:0: Cannot assign to final name RATE [incompatible_assignment] -./qualifiers_final_annotation.py:107:12: Unrecognized annotation object [invalid_annotation] -./qualifiers_final_annotation.py:108:12: Unrecognized annotation object [invalid_annotation] +./qualifiers_final_annotation.py:108:12: Unrecognized subscripted annotation: typing.Final [invalid_annotation] ./qualifiers_final_annotation.py:118:3: Unrecognized annotation typing.Final[] [invalid_annotation] ./qualifiers_final_annotation.py:121:13: Unexpected Final annotation [invalid_annotation] ./qualifiers_final_annotation.py:134:0: In call to pycroscope.signature.N: Missing required argument 'x' [incompatible_call] diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index 35a2cf572..b6e49ffbe 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -5,22 +5,14 @@ Line 76: Expected 1 errors Line 143: Expected 1 errors Line 144: Expected 1 errors Line 38: Unexpected errors ['./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] -Line 42: Unexpected errors ['./specialtypes_type.py:42:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] -Line 43: Unexpected errors ['./specialtypes_type.py:43:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] Line 44: Unexpected errors ['./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser'] -Line 54: Unexpected errors ['./specialtypes_type.py:54:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] -Line 55: Unexpected errors ['./specialtypes_type.py:55:12: Any[error] is not equivalent to ./specialtypes_type.py.User'] Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] Line 127: Unexpected errors ['./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser'] """ output = """ ./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] -./specialtypes_type.py:42:12: Any[error] is not equivalent to ./specialtypes_type.py.User -./specialtypes_type.py:43:12: Any[error] is not equivalent to ./specialtypes_type.py.User ./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser -./specialtypes_type.py:54:12: Any[error] is not equivalent to ./specialtypes_type.py.User -./specialtypes_type.py:55:12: Any[error] is not equivalent to ./specialtypes_type.py.User ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] ./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] diff --git a/conformance/results/pycroscope/typeddicts_alt_syntax.toml b/conformance/results/pycroscope/typeddicts_alt_syntax.toml index 929b2b250..447ad2f77 100644 --- a/conformance/results/pycroscope/typeddicts_alt_syntax.toml +++ b/conformance/results/pycroscope/typeddicts_alt_syntax.toml @@ -1,10 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 23: Expected 1 errors -Line 27: Expected 1 errors -Line 31: Expected 1 errors """ output = """ -./typeddicts_alt_syntax.py:35:16: Error calling (typename, fields=None, /, *, total=Literal[True], **kwargs) -> Any[unannotated]: TypedDict takes either a dict or keyword arguments, but not both [incompatible_call] +./typeddicts_alt_syntax.py:23:43: TypedDict fields argument must be a dictionary literal [incompatible_call] +./typeddicts_alt_syntax.py:27:44: TypedDict field names must be string literals [incompatible_call] +./typeddicts_alt_syntax.py:31:26: TypedDict name argument must match the assignment target name [incompatible_call] +./typeddicts_alt_syntax.py:35:71: TypedDict takes either a dict or keyword arguments, but not both [incompatible_call] ./typeddicts_alt_syntax.py:45:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': ''}] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_class_syntax.toml b/conformance/results/pycroscope/typeddicts_class_syntax.toml index 891f87833..23f929c29 100644 --- a/conformance/results/pycroscope/typeddicts_class_syntax.toml +++ b/conformance/results/pycroscope/typeddicts_class_syntax.toml @@ -5,8 +5,6 @@ Line 44: Expected 1 errors Line 49: Expected 1 errors Lines 33, 34: Expected error (tag 'method2') Lines 38, 39: Expected error (tag 'method3') -Line 15: Unexpected errors ['./typeddicts_class_syntax.py:15:14: Undefined name: Person [undefined_name]'] """ output = """ -./typeddicts_class_syntax.py:15:14: Undefined name: Person [undefined_name] """ diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml index 74bfee986..b9fdcec3a 100644 --- a/conformance/results/pycroscope/typeddicts_extra_items.toml +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -1,56 +1,33 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 15: Expected 1 errors -Line 22: Expected 1 errors -Line 49: Expected 1 errors -Line 67: Expected 1 errors -Line 73: Expected 1 errors -Line 109: Expected 1 errors -Line 114: Expected 1 errors -Line 117: Expected 1 errors -Line 143: Expected 1 errors -Line 174: 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 19: Unexpected errors ['./typeddicts_extra_items.py:19:18: Error calling (typename, fields=None, /, *, total=Literal[True], **kwargs) -> Any[unannotated]: TypedDict takes either a dict or keyword arguments, but not both [incompatible_call]'] -Line 29: Unexpected errors ['./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool', "./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key]"] -Line 129: Unexpected errors ["./typeddicts_extra_items.py:129:14: Key Literal['year'] does not exist in TypedDict [invalid_typeddict_key]"] -Line 140: Unexpected errors ['./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation]'] -Line 141: Unexpected errors ['./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation]'] -Line 284: Unexpected errors ["./typeddicts_extra_items.py:284:0: Got an unexpected keyword argument 'year' [incompatible_call]"] -Line 310: Unexpected errors ['./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]]'] -Line 311: Unexpected errors ['./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str]'] -Line 339: Unexpected errors ['./typeddicts_extra_items.py:339:12: Any[explicit] is not equivalent to tuple[str, int]'] -Line 342: Unexpected errors ['./typeddicts_extra_items.py:342:26: Cannot set unknown key str in TypedDict TypedDict({"num": NotRequired[int]}) [invalid_typeddict_key]'] -Line 343: Unexpected errors ['./typeddicts_extra_items.py:343:30: Key str does not exist in TypedDict [invalid_typeddict_key]'] """ output = """ -./typeddicts_extra_items.py:19:18: Error calling (typename, fields=None, /, *, total=Literal[True], **kwargs) -> Any[unannotated]: TypedDict takes either a dict or keyword arguments, but not both [incompatible_call] -./typeddicts_extra_items.py:29:16: Any[error] is not equivalent to bool -./typeddicts_extra_items.py:29:22: Unknown TypedDict key 'novel_adaptation' [invalid_typeddict_key] -./typeddicts_extra_items.py:39:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': None}] [incompatible_assignment] +./typeddicts_extra_items.py:15:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": bool}, closed=True), got Literal[{'name': 'Blade Runner', 'year': 1982}] [incompatible_assignment] +./typeddicts_extra_items.py:22:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": bool}, closed=True), got Literal[{'name': 'Blade Runner', 'year': 1982}] [incompatible_assignment] +./typeddicts_extra_items.py:39:0: Incompatible assignment: expected TypedDict({"name": str, "year": int, "__extra_items__": ReadOnly[int | None]}, closed=True), got Literal[{'name': 'Blade Runner', 'year': None}] [incompatible_assignment] +./typeddicts_extra_items.py:49:34: Argument to "closed" must be a literal True or False [invalid_annotation] +./typeddicts_extra_items.py:67:0: Cannot set 'closed=False' when superclass is closed or has 'extra_items' [invalid_annotation] +./typeddicts_extra_items.py:73:0: Cannot set 'closed=False' when superclass is closed or has 'extra_items' [invalid_annotation] +./typeddicts_extra_items.py:92:4: "MovieC" is a closed TypedDict; extra key 'age' not allowed [invalid_annotation] +./typeddicts_extra_items.py:95:4: "MovieD" is a closed TypedDict; extra key 'age' not allowed [invalid_annotation] +./typeddicts_extra_items.py:109:0: Cannot set 'closed=True' when superclass has non-read-only 'extra_items' [invalid_annotation] +./typeddicts_extra_items.py:114:49: 'extra_items' value cannot be 'Required[...]' [invalid_annotation] +./typeddicts_extra_items.py:117:56: 'extra_items' value cannot be 'NotRequired[...]' [invalid_annotation] ./typeddicts_extra_items.py:128:14: Cannot delete required TypedDict key Literal['name'] [incompatible_argument] -./typeddicts_extra_items.py:129:14: Key Literal['year'] does not exist in TypedDict [invalid_typeddict_key] -./typeddicts_extra_items.py:140:30: Unrecognized annotation object [invalid_annotation] -./typeddicts_extra_items.py:141:27: Unrecognized annotation object [invalid_annotation] +./typeddicts_extra_items.py:143:0: Got an unexpected keyword argument 'year' [incompatible_call] +./typeddicts_extra_items.py:174:0: Cannot change 'extra_items' type unless it is 'ReadOnly' in the superclass [invalid_annotation] +./typeddicts_extra_items.py:185:4: Required key 'year' is not known to base TypedDict [invalid_annotation] +./typeddicts_extra_items.py:188:4: int is not consistent with 'extra_items' type int | None [invalid_annotation] +./typeddicts_extra_items.py:197:4: str is not assignable to 'extra_items' type int | None [invalid_annotation] +./typeddicts_extra_items.py:215:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": int | None}, closed=True), got TypedDict({"name": str, "year": NotRequired[int], "__extra_items__": int | None}, closed=True) [incompatible_assignment] +./typeddicts_extra_items.py:222:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": int | None}, closed=True), got TypedDict({"name": str, "year": int | None, "__extra_items__": int | None}, closed=True) [incompatible_assignment] +./typeddicts_extra_items.py:242:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": ReadOnly[str | int]}, closed=True), got TypedDict({"name": str, "actors": list[str], "__extra_items__": int}, closed=True) [incompatible_assignment] +./typeddicts_extra_items.py:256:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": int}, closed=True), got TypedDict({"name": str, "__extra_items__": str}, closed=True) [incompatible_assignment] +./typeddicts_extra_items.py:257:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": str}, closed=True), got TypedDict({"name": str, "__extra_items__": int}, closed=True) [incompatible_assignment] +./typeddicts_extra_items.py:268:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": int}, closed=True), got TypedDict({"name": str}) [incompatible_assignment] ./typeddicts_extra_items.py:278:0: Got an unexpected keyword argument 'year' [incompatible_call] -./typeddicts_extra_items.py:284:0: Got an unexpected keyword argument 'year' [incompatible_call] -./typeddicts_extra_items.py:285:0: Got an unexpected keyword argument 'language' [incompatible_call] -./typeddicts_extra_items.py:293:0: Got an unexpected keyword argument 'year' [incompatible_call] -./typeddicts_extra_items.py:303:0: Incompatible assignment: expected collections.abc.Mapping[str, int], got TypedDict({"name": str}) [incompatible_assignment] -./typeddicts_extra_items.py:310:16: list[tuple[str, str]] is not equivalent to list[tuple[str, int | str]] -./typeddicts_extra_items.py:311:16: list[str] is not equivalent to list[int | str] -./typeddicts_extra_items.py:339:12: Any[explicit] is not equivalent to tuple[str, int] -./typeddicts_extra_items.py:342:26: Cannot set unknown key str in TypedDict TypedDict({"num": NotRequired[int]}) [invalid_typeddict_key] -./typeddicts_extra_items.py:343:30: Key str does not exist in TypedDict [invalid_typeddict_key] -./typeddicts_extra_items.py:352:4: Incompatible assignment: expected TypedDict({}), got dict[str, int] [incompatible_assignment] +./typeddicts_extra_items.py:285:0: Incompatible argument type for %kwargs: expected dict[str, int] but got TypedDict({"language": Literal['English']}) [incompatible_argument] +./typeddicts_extra_items.py:293:0: Incompatible argument type for %kwargs: expected dict[str, Never] but got TypedDict({"year": Literal[2007]}) [incompatible_argument] +./typeddicts_extra_items.py:303:0: Incompatible assignment: expected collections.abc.Mapping[str, int], got TypedDict({"name": str, "__extra_items__": int}, closed=True) [incompatible_assignment] +./typeddicts_extra_items.py:352:4: Incompatible assignment: expected TypedDict({"__extra_items__": int}, closed=True), got dict[str, int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_inheritance.toml b/conformance/results/pycroscope/typeddicts_inheritance.toml index 815460c58..463002af0 100644 --- a/conformance/results/pycroscope/typeddicts_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_inheritance.toml @@ -1,8 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 44: Expected 1 errors """ output = """ +./typeddicts_inheritance.py:44:30: TypedDict classes may only inherit from TypedDict types and Generic [invalid_base] ./typeddicts_inheritance.py:55:3: Incompatible TypedDict override for key 'x' [invalid_annotation] ./typeddicts_inheritance.py:65:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_operations.toml b/conformance/results/pycroscope/typeddicts_operations.toml index 444a8f633..20850460c 100644 --- a/conformance/results/pycroscope/typeddicts_operations.toml +++ b/conformance/results/pycroscope/typeddicts_operations.toml @@ -1,16 +1,17 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 22: Expected 1 errors -Line 23: Expected 1 errors -Line 24: Expected 1 errors -Line 26: Expected 1 errors -Line 32: Expected 1 errors -Line 37: Expected 1 errors -Line 47: Expected 1 errors -Line 49: Expected 1 errors -Line 62: Expected 1 errors """ output = """ +./typeddicts_operations.py:22:0: Value for key 'name' must be str, not Literal[1982] [incompatible_argument] +./typeddicts_operations.py:23:0: Value for key 'year' must be int, not Literal[''] [incompatible_argument] +./typeddicts_operations.py:24:6: Key 'other' does not exist in TypedDict({"name": str, "year": int}) [invalid_typeddict_key] +./typeddicts_operations.py:26:12: Unknown TypedDict key 'other' [invalid_typeddict_key] ./typeddicts_operations.py:28:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner'}] [incompatible_assignment] ./typeddicts_operations.py:29:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': 'Blade Runner', 'year': 1982.1}] [incompatible_assignment] +./typeddicts_operations.py:32:0: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got Literal[{'name': '', 'year': 1900, 'other': 2}] [incompatible_assignment] +./typeddicts_operations.py:37:4: Incompatible assignment: expected TypedDict({"name": str, "year": int}), got [incompatible_assignment] +./typeddicts_operations.py:44:0: Unknown TypedDict key 'other' [invalid_typeddict_key] +./typeddicts_operations.py:47:0: Cannot call clear() on non-closed TypedDict [incompatible_call] +./typeddicts_operations.py:49:10: Cannot delete required TypedDict key Literal['name'] [incompatible_argument] +./typeddicts_operations.py:62:0: Cannot call clear() on non-closed TypedDict [incompatible_call] """ diff --git a/conformance/results/pycroscope/typeddicts_type_consistency.toml b/conformance/results/pycroscope/typeddicts_type_consistency.toml index ceb03071c..b779a828b 100644 --- a/conformance/results/pycroscope/typeddicts_type_consistency.toml +++ b/conformance/results/pycroscope/typeddicts_type_consistency.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 69: Expected 1 errors Line 76: Expected 1 errors Line 77: Expected 1 errors Line 78: Expected 1 errors @@ -10,5 +9,6 @@ output = """ ./typeddicts_type_consistency.py:21:0: Incompatible assignment: expected TypedDict({"x": int | None}), got TypedDict({"x": int}) [incompatible_assignment] ./typeddicts_type_consistency.py:38:0: Incompatible assignment: expected TypedDict({"x": NotRequired[int]}), got TypedDict({"x": int}) [incompatible_assignment] ./typeddicts_type_consistency.py:65:0: Incompatible assignment: expected TypedDict({"x": int, "y": int}), got TypedDict({"x": int}) [incompatible_assignment] +./typeddicts_type_consistency.py:69:0: Incompatible assignment: expected TypedDict({"x": int}), got Literal[{'x': 0, 'y': 0}] [incompatible_assignment] ./typeddicts_type_consistency.py:126:0: Incompatible assignment: expected TypedDict({"outer_key": TypedDict({"inner_key": TypedDict({"inner_key": str})})}), got Literal[{'outer_key': {'inner_key': {'inner_key': 1}}}] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index e90eb3c3e..499c381cb 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -937,7 +937,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_class_syntax Pass @@ -951,7 +951,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_final Pass @@ -965,14 +965,14 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_operations Pass Pass Pass Pass -Unknown +Pass      typeddicts_readonly Pass From 88fe19302edba323e1f734144df5de45f8c4c5e4 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 23 Feb 2026 11:36:13 -0800 Subject: [PATCH 22/78] progress --- .../pycroscope/generics_variance_inference.toml | 4 +++- .../results/pycroscope/literals_literalstring.toml | 2 +- .../results/pycroscope/narrowing_typeis.toml | 4 ++-- .../results/pycroscope/protocols_generic.toml | 6 ++---- .../results/pycroscope/specialtypes_never.toml | 2 +- .../pycroscope/typeddicts_class_syntax.toml | 12 ++++++------ .../results/pycroscope/typeddicts_extra_items.toml | 4 ++-- .../typeddicts_readonly_inheritance.toml | 14 +++++++------- .../pycroscope/typeddicts_readonly_update.toml | 4 +--- .../results/pycroscope/typeddicts_required.toml | 2 +- .../pycroscope/typeddicts_type_consistency.toml | 2 +- conformance/results/results.html | 8 ++++---- 12 files changed, 31 insertions(+), 33 deletions(-) diff --git a/conformance/results/pycroscope/generics_variance_inference.toml b/conformance/results/pycroscope/generics_variance_inference.toml index f8c852e85..5f01e8336 100644 --- a/conformance/results/pycroscope/generics_variance_inference.toml +++ b/conformance/results/pycroscope/generics_variance_inference.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 25: Expected 1 errors Line 41: Expected 1 errors Line 49: Expected 1 errors Line 58: Expected 1 errors @@ -21,10 +20,13 @@ Line 169: Expected 1 errors Line 170: Expected 1 errors Line 181: Expected 1 errors Line 194: Expected 1 errors +Line 26: Unexpected errors ['./generics_variance_inference.py:26:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment]'] Line 29: Unexpected errors ['./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment]'] """ output = """ ./generics_variance_inference.py:24:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] +./generics_variance_inference.py:25:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, float | int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] +./generics_variance_inference.py:26:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] ./generics_variance_inference.py:28:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] ./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/literals_literalstring.toml b/conformance/results/pycroscope/literals_literalstring.toml index f1c2ea4e6..03c594a9b 100644 --- a/conformance/results/pycroscope/literals_literalstring.toml +++ b/conformance/results/pycroscope/literals_literalstring.toml @@ -2,7 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 36: Expected 1 errors Line 37: Expected 1 errors -Line 171: Expected 1 errors Line 63: Unexpected errors ['./literals_literalstring.py:63:16: str is not equivalent to LiteralString'] Line 161: Unexpected errors ['./literals_literalstring.py:161:0: Function may exit without returning a value [missing_return]'] """ @@ -15,4 +14,5 @@ output = """ ./literals_literalstring.py:120:21: Incompatible argument type for s: expected ~TLiteral: LiteralString but got str [incompatible_argument] ./literals_literalstring.py:134:50: Incompatible argument type for value: expected ~T: LiteralString but got str [incompatible_argument] ./literals_literalstring.py:161:0: Function may exit without returning a value [missing_return] +./literals_literalstring.py:171:4: Incompatible assignment: expected list[str], got list[LiteralString] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml index 1d18cbfaf..9901d1237 100644 --- a/conformance/results/pycroscope/narrowing_typeis.toml +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -1,6 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 199: Expected 1 errors """ output = """ ./narrowing_typeis.py:105:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] @@ -11,4 +10,5 @@ output = """ ./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeguard' [incompatible_argument] ./narrowing_typeis.py:191:17: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.bool_typeis' [incompatible_argument] ./narrowing_typeis.py:195:26: TypeIs narrowed type str is incompatible with parameter x [typeis_must_be_subtype] +./narrowing_typeis.py:199:44: TypeIs narrowed type list[int] is incompatible with parameter x [typeis_must_be_subtype] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 3655c1d7c..a5c23f7df 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -2,18 +2,16 @@ conformance_automated = "Fail" errors_diff = """ Line 40: Expected 1 errors Line 44: Expected 1 errors -Line 66: Expected 1 errors -Line 74: Expected 1 errors Line 145: Expected 1 errors Line 147: Expected 1 errors Line 39: Unexpected errors ['./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment]'] -Line 65: Unexpected errors ['./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment]'] Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent'] """ output = """ ./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment] ./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] -./protocols_generic.py:65:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[int], got .../tests/protocols_generic.py.Sender[float | int] [incompatible_assignment] +./protocols_generic.py:66:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[float | int], got .../tests/protocols_generic.py.Sender[int] [incompatible_assignment] +./protocols_generic.py:74:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[float | int], got .../tests/protocols_generic.py.AttrProto[int] [incompatible_assignment] ./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] ./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent ./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] diff --git a/conformance/results/pycroscope/specialtypes_never.toml b/conformance/results/pycroscope/specialtypes_never.toml index 602bc6629..35f8a7da3 100644 --- a/conformance/results/pycroscope/specialtypes_never.toml +++ b/conformance/results/pycroscope/specialtypes_never.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 85: Expected 1 errors Line 104: Expected 1 errors Line 51: Unexpected errors ['./specialtypes_never.py:51:4: Incompatible return type: expected list[Never], got Literal[[]] [incompatible_return_value]'] Line 84: Unexpected errors ['./specialtypes_never.py:84:4: Incompatible assignment: expected Never, got Any[explicit] [incompatible_assignment]'] @@ -9,4 +8,5 @@ output = """ ./specialtypes_never.py:19:0: Function is annotated as NoReturn but may return [no_return_may_return] ./specialtypes_never.py:51:4: Incompatible return type: expected list[Never], got Literal[[]] [incompatible_return_value] ./specialtypes_never.py:84:4: Incompatible assignment: expected Never, got Any[explicit] [incompatible_assignment] +./specialtypes_never.py:85:4: Incompatible assignment: expected list[int], got list[Never] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_class_syntax.toml b/conformance/results/pycroscope/typeddicts_class_syntax.toml index 23f929c29..42837ec7a 100644 --- a/conformance/results/pycroscope/typeddicts_class_syntax.toml +++ b/conformance/results/pycroscope/typeddicts_class_syntax.toml @@ -1,10 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 29: Expected 1 errors -Line 44: Expected 1 errors -Line 49: Expected 1 errors -Lines 33, 34: Expected error (tag 'method2') -Lines 38, 39: Expected error (tag 'method3') """ output = """ +./typeddicts_class_syntax.py:29:4: Methods are not allowed in TypedDict definitions [invalid_annotation] +./typeddicts_class_syntax.py:34:4: Methods are not allowed in TypedDict definitions [invalid_annotation] +./typeddicts_class_syntax.py:39:4: Methods are not allowed in TypedDict definitions [invalid_annotation] +./typeddicts_class_syntax.py:44:31: TypedDict definitions cannot specify a metaclass [invalid_annotation] +./typeddicts_class_syntax.py:49:31: Unexpected keyword argument 'other' in TypedDict definition [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_extra_items.toml b/conformance/results/pycroscope/typeddicts_extra_items.toml index b9fdcec3a..b7d748f76 100644 --- a/conformance/results/pycroscope/typeddicts_extra_items.toml +++ b/conformance/results/pycroscope/typeddicts_extra_items.toml @@ -26,8 +26,8 @@ output = """ ./typeddicts_extra_items.py:257:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": str}, closed=True), got TypedDict({"name": str, "__extra_items__": int}, closed=True) [incompatible_assignment] ./typeddicts_extra_items.py:268:0: Incompatible assignment: expected TypedDict({"name": str, "__extra_items__": int}, closed=True), got TypedDict({"name": str}) [incompatible_assignment] ./typeddicts_extra_items.py:278:0: Got an unexpected keyword argument 'year' [incompatible_call] -./typeddicts_extra_items.py:285:0: Incompatible argument type for %kwargs: expected dict[str, int] but got TypedDict({"language": Literal['English']}) [incompatible_argument] -./typeddicts_extra_items.py:293:0: Incompatible argument type for %kwargs: expected dict[str, Never] but got TypedDict({"year": Literal[2007]}) [incompatible_argument] +./typeddicts_extra_items.py:285:0: Incompatible argument type for %kwargs: expected dict[str, int] but got [incompatible_argument] +./typeddicts_extra_items.py:293:0: Incompatible argument type for %kwargs: expected dict[str, Never] but got [incompatible_argument] ./typeddicts_extra_items.py:303:0: Incompatible assignment: expected collections.abc.Mapping[str, int], got TypedDict({"name": str, "__extra_items__": int}, closed=True) [incompatible_assignment] ./typeddicts_extra_items.py:352:4: Incompatible assignment: expected TypedDict({"__extra_items__": int}, closed=True), got dict[str, int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml index 2407d2ba3..ac9269546 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml @@ -1,16 +1,16 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Expected 1 errors -Line 94: Expected 1 errors -Line 98: Expected 1 errors -Line 106: Expected 1 errors -Line 119: Expected 1 errors -Line 132: Expected 1 errors """ output = """ ./typeddicts_readonly_inheritance.py:36:3: Cannot set readonly key 'name' in TypedDict TypedDict({"name": Readonly[str], "year": int}) [readonly_typeddict] +./typeddicts_readonly_inheritance.py:50:4: Incompatible TypedDict override for key 'alt' [invalid_annotation] ./typeddicts_readonly_inheritance.py:65:0: Incompatible assignment: expected TypedDict({"name": Readonly[str]}), got Literal[{}] [incompatible_assignment] ./typeddicts_readonly_inheritance.py:82:0: Value for key 'ident' must be str, not Literal[3] [incompatible_argument] ./typeddicts_readonly_inheritance.py:83:0: Incompatible assignment: expected TypedDict({"ident": str}), got Literal[{'ident': 3}] [incompatible_assignment] ./typeddicts_readonly_inheritance.py:84:0: Incompatible assignment: expected TypedDict({"ident": str}), got Literal[{}] [incompatible_assignment] +./typeddicts_readonly_inheritance.py:94:4: Incompatible TypedDict override for key 'a' [invalid_annotation] +./typeddicts_readonly_inheritance.py:98:4: Incompatible TypedDict override for key 'a' [invalid_annotation] +./typeddicts_readonly_inheritance.py:106:4: Incompatible TypedDict override for key 'c' [invalid_annotation] +./typeddicts_readonly_inheritance.py:119:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] +./typeddicts_readonly_inheritance.py:132:0: TypedDict base classes define key 'x' with incompatible requiredness [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_update.toml b/conformance/results/pycroscope/typeddicts_readonly_update.toml index 4b5ec4d52..f7e82a4ba 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_update.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_update.toml @@ -1,8 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 34: Unexpected errors ['./typeddicts_readonly_update.py:34:4: Cannot set readonly key \\'x\\' in TypedDict TypedDict({"x": Readonly[int], "y": int}) [readonly_typeddict]'] """ output = """ ./typeddicts_readonly_update.py:23:0: Cannot set readonly key 'x' in TypedDict TypedDict({"x": Readonly[int], "y": int}) [readonly_typeddict] -./typeddicts_readonly_update.py:34:4: Cannot set readonly key 'x' in TypedDict TypedDict({"x": Readonly[int], "y": int}) [readonly_typeddict] """ diff --git a/conformance/results/pycroscope/typeddicts_required.toml b/conformance/results/pycroscope/typeddicts_required.toml index d090f9a38..0cd95d6f2 100644 --- a/conformance/results/pycroscope/typeddicts_required.toml +++ b/conformance/results/pycroscope/typeddicts_required.toml @@ -4,6 +4,6 @@ errors_diff = """ output = """ ./typeddicts_required.py:12:7: Unexpected Required annotation [invalid_annotation] ./typeddicts_required.py:16:7: Unexpected NotRequired annotation [invalid_annotation] -./typeddicts_required.py:59:7: Required[] cannot be nested [invalid_annotation] +./typeddicts_required.py:59:16: Required[] cannot be nested [invalid_annotation] ./typeddicts_required.py:60:7: Required[] and NotRequired[] cannot be nested [invalid_annotation] """ diff --git a/conformance/results/pycroscope/typeddicts_type_consistency.toml b/conformance/results/pycroscope/typeddicts_type_consistency.toml index b779a828b..ffaf50ae2 100644 --- a/conformance/results/pycroscope/typeddicts_type_consistency.toml +++ b/conformance/results/pycroscope/typeddicts_type_consistency.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 76: Expected 1 errors -Line 77: Expected 1 errors Line 78: Expected 1 errors Line 82: Expected 1 errors """ @@ -10,5 +9,6 @@ output = """ ./typeddicts_type_consistency.py:38:0: Incompatible assignment: expected TypedDict({"x": NotRequired[int]}), got TypedDict({"x": int}) [incompatible_assignment] ./typeddicts_type_consistency.py:65:0: Incompatible assignment: expected TypedDict({"x": int, "y": int}), got TypedDict({"x": int}) [incompatible_assignment] ./typeddicts_type_consistency.py:69:0: Incompatible assignment: expected TypedDict({"x": int}), got Literal[{'x': 0, 'y': 0}] [incompatible_assignment] +./typeddicts_type_consistency.py:77:0: Incompatible assignment: expected dict[str, object], got TypedDict({"x": int, "y": int}) [incompatible_assignment] ./typeddicts_type_consistency.py:126:0: Incompatible assignment: expected TypedDict({"outer_key": TypedDict({"inner_key": TypedDict({"inner_key": str})})}), got Literal[{'outer_key': {'inner_key': {'inner_key': 1}}}] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 499c381cb..bc6ce8ccd 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -944,7 +944,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_extra_items
Unsupported

Not supported.

@@ -993,7 +993,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_readonly_kwargs Pass @@ -1007,7 +1007,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      typeddicts_required Pass @@ -1145,7 +1145,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Type checker directives From 278cad238ec0bb75e0af135084838fada7b94c78 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 23 Feb 2026 20:33:17 -0800 Subject: [PATCH 23/78] progress --- .../results/pycroscope/aliases_implicit.toml | 4 +- .../pycroscope/callables_annotation.toml | 20 ++---- .../pycroscope/callables_protocol.toml | 66 ++++--------------- .../pycroscope/constructors_call_init.toml | 23 ++++--- .../constructors_call_metaclass.toml | 11 ++-- .../pycroscope/constructors_call_new.toml | 28 ++++---- .../pycroscope/dataclasses_descriptors.toml | 16 ++--- .../results/pycroscope/dataclasses_final.toml | 4 -- .../results/pycroscope/dataclasses_order.toml | 2 + .../pycroscope/dataclasses_postinit.toml | 6 -- .../results/pycroscope/dataclasses_slots.toml | 4 +- .../dataclasses_transform_converter.toml | 2 - .../results/pycroscope/dataclasses_usage.toml | 43 ++++++------ .../pycroscope/directives_deprecated.toml | 4 +- .../results/pycroscope/enums_behaviors.toml | 6 +- .../pycroscope/generics_base_class.toml | 6 +- .../results/pycroscope/generics_basic.toml | 8 +-- .../results/pycroscope/generics_defaults.toml | 7 +- .../generics_defaults_referential.toml | 16 ++--- .../generics_paramspec_semantics.toml | 7 +- .../pycroscope/generics_self_advanced.toml | 9 +-- .../pycroscope/generics_self_attributes.toml | 2 +- .../pycroscope/generics_self_basic.toml | 3 +- .../pycroscope/generics_self_protocols.toml | 4 +- .../generics_syntax_infer_variance.toml | 14 ++-- .../pycroscope/generics_type_erasure.toml | 15 +++-- .../generics_typevartuple_args.toml | 18 ++--- .../generics_typevartuple_basic.toml | 12 ++-- .../generics_typevartuple_callable.toml | 16 ++--- .../generics_typevartuple_concat.toml | 6 +- .../generics_typevartuple_specialization.toml | 20 +++--- .../generics_typevartuple_unpack.toml | 6 ++ .../generics_variance_inference.toml | 56 ++++++++++------ .../pycroscope/historical_positional.toml | 4 +- .../pycroscope/namedtuples_define_class.toml | 60 ++++------------- .../results/pycroscope/namedtuples_usage.toml | 32 ++------- .../results/pycroscope/overloads_basic.toml | 6 +- .../pycroscope/overloads_evaluation.toml | 54 +++++---------- .../pycroscope/protocols_class_objects.toml | 18 ++--- .../results/pycroscope/protocols_merging.toml | 18 +++-- .../pycroscope/protocols_subtyping.toml | 12 ++-- .../pycroscope/specialtypes_never.toml | 2 +- .../pycroscope/tuples_type_compat.toml | 22 ++----- .../results/pycroscope/tuples_type_form.toml | 14 ++-- .../results/pycroscope/tuples_unpacked.toml | 12 ++-- conformance/results/results.html | 10 +-- 46 files changed, 293 insertions(+), 435 deletions(-) diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index a9f8c7cfd..d242cd6b7 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -14,7 +14,7 @@ Line 119: Expected 1 errors Line 135: Expected 1 errors Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] -Line 131: Unexpected errors ['./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int]'] +Line 131: Unexpected errors ['./aliases_implicit.py:131:12: Literal[[]] is not equivalent to list[int]'] """ output = """ ./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None @@ -28,6 +28,6 @@ output = """ ./aliases_implicit.py:114:8: Invalid type annotation 3 [invalid_annotation] ./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] ./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] -./aliases_implicit.py:131:12: Any[from_another] is not equivalent to list[int] +./aliases_implicit.py:131:12: Literal[[]] is not equivalent to list[int] ./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 561e20f14..2c8c0fe25 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,15 +4,11 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 147: Unexpected errors ['./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment]'] -Line 148: Unexpected errors ['./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1, got (...) -> None [incompatible_assignment]'] +Line 147: Unexpected errors ['./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 (Protocol with members ) [incompatible_assignment]'] Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] -Line 151: Unexpected errors ['./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 [incompatible_assignment]'] -Line 152: Unexpected errors ['./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment]'] -Line 153: Unexpected errors ['./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 [incompatible_assignment]'] -Line 154: Unexpected errors ['./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3, got (...) -> None [incompatible_assignment]'] +Line 151: Unexpected errors ['./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 (Protocol with members ) [incompatible_assignment]'] +Line 153: Unexpected errors ['./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 (Protocol with members ) [incompatible_assignment]'] Line 155: Unexpected errors ['./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation]'] -Line 157: Unexpected errors ['./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6, got ./callables_annotation.py.Proto7 [incompatible_assignment]'] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -23,15 +19,11 @@ output = """ ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] -./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 [incompatible_assignment] -./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1, got (...) -> None [incompatible_assignment] +./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 (Protocol with members ) [incompatible_assignment] ./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation] -./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 [incompatible_assignment] -./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment] -./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 [incompatible_assignment] -./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3, got (...) -> None [incompatible_assignment] +./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 (Protocol with members ) [incompatible_assignment] +./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 (Protocol with members ) [incompatible_assignment] ./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation] -./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6, got ./callables_annotation.py.Proto7 [incompatible_assignment] ./callables_annotation.py:159:10: Object Proto5 does not support subscripting [unsupported_operation] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index bc0d7615f..df0a7d3b1 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -1,94 +1,54 @@ conformance_automated = "Fail" errors_diff = """ +Line 35: Expected 1 errors +Line 36: Expected 1 errors +Line 37: Expected 1 errors +Line 67: Expected 1 errors +Line 68: Expected 1 errors +Line 69: Expected 1 errors +Line 70: Expected 1 errors +Line 97: Expected 1 errors +Line 169: Expected 1 errors Line 186: Expected 1 errors Line 187: Expected 1 errors Line 197: Expected 1 errors +Line 238: Expected 1 errors +Line 260: Expected 1 errors +Line 284: Expected 1 errors +Line 311: Expected 1 errors Line 14: Unexpected errors ['./callables_protocol.py:14:4: Function may exit without returning a value [missing_return]'] -Line 34: Unexpected errors ['./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment]'] -Line 65: Unexpected errors ['./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] -Line 78: Unexpected errors ['./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] -Line 79: Unexpected errors ['./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment]'] -Line 80: Unexpected errors ['./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] -Line 81: Unexpected errors ['./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment]'] -Line 82: Unexpected errors ['./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]'] Line 101: Unexpected errors ['./callables_protocol.py:101:4: Function may exit without returning a value [missing_return]'] -Line 109: Unexpected errors ['./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5, got (a: int, b: str) -> int [incompatible_assignment]'] Line 125: Unexpected errors ['./callables_protocol.py:125:4: Function may exit without returning a value [missing_return]'] Line 135: Unexpected errors ['./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation]'] Line 144: Unexpected errors ['./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation]'] Line 156: Unexpected errors ['./callables_protocol.py:156:4: Function may exit without returning a value [missing_return]'] -Line 168: Unexpected errors ['./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]'] Line 179: Unexpected errors ['./callables_protocol.py:179:4: Function may exit without returning a value [missing_return]'] Line 184: Unexpected errors ['./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation]'] -Line 216: Unexpected errors ['./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment]'] Line 220: Unexpected errors ['./callables_protocol.py:220:4: Function may exit without returning a value [missing_return]'] Line 224: Unexpected errors ['./callables_protocol.py:224:0: Function may exit without returning a value [missing_return]'] Line 228: Unexpected errors ['./callables_protocol.py:228:0: Function may exit without returning a value [missing_return]'] Line 232: Unexpected errors ['./callables_protocol.py:232:0: Function may exit without returning a value [missing_return]'] -Line 236: Unexpected errors ['./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]'] -Line 237: Unexpected errors ['./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]'] -Line 258: Unexpected errors ['./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment]'] -Line 259: Unexpected errors ['./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment]'] Line 265: Unexpected errors ['./callables_protocol.py:265:4: Function may exit without returning a value [missing_return]'] Line 271: Unexpected errors ['./callables_protocol.py:271:4: Function may exit without returning a value [missing_return]'] -Line 283: Unexpected errors ["./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str = Literal['']) -> str [incompatible_assignment]"] -Line 286: Unexpected errors ["./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str = Literal['']) -> str [incompatible_assignment]"] -Line 287: Unexpected errors ['./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str) -> str [incompatible_assignment]'] Line 292: Unexpected errors ['./callables_protocol.py:292:4: Function may exit without returning a value [missing_return]'] Line 298: Unexpected errors ['./callables_protocol.py:298:4: Function may exit without returning a value [missing_return]'] -Line 310: Unexpected errors ["./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default, got (*, path: str = Literal['']) -> str [incompatible_assignment]"] -Line 312: Unexpected errors ["./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str = Literal['']) -> str [incompatible_assignment]"] -Line 313: Unexpected errors ['./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str) -> str [incompatible_assignment]'] """ output = """ ./callables_protocol.py:14:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:36:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...]) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:37:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_len: str | None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:67:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:68:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:69:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:70:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3, got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4, got (x: int) -> None [incompatible_assignment] ./callables_protocol.py:101:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5, got (a: int, b: str) -> int [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:125:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation] ./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation] ./callables_protocol.py:156:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:179:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation] -./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment] ./callables_protocol.py:220:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:224:0: Function may exit without returning a value [missing_return] ./callables_protocol.py:228:0: Function may exit without returning a value [missing_return] ./callables_protocol.py:232:0: Function may exit without returning a value [missing_return] -./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment] -./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment] -./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] ./callables_protocol.py:265:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:271:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str = Literal['']) -> str [incompatible_assignment] -./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str) -> str [incompatible_assignment] -./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str = Literal['']) -> str [incompatible_assignment] -./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault, got (path: str) -> str [incompatible_assignment] ./callables_protocol.py:292:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:298:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default, got (*, path: str = Literal['']) -> str [incompatible_assignment] -./callables_protocol.py:311:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default, got (*, path: str) -> str [incompatible_assignment] -./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str = Literal['']) -> str [incompatible_assignment] -./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault, got (*, path: str) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 7c865f717..452982710 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -5,19 +5,18 @@ Line 107: Expected 1 errors Line 130: Expected 1 errors Line 19: Unexpected errors ['./constructors_call_init.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] Line 20: Unexpected errors ['./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] -Line 24: Unexpected errors ['./constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation]'] -Line 25: Unexpected errors ['./constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation]'] +Line 24: Unexpected errors ["./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation]'] +Line 25: Unexpected errors ["./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation]'] Line 37: Unexpected errors ['./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation]'] Line 55: Unexpected errors ['./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation]'] -Line 72: Unexpected errors ['./constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation]'] +Line 72: Unexpected errors ["./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation]'] Line 73: Unexpected errors ['./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation]', './constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation]'] -Line 74: Unexpected errors ['./constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation]'] -Line 75: Unexpected errors ['./constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation]'] -Line 91: Unexpected errors ['./constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation]'] +Line 74: Unexpected errors ["./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation]'] +Line 75: Unexpected errors ["./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation]'] +Line 91: Unexpected errors ["./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation]'] Line 92: Unexpected errors ['./constructors_call_init.py:92:12: Object Class6 does not support subscripting [unsupported_operation]', './constructors_call_init.py:92:37: Object Class6 does not support subscripting [unsupported_operation]'] -Line 99: Unexpected errors ['./constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation]'] +Line 99: Unexpected errors ["./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation]'] Line 100: Unexpected errors ['./constructors_call_init.py:100:12: Object Class7 does not support subscripting [unsupported_operation]', './constructors_call_init.py:100:37: Object Class7 does not support subscripting [unsupported_operation]'] -Line 129: Unexpected errors ['./constructors_call_init.py:129:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class11'] """ output = """ ./constructors_call_init.py:19:12: Object Class1 does not support subscripting [unsupported_operation] @@ -25,21 +24,27 @@ output = """ ./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_init.py:21:0: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation] ./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation] ./constructors_call_init.py:56:0: Object Class4 does not support subscripting [unsupported_operation] +./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] ./constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation] ./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation] ./constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] ./constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] ./constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation] ./constructors_call_init.py:92:12: Object Class6 does not support subscripting [unsupported_operation] ./constructors_call_init.py:92:37: Object Class6 does not support subscripting [unsupported_operation] +./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation] ./constructors_call_init.py:100:12: Object Class7 does not support subscripting [unsupported_operation] ./constructors_call_init.py:100:37: Object Class7 does not support subscripting [unsupported_operation] -./constructors_call_init.py:129:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class11 """ diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index 03a713be9..39fb8010a 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -2,14 +2,11 @@ conformance_automated = "Fail" errors_diff = """ Line 54: Expected 1 errors Line 68: Expected 1 errors -Line 26: Unexpected errors ['./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never'] -Line 39: Unexpected errors ['./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 55: Unexpected errors ['./constructors_call_metaclass.py:55:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class3'] -Line 69: Unexpected errors ['./constructors_call_metaclass.py:69:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class4'] +Line 26: Unexpected errors ["./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] +Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] """ output = """ -./constructors_call_metaclass.py:26:16: Any[from_another] is not equivalent to Never +./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never +./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_metaclass.py:55:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class3 -./constructors_call_metaclass.py:69:12: Any[from_another] is not equivalent to ./constructors_call_metaclass.py.Class4 """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 338ad710f..4e730a88a 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -2,15 +2,14 @@ conformance_automated = "Fail" errors_diff = """ Line 19: Unexpected errors ['./constructors_call_new.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] Line 20: Unexpected errors ['./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] -Line 23: Unexpected errors ['./constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation]'] -Line 24: Unexpected errors ['./constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation]'] -Line 35: Unexpected errors ['./constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] -Line 36: Unexpected errors ['./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] -Line 49: Unexpected errors ['./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int'] -Line 64: Unexpected errors ['./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 76: Unexpected errors ['./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never'] -Line 89: Unexpected errors ['./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 104: Unexpected errors ['./constructors_call_new.py:104:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class7'] +Line 23: Unexpected errors ["./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation]'] +Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation]'] +Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] +Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] +Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] +Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] +Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 130: Unexpected errors ['./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation]'] @@ -23,15 +22,20 @@ output = """ ./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_new.py:21:0: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation] +./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation] -./constructors_call_new.py:49:12: Any[from_another] is not equivalent to int +./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int +./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:76:16: Any[from_another] is not equivalent to Never +./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never +./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:104:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class7 ./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation] ./constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation] ./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index 7dde00477..55b9b1d04 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,25 +1,25 @@ conformance_automated = "Fail" errors_diff = """ -Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int'] +Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int'] Line 56: Unexpected errors ['./dataclasses_descriptors.py:56:7: Object Desc2 does not support subscripting [unsupported_operation]'] Line 57: Unexpected errors ['./dataclasses_descriptors.py:57:7: Object Desc2 does not support subscripting [unsupported_operation]'] Line 58: Unexpected errors ['./dataclasses_descriptors.py:58:7: Object Desc2 does not support subscripting [unsupported_operation]'] Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int]'] Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str]'] Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str]'] -Line 66: Unexpected errors ['./dataclasses_descriptors.py:66:12: Any[from_another] is not equivalent to int'] -Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: Any[from_another] is not equivalent to str'] -Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str'] +Line 66: Unexpected errors ['./dataclasses_descriptors.py:66:12: Any[error] is not equivalent to int'] +Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: Any[error] is not equivalent to str'] +Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[error] is not equivalent to str'] """ output = """ -./dataclasses_descriptors.py:37:12: Any[from_another] is not equivalent to int +./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int ./dataclasses_descriptors.py:56:7: Object Desc2 does not support subscripting [unsupported_operation] ./dataclasses_descriptors.py:57:7: Object Desc2 does not support subscripting [unsupported_operation] ./dataclasses_descriptors.py:58:7: Object Desc2 does not support subscripting [unsupported_operation] ./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int] ./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str] ./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str] -./dataclasses_descriptors.py:66:12: Any[from_another] is not equivalent to int -./dataclasses_descriptors.py:67:12: Any[from_another] is not equivalent to str -./dataclasses_descriptors.py:68:12: Any[from_another] is not equivalent to str +./dataclasses_descriptors.py:66:12: Any[error] is not equivalent to int +./dataclasses_descriptors.py:67:12: Any[error] is not equivalent to str +./dataclasses_descriptors.py:68:12: Any[error] is not equivalent to str """ diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index 23b9be5b1..36aba1dc0 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -5,10 +5,6 @@ Line 35: Expected 1 errors Line 36: Expected 1 errors Line 37: Expected 1 errors Line 38: Expected 1 errors -Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int'] -Line 32: Unexpected errors ['./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str'] """ output = """ -./dataclasses_final.py:31:12: Any[from_another] is not equivalent to int -./dataclasses_final.py:32:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/dataclasses_order.toml b/conformance/results/pycroscope/dataclasses_order.toml index 8a6afe99a..b9e8d57b6 100644 --- a/conformance/results/pycroscope/dataclasses_order.toml +++ b/conformance/results/pycroscope/dataclasses_order.toml @@ -1,6 +1,8 @@ conformance_automated = "Fail" errors_diff = """ Line 50: Expected 1 errors +Line 53: Unexpected errors ['./dataclasses_order.py:53:3: Traceback (most recent call last):'] """ output = """ +./dataclasses_order.py:53:3: Traceback (most recent call last): """ diff --git a/conformance/results/pycroscope/dataclasses_postinit.toml b/conformance/results/pycroscope/dataclasses_postinit.toml index 58109c517..67e9675bc 100644 --- a/conformance/results/pycroscope/dataclasses_postinit.toml +++ b/conformance/results/pycroscope/dataclasses_postinit.toml @@ -4,12 +4,6 @@ Line 19: Expected 1 errors Line 28: Expected 1 errors Line 29: Expected 1 errors Line 36: Expected 1 errors -Line 25: Unexpected errors ['./dataclasses_postinit.py:25:12: Any[from_another] is not equivalent to int'] -Line 26: Unexpected errors ['./dataclasses_postinit.py:26:12: Any[from_another] is not equivalent to int'] -Line 27: Unexpected errors ['./dataclasses_postinit.py:27:12: Any[from_another] is not equivalent to int'] """ output = """ -./dataclasses_postinit.py:25:12: Any[from_another] is not equivalent to int -./dataclasses_postinit.py:26:12: Any[from_another] is not equivalent to int -./dataclasses_postinit.py:27:12: Any[from_another] is not equivalent to int """ diff --git a/conformance/results/pycroscope/dataclasses_slots.toml b/conformance/results/pycroscope/dataclasses_slots.toml index 840f0dcbd..f48d629f4 100644 --- a/conformance/results/pycroscope/dataclasses_slots.toml +++ b/conformance/results/pycroscope/dataclasses_slots.toml @@ -2,11 +2,13 @@ conformance_automated = "Fail" errors_diff = """ Line 25: Expected 1 errors Line 38: Expected 1 errors -Line 69: Expected 1 errors Lines 10, 11: Expected error (tag 'DC1') Line 56: Unexpected errors ["./dataclasses_slots.py:56:0: DC5 has no attribute '__slots__' [undefined_attribute]"] +Line 57: Unexpected errors ["./dataclasses_slots.py:57:0: ./dataclasses_slots.py.DC5 has no attribute '__slots__' [undefined_attribute]"] """ output = """ ./dataclasses_slots.py:56:0: DC5 has no attribute '__slots__' [undefined_attribute] +./dataclasses_slots.py:57:0: ./dataclasses_slots.py.DC5 has no attribute '__slots__' [undefined_attribute] ./dataclasses_slots.py:66:0: DC6 has no attribute '__slots__' [undefined_attribute] +./dataclasses_slots.py:69:0: ./dataclasses_slots.py.DC6 has no attribute '__slots__' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index 9546df317..ac456b921 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -6,13 +6,11 @@ Line 109: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors Line 102: Unexpected errors ['./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument]'] -Line 103: Unexpected errors ['./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str [incompatible_assignment]'] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] ./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument] -./dataclasses_transform_converter.py:103:4: Incompatible assignment: expected int, got int | str [incompatible_assignment] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 1927c70d2..2183ec5d3 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -10,30 +10,35 @@ Line 179: Expected 1 errors Lines 58, 60, 61: Expected error (tag 'DC1') Lines 64, 66, 67: Expected error (tag 'DC2') Lines 70, 72, 73: Expected error (tag 'DC3') -Line 46: Unexpected errors ['./dataclasses_usage.py:46:12: Any[from_another] is not equivalent to str'] -Line 47: Unexpected errors ['./dataclasses_usage.py:47:12: Any[from_another] is not equivalent to float | int'] -Line 48: Unexpected errors ['./dataclasses_usage.py:48:12: Any[from_another] is not equivalent to int'] -Line 103: Unexpected errors ['./dataclasses_usage.py:103:12: Any[from_another] is not equivalent to int'] -Line 105: Unexpected errors ['./dataclasses_usage.py:105:12: Any[from_another] is not equivalent to str'] -Line 106: Unexpected errors ['./dataclasses_usage.py:106:12: Any[from_another] is not equivalent to (str, /) -> int'] -Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] -Line 197: Unexpected errors ['./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str'] -Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str'] -Line 213: Unexpected errors ['./dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation]'] +Line 35: Unexpected errors ["./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute]"] +Line 38: Unexpected errors ["./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute]"] +Line 39: Unexpected errors ["./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute]"] +Line 40: Unexpected errors ["./dataclasses_usage.py:40:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ne__' [undefined_attribute]"] +Line 41: Unexpected errors ["./dataclasses_usage.py:41:6: ./dataclasses_usage.py.InventoryItem has no attribute '__lt__' [undefined_attribute]"] +Line 42: Unexpected errors ["./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute]"] +Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute]"] +Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] +Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:196:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_1' [undefined_attribute]"] +Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute]"] +Line 213: Unexpected errors ["./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error]", './dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation]'] Line 216: Unexpected errors ['./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation]'] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] """ output = """ -./dataclasses_usage.py:46:12: Any[from_another] is not equivalent to str -./dataclasses_usage.py:47:12: Any[from_another] is not equivalent to float | int -./dataclasses_usage.py:48:12: Any[from_another] is not equivalent to int +./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute] +./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute] +./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute] +./dataclasses_usage.py:40:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ne__' [undefined_attribute] +./dataclasses_usage.py:41:6: ./dataclasses_usage.py.InventoryItem has no attribute '__lt__' [undefined_attribute] +./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute] +./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute] +./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute] ./dataclasses_usage.py:88:4: Incompatible assignment: expected int, got str [incompatible_assignment] -./dataclasses_usage.py:103:12: Any[from_another] is not equivalent to int -./dataclasses_usage.py:105:12: Any[from_another] is not equivalent to str -./dataclasses_usage.py:106:12: Any[from_another] is not equivalent to (str, /) -> int -./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str -./dataclasses_usage.py:197:12: Any[from_another] is not equivalent to str -./dataclasses_usage.py:198:12: Any[from_another] is not equivalent to str +./dataclasses_usage.py:196:12: Any[error] is not equivalent to str +./dataclasses_usage.py:196:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_1' [undefined_attribute] +./dataclasses_usage.py:198:12: Any[error] is not equivalent to str +./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute] +./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error] ./dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation] ./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index eeff20fb4..8763095ca 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -9,14 +9,12 @@ 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 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute]"] -Line 119: Unexpected errors ['./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument]'] """ output = """ +./directives_deprecated.py:58:0: Annotated[./directives_deprecated.py.Invocable, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=AnyValue(source=))] is not callable [not_callable] ./directives_deprecated.py:90:4: @override decorator in invalid location [invalid_override_decorator] ./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] ./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] -./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument] """ diff --git a/conformance/results/pycroscope/enums_behaviors.toml b/conformance/results/pycroscope/enums_behaviors.toml index 828e87ad5..dd0f267aa 100644 --- a/conformance/results/pycroscope/enums_behaviors.toml +++ b/conformance/results/pycroscope/enums_behaviors.toml @@ -2,12 +2,9 @@ conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors Lines 27, 28: Expected exactly one error (tag 'red') -Lines 31, 32: Expected exactly one error (tag 'blue') Line 20: Unexpected errors ['./enums_behaviors.py:20:16: Any[generic_argument] is not equivalent to ./enums_behaviors.py.Color'] Line 27: Unexpected errors ['./enums_behaviors.py:27:12: Any[error] is not equivalent to ./enums_behaviors.py.Color', './enums_behaviors.py:27:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call]'] Line 28: Unexpected errors ['./enums_behaviors.py:28:12: Any[error] is not equivalent to Literal[1]', './enums_behaviors.py:28:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call]'] -Line 31: Unexpected errors ['./enums_behaviors.py:31:12: Any[from_another] is not equivalent to ./enums_behaviors.py.Color'] -Line 32: Unexpected errors ['./enums_behaviors.py:32:12: Any[from_another] is not equivalent to Literal[3]'] """ output = """ ./enums_behaviors.py:20:16: Any[generic_argument] is not equivalent to ./enums_behaviors.py.Color @@ -15,6 +12,5 @@ output = """ ./enums_behaviors.py:27:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call] ./enums_behaviors.py:28:12: Any[error] is not equivalent to Literal[1] ./enums_behaviors.py:28:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call] -./enums_behaviors.py:31:12: Any[from_another] is not equivalent to ./enums_behaviors.py.Color -./enums_behaviors.py:32:12: Any[from_another] is not equivalent to Literal[3] +./enums_behaviors.py:32:12: Annotated[./enums_behaviors.py.Color, HasAttrExtension(attribute_name=KnownValue(val='RED'), attribute_type=KnownValue(val=1)), HasAttrExtension(attribute_name=KnownValue(val='GREEN'), attribute_type=KnownValue(val=2)), HasAttrExtension(attribute_name=KnownValue(val='BLUE'), attribute_type=KnownValue(val=3))] is not equivalent to Literal[3] """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index 4166a789d..9e03f42b4 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -1,10 +1,9 @@ conformance_automated = "Fail" errors_diff = """ +Line 26: Expected 1 errors Line 29: Expected 1 errors Line 30: Expected 1 errors Line 68: Expected 1 errors -Line 24: Unexpected errors ['./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] -Line 25: Unexpected errors ['./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[Any[explicit]]] but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int]'] Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool'] Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[from_another] is not equivalent to int'] @@ -12,9 +11,6 @@ Line 84: Unexpected errors ['./generics_base_class.py:84:12: Object Parent1 does Line 97: Unexpected errors ['./generics_base_class.py:97:13: Object Grandparent does not support subscripting [unsupported_operation]'] """ output = """ -./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument] -./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[Any[explicit]]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] -./generics_base_class.py:26:25: Incompatible argument type for x: expected dict[str, list[object]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] ./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int] ./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool ./generics_base_class.py:49:21: Object LinkedList does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 706dbbed7..eecb502b1 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -9,8 +9,6 @@ Line 163: Expected 1 errors Line 171: Expected 1 errors Line 172: Expected 1 errors Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] -Line 67: Unexpected errors ['./generics_basic.py:67:16: Any[error] is not equivalent to str', './generics_basic.py:67:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument]'] -Line 68: Unexpected errors ['./generics_basic.py:68:16: Any[error] is not equivalent to str', './generics_basic.py:68:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument]'] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int'] Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] @@ -23,11 +21,7 @@ output = """ ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] -./generics_basic.py:67:16: Any[error] is not equivalent to str -./generics_basic.py:67:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument] -./generics_basic.py:68:16: Any[error] is not equivalent to str -./generics_basic.py:68:23: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument] -./generics_basic.py:69:11: Incompatible argument type for x: expected ~AnyStr: (str, bytes) but got ./generics_basic.py.MyStr [incompatible_argument] +./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:106:20: Any[from_another] is not equivalent to int ./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index ec972d634..89cd944ed 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -19,11 +19,11 @@ Line 61: Unexpected errors ['./generics_defaults.py:61:9: Object AllTheDefaults Line 64: Unexpected errors ['./generics_defaults.py:64:4: Object AllTheDefaults does not support subscripting [unsupported_operation]'] Line 65: Unexpected errors ['./generics_defaults.py:65:9: Object AllTheDefaults does not support subscripting [unsupported_operation]'] Line 79: Unexpected errors ['./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference]', './generics_defaults.py:79:34: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] -Line 80: Unexpected errors ['./generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] +Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] Line 81: Unexpected errors ['./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation]', './generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] Line 94: Unexpected errors ['./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference]'] Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error]', './generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation]'] -Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[from_another] is not equivalent to int'] +Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int'] """ output = """ ./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference] @@ -51,6 +51,7 @@ output = """ ./generics_defaults.py:65:9: Object AllTheDefaults does not support subscripting [unsupported_operation] ./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference] ./generics_defaults.py:79:34: Object Class_ParamSpec does not support subscripting [unsupported_operation] +./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] ./generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation] ./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation] ./generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation] @@ -58,5 +59,5 @@ output = """ ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error] ./generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation] -./generics_defaults.py:173:12: Any[from_another] is not equivalent to int +./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index 79e6fd002..f35c40bce 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 36: Expected 1 errors -Line 37: Expected 1 errors Line 53: Expected 1 errors Line 60: Expected 1 errors Line 68: Expected 1 errors @@ -9,24 +8,19 @@ Line 74: Expected 1 errors Line 78: Expected 1 errors Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]]"] Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None]'] -Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None]'] -Line 26: Unexpected errors ['./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, bool, complex | float | int]'] +Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: .../tests/generics_defaults_referential.py.slice[str, Any[generic_argument], int | None] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None]'] Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str]"] Line 94: Unexpected errors ["./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]]"] Line 95: Unexpected errors ['./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]]'] -Line 96: Unexpected errors ['./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]]'] -Line 97: Unexpected errors ['./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[str]]'] -Line 98: Unexpected errors ['./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, str]'] +Line 96: Unexpected errors ['./generics_defaults_referential.py:96:12: .../tests/generics_defaults_referential.py.Bar[int, list[Any[unreachable]]] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]]'] """ output = """ ./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]] ./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None] -./generics_defaults_referential.py:25:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None] -./generics_defaults_referential.py:26:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, bool, complex | float | int] +./generics_defaults_referential.py:25:12: .../tests/generics_defaults_referential.py.slice[str, Any[generic_argument], int | None] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None] ./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str] +./generics_defaults_referential.py:37:9: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] ./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]] ./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]] -./generics_defaults_referential.py:96:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]] -./generics_defaults_referential.py:97:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[str]] -./generics_defaults_referential.py:98:12: Any[from_another] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, str] +./generics_defaults_referential.py:96:12: .../tests/generics_defaults_referential.py.Bar[int, list[Any[unreachable]]] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]] """ diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index b49f7e5ba..85587a456 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -1,15 +1,16 @@ conformance_automated = "Fail" errors_diff = """ -Line 82: Unexpected errors ['./generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation]'] -Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: Any[from_another] is not equivalent to (int, /) -> str'] +Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation]'] +Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str'] """ output = """ ./generics_paramspec_semantics.py:26:0: Missing required positional argument 'a' [incompatible_call] ./generics_paramspec_semantics.py:27:8: Incompatible argument type for b: expected bool but got Literal['A'] [incompatible_argument] ./generics_paramspec_semantics.py:46:5: Cannot resolve type variables [incompatible_call] ./generics_paramspec_semantics.py:61:0: Cannot resolve type variables [incompatible_call] +./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation] -./generics_paramspec_semantics.py:84:16: Any[from_another] is not equivalent to (int, /) -> str +./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str ./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] ./generics_paramspec_semantics.py:108:0: Incompatible argument type for args: expected tuple[bool, ...] but got tuple[Literal[1]] [incompatible_argument] ./generics_paramspec_semantics.py:120:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index 75d5d1a14..f38a585b6 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -1,14 +1,15 @@ conformance_automated = "Fail" errors_diff = """ -Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ParentA'] -Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ChildA'] +Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] +Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA', "./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute]"] Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT]'] Line 42: Unexpected errors ['./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT]'] Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT]'] """ output = """ -./generics_self_advanced.py:18:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ParentA -./generics_self_advanced.py:19:12: Any[from_another] is not equivalent to ./generics_self_advanced.py.ChildA +./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA +./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA +./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute] ./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT] ./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT] ./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT] diff --git a/conformance/results/pycroscope/generics_self_attributes.toml b/conformance/results/pycroscope/generics_self_attributes.toml index d645143c1..913a04b76 100644 --- a/conformance/results/pycroscope/generics_self_attributes.toml +++ b/conformance/results/pycroscope/generics_self_attributes.toml @@ -1,7 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors Line 32: Expected 1 errors """ output = """ +./generics_self_attributes.py:26:37: Incompatible argument type for next: expected .../tests/generics_self_attributes.py.OrdinalLinkedList | None but got .../tests/generics_self_attributes.py.LinkedList[int] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index ec44a4fff..0ef0e1b61 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -4,7 +4,7 @@ Line 20: Expected 1 errors Line 33: Expected 1 errors Line 27: Unexpected errors ['./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT]'] Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape'] -Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle'] +Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle', "./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute]"] Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 75: Unexpected errors ['./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation]'] @@ -15,6 +15,7 @@ output = """ ./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT] ./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape ./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle +./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute] ./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape ./generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle diff --git a/conformance/results/pycroscope/generics_self_protocols.toml b/conformance/results/pycroscope/generics_self_protocols.toml index 9469faabc..1e1cf320f 100644 --- a/conformance/results/pycroscope/generics_self_protocols.toml +++ b/conformance/results/pycroscope/generics_self_protocols.toml @@ -1,7 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 64: Expected 1 errors """ output = """ ./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got .../tests/generics_self_protocols.py.BadReturnType [incompatible_argument] +./generics_self_protocols.py:64:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got .../tests/generics_self_protocols.py.ReturnDifferentClass [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index b7eb6f606..bcf494f8b 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,7 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument]"] -Line 46: Unexpected errors ["./generics_syntax_infer_variance.py:46:27: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:46:55: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument]", './generics_syntax_infer_variance.py:46:8: Unrecognized annotation collections.abc.Sequence[Any[generic_argument]] [invalid_annotation]', './generics_syntax_infer_variance.py:46:36: collections.abc.Sequence[Any[generic_argument]] is not callable [not_callable]'] +Line 46: Unexpected errors ['./generics_syntax_infer_variance.py:46:8: Cannot call overloaded function [incompatible_argument]', './generics_syntax_infer_variance.py:46:36: Cannot call overloaded function [incompatible_argument]'] Line 55: Unexpected errors ['./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]'] Line 84: Unexpected errors ['./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]'] Line 95: Unexpected errors ['./generics_syntax_infer_variance.py:95:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:95:35: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]'] @@ -15,14 +15,10 @@ output = """ ./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] ./generics_syntax_infer_variance.py:29:53: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] ./generics_syntax_infer_variance.py:29:27: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] -./generics_syntax_infer_variance.py:46:27: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument] -./generics_syntax_infer_variance.py:46:55: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument] -./generics_syntax_infer_variance.py:46:8: Unrecognized annotation collections.abc.Sequence[Any[generic_argument]] [invalid_annotation] -./generics_syntax_infer_variance.py:46:36: collections.abc.Sequence[Any[generic_argument]] is not callable [not_callable] -./generics_syntax_infer_variance.py:47:53: Incompatible argument type for index: expected int | slice but got type 'float' [incompatible_argument] -./generics_syntax_infer_variance.py:47:27: Incompatible argument type for index: expected int | slice but got type 'int' [incompatible_argument] -./generics_syntax_infer_variance.py:47:8: Unrecognized annotation collections.abc.Sequence[Any[generic_argument]] [invalid_annotation] -./generics_syntax_infer_variance.py:47:34: collections.abc.Sequence[Any[generic_argument]] is not callable [not_callable] +./generics_syntax_infer_variance.py:46:8: Cannot call overloaded function [incompatible_argument] +./generics_syntax_infer_variance.py:46:36: Cannot call overloaded function [incompatible_argument] +./generics_syntax_infer_variance.py:47:8: Cannot call overloaded function [incompatible_argument] +./generics_syntax_infer_variance.py:47:34: Cannot call overloaded function [incompatible_argument] ./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:56:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index 4ca94b9c1..e2be12c2f 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -3,10 +3,10 @@ errors_diff = """ Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 17: Unexpected errors ['./generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation]'] -Line 18: Unexpected errors ['./generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation]'] -Line 19: Unexpected errors ['./generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation]'] -Line 21: Unexpected errors ['./generics_type_erasure.py:21:12: Any[from_another] is not equivalent to int'] +Line 17: Unexpected errors ["./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation]'] +Line 18: Unexpected errors ["./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation]'] +Line 19: Unexpected errors ["./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation]'] +Line 21: Unexpected errors ['./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int'] Line 27: Unexpected errors ['./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation]'] Line 28: Unexpected errors ['./generics_type_erasure.py:28:16: Object Node does not support subscripting [unsupported_operation]'] Line 29: Unexpected errors ['./generics_type_erasure.py:29:4: Object Node does not support subscripting [unsupported_operation]'] @@ -19,13 +19,15 @@ Line 37: Unexpected errors ['./generics_type_erasure.py:37:5: Object Node does n Line 39: Unexpected errors ['./generics_type_erasure.py:39:5: Object Node does not support subscripting [unsupported_operation]'] Line 47: Unexpected errors ['./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int'] Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int', './generics_type_erasure.py:48:12: Object Node does not support subscripting [unsupported_operation]'] -Line 56: Unexpected errors ['./generics_type_erasure.py:56:12: Any[from_another] is not equivalent to bytes'] """ output = """ +./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:21:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int ./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation] ./generics_type_erasure.py:28:16: Object Node does not support subscripting [unsupported_operation] ./generics_type_erasure.py:29:4: Object Node does not support subscripting [unsupported_operation] @@ -43,5 +45,4 @@ output = """ ./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int ./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int ./generics_type_erasure.py:48:12: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:56:12: Any[from_another] is not equivalent to bytes """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 97f535151..936428025 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -7,24 +7,24 @@ Line 57: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors Line 67: Expected 1 errors +Line 75: Expected 1 errors Line 76: Expected 1 errors Line 16: Unexpected errors ['./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] -Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] +Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] Line 27: Unexpected errors ['./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation]'] -Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[]'] -Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str]'] +Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[]'] +Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] Line 42: Unexpected errors ['./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation]'] -Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation]'] +Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation]'] Line 62: Unexpected errors ['./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation]'] """ output = """ ./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] -./generics_typevartuple_args.py:20:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] +./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] ./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation] -./generics_typevartuple_args.py:31:12: tuple[Any[explicit]] is not equivalent to tuple[] -./generics_typevartuple_args.py:32:12: tuple[Any[explicit]] is not equivalent to tuple[int, str] +./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[] +./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] ./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation] -./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation] +./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation] ./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation] -./generics_typevartuple_args.py:75:0: Incompatible argument type for args: expected tuple[tuple[Any[explicit]], ...] but got tuple[Literal[(0,)], Literal[(1, 2)]] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 3b6c1d2c4..ab3c5215f 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -3,22 +3,22 @@ errors_diff = """ Line 42: Expected 1 errors Line 43: Expected 1 errors Line 52: Expected 1 errors +Line 53: Expected 1 errors +Line 56: Expected 1 errors +Line 59: Expected 1 errors Line 89: Expected 1 errors +Line 90: Expected 1 errors Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] -Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[Any[explicit]] is not equivalent to tuple[int]'] +Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] """ output = """ ./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] -./generics_typevartuple_basic.py:53:30: Invalid type annotation Shape [invalid_annotation] -./generics_typevartuple_basic.py:56:27: Invalid type annotation Shape [invalid_annotation] -./generics_typevartuple_basic.py:59:23: Invalid type annotation Shape [invalid_annotation] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] -./generics_typevartuple_basic.py:84:12: tuple[Any[explicit]] is not equivalent to tuple[int] -./generics_typevartuple_basic.py:90:6: Incompatible argument type for arg1: expected tuple[Any[explicit]] but got Literal[(0, 0)] [incompatible_argument] +./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index c04a5e0f2..d5670c78e 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,14 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 26: Expected 1 errors -Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int]'] -Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str]'] -Line 45: Unexpected errors ['./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation]'] -Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int]'] +Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int]'] +Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str]'] +Line 45: Unexpected errors ['./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation]'] +Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ -./generics_typevartuple_callable.py:41:12: tuple[Any[explicit]] is not equivalent to tuple[str, int, complex | float | int] -./generics_typevartuple_callable.py:42:12: tuple[Any[explicit]] is not equivalent to tuple[str] -./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation] -./generics_typevartuple_callable.py:49:12: tuple[Any[explicit]] is not equivalent to tuple[float | int, str, complex | float | int] +./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int] +./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str] +./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation] +./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index e3df6acaf..886bbb9fe 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,9 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 51: Unexpected errors ["./generics_typevartuple_concat.py:51:24: Incompatible argument type for y: expected tuple[Any[explicit]] but got Literal[(True, 'a')] [incompatible_argument]"] -Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Any[explicit]] is not equivalent to tuple[int, bool, str]'] +Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:51:24: Incompatible argument type for y: expected tuple[Any[explicit]] but got Literal[(True, 'a')] [incompatible_argument] -./generics_typevartuple_concat.py:52:12: tuple[Any[explicit]] is not equivalent to tuple[int, bool, str] +./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 8389e53e8..b76f2ac4e 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -17,13 +17,13 @@ Line 94: Unexpected errors ['./generics_typevartuple_specialization.py:94:16: Line 95: Unexpected errors ['./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]]'] Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 134: Unexpected errors ['./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] -Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] -Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] +Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] +Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] +Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 147: Unexpected errors ['./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] -Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] +Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] +Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 157: Unexpected errors ['./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int]'] Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] @@ -48,14 +48,14 @@ output = """ ./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:135:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] -./generics_typevartuple_specialization.py:136:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] -./generics_typevartuple_specialization.py:137:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] +./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] +./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] +./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] ./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:148:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] -./generics_typevartuple_specialization.py:149:16: tuple[tuple[Any[explicit]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] +./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] +./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] ./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index 0ad3bee37..cdf092860 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -1,6 +1,12 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors +Line 21: Unexpected errors ['./generics_typevartuple_unpack.py:21:30: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation]'] +Line 36: Unexpected errors ['./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 44: Unexpected errors ['./generics_typevartuple_unpack.py:44:13: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation]'] """ output = """ +./generics_typevartuple_unpack.py:21:30: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation] +./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_unpack.py:44:13: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_variance_inference.toml b/conformance/results/pycroscope/generics_variance_inference.toml index 5f01e8336..6e36d8dcb 100644 --- a/conformance/results/pycroscope/generics_variance_inference.toml +++ b/conformance/results/pycroscope/generics_variance_inference.toml @@ -1,27 +1,15 @@ conformance_automated = "Fail" errors_diff = """ -Line 41: Expected 1 errors -Line 49: Expected 1 errors -Line 58: Expected 1 errors -Line 67: Expected 1 errors -Line 80: Expected 1 errors -Line 96: Expected 1 errors -Line 97: Expected 1 errors -Line 111: Expected 1 errors -Line 112: Expected 1 errors -Line 119: Expected 1 errors -Line 120: Expected 1 errors -Line 121: Expected 1 errors -Line 122: Expected 1 errors -Line 130: Expected 1 errors -Line 138: Expected 1 errors -Line 149: Expected 1 errors -Line 169: Expected 1 errors -Line 170: Expected 1 errors -Line 181: Expected 1 errors -Line 194: Expected 1 errors Line 26: Unexpected errors ['./generics_variance_inference.py:26:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment]'] Line 29: Unexpected errors ['./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment]'] +Line 40: Unexpected errors ['./generics_variance_inference.py:40:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant1[int] [incompatible_assignment]'] +Line 48: Unexpected errors ['./generics_variance_inference.py:48:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant2[int] [incompatible_assignment]'] +Line 57: Unexpected errors ['./generics_variance_inference.py:57:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant3[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant3[int] [incompatible_assignment]'] +Line 66: Unexpected errors ['./generics_variance_inference.py:66:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant4[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant4[int] [incompatible_assignment]'] +Line 79: Unexpected errors ['./generics_variance_inference.py:79:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant5[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant5[int] [incompatible_assignment]'] +Line 150: Unexpected errors ['./generics_variance_inference.py:150:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant1[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant1[float | int] [incompatible_assignment]'] +Line 182: Unexpected errors ['./generics_variance_inference.py:182:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant6[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant6[int] [incompatible_assignment]'] +Line 193: Unexpected errors ['./generics_variance_inference.py:193:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant2[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant2[float | int] [incompatible_assignment]'] """ output = """ ./generics_variance_inference.py:24:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] @@ -29,4 +17,32 @@ output = """ ./generics_variance_inference.py:26:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] ./generics_variance_inference.py:28:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] ./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] +./generics_variance_inference.py:40:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant1[int] [incompatible_assignment] +./generics_variance_inference.py:41:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant1[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant1[float | int] [incompatible_assignment] +./generics_variance_inference.py:48:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant2[int] [incompatible_assignment] +./generics_variance_inference.py:49:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant2[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant2[float | int] [incompatible_assignment] +./generics_variance_inference.py:57:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant3[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant3[int] [incompatible_assignment] +./generics_variance_inference.py:58:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant3[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant3[float | int] [incompatible_assignment] +./generics_variance_inference.py:66:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant4[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant4[int] [incompatible_assignment] +./generics_variance_inference.py:67:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant4[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant4[float | int] [incompatible_assignment] +./generics_variance_inference.py:79:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant5[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant5[int] [incompatible_assignment] +./generics_variance_inference.py:80:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant5[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant5[float | int] [incompatible_assignment] +./generics_variance_inference.py:96:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant1[int] [incompatible_assignment] +./generics_variance_inference.py:97:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant1[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant1[float | int] [incompatible_assignment] +./generics_variance_inference.py:111:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant2[int] [incompatible_assignment] +./generics_variance_inference.py:112:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant2[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant2[float | int] [incompatible_assignment] +./generics_variance_inference.py:119:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[float | int, str], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[int, str] [incompatible_assignment] +./generics_variance_inference.py:120:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[int, str], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[float | int, str] [incompatible_assignment] +./generics_variance_inference.py:121:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, int] [incompatible_assignment] +./generics_variance_inference.py:122:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, int], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, float | int] [incompatible_assignment] +./generics_variance_inference.py:130:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant4[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant4[int] [incompatible_assignment] +./generics_variance_inference.py:138:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant5[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant5[int] [incompatible_assignment] +./generics_variance_inference.py:149:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeContravariant1[int] [incompatible_assignment] +./generics_variance_inference.py:150:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant1[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant1[float | int] [incompatible_assignment] +./generics_variance_inference.py:169:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant6[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant6[float | int] [incompatible_assignment] +./generics_variance_inference.py:170:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant6[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant6[int] [incompatible_assignment] +./generics_variance_inference.py:181:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant6[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant6[float | int] [incompatible_assignment] +./generics_variance_inference.py:182:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant6[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant6[int] [incompatible_assignment] +./generics_variance_inference.py:193:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant2[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant2[float | int] [incompatible_assignment] +./generics_variance_inference.py:194:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeContravariant2[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/historical_positional.toml b/conformance/results/pycroscope/historical_positional.toml index ae78858de..d8bfa937a 100644 --- a/conformance/results/pycroscope/historical_positional.toml +++ b/conformance/results/pycroscope/historical_positional.toml @@ -1,9 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 59: Expected 1 errors """ output = """ ./historical_positional.py:18:0: Missing required positional argument '__x' [incompatible_call] ./historical_positional.py:26:15: Historical positional-only parameter may not follow a positional-or-keyword parameter [invalid_positional_only] ./historical_positional.py:54:25: Historical positional-only parameter may not follow a positional-or-keyword parameter [invalid_positional_only] +./historical_positional.py:59:0: Missing required positional argument '__x' [incompatible_call] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index 823b18651..5ea9b6c26 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,53 +1,19 @@ conformance_automated = "Fail" errors_diff = """ -Line 32: Expected 1 errors -Line 33: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 49: Expected 1 errors -Line 69: Expected 1 errors -Line 76: Expected 1 errors -Line 86: Expected 1 errors Line 106: Expected 1 errors -Line 132: Expected 1 errors -Line 22: Unexpected errors ['./namedtuples_define_class.py:22:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] -Line 23: Unexpected errors ['./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int'] -Line 24: Unexpected errors ['./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int'] -Line 25: Unexpected errors ['./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str'] -Line 26: Unexpected errors ['./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str'] -Line 27: Unexpected errors ['./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int'] -Line 28: Unexpected errors ['./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int'] -Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int]'] -Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str]'] -Line 36: Unexpected errors ['./namedtuples_define_class.py:36:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] -Line 39: Unexpected errors ['./namedtuples_define_class.py:39:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] -Line 42: Unexpected errors ['./namedtuples_define_class.py:42:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point'] -Line 66: Unexpected errors ['./namedtuples_define_class.py:66:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point2'] -Line 101: Unexpected errors ['./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str'] -Line 121: Unexpected errors ['./namedtuples_define_class.py:121:17: Object Property does not support subscripting [unsupported_operation]'] -Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int'] -Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int'] """ output = """ -./namedtuples_define_class.py:22:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point -./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str -./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str -./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int] -./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str] -./namedtuples_define_class.py:36:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point -./namedtuples_define_class.py:39:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point -./namedtuples_define_class.py:42:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point -./namedtuples_define_class.py:66:12: Any[from_another] is not equivalent to ./namedtuples_define_class.py.Point2 -./namedtuples_define_class.py:101:12: Any[from_another] is not equivalent to str -./namedtuples_define_class.py:121:17: Object Property does not support subscripting [unsupported_operation] -./namedtuples_define_class.py:122:12: Any[from_another] is not equivalent to float | int -./namedtuples_define_class.py:123:12: Any[from_another] is not equivalent to float | int -./namedtuples_define_class.py:125:0: Object Property does not support subscripting [unsupported_operation] +./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] +./namedtuples_define_class.py:33:6: Tuple index out of range: Literal[-4] [incompatible_call] +./namedtuples_define_class.py:44:5: In call to ./namedtuples_define_class.py.Point: Missing required argument 'y' [incompatible_call] +./namedtuples_define_class.py:45:5: In call to ./namedtuples_define_class.py.Point: Missing required argument 'y' [incompatible_call] +./namedtuples_define_class.py:46:14: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument] +./namedtuples_define_class.py:47:23: Incompatible argument type for units: expected str but got Literal[3] [incompatible_argument] +./namedtuples_define_class.py:48:5: In call to ./namedtuples_define_class.py.Point: Takes 3 positional arguments but 4 were given [incompatible_call] +./namedtuples_define_class.py:49:6: In call to ./namedtuples_define_class.py.Point: Got an unexpected keyword argument 'other' [incompatible_call] +./namedtuples_define_class.py:69:6: In call to ./namedtuples_define_class.py.Point2: Takes 2 positional arguments but 3 were given [incompatible_call] +./namedtuples_define_class.py:76:4: NamedTuple field names cannot start with an underscore [invalid_annotation] +./namedtuples_define_class.py:86:4: NamedTuple fields without defaults cannot follow fields with defaults [invalid_annotation] +./namedtuples_define_class.py:125:18: Incompatible argument type for value: expected str but got Literal[3.1] [incompatible_argument] +./namedtuples_define_class.py:132:23: NamedTuple classes may only inherit from NamedTuple and Generic [invalid_base] """ diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml index 9108d022e..86a0dd98c 100644 --- a/conformance/results/pycroscope/namedtuples_usage.toml +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -1,33 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 34: Expected 1 errors -Line 35: Expected 1 errors Line 40: Expected 1 errors -Line 41: Expected 1 errors Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 52: Expected 1 errors -Line 53: Expected 1 errors -Line 20: Unexpected errors ['./namedtuples_usage.py:20:12: Any[from_another] is not equivalent to int'] -Line 21: Unexpected errors ['./namedtuples_usage.py:21:12: Any[from_another] is not equivalent to str'] -Line 27: Unexpected errors ['./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int'] -Line 28: Unexpected errors ['./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int'] -Line 29: Unexpected errors ['./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str'] -Line 30: Unexpected errors ['./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str'] -Line 31: Unexpected errors ['./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int'] -Line 32: Unexpected errors ['./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int'] -Line 49: Unexpected errors ['./namedtuples_usage.py:49:12: Any[generic_argument] is not equivalent to int'] -Line 50: Unexpected errors ['./namedtuples_usage.py:50:12: Any[generic_argument] is not equivalent to str'] """ output = """ -./namedtuples_usage.py:20:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:21:12: Any[from_another] is not equivalent to str -./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str -./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str -./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:49:12: Any[generic_argument] is not equivalent to int -./namedtuples_usage.py:50:12: Any[generic_argument] is not equivalent to str +./namedtuples_usage.py:34:6: Tuple index out of range: Literal[3] [incompatible_call] +./namedtuples_usage.py:35:6: Tuple index out of range: Literal[-4] [incompatible_call] +./namedtuples_usage.py:41:0: Object of type ./namedtuples_usage.py.Point does not support '__setitem__' [unsupported_operation] +./namedtuples_usage.py:43:4: Object of type ./namedtuples_usage.py.Point does not support '__delitem__' [unsupported_operation] +./namedtuples_usage.py:52:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] +./namedtuples_usage.py:53:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] """ diff --git a/conformance/results/pycroscope/overloads_basic.toml b/conformance/results/pycroscope/overloads_basic.toml index 4bcd4f7d1..b6e5eb4e1 100644 --- a/conformance/results/pycroscope/overloads_basic.toml +++ b/conformance/results/pycroscope/overloads_basic.toml @@ -1,12 +1,8 @@ conformance_automated = "Fail" errors_diff = """ -Line 36: Expected 1 errors -Line 34: Unexpected errors ['./overloads_basic.py:34:12: Any[from_another] is not equivalent to int'] -Line 35: Unexpected errors ['./overloads_basic.py:35:12: Any[from_another] is not equivalent to bytes'] Line 56: Unexpected errors ['./overloads_basic.py:56:0: Function may exit without returning a value [missing_return]'] """ output = """ -./overloads_basic.py:34:12: Any[from_another] is not equivalent to int -./overloads_basic.py:35:12: Any[from_another] is not equivalent to bytes +./overloads_basic.py:36:0: Cannot call overloaded function [incompatible_argument] ./overloads_basic.py:56:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/overloads_evaluation.toml b/conformance/results/pycroscope/overloads_evaluation.toml index b89394780..450cb1eda 100644 --- a/conformance/results/pycroscope/overloads_evaluation.toml +++ b/conformance/results/pycroscope/overloads_evaluation.toml @@ -1,47 +1,29 @@ conformance_automated = "Fail" errors_diff = """ -Line 51: Expected 1 errors -Line 44: Unexpected errors ['./overloads_evaluation.py:44:12: int | str is not equivalent to int'] -Line 49: Unexpected errors ['./overloads_evaluation.py:49:12: int | str is not equivalent to str'] -Line 67: Unexpected errors ['./overloads_evaluation.py:67:16: float | int is not equivalent to int'] -Line 93: Unexpected errors ['./overloads_evaluation.py:93:12: int | str is not equivalent to int'] -Line 136: Unexpected errors ['./overloads_evaluation.py:136:16: int is not equivalent to Literal[0, 1]'] Line 149: Unexpected errors ["./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] Line 153: Unexpected errors ["./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] Line 157: Unexpected errors ["./overloads_evaluation.py:157:11: ./overloads_evaluation.py.Color has no attribute 'value' [undefined_attribute]"] -Line 162: Unexpected errors ['./overloads_evaluation.py:162:16: int is not equivalent to Literal[0, 1]'] -Line 235: Unexpected errors ['./overloads_evaluation.py:235:16: int | str is not equivalent to int'] -Line 262: Unexpected errors ['./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int]'] -Line 265: Unexpected errors ['./overloads_evaluation.py:265:16: list[int] | list[str] is not equivalent to Any[explicit]'] -Line 281: Unexpected errors ['./overloads_evaluation.py:281:16: list[Any[explicit]] is not equivalent to Any[explicit]'] -Line 303: Unexpected errors ['./overloads_evaluation.py:303:16: list[Any[explicit]] is not equivalent to float | int'] -Line 309: Unexpected errors ['./overloads_evaluation.py:309:16: Any[explicit] is not equivalent to float | int'] -Line 315: Unexpected errors ['./overloads_evaluation.py:315:16: list[int] is not equivalent to float | int'] -Line 341: Unexpected errors ['./overloads_evaluation.py:341:16: list[int] | list[str] is not equivalent to list[int]'] -Line 344: Unexpected errors ['./overloads_evaluation.py:344:16: list[int] | list[str] is not equivalent to list[str]'] -Line 347: Unexpected errors ['./overloads_evaluation.py:347:16: list[int] | list[str] is not equivalent to Any[explicit]'] +Line 161: Unexpected errors ['./overloads_evaluation.py:161:11: Cannot call overloaded function [incompatible_argument]'] +Line 162: Unexpected errors ['./overloads_evaluation.py:162:16: Any[error] is not equivalent to Literal[0, 1]'] +Line 205: Unexpected errors ['./overloads_evaluation.py:205:11: Cannot call overloaded function [incompatible_argument]'] +Line 206: Unexpected errors ['./overloads_evaluation.py:206:16: Any[error] is not equivalent to int | str'] +Line 235: Unexpected errors ['./overloads_evaluation.py:235:16: str is not equivalent to int'] +Line 303: Unexpected errors ['./overloads_evaluation.py:303:16: Any[multiple_overload_matches] is not equivalent to float | int'] +Line 315: Unexpected errors ['./overloads_evaluation.py:315:16: Any[multiple_overload_matches] is not equivalent to float | int'] """ output = """ -./overloads_evaluation.py:38:0: Missing required argument 'x' [incompatible_call] -./overloads_evaluation.py:44:12: int | str is not equivalent to int -./overloads_evaluation.py:46:14: Incompatible argument type for y: expected str but got Literal[1] [incompatible_argument] -./overloads_evaluation.py:49:12: int | str is not equivalent to str -./overloads_evaluation.py:67:16: float | int is not equivalent to int -./overloads_evaluation.py:93:12: int | str is not equivalent to int -./overloads_evaluation.py:116:13: Incompatible argument type for x: expected int but got int | str [incompatible_argument] -./overloads_evaluation.py:136:16: int is not equivalent to Literal[0, 1] +./overloads_evaluation.py:38:0: Cannot call overloaded function [incompatible_call] +./overloads_evaluation.py:46:0: Cannot call overloaded function [incompatible_argument] +./overloads_evaluation.py:51:0: Cannot call overloaded function [incompatible_argument] +./overloads_evaluation.py:116:4: Cannot call overloaded function [incompatible_argument] ./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] ./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] ./overloads_evaluation.py:157:11: ./overloads_evaluation.py.Color has no attribute 'value' [undefined_attribute] -./overloads_evaluation.py:162:16: int is not equivalent to Literal[0, 1] -./overloads_evaluation.py:235:16: int | str is not equivalent to int -./overloads_evaluation.py:262:16: list[int] | list[str] is not equivalent to list[int] -./overloads_evaluation.py:265:16: list[int] | list[str] is not equivalent to Any[explicit] -./overloads_evaluation.py:281:16: list[Any[explicit]] is not equivalent to Any[explicit] -./overloads_evaluation.py:303:16: list[Any[explicit]] is not equivalent to float | int -./overloads_evaluation.py:309:16: Any[explicit] is not equivalent to float | int -./overloads_evaluation.py:315:16: list[int] is not equivalent to float | int -./overloads_evaluation.py:341:16: list[int] | list[str] is not equivalent to list[int] -./overloads_evaluation.py:344:16: list[int] | list[str] is not equivalent to list[str] -./overloads_evaluation.py:347:16: list[int] | list[str] is not equivalent to Any[explicit] +./overloads_evaluation.py:161:11: Cannot call overloaded function [incompatible_argument] +./overloads_evaluation.py:162:16: Any[error] is not equivalent to Literal[0, 1] +./overloads_evaluation.py:205:11: Cannot call overloaded function [incompatible_argument] +./overloads_evaluation.py:206:16: Any[error] is not equivalent to int | str +./overloads_evaluation.py:235:16: str is not equivalent to int +./overloads_evaluation.py:303:16: Any[multiple_overload_matches] is not equivalent to float | int +./overloads_evaluation.py:315:16: Any[multiple_overload_matches] is not equivalent to float | int """ diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 9adf2d1bd..eca607810 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -2,24 +2,18 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors Line 34: Expected 1 errors +Line 58: Expected 1 errors +Line 74: Expected 1 errors +Line 104: Expected 1 errors +Line 106: Expected 1 errors +Line 107: Expected 1 errors +Line 108: Expected 1 errors Line 44: Unexpected errors ['./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return]'] Line 49: Unexpected errors ['./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return]'] -Line 59: Unexpected errors ['./protocols_class_objects.py:59:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA2, got ConcreteA [incompatible_assignment]'] Line 64: Unexpected errors ['./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return]'] -Line 105: Unexpected errors ['./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC1 [incompatible_assignment]'] -Line 109: Unexpected errors ['./protocols_class_objects.py:109:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC3 [incompatible_assignment]'] """ output = """ ./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return] ./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return] -./protocols_class_objects.py:58:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA1, got ConcreteA [incompatible_assignment] -./protocols_class_objects.py:59:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA2, got ConcreteA [incompatible_assignment] ./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return] -./protocols_class_objects.py:74:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoB1, got ConcreteB [incompatible_assignment] -./protocols_class_objects.py:104:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got ConcreteC1 [incompatible_assignment] -./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC1 [incompatible_assignment] -./protocols_class_objects.py:106:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got ConcreteC2 [incompatible_assignment] -./protocols_class_objects.py:107:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC2 [incompatible_assignment] -./protocols_class_objects.py:108:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got ConcreteC3 [incompatible_assignment] -./protocols_class_objects.py:109:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got ConcreteC3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index 00d9d84e9..caf90389d 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -1,17 +1,21 @@ conformance_automated = "Fail" errors_diff = """ -Line 52: Expected 1 errors Line 53: Expected 1 errors -Line 54: Expected 1 errors Line 67: Expected 1 errors Line 82: Expected 1 errors -Line 83: Expected 1 errors Line 18: Unexpected errors ['./protocols_merging.py:18:4: Function may exit without returning a value [missing_return]'] -Line 59: Unexpected errors ['./protocols_merging.py:59:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got ./protocols_merging.py.SizedAndClosable1 [incompatible_assignment]'] -Line 60: Unexpected errors ['./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got ./protocols_merging.py.SizedAndClosable2 [incompatible_assignment]'] +Line 46: Unexpected errors ["./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 48: Unexpected errors ["./protocols_merging.py:48:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SizedAndClosable3, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 50: Unexpected errors ["./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 60: Unexpected errors ["./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got ./protocols_merging.py.SizedAndClosable2 (Protocol with members ) [incompatible_assignment]"] """ output = """ ./protocols_merging.py:18:4: Function may exit without returning a value [missing_return] -./protocols_merging.py:59:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got ./protocols_merging.py.SizedAndClosable1 [incompatible_assignment] -./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got ./protocols_merging.py.SizedAndClosable2 [incompatible_assignment] +./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:48:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SizedAndClosable3, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got ./protocols_merging.py.SizedAndClosable2 (Protocol with members ) [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index c2ab99f6b..7af19f9e7 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -1,8 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors -Line 37: Unexpected errors ['./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Concrete2 [incompatible_assignment]'] -Line 54: Unexpected errors ['./protocols_subtyping.py:54:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Proto3 [incompatible_assignment]'] +Line 55: Expected 1 errors Line 67: Unexpected errors ['./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return]'] Line 72: Unexpected errors ['./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return]'] Line 77: Unexpected errors ['./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation]'] @@ -14,13 +13,10 @@ Line 99: Unexpected errors ['./protocols_subtyping.py:99:8: Object Proto7 does n Line 100: Unexpected errors ['./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation]'] Line 110: Unexpected errors ['./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return]'] Line 115: Unexpected errors ['./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return]'] -Line 142: Unexpected errors ['./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument]'] +Line 142: Unexpected errors ['./protocols_subtyping.py:142:0: Traceback (most recent call last):'] """ output = """ -./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] -./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 [incompatible_assignment] -./protocols_subtyping.py:54:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2, got ./protocols_subtyping.py.Proto3 [incompatible_assignment] -./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3, got ./protocols_subtyping.py.Proto2 [incompatible_assignment] +./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members ) [incompatible_assignment] ./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation] @@ -36,5 +32,5 @@ output = """ ./protocols_subtyping.py:103:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return] -./protocols_subtyping.py:142:12: Incompatible argument type for args: expected ./protocols_subtyping.py.HashableFloats but got Literal[(1, 2, 3)] [incompatible_argument] +./protocols_subtyping.py:142:0: Traceback (most recent call last): """ diff --git a/conformance/results/pycroscope/specialtypes_never.toml b/conformance/results/pycroscope/specialtypes_never.toml index 35f8a7da3..93086d054 100644 --- a/conformance/results/pycroscope/specialtypes_never.toml +++ b/conformance/results/pycroscope/specialtypes_never.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 104: Expected 1 errors Line 51: Unexpected errors ['./specialtypes_never.py:51:4: Incompatible return type: expected list[Never], got Literal[[]] [incompatible_return_value]'] Line 84: Unexpected errors ['./specialtypes_never.py:84:4: Incompatible assignment: expected Never, got Any[explicit] [incompatible_assignment]'] """ @@ -9,4 +8,5 @@ output = """ ./specialtypes_never.py:51:4: Incompatible return type: expected list[Never], got Literal[[]] [incompatible_return_value] ./specialtypes_never.py:84:4: Incompatible assignment: expected Never, got Any[explicit] [incompatible_assignment] ./specialtypes_never.py:85:4: Incompatible assignment: expected list[int], got list[Never] [incompatible_assignment] +./specialtypes_never.py:104:4: Incompatible return type: expected .../tests/specialtypes_never.py.ClassC[~U], got .../tests/specialtypes_never.py.ClassC[Never] [incompatible_return_value] """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 346c17b04..6bc206ffd 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -1,15 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Lines 101, 102: Expected exactly one error (tag 'func6_1') -Lines 106, 107: Expected exactly one error (tag 'func6_2') -Lines 111, 112: Expected exactly one error (tag 'func6_3') -Line 60: Unexpected errors ['./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment]'] -Line 101: Unexpected errors ['./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int]'] -Line 102: Unexpected errors ['./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 106: Unexpected errors ['./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int]'] -Line 107: Unexpected errors ['./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] -Line 111: Unexpected errors ['./tuples_type_compat.py:111:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int, str, int]'] -Line 112: Unexpected errors ['./tuples_type_compat.py:112:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]'] """ output = """ ./tuples_type_compat.py:15:4: Incompatible assignment: expected tuple[int, int], got tuple[float | int, complex | float | int] [incompatible_assignment] @@ -17,17 +7,13 @@ output = """ ./tuples_type_compat.py:32:4: Incompatible assignment: expected tuple[int], got tuple[int, *tuple[int, ...]] [incompatible_assignment] ./tuples_type_compat.py:33:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:43:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] -./tuples_type_compat.py:60:4: Incompatible assignment: expected tuple[int, int], got tuple[Any[explicit]] [incompatible_assignment] ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:76:20: tuple[int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:81:20: tuple[str, str] | tuple[int, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:86:20: tuple[int, str, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:101:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] -./tuples_type_compat.py:102:24: tuple[int] | tuple[int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:106:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[str, str] | tuple[int, int] -./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:111:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int, str, int] -./tuples_type_compat.py:112:24: tuple[int | str, int | str, int | str] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:102:24: tuple[int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:112:24: tuple[int, str, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] ./tuples_type_compat.py:126:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, str] ./tuples_type_compat.py:129:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, int] ./tuples_type_compat.py:157:0: Incompatible assignment: expected tuple[int, str], got Literal[(1, '', '')] [incompatible_assignment] diff --git a/conformance/results/pycroscope/tuples_type_form.toml b/conformance/results/pycroscope/tuples_type_form.toml index dfa619b91..8ea1c0e46 100644 --- a/conformance/results/pycroscope/tuples_type_form.toml +++ b/conformance/results/pycroscope/tuples_type_form.toml @@ -1,11 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 40: Expected 1 errors -Line 41: Expected 1 errors -Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors """ output = """ ./tuples_type_form.py:12:0: Incompatible assignment: expected tuple[int], got Literal[(1, 2)] [incompatible_assignment] @@ -13,4 +7,10 @@ output = """ ./tuples_type_form.py:15:0: Incompatible assignment: expected tuple[int, int], got Literal[(1, '')] [incompatible_assignment] ./tuples_type_form.py:25:0: Incompatible assignment: expected tuple[], got Literal[(1,)] [incompatible_assignment] ./tuples_type_form.py:36:0: Incompatible assignment: expected tuple[int, ...], got Literal[(1, 2, 3, '')] [incompatible_assignment] +./tuples_type_form.py:40:5: Ellipsis can be used only in tuple[T, ...] [invalid_annotation] +./tuples_type_form.py:41:5: Ellipsis can be used only in tuple[T, ...] [invalid_annotation] +./tuples_type_form.py:42:5: Ellipsis can be used only in tuple[T, ...] [invalid_annotation] +./tuples_type_form.py:43:5: Ellipsis can be used only in tuple[T, ...] [invalid_annotation] +./tuples_type_form.py:44:5: Ellipsis can be used only in tuple[T, ...] [invalid_annotation] +./tuples_type_form.py:45:5: Ellipsis can be used only in tuple[T, ...] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/tuples_unpacked.toml b/conformance/results/pycroscope/tuples_unpacked.toml index a16914ecd..f7d1ae069 100644 --- a/conformance/results/pycroscope/tuples_unpacked.toml +++ b/conformance/results/pycroscope/tuples_unpacked.toml @@ -1,10 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 40: Expected 1 errors -Line 41: Expected 1 errors -Line 51: Expected 1 errors -Line 59: Expected 1 errors -Lines 60, 61: Expected error (tag 't14') """ output = """ +./tuples_unpacked.py:40:4: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] +./tuples_unpacked.py:41:4: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] +./tuples_unpacked.py:51:8: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] +./tuples_unpacked.py:59:5: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] +./tuples_unpacked.py:60:5: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index bc6ce8ccd..a402010ab 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -368,7 +368,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_self_usage Pass @@ -1038,21 +1038,21 @@

Python Type System Conformance Test Results

Partial

Incorrectly marks a match case as unreachable.

Pass Pass -Unknown +Pass      tuples_type_form Pass Pass Pass Pass -Unknown +Pass      tuples_unpacked
Partial

"More than one unpack" error is missing in some cases.

Pass Pass Pass -Unknown +Pass Named tuples @@ -1228,7 +1228,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass From 1545e5c2246553abd123f01d977795bb4cc2cb04 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 23 Feb 2026 22:13:00 -0800 Subject: [PATCH 24/78] some fixes --- conformance/results/pycroscope/dataclasses_order.toml | 2 -- conformance/results/pycroscope/enums_member_values.toml | 3 +-- conformance/results/pycroscope/generics_basic.toml | 3 --- .../results/pycroscope/generics_paramspec_basic.toml | 7 +++++-- conformance/results/pycroscope/overloads_evaluation.toml | 2 -- conformance/results/pycroscope/protocols_subtyping.toml | 2 -- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/conformance/results/pycroscope/dataclasses_order.toml b/conformance/results/pycroscope/dataclasses_order.toml index b9e8d57b6..8a6afe99a 100644 --- a/conformance/results/pycroscope/dataclasses_order.toml +++ b/conformance/results/pycroscope/dataclasses_order.toml @@ -1,8 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 50: Expected 1 errors -Line 53: Unexpected errors ['./dataclasses_order.py:53:3: Traceback (most recent call last):'] """ output = """ -./dataclasses_order.py:53:3: Traceback (most recent call last): """ diff --git a/conformance/results/pycroscope/enums_member_values.toml b/conformance/results/pycroscope/enums_member_values.toml index 97735dbae..0d1af05c1 100644 --- a/conformance/results/pycroscope/enums_member_values.toml +++ b/conformance/results/pycroscope/enums_member_values.toml @@ -10,8 +10,7 @@ output = """ ./enums_member_values.py:22:12: Literal[1] has no attribute 'value' [undefined_attribute] ./enums_member_values.py:26:16: Any[error] is not equivalent to Literal[1, 3] ./enums_member_values.py:26:16: Literal[1] has no attribute 'value' [undefined_attribute] -./enums_member_values.py:30:16: Any[error] is not equivalent to Literal[1, 2, 3] -./enums_member_values.py:30:16: ./enums_member_values.py.Color has no attribute 'value' [undefined_attribute] +./enums_member_values.py:30:16: Any[explicit] is not equivalent to Literal[1, 2, 3] ./enums_member_values.py:54:12: Any[error] is not equivalent to Literal[1] ./enums_member_values.py:54:12: Literal[(1, 3.303e+23, 2439700.0)] has no attribute 'value' [undefined_attribute] ./enums_member_values.py:68:12: Any[explicit] is not equivalent to Literal[1] diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index eecb502b1..4856fde19 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -14,7 +14,6 @@ Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[from_another] is not equivalent to int'] Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[from_another] is not equivalent to int'] -Line 199: Unexpected errors ['./generics_basic.py:199:16: Any[error] is not equivalent to collections.abc.Iterator[Any[explicit]]', './generics_basic.py:199:16: Cannot call overloaded function [incompatible_argument]'] """ output = """ ./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation] @@ -27,7 +26,5 @@ output = """ ./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:154:16: Any[from_another] is not equivalent to int ./generics_basic.py:155:16: Any[from_another] is not equivalent to int -./generics_basic.py:199:16: Any[error] is not equivalent to collections.abc.Iterator[Any[explicit]] -./generics_basic.py:199:16: Cannot call overloaded function [incompatible_argument] ./generics_basic.py:208:36: Object GenericMeta does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_paramspec_basic.toml b/conformance/results/pycroscope/generics_paramspec_basic.toml index cfbb6f4fa..c7b0919a5 100644 --- a/conformance/results/pycroscope/generics_paramspec_basic.toml +++ b/conformance/results/pycroscope/generics_paramspec_basic.toml @@ -4,9 +4,12 @@ Line 10: Expected 1 errors Line 15: Expected 1 errors Line 31: Expected 1 errors Line 35: Expected 1 errors -Line 39: Expected 1 errors """ output = """ -./generics_paramspec_basic.py:23:0: Traceback (most recent call last): +./generics_paramspec_basic.py:23:0: Function may exit without returning a value [missing_return] +./generics_paramspec_basic.py:23:10: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_basic.py:23:19: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:27:13: Unrecognized annotation typing.Concatenate[, ~P] [invalid_annotation] +./generics_paramspec_basic.py:39:11: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_basic.py:39:22: ParamSpec cannot be used in this annotation context [invalid_annotation] """ diff --git a/conformance/results/pycroscope/overloads_evaluation.toml b/conformance/results/pycroscope/overloads_evaluation.toml index 450cb1eda..7764f8530 100644 --- a/conformance/results/pycroscope/overloads_evaluation.toml +++ b/conformance/results/pycroscope/overloads_evaluation.toml @@ -2,7 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 149: Unexpected errors ["./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] Line 153: Unexpected errors ["./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] -Line 157: Unexpected errors ["./overloads_evaluation.py:157:11: ./overloads_evaluation.py.Color has no attribute 'value' [undefined_attribute]"] Line 161: Unexpected errors ['./overloads_evaluation.py:161:11: Cannot call overloaded function [incompatible_argument]'] Line 162: Unexpected errors ['./overloads_evaluation.py:162:16: Any[error] is not equivalent to Literal[0, 1]'] Line 205: Unexpected errors ['./overloads_evaluation.py:205:11: Cannot call overloaded function [incompatible_argument]'] @@ -18,7 +17,6 @@ output = """ ./overloads_evaluation.py:116:4: Cannot call overloaded function [incompatible_argument] ./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] ./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] -./overloads_evaluation.py:157:11: ./overloads_evaluation.py.Color has no attribute 'value' [undefined_attribute] ./overloads_evaluation.py:161:11: Cannot call overloaded function [incompatible_argument] ./overloads_evaluation.py:162:16: Any[error] is not equivalent to Literal[0, 1] ./overloads_evaluation.py:205:11: Cannot call overloaded function [incompatible_argument] diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index 7af19f9e7..d305cce5a 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -13,7 +13,6 @@ Line 99: Unexpected errors ['./protocols_subtyping.py:99:8: Object Proto7 does n Line 100: Unexpected errors ['./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation]'] Line 110: Unexpected errors ['./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return]'] Line 115: Unexpected errors ['./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return]'] -Line 142: Unexpected errors ['./protocols_subtyping.py:142:0: Traceback (most recent call last):'] """ output = """ ./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members ) [incompatible_assignment] @@ -32,5 +31,4 @@ output = """ ./protocols_subtyping.py:103:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return] -./protocols_subtyping.py:142:0: Traceback (most recent call last): """ From be347a4da6f69fe1e006343aae8f5549dae4037f Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 24 Feb 2026 10:09:04 -0800 Subject: [PATCH 25/78] progress --- .../pycroscope/annotations_forward_refs.toml | 6 ++-- .../pycroscope/callables_annotation.toml | 6 ---- .../pycroscope/callables_protocol.toml | 26 --------------- .../results/pycroscope/classes_classvar.toml | 2 +- .../pycroscope/constructors_call_init.toml | 20 ++++++------ .../constructors_call_metaclass.toml | 8 ++--- .../pycroscope/constructors_call_new.toml | 32 +++++++++---------- .../results/pycroscope/dataclasses_final.toml | 14 +++++--- .../dataclasses_transform_class.toml | 2 -- .../dataclasses_transform_field.toml | 4 --- .../dataclasses_transform_func.toml | 2 -- .../dataclasses_transform_meta.toml | 2 -- .../results/pycroscope/dataclasses_usage.toml | 3 ++ .../pycroscope/directives_deprecated.toml | 2 +- .../results/pycroscope/enums_behaviors.toml | 12 ++----- .../pycroscope/enums_member_values.toml | 8 +---- .../results/pycroscope/enums_members.toml | 16 +++++----- .../pycroscope/generics_base_class.toml | 4 +-- .../results/pycroscope/generics_basic.toml | 11 +++++++ .../generics_paramspec_semantics.toml | 4 +-- .../pycroscope/generics_self_advanced.toml | 15 +++++---- .../pycroscope/generics_self_basic.toml | 10 +++--- .../pycroscope/generics_self_usage.toml | 4 ++- .../generics_syntax_infer_variance.toml | 14 ++++++-- .../pycroscope/generics_type_erasure.toml | 12 +++---- .../generics_typevartuple_basic.toml | 4 +++ .../generics_typevartuple_overloads.toml | 4 +-- .../pycroscope/literals_interactions.toml | 4 +-- .../pycroscope/literals_literalstring.toml | 2 -- .../results/pycroscope/overloads_basic.toml | 4 +-- .../pycroscope/overloads_definitions.toml | 25 +++++++-------- .../pycroscope/overloads_evaluation.toml | 20 +----------- .../pycroscope/protocols_class_objects.toml | 6 ---- .../pycroscope/protocols_definition.toml | 16 ---------- .../pycroscope/protocols_explicit.toml | 4 --- .../results/pycroscope/protocols_merging.toml | 14 +++----- .../results/pycroscope/protocols_modules.toml | 4 --- .../pycroscope/protocols_recursive.toml | 6 ---- .../pycroscope/protocols_subtyping.toml | 12 ------- .../pycroscope/qualifiers_annotated.toml | 6 ++-- .../qualifiers_final_annotation.toml | 29 +++++++++-------- .../qualifiers_final_decorator.toml | 22 ++++++------- conformance/results/results.html | 12 +++---- 43 files changed, 165 insertions(+), 268 deletions(-) diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index d0cdc84b0..8ddd2423d 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -7,7 +7,7 @@ Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] -Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation]'] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] """ output = """ @@ -38,7 +38,7 @@ output = """ ./annotations_forward_refs.py:54:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] -./annotations_forward_refs.py:87:7: Unrecognized annotation (self) -> None [invalid_annotation] -./annotations_forward_refs.py:89:7: Unrecognized annotation (self) -> None [invalid_annotation] +./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] +./annotations_forward_refs.py:89:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] ./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 2c8c0fe25..ee7539a86 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,10 +4,7 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 147: Unexpected errors ['./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 (Protocol with members ) [incompatible_assignment]'] Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] -Line 151: Unexpected errors ['./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 (Protocol with members ) [incompatible_assignment]'] -Line 153: Unexpected errors ['./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 (Protocol with members ) [incompatible_assignment]'] Line 155: Unexpected errors ['./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation]'] """ output = """ @@ -19,10 +16,7 @@ output = """ ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] -./callables_annotation.py:147:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto1 (Protocol with members ) [incompatible_assignment] ./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation] -./callables_annotation.py:151:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> None, got ./callables_annotation.py.Proto2 (Protocol with members ) [incompatible_assignment] -./callables_annotation.py:153:4: Incompatible assignment: expected (...) -> None, got ./callables_annotation.py.Proto3 (Protocol with members ) [incompatible_assignment] ./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation] ./callables_annotation.py:159:10: Object Proto5 does not support subscripting [unsupported_operation] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index df0a7d3b1..c86d4d300 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -16,39 +16,13 @@ Line 238: Expected 1 errors Line 260: Expected 1 errors Line 284: Expected 1 errors Line 311: Expected 1 errors -Line 14: Unexpected errors ['./callables_protocol.py:14:4: Function may exit without returning a value [missing_return]'] -Line 101: Unexpected errors ['./callables_protocol.py:101:4: Function may exit without returning a value [missing_return]'] -Line 125: Unexpected errors ['./callables_protocol.py:125:4: Function may exit without returning a value [missing_return]'] Line 135: Unexpected errors ['./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation]'] Line 144: Unexpected errors ['./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation]'] -Line 156: Unexpected errors ['./callables_protocol.py:156:4: Function may exit without returning a value [missing_return]'] -Line 179: Unexpected errors ['./callables_protocol.py:179:4: Function may exit without returning a value [missing_return]'] Line 184: Unexpected errors ['./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation]'] -Line 220: Unexpected errors ['./callables_protocol.py:220:4: Function may exit without returning a value [missing_return]'] -Line 224: Unexpected errors ['./callables_protocol.py:224:0: Function may exit without returning a value [missing_return]'] -Line 228: Unexpected errors ['./callables_protocol.py:228:0: Function may exit without returning a value [missing_return]'] -Line 232: Unexpected errors ['./callables_protocol.py:232:0: Function may exit without returning a value [missing_return]'] -Line 265: Unexpected errors ['./callables_protocol.py:265:4: Function may exit without returning a value [missing_return]'] -Line 271: Unexpected errors ['./callables_protocol.py:271:4: Function may exit without returning a value [missing_return]'] -Line 292: Unexpected errors ['./callables_protocol.py:292:4: Function may exit without returning a value [missing_return]'] -Line 298: Unexpected errors ['./callables_protocol.py:298:4: Function may exit without returning a value [missing_return]'] """ output = """ -./callables_protocol.py:14:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:101:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:125:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation] ./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation] -./callables_protocol.py:156:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:179:4: Function may exit without returning a value [missing_return] ./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation] -./callables_protocol.py:220:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:224:0: Function may exit without returning a value [missing_return] -./callables_protocol.py:228:0: Function may exit without returning a value [missing_return] -./callables_protocol.py:232:0: Function may exit without returning a value [missing_return] -./callables_protocol.py:265:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:271:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:292:4: Function may exit without returning a value [missing_return] -./callables_protocol.py:298:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index eff7c1791..0ffd234ea 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -17,7 +17,7 @@ output = """ ./classes_classvar.py:39:10: Invalid type annotation 3 [invalid_annotation] ./classes_classvar.py:40:13: Undefined name: var [undefined_name] ./classes_classvar.py:52:4: Incompatible assignment: expected list[str], got Literal[{}] [incompatible_assignment] -./classes_classvar.py:54:10: Unrecognized subscripted annotation: typing.Final [invalid_annotation] +./classes_classvar.py:54:10: Final cannot be combined with ClassVar [invalid_annotation] ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 452982710..d7fd8b31c 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -5,14 +5,14 @@ Line 107: Expected 1 errors Line 130: Expected 1 errors Line 19: Unexpected errors ['./constructors_call_init.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] Line 20: Unexpected errors ['./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] -Line 24: Unexpected errors ["./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation]'] -Line 25: Unexpected errors ["./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation]'] +Line 24: Unexpected errors ["./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation]'] +Line 25: Unexpected errors ["./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation]'] Line 37: Unexpected errors ['./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation]'] Line 55: Unexpected errors ['./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation]'] -Line 72: Unexpected errors ["./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation]'] +Line 72: Unexpected errors ["./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation]'] Line 73: Unexpected errors ['./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation]', './constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation]'] -Line 74: Unexpected errors ["./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation]'] -Line 75: Unexpected errors ["./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation]'] +Line 74: Unexpected errors ["./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation]'] +Line 75: Unexpected errors ["./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation]'] Line 91: Unexpected errors ["./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation]'] Line 92: Unexpected errors ['./constructors_call_init.py:92:12: Object Class6 does not support subscripting [unsupported_operation]', './constructors_call_init.py:92:37: Object Class6 does not support subscripting [unsupported_operation]'] Line 99: Unexpected errors ["./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation]'] @@ -24,20 +24,20 @@ output = """ ./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_init.py:21:0: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation] ./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation] ./constructors_call_init.py:56:0: Object Class4 does not support subscripting [unsupported_operation] -./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] +./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] ./constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation] ./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation] ./constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation] -./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] +./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] ./constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation] -./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] +./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] ./constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation] ./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index 39fb8010a..0c2e0db35 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -2,11 +2,11 @@ conformance_automated = "Fail" errors_diff = """ Line 54: Expected 1 errors Line 68: Expected 1 errors -Line 26: Unexpected errors ["./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 26: Unexpected errors ["./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] +Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] """ output = """ -./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never -./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never +./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 4e730a88a..bfb3bc3c8 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -2,14 +2,14 @@ conformance_automated = "Fail" errors_diff = """ Line 19: Unexpected errors ['./constructors_call_new.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] Line 20: Unexpected errors ['./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] -Line 23: Unexpected errors ["./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation]'] -Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation]'] -Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] -Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] -Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] -Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 23: Unexpected errors ["./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation]'] +Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation]'] +Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] +Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] +Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] +Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] +Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 130: Unexpected errors ['./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation]'] @@ -22,19 +22,19 @@ output = """ ./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation] ./constructors_call_new.py:21:0: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation] -./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=)), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation] -./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int -./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int +./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never -./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=AnyValue(source=))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never +./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation] ./constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index 36aba1dc0..ef5b1a8b2 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -1,10 +1,14 @@ conformance_automated = "Fail" errors_diff = """ -Line 27: Expected 1 errors -Line 35: Expected 1 errors -Line 36: Expected 1 errors -Line 37: Expected 1 errors -Line 38: Expected 1 errors +Line 16: Unexpected errors ['./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation]'] +Line 18: Unexpected errors ['./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation]'] """ output = """ +./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation] +./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation] +./dataclasses_final.py:27:0: Cannot assign to final name final_classvar [incompatible_assignment] +./dataclasses_final.py:35:0: Cannot assign to final name final_no_default [incompatible_assignment] +./dataclasses_final.py:36:0: Cannot assign to final name final_with_default [incompatible_assignment] +./dataclasses_final.py:37:0: Cannot assign to final name final_no_default [incompatible_assignment] +./dataclasses_final.py:38:0: Cannot assign to final name final_with_default [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 5cd0606f3..934d6e9f2 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -6,10 +6,8 @@ Line 66: Expected 1 errors Line 72: Expected 1 errors Line 82: Expected 1 errors Line 122: Expected 1 errors -Line 17: Unexpected errors ['./dataclasses_transform_class.py:17:0: Function may exit without returning a value [missing_return]'] Line 102: Unexpected errors ['./dataclasses_transform_class.py:102:22: Object GenericModelBase does not support subscripting [unsupported_operation]'] """ output = """ -./dataclasses_transform_class.py:17:0: Function may exit without returning a value [missing_return] ./dataclasses_transform_class.py:102:22: Object GenericModelBase does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_field.toml b/conformance/results/pycroscope/dataclasses_transform_field.toml index 1983f8a5a..47dcdb0bf 100644 --- a/conformance/results/pycroscope/dataclasses_transform_field.toml +++ b/conformance/results/pycroscope/dataclasses_transform_field.toml @@ -2,10 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 64: Expected 1 errors Line 75: Expected 1 errors -Line 35: Unexpected errors ['./dataclasses_transform_field.py:35:0: Function may exit without returning a value [missing_return]'] -Line 44: Unexpected errors ['./dataclasses_transform_field.py:44:0: Function may exit without returning a value [missing_return]'] """ output = """ -./dataclasses_transform_field.py:35:0: Function may exit without returning a value [missing_return] -./dataclasses_transform_field.py:44:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_func.toml b/conformance/results/pycroscope/dataclasses_transform_func.toml index 032673172..ec9648a77 100644 --- a/conformance/results/pycroscope/dataclasses_transform_func.toml +++ b/conformance/results/pycroscope/dataclasses_transform_func.toml @@ -6,8 +6,6 @@ Line 64: Expected 1 errors Line 70: Expected 1 errors Line 96: Expected 1 errors Lines 88, 89: Expected error (tag 'Customer3Subclass') -Line 28: Unexpected errors ['./dataclasses_transform_func.py:28:0: Function may exit without returning a value [missing_return]'] """ output = """ -./dataclasses_transform_func.py:28:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_meta.toml b/conformance/results/pycroscope/dataclasses_transform_meta.toml index 0bc0ee730..23f707a1e 100644 --- a/conformance/results/pycroscope/dataclasses_transform_meta.toml +++ b/conformance/results/pycroscope/dataclasses_transform_meta.toml @@ -6,8 +6,6 @@ Line 66: Expected 1 errors Line 73: Expected 1 errors Line 83: Expected 1 errors Line 103: Expected 1 errors -Line 15: Unexpected errors ['./dataclasses_transform_meta.py:15:0: Function may exit without returning a value [missing_return]'] """ output = """ -./dataclasses_transform_meta.py:15:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 2183ec5d3..a23ae35e4 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -10,6 +10,7 @@ Line 179: Expected 1 errors Lines 58, 60, 61: Expected error (tag 'DC1') Lines 64, 66, 67: Expected error (tag 'DC2') Lines 70, 72, 73: Expected error (tag 'DC3') +Line 22: Unexpected errors ["./dataclasses_usage.py:22:33: ./dataclasses_usage.py.InventoryItem has no attribute 'quantity_on_hand' [undefined_attribute]", "./dataclasses_usage.py:22:15: ./dataclasses_usage.py.InventoryItem has no attribute 'unit_price' [undefined_attribute]"] Line 35: Unexpected errors ["./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute]"] Line 38: Unexpected errors ["./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute]"] Line 39: Unexpected errors ["./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute]"] @@ -25,6 +26,8 @@ Line 216: Unexpected errors ['./dataclasses_usage.py:216:11: Object DC16 does no Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] """ output = """ +./dataclasses_usage.py:22:33: ./dataclasses_usage.py.InventoryItem has no attribute 'quantity_on_hand' [undefined_attribute] +./dataclasses_usage.py:22:15: ./dataclasses_usage.py.InventoryItem has no attribute 'unit_price' [undefined_attribute] ./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute] ./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute] ./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute] diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 8763095ca..cdb9ea34b 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -14,7 +14,7 @@ Line 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_depre """ output = """ ./directives_deprecated.py:58:0: Annotated[./directives_deprecated.py.Invocable, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=AnyValue(source=))] is not callable [not_callable] -./directives_deprecated.py:90:4: @override decorator in invalid location [invalid_override_decorator] +./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] ./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] ./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/enums_behaviors.toml b/conformance/results/pycroscope/enums_behaviors.toml index dd0f267aa..9c5760510 100644 --- a/conformance/results/pycroscope/enums_behaviors.toml +++ b/conformance/results/pycroscope/enums_behaviors.toml @@ -1,16 +1,8 @@ conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors -Lines 27, 28: Expected exactly one error (tag 'red') -Line 20: Unexpected errors ['./enums_behaviors.py:20:16: Any[generic_argument] is not equivalent to ./enums_behaviors.py.Color'] -Line 27: Unexpected errors ['./enums_behaviors.py:27:12: Any[error] is not equivalent to ./enums_behaviors.py.Color', './enums_behaviors.py:27:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call]'] -Line 28: Unexpected errors ['./enums_behaviors.py:28:12: Any[error] is not equivalent to Literal[1]', './enums_behaviors.py:28:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call]'] """ output = """ -./enums_behaviors.py:20:16: Any[generic_argument] is not equivalent to ./enums_behaviors.py.Color -./enums_behaviors.py:27:12: Any[error] is not equivalent to ./enums_behaviors.py.Color -./enums_behaviors.py:27:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call] -./enums_behaviors.py:28:12: Any[error] is not equivalent to Literal[1] -./enums_behaviors.py:28:12: In call to enum.EnumType.__getitem__: Takes 2 positional arguments but 3 were given [incompatible_call] -./enums_behaviors.py:32:12: Annotated[./enums_behaviors.py.Color, HasAttrExtension(attribute_name=KnownValue(val='RED'), attribute_type=KnownValue(val=1)), HasAttrExtension(attribute_name=KnownValue(val='GREEN'), attribute_type=KnownValue(val=2)), HasAttrExtension(attribute_name=KnownValue(val='BLUE'), attribute_type=KnownValue(val=3))] is not equivalent to Literal[3] +./enums_behaviors.py:27:12: Literal[] is not equivalent to ./enums_behaviors.py.Color +./enums_behaviors.py:32:12: ./enums_behaviors.py.Color is not equivalent to Literal[] """ diff --git a/conformance/results/pycroscope/enums_member_values.toml b/conformance/results/pycroscope/enums_member_values.toml index 0d1af05c1..be7841f1d 100644 --- a/conformance/results/pycroscope/enums_member_values.toml +++ b/conformance/results/pycroscope/enums_member_values.toml @@ -4,15 +4,9 @@ Line 78: Expected 1 errors Line 85: Expected 1 errors """ output = """ -./enums_member_values.py:21:12: Any[error] is not equivalent to Literal[1] -./enums_member_values.py:21:12: Literal[1] has no attribute '_value_' [undefined_attribute] -./enums_member_values.py:22:12: Any[error] is not equivalent to Literal[1] -./enums_member_values.py:22:12: Literal[1] has no attribute 'value' [undefined_attribute] -./enums_member_values.py:26:16: Any[error] is not equivalent to Literal[1, 3] -./enums_member_values.py:26:16: Literal[1] has no attribute 'value' [undefined_attribute] ./enums_member_values.py:30:16: Any[explicit] is not equivalent to Literal[1, 2, 3] ./enums_member_values.py:54:12: Any[error] is not equivalent to Literal[1] ./enums_member_values.py:54:12: Literal[(1, 3.303e+23, 2439700.0)] has no attribute 'value' [undefined_attribute] ./enums_member_values.py:68:12: Any[explicit] is not equivalent to Literal[1] -./enums_member_values.py:96:12: Any[from_another] is not equivalent to int +./enums_member_values.py:96:12: Literal[Ellipsis] is not equivalent to int """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 660012a70..1d9c9deb2 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -7,26 +7,26 @@ Line 84: Expected 1 errors Line 85: Expected 1 errors Line 29: Unexpected errors ["./enums_members.py:29:12: Literal[('felis', 'catus')] is not equivalent to Literal['felis', 'catus']"] Line 30: Unexpected errors ["./enums_members.py:30:12: Literal[('canis', 'lupus')] is not equivalent to Literal['canis', 'lupus']"] -Line 35: Unexpected errors ['./enums_members.py:35:12: Any[from_another] is not equivalent to str'] -Line 36: Unexpected errors ['./enums_members.py:36:12: Any[from_another] is not equivalent to str'] +Line 75: Unexpected errors ["./enums_members.py:75:24: Comparison between objects that do not overlap: ./enums_members.py.Pet4 and Literal[('felis', 'catus')] [unsafe_comparison]"] Line 77: Unexpected errors ['./enums_members.py:77:4: Name Nested is already defined [class_variable_redefinition]'] +Line 97: Unexpected errors ['./enums_members.py:97:12: Undefined name: YELLOW [undefined_name]'] Line 115: Unexpected errors ['./enums_members.py:115:12: enum.member[Literal[1]] is not equivalent to Any[unannotated]'] -Line 117: Unexpected errors ['./enums_members.py:117:12: enum.member[(self) -> None] is not equivalent to Any[unannotated]'] +Line 117: Unexpected errors ['./enums_members.py:117:12: enum.member[(self: ./enums_members.py.Example) -> None] is not equivalent to Any[unannotated]'] Line 128: Unexpected errors ["./enums_members.py:128:20: Example2 has no attribute '__B' [undefined_attribute]"] """ output = """ ./enums_members.py:29:12: Literal[('felis', 'catus')] is not equivalent to Literal['felis', 'catus'] ./enums_members.py:30:12: Literal[('canis', 'lupus')] is not equivalent to Literal['canis', 'lupus'] -./enums_members.py:35:12: Any[from_another] is not equivalent to str -./enums_members.py:36:12: Any[from_another] is not equivalent to str +./enums_members.py:75:24: Comparison between objects that do not overlap: ./enums_members.py.Pet4 and Literal[('felis', 'catus')] [unsafe_comparison] ./enums_members.py:77:4: Name Nested is already defined [class_variable_redefinition] +./enums_members.py:97:12: Undefined name: YELLOW [undefined_name] ./enums_members.py:115:12: enum.member[Literal[1]] is not equivalent to Any[unannotated] ./enums_members.py:116:12: enum.nonmember[Literal[2]] is not equivalent to Any[unannotated] -./enums_members.py:117:12: enum.member[(self) -> None] is not equivalent to Any[unannotated] +./enums_members.py:117:12: enum.member[(self: ./enums_members.py.Example) -> None] is not equivalent to Any[unannotated] ./enums_members.py:128:20: Example2 has no attribute '__B' [undefined_attribute] ./enums_members.py:128:20: Revealed type is 'Any[error]' [reveal_type] ./enums_members.py:129:20: Example2 has no attribute '__B' [undefined_attribute] ./enums_members.py:129:42: Example2 has no attribute '__B' [undefined_attribute] -./enums_members.py:146:12: Literal[2] is not equivalent to int -./enums_members.py:147:12: Literal[3] is not equivalent to int +./enums_members.py:146:12: Literal[] is not equivalent to int +./enums_members.py:147:12: Literal[] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index 9e03f42b4..1221b9f7a 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -4,14 +4,14 @@ Line 26: Expected 1 errors Line 29: Expected 1 errors Line 30: Expected 1 errors Line 68: Expected 1 errors -Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int]'] +Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[generic_argument] is not equivalent to collections.abc.Iterator[int]'] Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool'] Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[from_another] is not equivalent to int'] Line 84: Unexpected errors ['./generics_base_class.py:84:12: Object Parent1 does not support subscripting [unsupported_operation]', './generics_base_class.py:84:29: Object Parent2 does not support subscripting [unsupported_operation]'] Line 97: Unexpected errors ['./generics_base_class.py:97:13: Object Grandparent does not support subscripting [unsupported_operation]'] """ output = """ -./generics_base_class.py:45:16: Any[multiple_overload_matches] is not equivalent to collections.abc.Iterator[int] +./generics_base_class.py:45:16: Any[generic_argument] is not equivalent to collections.abc.Iterator[int] ./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool ./generics_base_class.py:49:21: Object LinkedList does not support subscripting [unsupported_operation] ./generics_base_class.py:58:16: Any[from_another] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 4856fde19..31bc376cd 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -9,6 +9,10 @@ Line 163: Expected 1 errors Line 171: Expected 1 errors Line 172: Expected 1 errors Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] +Line 92: Unexpected errors ["./generics_basic.py:92:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute]", "./generics_basic.py:92:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute]"] +Line 96: Unexpected errors ["./generics_basic.py:96:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute]", "./generics_basic.py:96:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute]"] +Line 97: Unexpected errors ["./generics_basic.py:97:15: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute]"] +Line 100: Unexpected errors ["./generics_basic.py:100:8: ./generics_basic.py.LoggedVar has no attribute 'logger' [undefined_attribute]", "./generics_basic.py:100:41: ./generics_basic.py.LoggedVar has no attribute 'name' [undefined_attribute]"] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int'] Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] @@ -21,6 +25,13 @@ output = """ ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] +./generics_basic.py:92:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute] +./generics_basic.py:92:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] +./generics_basic.py:96:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute] +./generics_basic.py:96:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] +./generics_basic.py:97:15: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] +./generics_basic.py:100:8: ./generics_basic.py.LoggedVar has no attribute 'logger' [undefined_attribute] +./generics_basic.py:100:41: ./generics_basic.py.LoggedVar has no attribute 'name' [undefined_attribute] ./generics_basic.py:106:20: Any[from_another] is not equivalent to int ./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index 85587a456..4e34d5678 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -1,6 +1,6 @@ conformance_automated = "Fail" errors_diff = """ -Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation]'] +Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_paramspec_semantics.py.Y', literal_only=False)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation]'] Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str'] """ output = """ @@ -8,7 +8,7 @@ output = """ ./generics_paramspec_semantics.py:27:8: Incompatible argument type for b: expected bool but got Literal['A'] [incompatible_argument] ./generics_paramspec_semantics.py:46:5: Cannot resolve type variables [incompatible_call] ./generics_paramspec_semantics.py:61:0: Cannot resolve type variables [incompatible_call] -./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_paramspec_semantics.py.Y', literal_only=False)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation] ./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str ./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index f38a585b6..71b71b4c8 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -2,15 +2,18 @@ conformance_automated = "Fail" errors_diff = """ Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA', "./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute]"] -Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT]'] -Line 42: Unexpected errors ['./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT]'] -Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT]'] +Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: Any[error] is not equivalent to list[~SelfT]', "./generics_self_advanced.py:36:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute]"] +Line 37: Unexpected errors ["./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute]"] +Line 38: Unexpected errors ["./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB has no attribute 'method1' [undefined_attribute]"] +Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT]'] """ output = """ ./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA ./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA ./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute] -./generics_self_advanced.py:36:20: Any[from_another] is not equivalent to list[~SelfT] -./generics_self_advanced.py:42:20: Any[unannotated] is not equivalent to type[~SelfT] -./generics_self_advanced.py:43:20: Any[from_another] is not equivalent to list[~SelfT] +./generics_self_advanced.py:36:20: Any[error] is not equivalent to list[~SelfT] +./generics_self_advanced.py:36:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute] +./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute] +./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB has no attribute 'method1' [undefined_attribute] +./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 0ef0e1b61..c98f5ed85 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,24 +2,22 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors -Line 27: Unexpected errors ['./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT]'] Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape'] Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle', "./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute]"] -Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] -Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] +Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] +Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 75: Unexpected errors ['./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation]'] Line 76: Unexpected errors ['./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation]'] Line 84: Unexpected errors ['./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation]'] """ output = """ -./generics_self_basic.py:27:20: Any[unannotated] is not equivalent to type[~SelfT] ./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape ./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle ./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute] ./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape -./generics_self_basic.py:54:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] +./generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle -./generics_self_basic.py:55:12: classmethod[Any[generic_argument], (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] +./generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] ./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation] ./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 17ba274c3..254bc2d7c 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -1,5 +1,6 @@ conformance_automated = "Fail" errors_diff = """ +Line 73: Expected 1 errors Line 76: Expected 1 errors Line 82: Expected 1 errors Line 87: Expected 1 errors @@ -10,9 +11,10 @@ Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors Line 67: Unexpected errors ['./generics_self_usage.py:67:4: Name Inner is already defined [class_variable_redefinition]'] +Line 93: Unexpected errors ["./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child has no attribute 'return_concrete_type' [undefined_attribute]"] """ output = """ ./generics_self_usage.py:67:4: Name Inner is already defined [class_variable_redefinition] -./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] +./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child has no attribute 'return_concrete_type' [undefined_attribute] ./generics_self_usage.py:103:10: Object Bar does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index bcf494f8b..1d387ec56 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,11 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument]"] +Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument]", './generics_syntax_infer_variance.py:28:8: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument]', './generics_syntax_infer_variance.py:28:36: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument]'] Line 46: Unexpected errors ['./generics_syntax_infer_variance.py:46:8: Cannot call overloaded function [incompatible_argument]', './generics_syntax_infer_variance.py:46:36: Cannot call overloaded function [incompatible_argument]'] Line 55: Unexpected errors ['./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]'] +Line 81: Unexpected errors ["./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5 has no attribute '_x' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]'] Line 95: Unexpected errors ['./generics_syntax_infer_variance.py:95:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:95:35: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]'] -Line 108: Unexpected errors ['./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition]'] +Line 105: Unexpected errors ["./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1 has no attribute '_value' [undefined_attribute]"] +Line 121: Unexpected errors ["./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2 has no attribute '_value' [undefined_attribute]"] Line 166: Unexpected errors ['./generics_syntax_infer_variance.py:166:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:166:42: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]'] """ output = """ @@ -13,8 +15,12 @@ output = """ ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] ./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] +./generics_syntax_infer_variance.py:28:8: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] +./generics_syntax_infer_variance.py:28:36: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] ./generics_syntax_infer_variance.py:29:53: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] ./generics_syntax_infer_variance.py:29:27: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] +./generics_syntax_infer_variance.py:29:8: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] +./generics_syntax_infer_variance.py:29:34: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] ./generics_syntax_infer_variance.py:46:8: Cannot call overloaded function [incompatible_argument] ./generics_syntax_infer_variance.py:46:36: Cannot call overloaded function [incompatible_argument] ./generics_syntax_infer_variance.py:47:8: Cannot call overloaded function [incompatible_argument] @@ -23,6 +29,7 @@ output = """ ./generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:56:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:56:34: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5 has no attribute '_x' [undefined_attribute] ./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:85:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] @@ -31,11 +38,12 @@ output = """ ./generics_syntax_infer_variance.py:95:35: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:96:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:96:33: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:108:4: Name value is already defined [class_variable_redefinition] +./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1 has no attribute '_value' [undefined_attribute] ./generics_syntax_infer_variance.py:112:9: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:112:37: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:113:9: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:113:35: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2 has no attribute '_value' [undefined_attribute] ./generics_syntax_infer_variance.py:127:9: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:127:37: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:128:9: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index e2be12c2f..38f03a398 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -3,9 +3,9 @@ errors_diff = """ Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 17: Unexpected errors ["./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation]'] -Line 18: Unexpected errors ["./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation]'] -Line 19: Unexpected errors ["./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation]'] +Line 17: Unexpected errors ["./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation]'] +Line 18: Unexpected errors ["./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation]'] +Line 19: Unexpected errors ["./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation]'] Line 21: Unexpected errors ['./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int'] Line 27: Unexpected errors ['./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation]'] Line 28: Unexpected errors ['./generics_type_erasure.py:28:16: Object Node does not support subscripting [unsupported_operation]'] @@ -21,11 +21,11 @@ Line 47: Unexpected errors ['./generics_type_erasure.py:47:12: Any[from_anothe Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int', './generics_type_erasure.py:48:12: Object Node does not support subscripting [unsupported_operation]'] """ output = """ -./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation] ./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int ./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index ab3c5215f..6459b9c12 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -13,10 +13,14 @@ Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] +Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] +Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] """ output = """ ./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] +./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] +./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_overloads.toml b/conformance/results/pycroscope/generics_typevartuple_overloads.toml index 782510eff..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/generics_typevartuple_overloads.toml +++ b/conformance/results/pycroscope/generics_typevartuple_overloads.toml @@ -1,7 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 25: Unexpected errors ['./generics_typevartuple_overloads.py:25:4: Function may exit without returning a value [missing_return]'] """ output = """ -./generics_typevartuple_overloads.py:25:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/literals_interactions.toml b/conformance/results/pycroscope/literals_interactions.toml index 3440ddf03..70a4ad0c4 100644 --- a/conformance/results/pycroscope/literals_interactions.toml +++ b/conformance/results/pycroscope/literals_interactions.toml @@ -1,11 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 45: Unexpected errors ['./literals_interactions.py:45:0: Function may exit without returning a value [missing_return]'] """ output = """ ./literals_interactions.py:15:4: Tuple index out of range: Literal[5] [incompatible_call] ./literals_interactions.py:16:4: Tuple index out of range: Literal[-5] [incompatible_call] ./literals_interactions.py:17:4: Tuple index out of range: Literal[4] [incompatible_call] ./literals_interactions.py:18:4: Tuple index out of range: Literal[-4] [incompatible_call] -./literals_interactions.py:45:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/literals_literalstring.toml b/conformance/results/pycroscope/literals_literalstring.toml index 03c594a9b..bd9901ea1 100644 --- a/conformance/results/pycroscope/literals_literalstring.toml +++ b/conformance/results/pycroscope/literals_literalstring.toml @@ -3,7 +3,6 @@ errors_diff = """ Line 36: Expected 1 errors Line 37: Expected 1 errors Line 63: Unexpected errors ['./literals_literalstring.py:63:16: str is not equivalent to LiteralString'] -Line 161: Unexpected errors ['./literals_literalstring.py:161:0: Function may exit without returning a value [missing_return]'] """ output = """ ./literals_literalstring.py:43:4: Incompatible assignment: expected Literal[''], got Literal['two'] [incompatible_assignment] @@ -13,6 +12,5 @@ output = """ ./literals_literalstring.py:75:4: Incompatible assignment: expected LiteralString, got Literal[b'test'] [incompatible_assignment] ./literals_literalstring.py:120:21: Incompatible argument type for s: expected ~TLiteral: LiteralString but got str [incompatible_argument] ./literals_literalstring.py:134:50: Incompatible argument type for value: expected ~T: LiteralString but got str [incompatible_argument] -./literals_literalstring.py:161:0: Function may exit without returning a value [missing_return] ./literals_literalstring.py:171:4: Incompatible assignment: expected list[str], got list[LiteralString] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/overloads_basic.toml b/conformance/results/pycroscope/overloads_basic.toml index b6e5eb4e1..591f6f431 100644 --- a/conformance/results/pycroscope/overloads_basic.toml +++ b/conformance/results/pycroscope/overloads_basic.toml @@ -1,8 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 56: Unexpected errors ['./overloads_basic.py:56:0: Function may exit without returning a value [missing_return]'] """ output = """ ./overloads_basic.py:36:0: Cannot call overloaded function [incompatible_argument] -./overloads_basic.py:56:0: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/overloads_definitions.toml b/conformance/results/pycroscope/overloads_definitions.toml index 5b9460beb..8b376847f 100644 --- a/conformance/results/pycroscope/overloads_definitions.toml +++ b/conformance/results/pycroscope/overloads_definitions.toml @@ -1,19 +1,16 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Lines 15, 16: Expected error (tag 'func1') -Lines 27, 28: Expected error (tag 'func2') -Lines 58, 59: Expected error (tag 'not_abstract') -Lines 71, 73, 78, 81: Expected exactly one error (tag 'func5') -Lines 122, 123, 124, 128: Expected error (tag 'invalid_final') -Lines 137, 138, 139, 143, 144: Expected error (tag 'invalid_final_2') -Lines 175, 180, 181, 186, 188: Expected error (tag 'override-final') -Lines 226, 227, 228, 231, 232: Expected error (tag 'override_impl') -Line 73: Unexpected errors ["./overloads_definitions.py:73:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload]"] -Line 78: Unexpected errors ["./overloads_definitions.py:78:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload]"] """ output = """ -./overloads_definitions.py:73:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload] -./overloads_definitions.py:78:4: Overload for 'func5' is inconsistent with implementation [inconsistent_overload] -./overloads_definitions.py:84:5: Incompatible argument type for func: expected (...) -> Any[explicit] but got classmethod[.../tests/overloads_definitions.py.C, (x: int, /) -> Any[unannotated], int] [incompatible_argument] +./overloads_definitions.py:16:0: At least two overload signatures are required [invalid_annotation] +./overloads_definitions.py:28:0: Overloaded function is missing an implementation [invalid_annotation] +./overloads_definitions.py:59:4: Overloaded function is missing an implementation [invalid_annotation] +./overloads_definitions.py:81:4: Overload implementation has incompatible @staticmethod/@classmethod decorator [invalid_annotation] +./overloads_definitions.py:86:4: @staticmethod/@classmethod usage must be consistent across overloads [invalid_annotation] +./overloads_definitions.py:124:4: @final should be applied only to the overload implementation [invalid_annotation] +./overloads_definitions.py:139:4: @final should be applied only to the overload implementation [invalid_annotation] +./overloads_definitions.py:144:4: @final should be applied only to the overload implementation [invalid_annotation] +./overloads_definitions.py:186:4: Cannot override a final method [invalid_annotation] ./overloads_definitions.py:203:4: Method does not override any base method [override_does_not_override] +./overloads_definitions.py:228:4: @override decorator in invalid location [invalid_override_decorator] """ diff --git a/conformance/results/pycroscope/overloads_evaluation.toml b/conformance/results/pycroscope/overloads_evaluation.toml index 7764f8530..f04831ec5 100644 --- a/conformance/results/pycroscope/overloads_evaluation.toml +++ b/conformance/results/pycroscope/overloads_evaluation.toml @@ -1,27 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 149: Unexpected errors ["./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] -Line 153: Unexpected errors ["./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload]"] -Line 161: Unexpected errors ['./overloads_evaluation.py:161:11: Cannot call overloaded function [incompatible_argument]'] -Line 162: Unexpected errors ['./overloads_evaluation.py:162:16: Any[error] is not equivalent to Literal[0, 1]'] -Line 205: Unexpected errors ['./overloads_evaluation.py:205:11: Cannot call overloaded function [incompatible_argument]'] -Line 206: Unexpected errors ['./overloads_evaluation.py:206:16: Any[error] is not equivalent to int | str'] -Line 235: Unexpected errors ['./overloads_evaluation.py:235:16: str is not equivalent to int'] -Line 303: Unexpected errors ['./overloads_evaluation.py:303:16: Any[multiple_overload_matches] is not equivalent to float | int'] -Line 315: Unexpected errors ['./overloads_evaluation.py:315:16: Any[multiple_overload_matches] is not equivalent to float | int'] """ output = """ ./overloads_evaluation.py:38:0: Cannot call overloaded function [incompatible_call] ./overloads_evaluation.py:46:0: Cannot call overloaded function [incompatible_argument] ./overloads_evaluation.py:51:0: Cannot call overloaded function [incompatible_argument] ./overloads_evaluation.py:116:4: Cannot call overloaded function [incompatible_argument] -./overloads_evaluation.py:149:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] -./overloads_evaluation.py:153:0: Overload for 'expand_enum' is inconsistent with implementation [inconsistent_overload] -./overloads_evaluation.py:161:11: Cannot call overloaded function [incompatible_argument] -./overloads_evaluation.py:162:16: Any[error] is not equivalent to Literal[0, 1] -./overloads_evaluation.py:205:11: Cannot call overloaded function [incompatible_argument] -./overloads_evaluation.py:206:16: Any[error] is not equivalent to int | str -./overloads_evaluation.py:235:16: str is not equivalent to int -./overloads_evaluation.py:303:16: Any[multiple_overload_matches] is not equivalent to float | int -./overloads_evaluation.py:315:16: Any[multiple_overload_matches] is not equivalent to float | int """ diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index eca607810..381e8989c 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -8,12 +8,6 @@ Line 104: Expected 1 errors Line 106: Expected 1 errors Line 107: Expected 1 errors Line 108: Expected 1 errors -Line 44: Unexpected errors ['./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return]'] -Line 49: Unexpected errors ['./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return]'] -Line 64: Unexpected errors ['./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return]'] """ output = """ -./protocols_class_objects.py:44:4: Function may exit without returning a value [missing_return] -./protocols_class_objects.py:49:4: Function may exit without returning a value [missing_return] -./protocols_class_objects.py:64:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 646536780..1ef5b6646 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -21,22 +21,6 @@ Line 289: Expected 1 errors Line 339: Expected 1 errors Line 340: Expected 1 errors Line 341: Expected 1 errors -Line 44: Unexpected errors ['./protocols_definition.py:44:4: Function may exit without returning a value [missing_return]'] -Line 48: Unexpected errors ['./protocols_definition.py:48:4: Function may exit without returning a value [missing_return]'] -Line 52: Unexpected errors ['./protocols_definition.py:52:4: Function may exit without returning a value [missing_return]'] -Line 165: Unexpected errors ['./protocols_definition.py:165:4: Function may exit without returning a value [missing_return]'] -Line 223: Unexpected errors ['./protocols_definition.py:223:4: Function may exit without returning a value [missing_return]'] -Line 294: Unexpected errors ['./protocols_definition.py:294:4: Function may exit without returning a value [missing_return]'] -Line 298: Unexpected errors ['./protocols_definition.py:298:4: Name val1 is already defined [class_variable_redefinition]'] -Line 308: Unexpected errors ['./protocols_definition.py:308:4: Name val1 is already defined [class_variable_redefinition]'] """ output = """ -./protocols_definition.py:44:4: Function may exit without returning a value [missing_return] -./protocols_definition.py:48:4: Function may exit without returning a value [missing_return] -./protocols_definition.py:52:4: Function may exit without returning a value [missing_return] -./protocols_definition.py:165:4: Function may exit without returning a value [missing_return] -./protocols_definition.py:223:4: Function may exit without returning a value [missing_return] -./protocols_definition.py:294:4: Function may exit without returning a value [missing_return] -./protocols_definition.py:298:4: Name val1 is already defined [class_variable_redefinition] -./protocols_definition.py:308:4: Name val1 is already defined [class_variable_redefinition] """ diff --git a/conformance/results/pycroscope/protocols_explicit.toml b/conformance/results/pycroscope/protocols_explicit.toml index b72548688..d80bfe872 100644 --- a/conformance/results/pycroscope/protocols_explicit.toml +++ b/conformance/results/pycroscope/protocols_explicit.toml @@ -6,10 +6,6 @@ Line 60: Expected 1 errors Line 89: Expected 1 errors Line 134: Expected 1 errors Line 164: Expected 1 errors -Line 50: Unexpected errors ['./protocols_explicit.py:50:4: Function may exit without returning a value [missing_return]'] -Line 126: Unexpected errors ['./protocols_explicit.py:126:4: Function may exit without returning a value [missing_return]'] """ output = """ -./protocols_explicit.py:50:4: Function may exit without returning a value [missing_return] -./protocols_explicit.py:126:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index caf90389d..6a8744978 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -3,19 +3,15 @@ errors_diff = """ Line 53: Expected 1 errors Line 67: Expected 1 errors Line 82: Expected 1 errors -Line 18: Unexpected errors ['./protocols_merging.py:18:4: Function may exit without returning a value [missing_return]'] -Line 46: Unexpected errors ["./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] -Line 48: Unexpected errors ["./protocols_merging.py:48:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SizedAndClosable3, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] -Line 50: Unexpected errors ["./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 46: Unexpected errors ["./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 50: Unexpected errors ["./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] Line 60: Unexpected errors ["./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got ./protocols_merging.py.SizedAndClosable2 (Protocol with members ) [incompatible_assignment]"] """ output = """ -./protocols_merging.py:18:4: Function may exit without returning a value [missing_return] -./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:48:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SizedAndClosable3, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got ./protocols_merging.py.SizedAndClosable2 (Protocol with members ) [incompatible_assignment] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_modules.toml b/conformance/results/pycroscope/protocols_modules.toml index 575ff8e8e..d26457104 100644 --- a/conformance/results/pycroscope/protocols_modules.toml +++ b/conformance/results/pycroscope/protocols_modules.toml @@ -3,10 +3,6 @@ errors_diff = """ Line 26: Expected 1 errors Line 48: Expected 1 errors Line 49: Expected 1 errors -Line 38: Unexpected errors ['./protocols_modules.py:38:4: Function may exit without returning a value [missing_return]'] -Line 43: Unexpected errors ['./protocols_modules.py:43:4: Function may exit without returning a value [missing_return]'] """ output = """ -./protocols_modules.py:38:4: Function may exit without returning a value [missing_return] -./protocols_modules.py:43:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index 92f03507a..40b28b756 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,15 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 16: Unexpected errors ['./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return]'] Line 37: Unexpected errors ['./protocols_recursive.py:37:6: Object Tree does not support subscripting [unsupported_operation]'] -Line 42: Unexpected errors ['./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return]'] -Line 51: Unexpected errors ['./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return]'] Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ -./protocols_recursive.py:16:4: Function may exit without returning a value [missing_return] ./protocols_recursive.py:37:6: Object Tree does not support subscripting [unsupported_operation] -./protocols_recursive.py:42:4: Function may exit without returning a value [missing_return] -./protocols_recursive.py:51:4: Function may exit without returning a value [missing_return] ./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index d305cce5a..24aa5dc7b 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -2,33 +2,21 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors Line 55: Expected 1 errors -Line 67: Unexpected errors ['./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return]'] -Line 72: Unexpected errors ['./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return]'] Line 77: Unexpected errors ['./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation]'] Line 78: Unexpected errors ['./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation]'] -Line 88: Unexpected errors ['./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return]'] -Line 93: Unexpected errors ['./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return]'] Line 98: Unexpected errors ['./protocols_subtyping.py:98:8: Object Proto7 does not support subscripting [unsupported_operation]'] Line 99: Unexpected errors ['./protocols_subtyping.py:99:8: Object Proto7 does not support subscripting [unsupported_operation]'] Line 100: Unexpected errors ['./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation]'] -Line 110: Unexpected errors ['./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return]'] -Line 115: Unexpected errors ['./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return]'] """ output = """ ./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members ) [incompatible_assignment] -./protocols_subtyping.py:67:4: Function may exit without returning a value [missing_return] -./protocols_subtyping.py:72:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:79:8: Object Proto4 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:80:8: Object Proto5 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:88:4: Function may exit without returning a value [missing_return] -./protocols_subtyping.py:93:4: Function may exit without returning a value [missing_return] ./protocols_subtyping.py:98:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:99:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:102:8: Object Proto7 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:103:8: Object Proto7 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:110:4: Function may exit without returning a value [missing_return] -./protocols_subtyping.py:115:4: Function may exit without returning a value [missing_return] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 35c51bfe9..a698baa5f 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -7,9 +7,6 @@ Line 43: Expected 1 errors Line 44: Expected 1 errors Line 49: Expected 1 errors Line 59: Expected 1 errors -Line 86: Expected 1 errors -Line 87: Expected 1 errors -Line 88: Expected 1 errors """ output = """ ./qualifiers_annotated.py:38:6: Invalid type annotation [, ] [invalid_annotation] @@ -22,4 +19,7 @@ output = """ ./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:79:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[str, '']] [incompatible_argument] ./qualifiers_annotated.py:80:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[int, '']] [incompatible_argument] +./qualifiers_annotated.py:86:0: Annotated cannot be called [invalid_annotation] +./qualifiers_annotated.py:87:0: Annotated cannot be called [invalid_annotation] +./qualifiers_annotated.py:88:0: Annotated cannot be called [invalid_annotation] """ diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml index 3998c0a96..4d173c102 100644 --- a/conformance/results/pycroscope/qualifiers_final_annotation.toml +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -1,30 +1,31 @@ conformance_automated = "Fail" errors_diff = """ -Line 16: Expected 1 errors -Line 34: Expected 1 errors -Line 38: Expected 1 errors -Line 54: Expected 1 errors -Line 62: Expected 1 errors -Line 63: Expected 1 errors -Line 65: Expected 1 errors -Line 67: Expected 1 errors -Line 81: Expected 1 errors -Line 94: Expected 1 errors -Line 107: Expected 1 errors -Line 141: Expected 1 errors Line 166: Expected 1 errors Line 170: Expected 1 errors Line 168: Unexpected errors ["./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import]"] """ output = """ -./qualifiers_final_annotation.py:18:6: Unrecognized subscripted annotation: typing.Final [invalid_annotation] +./qualifiers_final_annotation.py:16:6: Final annotation without assignment requires an explicit type [invalid_annotation] +./qualifiers_final_annotation.py:18:6: Invalid type annotation (, ) [invalid_annotation] +./qualifiers_final_annotation.py:34:9: Final annotation without assignment requires an explicit type [invalid_annotation] +./qualifiers_final_annotation.py:34:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation] +./qualifiers_final_annotation.py:38:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation] +./qualifiers_final_annotation.py:54:8: Cannot assign to final name ID5 [incompatible_assignment] +./qualifiers_final_annotation.py:62:18: Final instance attributes may be declared only in __init__ [invalid_annotation] +./qualifiers_final_annotation.py:63:18: Final instance attributes may be declared only in __init__ [invalid_annotation] +./qualifiers_final_annotation.py:65:8: Cannot assign to final name ID7 [incompatible_assignment] +./qualifiers_final_annotation.py:67:8: Cannot assign to final name ID7 [incompatible_assignment] ./qualifiers_final_annotation.py:71:0: Cannot assign to final name RATE [incompatible_assignment] -./qualifiers_final_annotation.py:108:12: Unrecognized subscripted annotation: typing.Final [invalid_annotation] +./qualifiers_final_annotation.py:81:0: Cannot assign to final name DEFAULT_ID [incompatible_assignment] +./qualifiers_final_annotation.py:94:4: Cannot override final attribute BORDER_WIDTH [invalid_annotation] +./qualifiers_final_annotation.py:107:12: Final cannot be combined with ClassVar [invalid_annotation] +./qualifiers_final_annotation.py:108:12: Final cannot be combined with ClassVar [invalid_annotation] ./qualifiers_final_annotation.py:118:3: Unrecognized annotation typing.Final[] [invalid_annotation] ./qualifiers_final_annotation.py:121:13: Unexpected Final annotation [invalid_annotation] ./qualifiers_final_annotation.py:134:0: In call to pycroscope.signature.N: Missing required argument 'x' [incompatible_call] ./qualifiers_final_annotation.py:135:4: Incompatible argument type for x: expected int but got Literal[''] [incompatible_argument] ./qualifiers_final_annotation.py:135:10: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument] +./qualifiers_final_annotation.py:141:4: Cannot assign to final name ID1 [incompatible_assignment] ./qualifiers_final_annotation.py:145:4: Cannot assign to final name x [incompatible_assignment] ./qualifiers_final_annotation.py:147:9: Cannot assign to final name x [incompatible_assignment] ./qualifiers_final_annotation.py:149:8: Cannot assign to final name x [incompatible_assignment] diff --git a/conformance/results/pycroscope/qualifiers_final_decorator.toml b/conformance/results/pycroscope/qualifiers_final_decorator.toml index 68fc20884..1b21e63be 100644 --- a/conformance/results/pycroscope/qualifiers_final_decorator.toml +++ b/conformance/results/pycroscope/qualifiers_final_decorator.toml @@ -1,15 +1,15 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 21: Expected 1 errors -Line 56: Expected 1 errors -Line 118: Expected 1 errors -Lines 59, 60: Expected error (tag 'method2') -Lines 63, 64: Expected error (tag 'method3') -Lines 67, 68, 75: Expected error (tag 'method4') -Lines 80, 81, 89: Expected error (tag 'Derived3') -Lines 84, 85, 86: Expected error (tag 'Derived3-2') -Lines 94, 95, 102: Expected error (tag 'Derived4') -Lines 125, 126: Expected error (tag 'func') """ output = """ +./qualifiers_final_decorator.py:21:0: Cannot inherit from final class [invalid_annotation] +./qualifiers_final_decorator.py:56:4: Cannot override final attribute method1 [invalid_annotation] +./qualifiers_final_decorator.py:60:4: Cannot override final attribute method2 [invalid_annotation] +./qualifiers_final_decorator.py:64:4: Cannot override final attribute method3 [invalid_annotation] +./qualifiers_final_decorator.py:75:4: Cannot override a final method [invalid_annotation] +./qualifiers_final_decorator.py:86:4: @final should be applied only to the overload implementation [invalid_annotation] +./qualifiers_final_decorator.py:89:4: Cannot override a final method [invalid_annotation] +./qualifiers_final_decorator.py:102:4: Cannot override a final method [invalid_annotation] +./qualifiers_final_decorator.py:118:4: Cannot override final attribute method [invalid_annotation] +./qualifiers_final_decorator.py:126:0: @final is not allowed on non-method functions [invalid_annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index a402010ab..ce0e63be4 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -445,7 +445,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_typevartuple_specialization
Partial

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

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

@@ -508,7 +508,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Class type compatibility @@ -587,7 +587,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

@@ -774,7 +774,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      overloads_consistency Pass @@ -788,7 +788,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      overloads_definitions_stub
Partial

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

@@ -802,7 +802,7 @@

Python Type System Conformance Test Results

Partial

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

Pass Pass -Unknown +Pass Exceptions From b84e975ca77c78d0445aa079520314906fe323ee Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 24 Feb 2026 11:36:28 -0800 Subject: [PATCH 26/78] progress --- .../results/mypy/classes_classvar.toml | 2 +- .../results/mypy/dataclasses_final.toml | 2 - .../mypy/generics_variance_inference.toml | 4 +- .../results/mypy/literals_literalstring.toml | 6 +- conformance/results/mypy/overloads_basic.toml | 8 +- .../mypy/qualifiers_final_annotation.toml | 4 +- .../results/pycroscope/aliases_explicit.toml | 2 +- .../results/pycroscope/aliases_implicit.toml | 2 +- .../pycroscope/annotations_forward_refs.toml | 26 +---- .../pycroscope/annotations_generators.toml | 2 - .../pycroscope/annotations_typeexpr.toml | 2 +- .../pycroscope/callables_annotation.toml | 16 +-- .../constructors_call_metaclass.toml | 4 +- .../pycroscope/constructors_call_new.toml | 8 +- .../results/pycroscope/dataclasses_final.toml | 8 +- .../results/pycroscope/generics_basic.toml | 2 +- .../results/pycroscope/generics_scoping.toml | 30 +++--- .../pycroscope/generics_self_basic.toml | 17 ---- .../generics_syntax_infer_variance.toml | 4 +- .../pycroscope/generics_syntax_scoping.toml | 8 +- .../generics_typevartuple_args.toml | 20 ++-- .../generics_typevartuple_basic.toml | 4 +- .../generics_typevartuple_callable.toml | 4 +- .../pycroscope/generics_upper_bound.toml | 2 +- .../results/pycroscope/generics_variance.toml | 2 +- .../pycroscope/literals_literalstring.toml | 10 +- .../results/pyrefly/aliases_explicit.toml | 2 +- .../results/pyrefly/aliases_recursive.toml | 1 + .../pyrefly/aliases_type_statement.toml | 1 + .../pyrefly/aliases_typealiastype.toml | 12 +-- .../pyrefly/annotations_forward_refs.toml | 4 +- .../results/pyrefly/generics_scoping.toml | 8 +- .../pyrefly/literals_literalstring.toml | 2 +- .../results/pyrefly/overloads_basic.toml | 2 +- conformance/results/pyrefly/version.toml | 2 +- .../pyright/annotations_forward_refs.toml | 7 +- .../pyright/generics_variance_inference.toml | 9 +- .../pyright/literals_literalstring.toml | 2 +- .../results/pyright/overloads_basic.toml | 4 +- conformance/results/results.html | 12 +-- .../results/zuban/literals_literalstring.toml | 6 +- .../results/zuban/overloads_basic.toml | 8 +- conformance/tests/literals_literalstring.py | 7 +- conformance/tests/typeforms_typeform.py | 98 ------------------- 44 files changed, 121 insertions(+), 265 deletions(-) delete mode 100644 conformance/tests/typeforms_typeform.py diff --git a/conformance/results/mypy/classes_classvar.toml b/conformance/results/mypy/classes_classvar.toml index fd95469f5..072593eed 100644 --- a/conformance/results/mypy/classes_classvar.toml +++ b/conformance/results/mypy/classes_classvar.toml @@ -10,7 +10,6 @@ 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? [valid-type] classes_classvar.py:40: error: Name "var" is not defined [name-defined] 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 [valid-type] classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type] classes_classvar.py:69: error: ClassVar can only be used for assignments in class body [misc] @@ -32,6 +31,7 @@ errors_diff = """ Line 45: Expected 1 errors Line 46: Expected 1 errors Line 47: Expected 1 errors +Line 54: Expected 1 errors Line 67: Unexpected errors ['classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type]'] Line 130: Unexpected errors ['classes_classvar.py:130: error: All protocol members must have explicitly declared types [misc]'] """ diff --git a/conformance/results/mypy/dataclasses_final.toml b/conformance/results/mypy/dataclasses_final.toml index fdf86919a..eb917058d 100644 --- a/conformance/results/mypy/dataclasses_final.toml +++ b/conformance/results/mypy/dataclasses_final.toml @@ -7,12 +7,10 @@ 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 [misc]'] -Line 18: Unexpected errors ['dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] Line 24: Unexpected errors ['dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type]'] """ output = """ 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 [valid-type] dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type] 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] diff --git a/conformance/results/mypy/generics_variance_inference.toml b/conformance/results/mypy/generics_variance_inference.toml index b1158c7e9..ef877e1ee 100644 --- a/conformance/results/mypy/generics_variance_inference.toml +++ b/conformance/results/mypy/generics_variance_inference.toml @@ -6,6 +6,7 @@ generics_variance_inference.py:28: error: Incompatible types in assignment (expr 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:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [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] @@ -24,6 +25,7 @@ generics_variance_inference.py:170: error: Incompatible types in assignment (exp 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] """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 66: Unexpected errors ['generics_variance_inference.py:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [assignment]'] """ diff --git a/conformance/results/mypy/literals_literalstring.toml b/conformance/results/mypy/literals_literalstring.toml index 1bde97a4d..dc1470fc2 100644 --- a/conformance/results/mypy/literals_literalstring.toml +++ b/conformance/results/mypy/literals_literalstring.toml @@ -9,14 +9,14 @@ literals_literalstring.py:43: error: Incompatible types in assignment (expressio literals_literalstring.py:73: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] literals_literalstring.py:74: error: Incompatible types in assignment (expression has type "bytes", variable has type "str") [assignment] literals_literalstring.py:156: 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:166: error: Expression is of type "B", not "A" [assert-type] +literals_literalstring.py:167: error: Expression is of type "B", not "A" [assert-type] """ conformance_automated = "Fail" errors_diff = """ Line 65: Expected 1 errors Line 119: Expected 1 errors Line 133: Expected 1 errors -Line 170: Expected 1 errors +Line 171: Expected 1 errors Line 156: Unexpected errors ["literals_literalstring.py:156: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [overload-cannot-match]"] -Line 166: Unexpected errors ['literals_literalstring.py:166: error: Expression is of type "B", not "A" [assert-type]'] +Line 167: Unexpected errors ['literals_literalstring.py:167: error: Expression is of type "B", not "A" [assert-type]'] """ diff --git a/conformance/results/mypy/overloads_basic.toml b/conformance/results/mypy/overloads_basic.toml index f592ea606..e6de0f6f9 100644 --- a/conformance/results/mypy/overloads_basic.toml +++ b/conformance/results/mypy/overloads_basic.toml @@ -1,9 +1,9 @@ conformant = "Pass" output = """ -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 +overloads_basic.py:36: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload] +overloads_basic.py:36: note: Possible overload variants: +overloads_basic.py:36: note: def __getitem__(self, int, /) -> int +overloads_basic.py:36: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/mypy/qualifiers_final_annotation.toml b/conformance/results/mypy/qualifiers_final_annotation.toml index 2d0cea337..8c0830f54 100644 --- a/conformance/results/mypy/qualifiers_final_annotation.toml +++ b/conformance/results/mypy/qualifiers_final_annotation.toml @@ -20,8 +20,6 @@ qualifiers_final_annotation.py:71: error: Cannot assign to final name "RATE" [m 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:96: error: Cannot assign to final name "__private" [misc] -qualifiers_final_annotation.py:107: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] -qualifiers_final_annotation.py:108: error: Variable should not be annotated with both ClassVar and Final [misc] qualifiers_final_annotation.py:118: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:121: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name [misc] @@ -40,6 +38,8 @@ qualifiers_final_annotation.py:170: error: Cannot assign to final name "PI" [mi """ conformance_automated = "Fail" errors_diff = """ +Line 107: Expected 1 errors +Line 108: Expected 1 errors Line 149: Expected 1 errors Line 59: Unexpected errors ['qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" [misc]'] Line 96: Unexpected errors ['qualifiers_final_annotation.py:96: error: Cannot assign to final name "__private" [misc]'] diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 39af3692c..934db7750 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -16,6 +16,7 @@ Line 88: Expected 1 errors Line 89: Expected 1 errors Line 91: Expected 1 errors Line 100: Expected 1 errors +Line 101: Expected 1 errors Line 102: Expected 1 errors Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] """ @@ -24,5 +25,4 @@ output = """ ./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] -./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index d242cd6b7..54fe52781 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -11,6 +11,7 @@ Line 113: Expected 1 errors Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors +Line 133: Expected 1 errors Line 135: Expected 1 errors Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] @@ -29,5 +30,4 @@ output = """ ./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] ./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] ./aliases_implicit.py:131:12: Literal[[]] is not equivalent to list[int] -./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 8ddd2423d..2ae7acb86 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -2,26 +2,9 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors Line 25: Expected 1 errors -Line 14: Unexpected errors ['./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name]'] -Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name]'] -Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] -Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] -Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] -Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] -Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] """ output = """ -./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]] -./annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:22:6: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:23:11: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:41:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] @@ -36,9 +19,8 @@ output = """ ./annotations_forward_refs.py:52:9: Invalid type annotation -1 [invalid_annotation] ./annotations_forward_refs.py:53:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:54:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] -./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] -./annotations_forward_refs.py:89:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] -./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int +./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/annotations_generators.toml b/conformance/results/pycroscope/annotations_generators.toml index d9d0cddee..bc5dd29ce 100644 --- a/conformance/results/pycroscope/annotations_generators.toml +++ b/conformance/results/pycroscope/annotations_generators.toml @@ -5,7 +5,6 @@ Line 100: Unexpected errors ['./annotations_generators.py:100:21: Generator func Line 109: Unexpected errors ['./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return]'] Line 167: Unexpected errors ['./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] Line 174: Unexpected errors ['./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] -Line 190: Unexpected errors ['./annotations_generators.py:190:4: Cannot assign value of type None to yield expression of type int [incompatible_yield]'] """ output = """ ./annotations_generators.py:54:8: Incompatible return type: expected .../tests/annotations_generators.py.C, got Literal[False] [incompatible_return_value] @@ -22,5 +21,4 @@ output = """ ./annotations_generators.py:135:4: Cannot send int to a generator (expected str) [incompatible_yield] ./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] ./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] -./annotations_generators.py:190:4: Cannot assign value of type None to yield expression of type int [incompatible_yield] """ diff --git a/conformance/results/pycroscope/annotations_typeexpr.toml b/conformance/results/pycroscope/annotations_typeexpr.toml index 8402c85ee..b207f1610 100644 --- a/conformance/results/pycroscope/annotations_typeexpr.toml +++ b/conformance/results/pycroscope/annotations_typeexpr.toml @@ -16,5 +16,5 @@ output = """ ./annotations_typeexpr.py:97:9: Invalid type annotation True [invalid_annotation] ./annotations_typeexpr.py:98:9: Invalid type annotation 1 [invalid_annotation] ./annotations_typeexpr.py:99:9: Invalid type annotation -1 [invalid_annotation] -./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] +./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index ee7539a86..e9debe40b 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,8 +4,9 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] -Line 155: Unexpected errors ['./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation]'] +Line 152: Unexpected errors ['./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment]'] +Line 156: Unexpected errors ['./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3, got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]'] +Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6, got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -14,11 +15,12 @@ output = """ ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] -./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] -./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation] -./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation] -./callables_annotation.py:159:10: Object Proto5 does not support subscripting [unsupported_operation] +./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb2' [incompatible_assignment] +./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb4' [incompatible_assignment] +./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment] +./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3, got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] +./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6, got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:159:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto5[Any[explicit]], got .../tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] ./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index 0c2e0db35..bff3747e4 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -3,10 +3,10 @@ errors_diff = """ Line 54: Expected 1 errors Line 68: Expected 1 errors Line 26: Unexpected errors ["./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation typing.Union [invalid_annotation]'] """ output = """ ./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never ./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_metaclass.py:39:0: Unrecognized annotation typing.Union [invalid_annotation] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index bfb3bc3c8..f0d488169 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -7,9 +7,9 @@ Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./con Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] -Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation typing.Union [invalid_annotation]'] Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation typing.Union [invalid_annotation]'] Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 130: Unexpected errors ['./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation]'] @@ -32,10 +32,10 @@ output = """ ./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation] ./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int ./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_new.py:64:0: Unrecognized annotation typing.Union [invalid_annotation] ./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never ./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_new.py:89:0: Unrecognized annotation typing.Union [invalid_annotation] ./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation] ./constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation] ./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index ef5b1a8b2..a1bd83aa5 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -1,14 +1,18 @@ conformance_automated = "Fail" errors_diff = """ +Line 35: Expected 1 errors +Line 36: Expected 1 errors Line 16: Unexpected errors ['./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation]'] Line 18: Unexpected errors ['./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation]'] +Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Literal[10] is not equivalent to int'] +Line 32: Unexpected errors ["./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str"] """ output = """ ./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation] ./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation] ./dataclasses_final.py:27:0: Cannot assign to final name final_classvar [incompatible_assignment] -./dataclasses_final.py:35:0: Cannot assign to final name final_no_default [incompatible_assignment] -./dataclasses_final.py:36:0: Cannot assign to final name final_with_default [incompatible_assignment] +./dataclasses_final.py:31:12: Literal[10] is not equivalent to int +./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str ./dataclasses_final.py:37:0: Cannot assign to final name final_no_default [incompatible_assignment] ./dataclasses_final.py:38:0: Cannot assign to final name final_with_default [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 31bc376cd..01bb09fbc 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -23,7 +23,7 @@ output = """ ./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation] ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] +./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:92:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute] ./generics_basic.py:92:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] diff --git a/conformance/results/pycroscope/generics_scoping.toml b/conformance/results/pycroscope/generics_scoping.toml index 1d990bb3b..800acd33c 100644 --- a/conformance/results/pycroscope/generics_scoping.toml +++ b/conformance/results/pycroscope/generics_scoping.toml @@ -1,23 +1,19 @@ conformance_automated = "Fail" errors_diff = """ -Line 50: Expected 1 errors -Line 54: Expected 1 errors +Line 61: Expected 1 errors Line 65: Expected 1 errors -Line 75: Expected 1 errors -Line 78: Expected 1 errors -Line 87: Expected 1 errors -Line 94: Expected 1 errors -Line 95: Expected 1 errors -Line 96: Expected 1 errors -Line 14: Unexpected errors ['./generics_scoping.py:14:12: Literal[1] is not equivalent to int'] -Line 15: Unexpected errors ["./generics_scoping.py:15:12: Literal['a'] is not equivalent to str"] -Line 42: Unexpected errors ["./generics_scoping.py:42:12: Literal['abc'] is not equivalent to str"] -Line 43: Unexpected errors ["./generics_scoping.py:43:12: Literal[b'abc'] is not equivalent to bytes"] +Line 76: Expected 1 errors +Line 86: Expected 1 errors +Line 89: Expected 1 errors +Line 98: Expected 1 errors +Line 105: Expected 1 errors +Line 106: Expected 1 errors +Line 107: Expected 1 errors """ output = """ -./generics_scoping.py:14:12: Literal[1] is not equivalent to int -./generics_scoping.py:15:12: Literal['a'] is not equivalent to str -./generics_scoping.py:29:9: Incompatible argument type for x: expected int but got Literal['a'] [incompatible_argument] -./generics_scoping.py:42:12: Literal['abc'] is not equivalent to str -./generics_scoping.py:43:12: Literal[b'abc'] is not equivalent to bytes +./generics_scoping.py:15:12: Literal[1] is not equivalent to int +./generics_scoping.py:19:12: Literal['a'] is not equivalent to str +./generics_scoping.py:34:9: Incompatible argument type for x: expected int but got Literal['a'] [incompatible_argument] +./generics_scoping.py:49:12: Literal['abc'] is not equivalent to str +./generics_scoping.py:53:12: Literal[b'abc'] is not equivalent to bytes """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index c98f5ed85..6b54e0007 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,24 +2,7 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors -Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape'] -Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle', "./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute]"] -Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] -Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] -Line 75: Unexpected errors ['./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation]'] -Line 76: Unexpected errors ['./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation]'] -Line 84: Unexpected errors ['./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation]'] """ output = """ -./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape -./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle -./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute] -./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape -./generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] -./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle -./generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] -./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation] -./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation] -./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index 1d387ec56..5e0562523 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -11,8 +11,8 @@ Line 121: Unexpected errors ["./generics_syntax_infer_variance.py:121:15: ./gene Line 166: Unexpected errors ['./generics_syntax_infer_variance.py:166:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:166:42: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]'] """ output = """ -./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] ./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] ./generics_syntax_infer_variance.py:28:8: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index 0c339e7c1..b00117cd8 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -10,9 +10,7 @@ Line 31: Unexpected errors ['./generics_syntax_scoping.py:31:16: Object BaseClas Line 71: Unexpected errors ['./generics_syntax_scoping.py:71:4: Name Private is already defined [class_variable_redefinition]'] Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] -Line 110: Unexpected errors ['./generics_syntax_scoping.py:110:4: Name Inner1 is already defined [class_variable_redefinition]'] -Line 121: Unexpected errors ['./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int'] -Line 124: Unexpected errors ['./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int'] +Line 111: Unexpected errors ['./generics_syntax_scoping.py:111:8: Name Inner1 is already defined [class_variable_redefinition]'] """ output = """ ./generics_syntax_scoping.py:31:16: Object BaseClassC does not support subscripting [unsupported_operation] @@ -22,7 +20,5 @@ output = """ ./generics_syntax_scoping.py:71:4: Name Private is already defined [class_variable_redefinition] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] -./generics_syntax_scoping.py:110:4: Name Inner1 is already defined [class_variable_redefinition] -./generics_syntax_scoping.py:121:20: Literal[3j] is not equivalent to complex | float | int -./generics_syntax_scoping.py:124:24: Literal[3j] is not equivalent to complex | float | int +./generics_syntax_scoping.py:111:8: Name Inner1 is already defined [class_variable_redefinition] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 936428025..6bb1f2825 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -9,22 +9,22 @@ Line 59: Expected 1 errors Line 67: Expected 1 errors Line 75: Expected 1 errors Line 76: Expected 1 errors -Line 16: Unexpected errors ['./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] +Line 16: Unexpected errors ["./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] -Line 27: Unexpected errors ['./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation]'] +Line 27: Unexpected errors ["./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[]'] Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] -Line 42: Unexpected errors ['./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation]'] -Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation]'] -Line 62: Unexpected errors ['./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation]'] +Line 42: Unexpected errors ["./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 51: Unexpected errors ["./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 62: Unexpected errors ["./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] """ output = """ -./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] +./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] ./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation] +./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] ./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[] ./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation] -./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation] -./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation] +./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 6459b9c12..0e6c3109d 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -12,13 +12,13 @@ Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') -Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] +Line 16: Unexpected errors ["./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] """ output = """ -./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] +./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index d5670c78e..d69dce5cd 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -3,12 +3,12 @@ errors_diff = """ Line 26: Expected 1 errors Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int]'] Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str]'] -Line 45: Unexpected errors ['./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation]'] +Line 45: Unexpected errors ["./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ ./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int] ./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str] -./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation] +./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] ./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index 6b356655f..cd7503167 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -9,5 +9,5 @@ output = """ ./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int] ./generics_upper_bound.py:43:12: Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] ./generics_upper_bound.py:51:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] -./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] +./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index a93c4f496..a3e27c15d 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -21,7 +21,7 @@ Line 171: Unexpected errors ['./generics_variance.py:171:8: Object Co does not s Line 172: Unexpected errors ['./generics_variance.py:172:12: Object Contra does not support subscripting [unsupported_operation]'] """ output = """ -./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] +./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] ./generics_variance.py:38:10: Object ImmutableList does not support subscripting [unsupported_operation] ./generics_variance.py:39:11: Object ImmutableList does not support subscripting [unsupported_operation] ./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] diff --git a/conformance/results/pycroscope/literals_literalstring.toml b/conformance/results/pycroscope/literals_literalstring.toml index bd9901ea1..f7246d175 100644 --- a/conformance/results/pycroscope/literals_literalstring.toml +++ b/conformance/results/pycroscope/literals_literalstring.toml @@ -7,10 +7,10 @@ Line 63: Unexpected errors ['./literals_literalstring.py:63:16: str is not equ output = """ ./literals_literalstring.py:43:4: Incompatible assignment: expected Literal[''], got Literal['two'] [incompatible_assignment] ./literals_literalstring.py:63:16: str is not equivalent to LiteralString -./literals_literalstring.py:66:4: Incompatible assignment: expected LiteralString, got str [incompatible_assignment] -./literals_literalstring.py:74:4: Incompatible assignment: expected LiteralString, got Literal[3] [incompatible_assignment] -./literals_literalstring.py:75:4: Incompatible assignment: expected LiteralString, got Literal[b'test'] [incompatible_assignment] -./literals_literalstring.py:120:21: Incompatible argument type for s: expected ~TLiteral: LiteralString but got str [incompatible_argument] -./literals_literalstring.py:134:50: Incompatible argument type for value: expected ~T: LiteralString but got str [incompatible_argument] +./literals_literalstring.py:65:4: Incompatible assignment: expected LiteralString, got str [incompatible_assignment] +./literals_literalstring.py:73:4: Incompatible assignment: expected LiteralString, got Literal[3] [incompatible_assignment] +./literals_literalstring.py:74:4: Incompatible assignment: expected LiteralString, got Literal[b'test'] [incompatible_assignment] +./literals_literalstring.py:119:21: Incompatible argument type for s: expected ~TLiteral: LiteralString but got str [incompatible_argument] +./literals_literalstring.py:133:50: Incompatible argument type for value: expected ~T: LiteralString but got str [incompatible_argument] ./literals_literalstring.py:171:4: Incompatible assignment: expected list[str], got list[LiteralString] [incompatible_assignment] """ diff --git a/conformance/results/pyrefly/aliases_explicit.toml b/conformance/results/pyrefly/aliases_explicit.toml index b56c87078..9edd1350a 100644 --- a/conformance/results/pyrefly/aliases_explicit.toml +++ b/conformance/results/pyrefly/aliases_explicit.toml @@ -4,7 +4,7 @@ errors_diff = """ """ output = """ ERROR aliases_explicit.py:67:9-28: `TypeAlias[GoodTypeAlias2, type[int | None]]` is not subscriptable [unsupported-operation] -ERROR aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[GoodTypeAlias2]]]` is not subscriptable [unsupported-operation] +ERROR aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[int | None]]]` is not subscriptable [unsupported-operation] ERROR aliases_explicit.py:69:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization] ERROR aliases_explicit.py:70:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization] ERROR aliases_explicit.py:71:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec] diff --git a/conformance/results/pyrefly/aliases_recursive.toml b/conformance/results/pyrefly/aliases_recursive.toml index 0f805c8d5..327b37f70 100644 --- a/conformance/results/pyrefly/aliases_recursive.toml +++ b/conformance/results/pyrefly/aliases_recursive.toml @@ -14,4 +14,5 @@ ERROR aliases_recursive.py:63:30-43: `list[list[float] | str | GenericTypeAlias1 ERROR aliases_recursive.py:69:35-64: `list[int | list[int | list[int | list[float] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]]` is not assignable to `list[int | str | GenericTypeAlias2[str, int]]` [bad-assignment] ERROR aliases_recursive.py:72:29-57: Found cyclic self-reference in `RecursiveUnion` [invalid-type-alias] ERROR aliases_recursive.py:75:31-61: Found cyclic self-reference in `MutualReference1` [invalid-type-alias] +ERROR aliases_recursive.py:75:93-123: Found cyclic self-reference in `MutualReference2` [invalid-type-alias] """ diff --git a/conformance/results/pyrefly/aliases_type_statement.toml b/conformance/results/pyrefly/aliases_type_statement.toml index b58468417..01603ba9d 100644 --- a/conformance/results/pyrefly/aliases_type_statement.toml +++ b/conformance/results/pyrefly/aliases_type_statement.toml @@ -31,5 +31,6 @@ ERROR aliases_type_statement.py:77:7-41: `str` is not assignable to upper bound ERROR aliases_type_statement.py:79:7-41: `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization] ERROR aliases_type_statement.py:82:28-47: Found cyclic self-reference in `RecursiveTypeAlias3` [invalid-type-alias] ERROR aliases_type_statement.py:84:31-59: Found cyclic self-reference in `RecursiveTypeAlias4` [invalid-type-alias] +ERROR aliases_type_statement.py:88:28-47: Found cyclic self-reference in `RecursiveTypeAlias6` [invalid-type-alias] ERROR aliases_type_statement.py:89:28-47: Found cyclic self-reference in `RecursiveTypeAlias7` [invalid-type-alias] """ diff --git a/conformance/results/pyrefly/aliases_typealiastype.toml b/conformance/results/pyrefly/aliases_typealiastype.toml index ff8d05904..fbb056d16 100644 --- a/conformance/results/pyrefly/aliases_typealiastype.toml +++ b/conformance/results/pyrefly/aliases_typealiastype.toml @@ -2,10 +2,8 @@ conformant = "Partial" notes = """ Does not detect circular definitions. """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 48: Expected 1 errors -Line 66: Expected 1 errors """ output = """ ERROR aliases_typealiastype.py:32:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute] @@ -13,9 +11,10 @@ ERROR aliases_typealiastype.py:40:5-30: `int` is not assignable to upper bound ` ERROR aliases_typealiastype.py:43:13-66: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias] ERROR aliases_typealiastype.py:44:13-48: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias] ERROR aliases_typealiastype.py:45:45-65: Value for argument `type_params` must be a tuple literal [invalid-type-alias] -ERROR aliases_typealiastype.py:46:41-50: Found cyclic self-reference in `BadAlias4` [invalid-type-alias] -ERROR aliases_typealiastype.py:47:40-60: Found cyclic self-reference in `BadAlias5` [invalid-type-alias] -ERROR aliases_typealiastype.py:49:40-49: Found cyclic self-reference in `BadAlias7` [invalid-type-alias] +ERROR aliases_typealiastype.py:46:13-52: Found cyclic self-reference in `BadAlias4` [invalid-type-alias] +ERROR aliases_typealiastype.py:47:13-79: Found cyclic self-reference in `BadAlias5` [invalid-type-alias] +ERROR aliases_typealiastype.py:48:13-52: Found cyclic self-reference in `BadAlias6` [invalid-type-alias] +ERROR aliases_typealiastype.py:49:13-50: Found cyclic self-reference in `BadAlias7` [invalid-type-alias] ERROR aliases_typealiastype.py:52:40-80: Function call cannot be used in annotations [invalid-annotation] ERROR aliases_typealiastype.py:53:40-50: List literal cannot be used in annotations [invalid-annotation] ERROR aliases_typealiastype.py:54:42-55: Tuple literal cannot be used in annotations [invalid-annotation] @@ -31,4 +30,5 @@ ERROR aliases_typealiastype.py:61:42-46: Bool literal cannot be used in annotati ERROR aliases_typealiastype.py:62:42-43: Number literal cannot be used in annotations [invalid-annotation] ERROR aliases_typealiastype.py:63:42-53: Boolean operation cannot be used in annotations [invalid-annotation] ERROR aliases_typealiastype.py:64:42-52: F-string cannot be used in annotations [invalid-annotation] +ERROR aliases_typealiastype.py:66:14-59: Found cyclic self-reference in `BadAlias21` [invalid-type-alias] """ diff --git a/conformance/results/pyrefly/annotations_forward_refs.toml b/conformance/results/pyrefly/annotations_forward_refs.toml index 77859140a..cbf25ce24 100644 --- a/conformance/results/pyrefly/annotations_forward_refs.toml +++ b/conformance/results/pyrefly/annotations_forward_refs.toml @@ -5,12 +5,12 @@ Does not reject some type forms that require quotes. """ conformance_automated = "Fail" errors_diff = """ +Line 24: Expected 1 errors +Line 25: Expected 1 errors Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]'] Line 96: Unexpected errors ['assert_type(Any, int) failed [assert-type]'] """ output = """ -ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation] -ERROR annotations_forward_refs.py:25:7-21: `|` union syntax does not work with string literals [invalid-annotation] ERROR annotations_forward_refs.py:41:10-50: Function call cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:42:10-20: List literal cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:43:10-20: Tuple literal cannot be used in annotations [invalid-annotation] diff --git a/conformance/results/pyrefly/generics_scoping.toml b/conformance/results/pyrefly/generics_scoping.toml index a4d46cbff..236c49f06 100644 --- a/conformance/results/pyrefly/generics_scoping.toml +++ b/conformance/results/pyrefly/generics_scoping.toml @@ -4,13 +4,9 @@ Does not implement several scoping checks/restrictions for generics """ conformance_automated = "Fail" errors_diff = """ -Line 61: Expected 1 errors -Line 65: Expected 1 errors Line 86: Expected 1 errors Line 89: Expected 1 errors Line 98: Expected 1 errors -Line 105: Expected 1 errors -Line 106: Expected 1 errors Line 107: Expected 1 errors """ output = """ @@ -19,5 +15,9 @@ ERROR generics_scoping.py:20:12-38: assert_type(str, Literal['a']) failed [asser ERROR generics_scoping.py:34:10-13: Argument `Literal['a']` is not assignable to parameter `x` with type `int` in function `MyClass.meth_2` [bad-argument-type] ERROR generics_scoping.py:50:12-48: assert_type(str, Literal['abc']) failed [assert-type] ERROR generics_scoping.py:54:12-50: assert_type(bytes, Literal[b'abc']) failed [assert-type] +ERROR generics_scoping.py:61:8-15: Type variable `S` is not in scope [invalid-type-var] +ERROR generics_scoping.py:65:14-21: Type variable `S` is not in scope [invalid-type-var] ERROR generics_scoping.py:76:11-20: Redundant type parameter declaration [invalid-type-var] +ERROR generics_scoping.py:105:14-15: Type variable `T` is not in scope [invalid-type-var] +ERROR generics_scoping.py:106:14-21: Type variable `T` is not in scope [invalid-type-var] """ diff --git a/conformance/results/pyrefly/literals_literalstring.toml b/conformance/results/pyrefly/literals_literalstring.toml index 190cc520c..c86240080 100644 --- a/conformance/results/pyrefly/literals_literalstring.toml +++ b/conformance/results/pyrefly/literals_literalstring.toml @@ -10,5 +10,5 @@ ERROR literals_literalstring.py:73:25-26: `Literal[3]` is not assignable to `Lit ERROR literals_literalstring.py:74:25-32: `Literal[b'test']` is not assignable to `LiteralString` [bad-assignment] ERROR literals_literalstring.py:119:21-24: `str` is not assignable to upper bound `LiteralString` of type variable `TLiteral` [bad-specialization] ERROR literals_literalstring.py:133:51-52: Argument `str` is not assignable to parameter `value` with type `LiteralString` in function `Container.__init__` [bad-argument-type] -ERROR literals_literalstring.py:170:21-24: `list[LiteralString]` is not assignable to `list[str]` [bad-assignment] +ERROR literals_literalstring.py:171:21-24: `list[LiteralString]` is not assignable to `list[str]` [bad-assignment] """ diff --git a/conformance/results/pyrefly/overloads_basic.toml b/conformance/results/pyrefly/overloads_basic.toml index 9dd079a23..08256881b 100644 --- a/conformance/results/pyrefly/overloads_basic.toml +++ b/conformance/results/pyrefly/overloads_basic.toml @@ -3,5 +3,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR overloads_basic.py:39:1-6: Cannot index into `Bytes` [bad-index] +ERROR overloads_basic.py:36:1-6: Cannot index into `Bytes` [bad-index] """ diff --git a/conformance/results/pyrefly/version.toml b/conformance/results/pyrefly/version.toml index d8470f38f..64c5c3a32 100644 --- a/conformance/results/pyrefly/version.toml +++ b/conformance/results/pyrefly/version.toml @@ -1 +1 @@ -version = "pyrefly 0.53.0" +version = "pyrefly 0.54.0" diff --git a/conformance/results/pyright/annotations_forward_refs.toml b/conformance/results/pyright/annotations_forward_refs.toml index ca35b5bb1..7caac6289 100644 --- a/conformance/results/pyright/annotations_forward_refs.toml +++ b/conformance/results/pyright/annotations_forward_refs.toml @@ -1,7 +1,5 @@ conformant = "Pass" output = """ -annotations_forward_refs.py:22:7 - error: "ClassA" is not defined (reportUndefinedVariable) -annotations_forward_refs.py:23:12 - error: "ClassA" is not defined (reportUndefinedVariable) annotations_forward_refs.py:24:7 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:25:13 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:41:10 - error: Call expression not allowed in type expression (reportInvalidTypeForm) @@ -29,11 +27,10 @@ annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type ex annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type expression (reportInvalidTypeForm) annotations_forward_refs.py:54:11 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues) annotations_forward_refs.py:55:10 - error: Module cannot be used as a type (reportGeneralTypeIssues) -annotations_forward_refs.py:66:26 - error: "ClassB" is not defined (reportUndefinedVariable) annotations_forward_refs.py:80:14 - error: Type of "ClassF" could not be determined because it refers to itself (reportGeneralTypeIssues) annotations_forward_refs.py:80:14 - error: Variable not allowed in type expression (reportInvalidTypeForm) -annotations_forward_refs.py:89:8 - error: Expected class but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues) """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 89: Expected 1 errors """ diff --git a/conformance/results/pyright/generics_variance_inference.toml b/conformance/results/pyright/generics_variance_inference.toml index 9a378ad6f..5c0f32e2a 100644 --- a/conformance/results/pyright/generics_variance_inference.toml +++ b/conformance/results/pyright/generics_variance_inference.toml @@ -23,10 +23,12 @@ generics_variance_inference.py:58:35 - error: Type "ShouldBeCovariant3[float]" i   "ShouldBeCovariant3[float]" is not assignable to "ShouldBeCovariant3[int]"     Type parameter "T@ShouldBeCovariant3" is covariant, but "float" is not a subtype of "int"       "float" is not assignable to "int" (reportAssignmentType) +generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]" +  "ShouldBeCovariant4[int]" is not assignable to "ShouldBeCovariant4[float]" +    Type parameter "T@ShouldBeCovariant4" is invariant, but "int" is not the same as "float" (reportAssignmentType) generics_variance_inference.py:67:34 - error: Type "ShouldBeCovariant4[float]" is not assignable to declared type "ShouldBeCovariant4[int]"   "ShouldBeCovariant4[float]" is not assignable to "ShouldBeCovariant4[int]" -    Type parameter "T@ShouldBeCovariant4" is covariant, but "float" is not a subtype of "int" -      "float" is not assignable to "int" (reportAssignmentType) +    Type parameter "T@ShouldBeCovariant4" is invariant, but "float" is not the same as "int" (reportAssignmentType) generics_variance_inference.py:80:34 - error: Type "ShouldBeCovariant5[float]" is not assignable to declared type "ShouldBeCovariant5[int]"   "ShouldBeCovariant5[float]" is not assignable to "ShouldBeCovariant5[int]"     Type parameter "T@ShouldBeCovariant5" is covariant, but "float" is not a subtype of "int" @@ -80,6 +82,7 @@ generics_variance_inference.py:194:37 - error: Type "ShouldBeContravariant2[int]     Type parameter "T@ShouldBeContravariant2" is contravariant, but "int" is not a supertype of "float"       "float" is not assignable to "int" (reportAssignmentType) """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 66: Unexpected errors ['generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]"'] """ diff --git a/conformance/results/pyright/literals_literalstring.toml b/conformance/results/pyright/literals_literalstring.toml index e91750ea7..c917941ac 100644 --- a/conformance/results/pyright/literals_literalstring.toml +++ b/conformance/results/pyright/literals_literalstring.toml @@ -16,7 +16,7 @@ literals_literalstring.py:119:22 - error: Argument of type "str" cannot be assig literals_literalstring.py:133:51 - error: Argument of type "str" cannot be assigned to parameter "value" of type "T@Container" in function "__init__"   Type "str" is not assignable to type "LiteralString"     "str" is not assignable to "LiteralString" (reportArgumentType) -literals_literalstring.py:170:21 - error: Type "list[LiteralString]" is not assignable to declared type "list[str]" +literals_literalstring.py:171:21 - error: Type "list[LiteralString]" is not assignable to declared type "list[str]"   "list[LiteralString]" is not assignable to "list[str]"     Type parameter "_T@list" is invariant, but "LiteralString" is not the same as "str"     Consider switching from "list" to "Sequence" which is covariant (reportAssignmentType) diff --git a/conformance/results/pyright/overloads_basic.toml b/conformance/results/pyright/overloads_basic.toml index 14bfb58bf..bba504e00 100644 --- a/conformance/results/pyright/overloads_basic.toml +++ b/conformance/results/pyright/overloads_basic.toml @@ -2,8 +2,8 @@ conformant = "Pass" notes = """ """ output = """ -overloads_basic.py:39:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue) -overloads_basic.py:39:1 - error: Argument of type "Literal['']" cannot be assigned to parameter "__s" of type "slice[Any, Any, Any]" in function "__getitem__" +overloads_basic.py:36:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue) +overloads_basic.py:36:1 - error: Argument of type "Literal['']" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"   "Literal['']" is not assignable to "slice[Any, Any, Any]" (reportArgumentType) """ conformance_automated = "Pass" diff --git a/conformance/results/results.html b/conformance/results/results.html index ce0e63be4..d6e7ddecf 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -178,7 +178,7 @@

Python Type System Conformance Test Results

zuban 0.6.0
-
pyrefly 0.53.0
+
pyrefly 0.54.0
pycroscope 0.2.0
@@ -222,16 +222,6 @@

Python Type System Conformance Test Results

Unknown -Type forms - -     typeforms_typeform -
Partial

Does not support assigning Union and GenericAlias objects to their runtime types.

-Unknown -Unknown -Unknown -Unknown - - Special types in annotations      specialtypes_any diff --git a/conformance/results/zuban/literals_literalstring.toml b/conformance/results/zuban/literals_literalstring.toml index e29e362f4..6db478d33 100644 --- a/conformance/results/zuban/literals_literalstring.toml +++ b/conformance/results/zuban/literals_literalstring.toml @@ -10,7 +10,7 @@ literals_literalstring.py:73: error: Incompatible types in assignment (expressio literals_literalstring.py:74: error: Incompatible types in assignment (expression has type "Literal[b'test']", variable has type "LiteralString") [assignment] literals_literalstring.py:119: error: Value of type variable "TLiteral" of "literal_identity" cannot be "str" [type-var] literals_literalstring.py:133: error: Value of type variable "T" of "Container" cannot be "str" [type-var] -literals_literalstring.py:170: error: Incompatible types in assignment (expression has type "list[LiteralString]", variable has type "list[str]") [assignment] -literals_literalstring.py:170: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance -literals_literalstring.py:170: note: Consider using "Sequence" instead, which is covariant +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/overloads_basic.toml b/conformance/results/zuban/overloads_basic.toml index 6c3455642..8e40dd2b6 100644 --- a/conformance/results/zuban/overloads_basic.toml +++ b/conformance/results/zuban/overloads_basic.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -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 +overloads_basic.py:36: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload] +overloads_basic.py:36: note: Possible overload variants: +overloads_basic.py:36: note: def __getitem__(self, int, /) -> int +overloads_basic.py:36: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes """ diff --git a/conformance/tests/literals_literalstring.py b/conformance/tests/literals_literalstring.py index e299fa43d..798c6c7a6 100644 --- a/conformance/tests/literals_literalstring.py +++ b/conformance/tests/literals_literalstring.py @@ -161,9 +161,10 @@ def func8(x: Any) -> Any: raise NotImplementedError -assert_type(func8("foo"), C) # First overload -assert_type(func8("bar"), B) # Second overload -assert_type(func8(input()), A) # Third overload +def call_func8(x: str) -> None: + assert_type(func8("foo"), C) # First overload + assert_type(func8("bar"), B) # Second overload + assert_type(func8(x), A) # Third overload def func9(val: list[LiteralString]): diff --git a/conformance/tests/typeforms_typeform.py b/conformance/tests/typeforms_typeform.py deleted file mode 100644 index 3e3960ef0..000000000 --- a/conformance/tests/typeforms_typeform.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -Tests TypeForm functionality. -""" - -# Specification: https://typing.readthedocs.io/en/latest/spec/type-forms.html#typeform - -import types -from typing import Annotated, Any, ClassVar, Final, Literal, Optional, Self, TypeVarTuple, Unpack, assert_type -from typing_extensions import TypeForm - - -# > ``TypeForm[T]`` describes the set of all type form objects that represent -# > the type ``T`` or types that are assignable to ``T``. - -ok1: TypeForm[str | None] = str | None # OK -ok2: TypeForm[str | None] = str # OK -ok3: TypeForm[str | None] = None # OK -ok4: TypeForm[str | None] = Literal[None] # OK -ok5: TypeForm[str | None] = Optional[str] # OK -ok6: TypeForm[str | None] = "str | None" # OK -ok7: TypeForm[str | None] = Any # OK - -err1: TypeForm[str | None] = str | int # E -err2: TypeForm[str | None] = list[str | None] # E - - -# > ``TypeForm[Any]`` is assignable both to and from any other ``TypeForm`` type. - -v_any: TypeForm[Any] = int | str -v_str: TypeForm[str] = str -assert_type(v_any, TypeForm[Any]) -assert_type(v_str, TypeForm[str]) - -v_any = v_str # OK -v_str = v_any # OK - - -# > Valid type expressions are assignable to ``TypeForm`` through implicit TypeForm evaluation. - -v1_actual: types.UnionType = str | None # OK -v1_type_form: TypeForm[str | None] = str | None # OK - -v2_actual: types.GenericAlias = list[int] # OK -v2_type_form: TypeForm = list[int] # OK - -v3: TypeForm[int | str] = Annotated[int | str, "metadata"] # OK -v4: TypeForm[set[str]] = "set[str]" # OK - - -# > Expressions that are not valid type expressions should not evaluate to a ``TypeForm`` type. - -Ts = TypeVarTuple("Ts") -var = 1 - -bad1: TypeForm = tuple() # E -bad2: TypeForm = (1, 2) # E -bad3: TypeForm = 1 # E -bad4: TypeForm = Self # E -bad5: TypeForm = Literal[var] # E -bad6: TypeForm = Literal[f""] # E -bad7: TypeForm = ClassVar[int] # E -bad8: TypeForm = Final[int] # E -bad9: TypeForm = Unpack[Ts] # E -bad10: TypeForm = Optional # E -bad11: TypeForm = "int + str" # E - - -# > ``TypeForm`` acts as a function that can be called with a single valid type expression. - -x1 = TypeForm(str | None) -assert_type(x1, TypeForm[str | None]) - -x2 = TypeForm("list[int]") -assert_type(x2, TypeForm[list[int]]) - -x3 = TypeForm("type(1)") # E -x4 = type(1) # OK -x5 = TypeForm(type(1)) # E - - -# > ``TypeForm`` is covariant in its single type parameter. - -def get_type_form() -> TypeForm[int]: - return int - - -t1: TypeForm[int | str] = get_type_form() # OK -t2: TypeForm[str] = get_type_form() # E - - -# > ``type[T]`` is a subtype of ``TypeForm[T]``. - -def get_type() -> type[int]: - return int - - -t3: TypeForm[int | str] = get_type() # OK -t4: TypeForm[str] = get_type() # E From 9320e7070dfc792fd7d33add696722a64229a6e8 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 24 Feb 2026 20:06:46 -0800 Subject: [PATCH 27/78] more --- .../results/pycroscope/aliases_explicit.toml | 2 +- .../results/pycroscope/aliases_implicit.toml | 2 +- .../pycroscope/annotations_forward_refs.toml | 26 ++++++++++++++--- .../pycroscope/annotations_typeexpr.toml | 2 +- .../pycroscope/callables_annotation.toml | 16 +++++------ .../results/pycroscope/classes_classvar.toml | 3 -- .../constructors_call_metaclass.toml | 4 +-- .../pycroscope/constructors_call_new.toml | 8 +++--- .../pycroscope/constructors_call_type.toml | 2 +- .../results/pycroscope/dataclasses_final.toml | 8 ++---- .../pycroscope/directives_deprecated.toml | 1 - .../results/pycroscope/enums_behaviors.toml | 6 ++-- .../results/pycroscope/enums_expansion.toml | 8 ++---- .../pycroscope/enums_member_values.toml | 12 ++++---- .../results/pycroscope/enums_members.toml | 25 ++--------------- .../results/pycroscope/generics_basic.toml | 2 +- .../pycroscope/generics_self_basic.toml | 17 +++++++++++ .../pycroscope/generics_self_usage.toml | 2 -- .../generics_syntax_infer_variance.toml | 28 ++++++++----------- .../pycroscope/generics_syntax_scoping.toml | 4 --- .../generics_typevartuple_args.toml | 20 ++++++------- .../generics_typevartuple_basic.toml | 4 +-- .../generics_typevartuple_callable.toml | 4 +-- .../pycroscope/generics_upper_bound.toml | 2 +- .../results/pycroscope/generics_variance.toml | 2 +- conformance/results/results.html | 6 ++-- 26 files changed, 103 insertions(+), 113 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 934db7750..39af3692c 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -16,7 +16,6 @@ Line 88: Expected 1 errors Line 89: Expected 1 errors Line 91: Expected 1 errors Line 100: Expected 1 errors -Line 101: Expected 1 errors Line 102: Expected 1 errors Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] """ @@ -25,4 +24,5 @@ output = """ ./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 54fe52781..d242cd6b7 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -11,7 +11,6 @@ Line 113: Expected 1 errors Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors -Line 133: Expected 1 errors Line 135: Expected 1 errors Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] @@ -30,4 +29,5 @@ output = """ ./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] ./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] ./aliases_implicit.py:131:12: Literal[[]] is not equivalent to list[int] +./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 2ae7acb86..8ddd2423d 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -2,9 +2,26 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors Line 25: Expected 1 errors -Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] +Line 14: Unexpected errors ['./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name]'] +Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name]'] +Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] +Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] +Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] +Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] """ output = """ +./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]] +./annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:22:6: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:23:11: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:41:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] @@ -19,8 +36,9 @@ output = """ ./annotations_forward_refs.py:52:9: Invalid type annotation -1 [invalid_annotation] ./annotations_forward_refs.py:53:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:54:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] -./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] +./annotations_forward_refs.py:89:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] +./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int """ diff --git a/conformance/results/pycroscope/annotations_typeexpr.toml b/conformance/results/pycroscope/annotations_typeexpr.toml index b207f1610..8402c85ee 100644 --- a/conformance/results/pycroscope/annotations_typeexpr.toml +++ b/conformance/results/pycroscope/annotations_typeexpr.toml @@ -16,5 +16,5 @@ output = """ ./annotations_typeexpr.py:97:9: Invalid type annotation True [invalid_annotation] ./annotations_typeexpr.py:98:9: Invalid type annotation 1 [invalid_annotation] ./annotations_typeexpr.py:99:9: Invalid type annotation -1 [invalid_annotation] -./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] +./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index e9debe40b..ee7539a86 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,9 +4,8 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors -Line 152: Unexpected errors ['./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment]'] -Line 156: Unexpected errors ['./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3, got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]'] -Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6, got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] +Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] +Line 155: Unexpected errors ['./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation]'] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -15,12 +14,11 @@ output = """ ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb2' [incompatible_assignment] -./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function '.../tests/callables_annotation.py.test_cb4' [incompatible_assignment] -./callables_annotation.py:152:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto2, got (int, /, **Any[explicit]) -> None [incompatible_assignment] -./callables_annotation.py:156:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto3, got .../tests/callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] -./callables_annotation.py:157:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto6, got .../tests/callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:159:4: Incompatible assignment: expected .../tests/callables_annotation.py.Proto5[Any[explicit]], got .../tests/callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] +./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation] +./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation] +./callables_annotation.py:159:10: Object Proto5 does not support subscripting [unsupported_operation] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] ./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 0ffd234ea..6302b27cc 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -10,7 +10,6 @@ Line 78: Expected 1 errors Line 111: Expected 1 errors Line 140: Expected 1 errors Line 84: Unexpected errors ["./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute]"] -Line 107: Unexpected errors ["./classes_classvar.py:107:33: Starship has no attribute 'stats' [undefined_attribute]", "./classes_classvar.py:107:8: Starship has no attribute 'stats' [undefined_attribute]"] """ output = """ ./classes_classvar.py:38:10: Invalid type annotation (, ) [invalid_annotation] @@ -22,6 +21,4 @@ output = """ ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute] -./classes_classvar.py:107:33: Starship has no attribute 'stats' [undefined_attribute] -./classes_classvar.py:107:8: Starship has no attribute 'stats' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index bff3747e4..0c2e0db35 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -3,10 +3,10 @@ errors_diff = """ Line 54: Expected 1 errors Line 68: Expected 1 errors Line 26: Unexpected errors ["./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation typing.Union [invalid_annotation]'] +Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] """ output = """ ./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never ./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_metaclass.py:39:0: Unrecognized annotation typing.Union [invalid_annotation] +./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index f0d488169..bfb3bc3c8 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -7,9 +7,9 @@ Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./con Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] -Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation typing.Union [invalid_annotation]'] +Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation typing.Union [invalid_annotation]'] +Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation]'] Line 130: Unexpected errors ['./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation]'] @@ -32,10 +32,10 @@ output = """ ./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation] ./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int ./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:64:0: Unrecognized annotation typing.Union [invalid_annotation] +./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never ./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:89:0: Unrecognized annotation typing.Union [invalid_annotation] +./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation] ./constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation] ./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/constructors_call_type.toml b/conformance/results/pycroscope/constructors_call_type.toml index 17b748cd4..01a607870 100644 --- a/conformance/results/pycroscope/constructors_call_type.toml +++ b/conformance/results/pycroscope/constructors_call_type.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 30: Expected 1 errors Line 59: Expected 1 errors Line 64: Expected 1 errors Line 72: Expected 1 errors @@ -8,6 +7,7 @@ Line 81: Expected 1 errors Line 82: Expected 1 errors """ output = """ +./constructors_call_type.py:30:4: In call to .../tests/constructors_call_type.py.Meta1.__call__: Missing required argument 'x' [incompatible_call] ./constructors_call_type.py:40:4: In call to .../tests/constructors_call_type.py.Class2: Missing required argument 'x' [incompatible_call] ./constructors_call_type.py:50:4: In call to .../tests/constructors_call_type.py.Class3: Missing required argument 'x' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index a1bd83aa5..ef5b1a8b2 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -1,18 +1,14 @@ conformance_automated = "Fail" errors_diff = """ -Line 35: Expected 1 errors -Line 36: Expected 1 errors Line 16: Unexpected errors ['./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation]'] Line 18: Unexpected errors ['./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation]'] -Line 31: Unexpected errors ['./dataclasses_final.py:31:12: Literal[10] is not equivalent to int'] -Line 32: Unexpected errors ["./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str"] """ output = """ ./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation] ./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation] ./dataclasses_final.py:27:0: Cannot assign to final name final_classvar [incompatible_assignment] -./dataclasses_final.py:31:12: Literal[10] is not equivalent to int -./dataclasses_final.py:32:12: Literal['baz'] is not equivalent to str +./dataclasses_final.py:35:0: Cannot assign to final name final_no_default [incompatible_assignment] +./dataclasses_final.py:36:0: Cannot assign to final name final_with_default [incompatible_assignment] ./dataclasses_final.py:37:0: Cannot assign to final name final_no_default [incompatible_assignment] ./dataclasses_final.py:38:0: Cannot assign to final name final_with_default [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index cdb9ea34b..38bd55996 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -14,7 +14,6 @@ Line 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_depre """ output = """ ./directives_deprecated.py:58:0: Annotated[./directives_deprecated.py.Invocable, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=AnyValue(source=))] is not callable [not_callable] -./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] ./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] ./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/enums_behaviors.toml b/conformance/results/pycroscope/enums_behaviors.toml index 9c5760510..730e957bc 100644 --- a/conformance/results/pycroscope/enums_behaviors.toml +++ b/conformance/results/pycroscope/enums_behaviors.toml @@ -1,8 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 44: Expected 1 errors """ output = """ -./enums_behaviors.py:27:12: Literal[] is not equivalent to ./enums_behaviors.py.Color +./enums_behaviors.py:28:12: ./enums_behaviors.py.Color is not equivalent to Literal[] ./enums_behaviors.py:32:12: ./enums_behaviors.py.Color is not equivalent to Literal[] +./enums_behaviors.py:44:0: Cannot inherit from final class [invalid_annotation] """ diff --git a/conformance/results/pycroscope/enums_expansion.toml b/conformance/results/pycroscope/enums_expansion.toml index 86cf64aab..be7650444 100644 --- a/conformance/results/pycroscope/enums_expansion.toml +++ b/conformance/results/pycroscope/enums_expansion.toml @@ -1,10 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 53: Expected 1 errors -Line 52: Unexpected errors ['./enums_expansion.py:52:20: Literal[] is not equivalent to .../tests/enums_expansion.py.CustomFlags'] -Line 63: Unexpected errors ['./enums_expansion.py:63:24: Never is not equivalent to .../tests/enums_expansion.py.CustomFlags'] """ output = """ -./enums_expansion.py:52:20: Literal[] is not equivalent to .../tests/enums_expansion.py.CustomFlags -./enums_expansion.py:63:24: Never is not equivalent to .../tests/enums_expansion.py.CustomFlags +./enums_expansion.py:53:20: .../tests/enums_expansion.py.CustomFlags is not equivalent to Literal[] """ diff --git a/conformance/results/pycroscope/enums_member_values.toml b/conformance/results/pycroscope/enums_member_values.toml index be7841f1d..e4ed51aee 100644 --- a/conformance/results/pycroscope/enums_member_values.toml +++ b/conformance/results/pycroscope/enums_member_values.toml @@ -1,12 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 78: Expected 1 errors -Line 85: Expected 1 errors """ output = """ -./enums_member_values.py:30:16: Any[explicit] is not equivalent to Literal[1, 2, 3] -./enums_member_values.py:54:12: Any[error] is not equivalent to Literal[1] -./enums_member_values.py:54:12: Literal[(1, 3.303e+23, 2439700.0)] has no attribute 'value' [undefined_attribute] -./enums_member_values.py:68:12: Any[explicit] is not equivalent to Literal[1] +./enums_member_values.py:54:12: Literal[(1, 3.303e+23, 2439700.0)] is not equivalent to Literal[1] +./enums_member_values.py:68:12: Literal[] is not equivalent to Literal[1] +./enums_member_values.py:78:4: Enum member value must be assignable to int [invalid_annotation] +./enums_member_values.py:85:8: Enum member value must be assignable to str [invalid_annotation] ./enums_member_values.py:96:12: Literal[Ellipsis] is not equivalent to int """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 1d9c9deb2..2347eef71 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -1,32 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 50: Expected 1 errors Line 82: Expected 1 errors Line 83: Expected 1 errors Line 84: Expected 1 errors Line 85: Expected 1 errors -Line 29: Unexpected errors ["./enums_members.py:29:12: Literal[('felis', 'catus')] is not equivalent to Literal['felis', 'catus']"] -Line 30: Unexpected errors ["./enums_members.py:30:12: Literal[('canis', 'lupus')] is not equivalent to Literal['canis', 'lupus']"] -Line 75: Unexpected errors ["./enums_members.py:75:24: Comparison between objects that do not overlap: ./enums_members.py.Pet4 and Literal[('felis', 'catus')] [unsafe_comparison]"] -Line 77: Unexpected errors ['./enums_members.py:77:4: Name Nested is already defined [class_variable_redefinition]'] -Line 97: Unexpected errors ['./enums_members.py:97:12: Undefined name: YELLOW [undefined_name]'] -Line 115: Unexpected errors ['./enums_members.py:115:12: enum.member[Literal[1]] is not equivalent to Any[unannotated]'] -Line 117: Unexpected errors ['./enums_members.py:117:12: enum.member[(self: ./enums_members.py.Example) -> None] is not equivalent to Any[unannotated]'] -Line 128: Unexpected errors ["./enums_members.py:128:20: Example2 has no attribute '__B' [undefined_attribute]"] """ output = """ -./enums_members.py:29:12: Literal[('felis', 'catus')] is not equivalent to Literal['felis', 'catus'] -./enums_members.py:30:12: Literal[('canis', 'lupus')] is not equivalent to Literal['canis', 'lupus'] -./enums_members.py:75:24: Comparison between objects that do not overlap: ./enums_members.py.Pet4 and Literal[('felis', 'catus')] [unsafe_comparison] -./enums_members.py:77:4: Name Nested is already defined [class_variable_redefinition] -./enums_members.py:97:12: Undefined name: YELLOW [undefined_name] -./enums_members.py:115:12: enum.member[Literal[1]] is not equivalent to Any[unannotated] +./enums_members.py:50:4: Enum members should not be explicitly annotated [invalid_annotation] ./enums_members.py:116:12: enum.nonmember[Literal[2]] is not equivalent to Any[unannotated] -./enums_members.py:117:12: enum.member[(self: ./enums_members.py.Example) -> None] is not equivalent to Any[unannotated] -./enums_members.py:128:20: Example2 has no attribute '__B' [undefined_attribute] -./enums_members.py:128:20: Revealed type is 'Any[error]' [reveal_type] -./enums_members.py:129:20: Example2 has no attribute '__B' [undefined_attribute] -./enums_members.py:129:42: Example2 has no attribute '__B' [undefined_attribute] -./enums_members.py:146:12: Literal[] is not equivalent to int -./enums_members.py:147:12: Literal[] is not equivalent to int +./enums_members.py:128:20: Revealed type is 'int' [reveal_type] +./enums_members.py:129:20: int is not equivalent to Any[unannotated] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 01bb09fbc..31bc376cd 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -23,7 +23,7 @@ output = """ ./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation] ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] +./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:92:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute] ./generics_basic.py:92:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 6b54e0007..c98f5ed85 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,24 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors +Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape'] +Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle', "./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute]"] +Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] +Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] +Line 75: Unexpected errors ['./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation]'] +Line 76: Unexpected errors ['./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation]'] +Line 84: Unexpected errors ['./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation]'] """ output = """ +./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape +./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle +./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute] +./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape +./generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] +./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle +./generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] +./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation] +./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation] +./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 254bc2d7c..1642f0924 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -10,11 +10,9 @@ Line 113: Expected 1 errors Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors -Line 67: Unexpected errors ['./generics_self_usage.py:67:4: Name Inner is already defined [class_variable_redefinition]'] Line 93: Unexpected errors ["./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child has no attribute 'return_concrete_type' [undefined_attribute]"] """ output = """ -./generics_self_usage.py:67:4: Name Inner is already defined [class_variable_redefinition] ./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child has no attribute 'return_concrete_type' [undefined_attribute] ./generics_self_usage.py:103:10: Object Bar does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index 5e0562523..ce8593ed9 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,7 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument]", "./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument]", './generics_syntax_infer_variance.py:28:8: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument]', './generics_syntax_infer_variance.py:28:36: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument]'] -Line 46: Unexpected errors ['./generics_syntax_infer_variance.py:46:8: Cannot call overloaded function [incompatible_argument]', './generics_syntax_infer_variance.py:46:36: Cannot call overloaded function [incompatible_argument]'] +Line 28: Unexpected errors ['./generics_syntax_infer_variance.py:28:8: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:28:36: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation]'] +Line 46: Unexpected errors ['./generics_syntax_infer_variance.py:46:8: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:46:36: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation]'] Line 55: Unexpected errors ['./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]'] Line 81: Unexpected errors ["./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5 has no attribute '_x' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]'] @@ -11,20 +11,16 @@ Line 121: Unexpected errors ["./generics_syntax_infer_variance.py:121:15: ./gene Line 166: Unexpected errors ['./generics_syntax_infer_variance.py:166:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:166:42: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]'] """ output = """ -./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:28:27: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] -./generics_syntax_infer_variance.py:28:55: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] -./generics_syntax_infer_variance.py:28:8: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] -./generics_syntax_infer_variance.py:28:36: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] -./generics_syntax_infer_variance.py:29:53: Incompatible argument type for index: expected int but got type 'float' [incompatible_argument] -./generics_syntax_infer_variance.py:29:27: Incompatible argument type for index: expected int but got type 'int' [incompatible_argument] -./generics_syntax_infer_variance.py:29:8: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] -./generics_syntax_infer_variance.py:29:34: Incompatible argument type for self: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1 but got ShouldBeCovariant1 [incompatible_argument] -./generics_syntax_infer_variance.py:46:8: Cannot call overloaded function [incompatible_argument] -./generics_syntax_infer_variance.py:46:36: Cannot call overloaded function [incompatible_argument] -./generics_syntax_infer_variance.py:47:8: Cannot call overloaded function [incompatible_argument] -./generics_syntax_infer_variance.py:47:34: Cannot call overloaded function [incompatible_argument] +./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:28:8: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:28:36: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:29:8: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:29:34: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:46:8: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:46:36: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:47:8: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:47:34: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:56:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index b00117cd8..e6255e3ae 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -7,18 +7,14 @@ Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors Line 31: Unexpected errors ['./generics_syntax_scoping.py:31:16: Object BaseClassC does not support subscripting [unsupported_operation]', './generics_syntax_scoping.py:31:37: Object Foo does not support subscripting [unsupported_operation]'] -Line 71: Unexpected errors ['./generics_syntax_scoping.py:71:4: Name Private is already defined [class_variable_redefinition]'] Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] -Line 111: Unexpected errors ['./generics_syntax_scoping.py:111:8: Name Inner1 is already defined [class_variable_redefinition]'] """ output = """ ./generics_syntax_scoping.py:31:16: Object BaseClassC does not support subscripting [unsupported_operation] ./generics_syntax_scoping.py:31:37: Object Foo does not support subscripting [unsupported_operation] ./generics_syntax_scoping.py:44:12: Object Foo does not support subscripting [unsupported_operation] ./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] -./generics_syntax_scoping.py:71:4: Name Private is already defined [class_variable_redefinition] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] -./generics_syntax_scoping.py:111:8: Name Inner1 is already defined [class_variable_redefinition] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 6bb1f2825..936428025 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -9,22 +9,22 @@ Line 59: Expected 1 errors Line 67: Expected 1 errors Line 75: Expected 1 errors Line 76: Expected 1 errors -Line 16: Unexpected errors ["./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] +Line 16: Unexpected errors ['./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] -Line 27: Unexpected errors ["./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 27: Unexpected errors ['./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation]'] Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[]'] Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] -Line 42: Unexpected errors ["./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation]"] -Line 51: Unexpected errors ["./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] -Line 62: Unexpected errors ["./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 42: Unexpected errors ['./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation]'] +Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation]'] +Line 62: Unexpected errors ['./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation]'] """ output = """ -./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Starred(value=Name(...), ctx=Load(...)), Name(id='Env', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation] ./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[] ./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Constant(value=Ellipsis, kind=None)], ctx=Load()), ctx=Load())) [invalid_annotation] -./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] -./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), Name(id='str', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation] +./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation] +./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 0e6c3109d..6459b9c12 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -12,13 +12,13 @@ Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') -Line 16: Unexpected errors ["./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation]"] +Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] """ output = """ -./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=Name(id='Ts', ctx=Load())) [invalid_annotation] +./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index d69dce5cd..d5670c78e 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -3,12 +3,12 @@ errors_diff = """ Line 26: Expected 1 errors Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int]'] Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str]'] -Line 45: Unexpected errors ["./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation]"] +Line 45: Unexpected errors ['./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation]'] Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ ./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int] ./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str] -./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=Subscript(value=Name(id='tuple', ctx=Load()), slice=Tuple(elts=[Name(id='int', ctx=Load(...)), ..., Name(id='T', ctx=Load(...))], ctx=Load()), ctx=Load())) [invalid_annotation] +./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation] ./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index cd7503167..6b356655f 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -9,5 +9,5 @@ output = """ ./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int] ./generics_upper_bound.py:43:12: Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] ./generics_upper_bound.py:51:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] -./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] +./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index a3e27c15d..a93c4f496 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -21,7 +21,7 @@ Line 171: Unexpected errors ['./generics_variance.py:171:8: Object Co does not s Line 172: Unexpected errors ['./generics_variance.py:172:12: Object Contra does not support subscripting [unsupported_operation]'] """ output = """ -./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, contravariant: bool = Literal[False], covariant: bool = Literal[False], infer_variance: bool = Literal[False], default: Any[explicit] = Any[unannotated]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] +./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] ./generics_variance.py:38:10: Object ImmutableList does not support subscripting [unsupported_operation] ./generics_variance.py:39:11: Object ImmutableList does not support subscripting [unsupported_operation] ./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] diff --git a/conformance/results/results.html b/conformance/results/results.html index d6e7ddecf..493e0c1ec 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -1083,7 +1083,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      enums_definition Pass @@ -1097,7 +1097,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      enums_member_names
Pass*

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

@@ -1111,7 +1111,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      enums_members
Partial

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

Does not treat callables as non-members.

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

Does not properly handle aliased enum members.

Does not support `_ignore_` mechanism (optional).

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

From 49e6378d7720b910ede12a981080c31da33004f4 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 24 Feb 2026 20:33:27 -0800 Subject: [PATCH 28/78] . --- conformance/tests/overloads_basic.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/conformance/tests/overloads_basic.py b/conformance/tests/overloads_basic.py index e4a94aeb4..7aee51d87 100644 --- a/conformance/tests/overloads_basic.py +++ b/conformance/tests/overloads_basic.py @@ -19,15 +19,18 @@ class Bytes: ... @overload - def __getitem__(self, i: int, /) -> int: + def __getitem__(self, __i: int) -> int: ... @overload - def __getitem__(self, s: slice, /) -> bytes: + def __getitem__(self, __s: slice) -> bytes: ... - def __getitem__(self, i_or_s: int | slice, /) -> int | bytes: - raise NotImplementedError + def __getitem__(self, __i_or_s: int | slice) -> int | bytes: + if isinstance(__i_or_s, int): + return 0 + else: + return b"" b = Bytes() From 3c75c4dcce6c036abe8a1a697a6fcb40677dbb76 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 24 Feb 2026 22:11:34 -0800 Subject: [PATCH 29/78] two steps forward, many steps back --- .../pycroscope/callables_annotation.toml | 8 +++ .../pycroscope/callables_protocol.toml | 66 +++++++++++++++---- .../results/pycroscope/classes_classvar.toml | 2 +- .../results/pycroscope/dataclasses_usage.toml | 2 + .../pycroscope/directives_deprecated.toml | 3 + .../generics_variance_inference.toml | 22 +------ .../results/pycroscope/overloads_basic.toml | 8 ++- .../pycroscope/protocols_definition.toml | 8 ++- .../pycroscope/protocols_explicit.toml | 2 + .../results/pycroscope/protocols_merging.toml | 16 ++--- .../pycroscope/protocols_subtyping.toml | 6 +- conformance/results/results.html | 6 +- 12 files changed, 93 insertions(+), 56 deletions(-) diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index ee7539a86..1ca5d1375 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -4,8 +4,12 @@ Line 55: Expected 1 errors Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors +Line 148: Unexpected errors ["./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] +Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] +Line 154: Unexpected errors ["./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] Line 155: Unexpected errors ['./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation]'] +Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -16,8 +20,12 @@ output = """ ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] +./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] ./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation] +./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] +./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] ./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation] +./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:159:10: Object Proto5 does not support subscripting [unsupported_operation] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index c86d4d300..510b168a6 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -1,28 +1,68 @@ conformance_automated = "Fail" errors_diff = """ -Line 35: Expected 1 errors -Line 36: Expected 1 errors -Line 37: Expected 1 errors -Line 67: Expected 1 errors -Line 68: Expected 1 errors -Line 69: Expected 1 errors -Line 70: Expected 1 errors -Line 97: Expected 1 errors -Line 169: Expected 1 errors Line 186: Expected 1 errors Line 187: Expected 1 errors Line 197: Expected 1 errors -Line 238: Expected 1 errors -Line 260: Expected 1 errors -Line 284: Expected 1 errors -Line 311: Expected 1 errors +Line 34: Unexpected errors ["./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment]"] +Line 65: Unexpected errors ["./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] +Line 78: Unexpected errors ["./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] +Line 79: Unexpected errors ["./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment]"] +Line 80: Unexpected errors ["./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] +Line 81: Unexpected errors ["./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment]"] +Line 82: Unexpected errors ["./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] +Line 109: Unexpected errors ["./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment]"] Line 135: Unexpected errors ['./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation]'] Line 144: Unexpected errors ['./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation]'] +Line 168: Unexpected errors ["./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]"] Line 184: Unexpected errors ['./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation]'] +Line 216: Unexpected errors ["./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment]"] +Line 236: Unexpected errors ["./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] +Line 237: Unexpected errors ["./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] +Line 258: Unexpected errors ["./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment]"] +Line 259: Unexpected errors ["./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment]"] +Line 283: Unexpected errors ["./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment]"] +Line 286: Unexpected errors ["./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment]"] +Line 287: Unexpected errors ["./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment]"] +Line 310: Unexpected errors ["./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment]"] +Line 312: Unexpected errors ["./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment]"] +Line 313: Unexpected errors ["./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str) -> str [incompatible_assignment]"] """ output = """ +./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:36:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...]) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:37:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: str | None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:67:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:68:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:69:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:70:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4 (Protocol with members '__call__', 'other_attribute'), got (x: int) -> None [incompatible_assignment] +./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation] ./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation] +./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation] +./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment] +./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment] +./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment] +./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] +./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment] +./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment] +./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:311:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default (Protocol with members '__call__'), got (*, path: str) -> str [incompatible_assignment] +./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment] +./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 6302b27cc..2c6cf7e3e 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -8,7 +8,6 @@ Line 71: Expected 1 errors Line 77: Expected 1 errors Line 78: Expected 1 errors Line 111: Expected 1 errors -Line 140: Expected 1 errors Line 84: Unexpected errors ["./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute]"] """ output = """ @@ -21,4 +20,5 @@ output = """ ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute] +./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA (Protocol with members 'x', 'y', 'z'), got Annotated[./classes_classvar.py.ProtoAImpl, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=KnownValue(val='')), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./classes_classvar.py.ProtoAImpl', literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index a23ae35e4..dacefd965 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -21,6 +21,7 @@ Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:196:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_1' [undefined_attribute]"] Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute]"] +Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment]"] Line 213: Unexpected errors ["./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error]", './dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation]'] Line 216: Unexpected errors ['./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation]'] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] @@ -41,6 +42,7 @@ output = """ ./dataclasses_usage.py:196:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_1' [undefined_attribute] ./dataclasses_usage.py:198:12: Any[error] is not equivalent to str ./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute] +./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error] ./dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation] ./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 38bd55996..8541b1a40 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -11,9 +11,12 @@ Line 47: Expected 1 errors Line 48: Expected 1 errors Line 69: Expected 1 errors Line 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute]"] +Line 119: Unexpected errors ["./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 (Protocol with members 'foo') but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument]"] """ output = """ ./directives_deprecated.py:58:0: Annotated[./directives_deprecated.py.Invocable, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=AnyValue(source=))] is not callable [not_callable] +./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] ./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] ./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] +./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 (Protocol with members 'foo') but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_variance_inference.toml b/conformance/results/pycroscope/generics_variance_inference.toml index 6e36d8dcb..b32ac9a7f 100644 --- a/conformance/results/pycroscope/generics_variance_inference.toml +++ b/conformance/results/pycroscope/generics_variance_inference.toml @@ -1,31 +1,14 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 26: Unexpected errors ['./generics_variance_inference.py:26:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment]'] -Line 29: Unexpected errors ['./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment]'] -Line 40: Unexpected errors ['./generics_variance_inference.py:40:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant1[int] [incompatible_assignment]'] -Line 48: Unexpected errors ['./generics_variance_inference.py:48:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant2[int] [incompatible_assignment]'] -Line 57: Unexpected errors ['./generics_variance_inference.py:57:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant3[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant3[int] [incompatible_assignment]'] -Line 66: Unexpected errors ['./generics_variance_inference.py:66:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant4[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant4[int] [incompatible_assignment]'] -Line 79: Unexpected errors ['./generics_variance_inference.py:79:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant5[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant5[int] [incompatible_assignment]'] -Line 150: Unexpected errors ['./generics_variance_inference.py:150:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant1[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant1[float | int] [incompatible_assignment]'] -Line 182: Unexpected errors ['./generics_variance_inference.py:182:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant6[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant6[int] [incompatible_assignment]'] -Line 193: Unexpected errors ['./generics_variance_inference.py:193:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant2[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant2[float | int] [incompatible_assignment]'] """ output = """ ./generics_variance_inference.py:24:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] ./generics_variance_inference.py:25:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, float | int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] -./generics_variance_inference.py:26:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] ./generics_variance_inference.py:28:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] -./generics_variance_inference.py:29:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, float | int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] -./generics_variance_inference.py:40:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant1[int] [incompatible_assignment] ./generics_variance_inference.py:41:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant1[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant1[float | int] [incompatible_assignment] -./generics_variance_inference.py:48:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant2[int] [incompatible_assignment] ./generics_variance_inference.py:49:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant2[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant2[float | int] [incompatible_assignment] -./generics_variance_inference.py:57:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant3[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant3[int] [incompatible_assignment] ./generics_variance_inference.py:58:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant3[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant3[float | int] [incompatible_assignment] -./generics_variance_inference.py:66:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant4[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant4[int] [incompatible_assignment] ./generics_variance_inference.py:67:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant4[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant4[float | int] [incompatible_assignment] -./generics_variance_inference.py:79:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant5[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant5[int] [incompatible_assignment] ./generics_variance_inference.py:80:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant5[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant5[float | int] [incompatible_assignment] ./generics_variance_inference.py:96:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant1[int] [incompatible_assignment] ./generics_variance_inference.py:97:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant1[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant1[float | int] [incompatible_assignment] @@ -38,11 +21,8 @@ output = """ ./generics_variance_inference.py:130:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant4[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant4[int] [incompatible_assignment] ./generics_variance_inference.py:138:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant5[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant5[int] [incompatible_assignment] ./generics_variance_inference.py:149:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeContravariant1[int] [incompatible_assignment] -./generics_variance_inference.py:150:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant1[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant1[float | int] [incompatible_assignment] ./generics_variance_inference.py:169:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant6[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant6[float | int] [incompatible_assignment] ./generics_variance_inference.py:170:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant6[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant6[int] [incompatible_assignment] ./generics_variance_inference.py:181:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant6[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant6[float | int] [incompatible_assignment] -./generics_variance_inference.py:182:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant6[float | int], got .../tests/generics_variance_inference.py.ShouldBeCovariant6[int] [incompatible_assignment] -./generics_variance_inference.py:193:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant2[int], got .../tests/generics_variance_inference.py.ShouldBeContravariant2[float | int] [incompatible_assignment] ./generics_variance_inference.py:194:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeContravariant2[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/overloads_basic.toml b/conformance/results/pycroscope/overloads_basic.toml index 591f6f431..d5285d577 100644 --- a/conformance/results/pycroscope/overloads_basic.toml +++ b/conformance/results/pycroscope/overloads_basic.toml @@ -1,6 +1,10 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 37: Unexpected errors ['./overloads_basic.py:37:12: Literal[0] is not equivalent to int'] +Line 38: Unexpected errors ["./overloads_basic.py:38:12: Literal[b''] is not equivalent to bytes"] """ output = """ -./overloads_basic.py:36:0: Cannot call overloaded function [incompatible_argument] +./overloads_basic.py:37:12: Literal[0] is not equivalent to int +./overloads_basic.py:38:12: Literal[b''] is not equivalent to bytes +./overloads_basic.py:39:0: Cannot call overloaded function [incompatible_argument] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 1ef5b6646..e5d9117e1 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -2,17 +2,14 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 67: Expected 1 errors -Line 114: Expected 1 errors Line 115: Expected 1 errors Line 116: Expected 1 errors Line 117: Expected 1 errors -Line 156: Expected 1 errors Line 157: Expected 1 errors Line 158: Expected 1 errors Line 159: Expected 1 errors Line 160: Expected 1 errors Line 218: Expected 1 errors -Line 219: Expected 1 errors Line 285: Expected 1 errors Line 286: Expected 1 errors Line 287: Expected 1 errors @@ -21,6 +18,11 @@ Line 289: Expected 1 errors Line 339: Expected 1 errors Line 340: Expected 1 errors Line 341: Expected 1 errors +Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got Annotated[./protocols_definition.py.Concrete, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_definition.py.Concrete', literal_only=False)), 'name': SigParameter(name='name', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] """ output = """ +./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got Annotated[./protocols_definition.py.Concrete, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_definition.py.Concrete', literal_only=False)), 'name': SigParameter(name='name', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] +./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] +./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_explicit.toml b/conformance/results/pycroscope/protocols_explicit.toml index d80bfe872..a64a7e5ec 100644 --- a/conformance/results/pycroscope/protocols_explicit.toml +++ b/conformance/results/pycroscope/protocols_explicit.toml @@ -6,6 +6,8 @@ Line 60: Expected 1 errors Line 89: Expected 1 errors Line 134: Expected 1 errors Line 164: Expected 1 errors +Line 38: Unexpected errors ["./protocols_explicit.py:38:0: Incompatible assignment: expected ./protocols_explicit.py.PColor (Protocol with members 'complex_method', 'draw'), got Annotated[./protocols_explicit.py.NiceColor, HasAttrExtension(attribute_name=KnownValue(val='draw'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] """ output = """ +./protocols_explicit.py:38:0: Incompatible assignment: expected ./protocols_explicit.py.PColor (Protocol with members 'complex_method', 'draw'), got Annotated[./protocols_explicit.py.NiceColor, HasAttrExtension(attribute_name=KnownValue(val='draw'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index 6a8744978..df4b0bb50 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -1,17 +1,11 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 53: Expected 1 errors -Line 67: Expected 1 errors -Line 82: Expected 1 errors -Line 46: Unexpected errors ["./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] -Line 50: Unexpected errors ["./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] -Line 60: Unexpected errors ["./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got ./protocols_merging.py.SizedAndClosable2 (Protocol with members ) [incompatible_assignment]"] """ output = """ -./protocols_merging.py:46:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:50:0: Incompatible assignment: expected collections.abc.Sized (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__', 'close'), got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:53:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2 (Protocol with members '__len__', 'close'), got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:60:4: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__'), got ./protocols_merging.py.SizedAndClosable2 (Protocol with members ) [incompatible_assignment] +./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] +./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] ./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index 24aa5dc7b..93f4ea7a1 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -1,7 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors -Line 55: Expected 1 errors +Line 37: Unexpected errors ["./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment]"] Line 77: Unexpected errors ['./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation]'] Line 78: Unexpected errors ['./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation]'] Line 98: Unexpected errors ['./protocols_subtyping.py:98:8: Object Proto7 does not support subscripting [unsupported_operation]'] @@ -9,7 +9,9 @@ Line 99: Unexpected errors ['./protocols_subtyping.py:99:8: Object Proto7 does n Line 100: Unexpected errors ['./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation]'] """ output = """ -./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members ) [incompatible_assignment] +./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] +./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] +./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3 (Protocol with members 'method1', 'method2'), got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] ./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation] ./protocols_subtyping.py:79:8: Object Proto4 does not support subscripting [unsupported_operation] diff --git a/conformance/results/results.html b/conformance/results/results.html index 493e0c1ec..7ba5ecc19 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -474,7 +474,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Type qualifiers @@ -636,7 +636,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      protocols_modules Pass @@ -764,7 +764,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown      overloads_consistency Pass From 73a64172b1aa079ac411b133142fd66fc7387db1 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 26 Feb 2026 07:15:12 -0800 Subject: [PATCH 30/78] progress --- .../results/pycroscope/generics_defaults.toml | 9 ++- .../generics_typevartuple_args.toml | 4 +- .../generics_typevartuple_basic.toml | 12 +++- .../generics_typevartuple_callable.toml | 14 +++-- .../generics_typevartuple_concat.toml | 6 ++ .../generics_typevartuple_specialization.toml | 56 ++++++------------- .../generics_typevartuple_unpack.toml | 4 -- 7 files changed, 51 insertions(+), 54 deletions(-) diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 89cd944ed..eff67e7f5 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -21,7 +21,9 @@ Line 65: Unexpected errors ['./generics_defaults.py:65:9: Object AllTheDefaults Line 79: Unexpected errors ['./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference]', './generics_defaults.py:79:34: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] Line 81: Unexpected errors ['./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation]', './generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] -Line 94: Unexpected errors ['./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference]'] +Line 94: Unexpected errors ['./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference]', './generics_defaults.py:94:37: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]'] +Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error]', './generics_defaults.py:95:34: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]'] +Line 96: Unexpected errors ['./generics_defaults.py:96:12: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]', './generics_defaults.py:96:45: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]'] Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error]', './generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation]'] Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int'] """ @@ -56,6 +58,11 @@ output = """ ./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation] ./generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation] ./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference] +./generics_defaults.py:94:37: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] +./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error] +./generics_defaults.py:95:34: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] +./generics_defaults.py:96:12: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] +./generics_defaults.py:96:45: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error] ./generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation] diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 936428025..41da32134 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -15,7 +15,7 @@ Line 27: Unexpected errors ['./generics_typevartuple_args.py:27:30: Unrecognized Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[]'] Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] Line 42: Unexpected errors ['./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation]'] -Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation]'] +Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation]'] Line 62: Unexpected errors ['./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation]'] """ output = """ @@ -25,6 +25,6 @@ output = """ ./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[] ./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] ./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation] -./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[tuple[str, ...]], str]), node=) [invalid_annotation] +./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation] ./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 6459b9c12..e06f8dd68 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -1,7 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 42: Expected 1 errors -Line 43: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors Line 56: Expected 1 errors @@ -11,15 +9,23 @@ Line 90: Expected 1 errors Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors -Lines 44, 45: Expected error (tag 'v6') Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] +Line 36: Unexpected errors ['./generics_typevartuple_basic.py:36:4: Object Array does not support subscripting [unsupported_operation]'] +Line 37: Unexpected errors ['./generics_typevartuple_basic.py:37:4: Object Array does not support subscripting [unsupported_operation]'] +Line 38: Unexpected errors ['./generics_typevartuple_basic.py:38:4: Object Array does not support subscripting [unsupported_operation]'] Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] """ output = """ ./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] +./generics_typevartuple_basic.py:36:4: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:37:4: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:38:4: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:42:4: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:43:4: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:44:4: Object Array does not support subscripting [unsupported_operation] ./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index d5670c78e..8254b02bd 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,14 +1,20 @@ conformance_automated = "Fail" errors_diff = """ Line 26: Expected 1 errors -Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int]'] -Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str]'] +Line 17: Unexpected errors ['./generics_typevartuple_callable.py:17:31: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation]'] +Line 29: Unexpected errors ['./generics_typevartuple_callable.py:29:13: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation]'] +Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str, int, complex | float | int]', './generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument]'] +Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str]', './generics_typevartuple_callable.py:42:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, d: str) -> tuple[str] [incompatible_argument]'] Line 45: Unexpected errors ['./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation]'] Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ -./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str, int, complex | float | int] -./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[generic_argument], ...], Any[generic_argument]] is not equivalent to tuple[str] +./generics_typevartuple_callable.py:17:31: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation] +./generics_typevartuple_callable.py:29:13: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation] +./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str, int, complex | float | int] +./generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument] +./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str] +./generics_typevartuple_callable.py:42:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, d: str) -> tuple[str] [incompatible_argument] ./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation] ./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index 886bbb9fe..00b28fb75 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,7 +1,13 @@ conformance_automated = "Fail" errors_diff = """ +Line 40: Unexpected errors ['./generics_typevartuple_concat.py:40:19: Object Array does not support subscripting [unsupported_operation]'] +Line 42: Unexpected errors ['./generics_typevartuple_concat.py:42:19: Object Array does not support subscripting [unsupported_operation]'] +Line 44: Unexpected errors ['./generics_typevartuple_concat.py:44:19: Object Array does not support subscripting [unsupported_operation]'] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ +./generics_typevartuple_concat.py:40:19: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_concat.py:42:19: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_concat.py:44:19: Object Array does not support subscripting [unsupported_operation] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index b76f2ac4e..0bddd329b 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -5,61 +5,37 @@ Line 110: Expected 1 errors Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors -Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 46: Unexpected errors ['./generics_typevartuple_specialization.py:46:16: Any[error] is not equivalent to tuple[int, float | int, bool]'] -Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]]'] -Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 51: Unexpected errors ['./generics_typevartuple_specialization.py:51:16: Any[error] is not equivalent to tuple[int]'] -Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]]'] -Line 92: Unexpected errors ['./generics_typevartuple_specialization.py:92:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:92:41: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 93: Unexpected errors ['./generics_typevartuple_specialization.py:93:16: Any[error] is not equivalent to tuple[str, int]'] -Line 94: Unexpected errors ['./generics_typevartuple_specialization.py:94:16: Any[error] is not equivalent to tuple[float | int]'] -Line 95: Unexpected errors ['./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]]'] -Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 134: Unexpected errors ['./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 42: Unexpected errors ['./generics_typevartuple_specialization.py:42:24: Object Array does not support subscripting [unsupported_operation]'] +Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]]', './generics_typevartuple_specialization.py:47:30: Object Array does not support subscripting [unsupported_operation]'] +Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]]', './generics_typevartuple_specialization.py:52:30: Object Array does not support subscripting [unsupported_operation]'] +Line 63: Unexpected errors ['./generics_typevartuple_specialization.py:63:13: Object Array2 does not support subscripting [unsupported_operation]'] +Line 64: Unexpected errors ['./generics_typevartuple_specialization.py:64:10: Object Array2 does not support subscripting [unsupported_operation]'] +Line 68: Unexpected errors ['./generics_typevartuple_specialization.py:68:19: Object Array2 does not support subscripting [unsupported_operation]'] +Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:19: Object Array2 does not support subscripting [unsupported_operation]'] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] -Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 147: Unexpected errors ['./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] -Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 157: Unexpected errors ['./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int]'] -Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] -Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] """ output = """ -./generics_typevartuple_specialization.py:45:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:42:24: Object Array does not support subscripting [unsupported_operation] ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:46:16: Any[error] is not equivalent to tuple[int, float | int, bool] ./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]] -./generics_typevartuple_specialization.py:50:13: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:47:30: Object Array does not support subscripting [unsupported_operation] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:51:16: Any[error] is not equivalent to tuple[int] ./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]] -./generics_typevartuple_specialization.py:92:13: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:92:41: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:93:16: Any[error] is not equivalent to tuple[str, int] -./generics_typevartuple_specialization.py:94:16: Any[error] is not equivalent to tuple[float | int] -./generics_typevartuple_specialization.py:95:16: tuple[Any[explicit]] is not equivalent to tuple[Any[explicit], *tuple[Any[explicit], ...]] +./generics_typevartuple_specialization.py:52:30: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:63:13: Object Array2 does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:64:10: Object Array2 does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:68:19: Object Array2 does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:69:19: Object Array2 does not support subscripting [unsupported_operation] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:134:13: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:134:32: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:134:58: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] ./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] ./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] -./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:147:14: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:147:40: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] ./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] -./generics_typevartuple_specialization.py:156:14: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:157:16: Any[error] is not equivalent to tuple[*tuple[int, ...], int] -./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] -./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index cdf092860..c986e09a8 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -1,12 +1,8 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors -Line 21: Unexpected errors ['./generics_typevartuple_unpack.py:21:30: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation]'] Line 36: Unexpected errors ['./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 44: Unexpected errors ['./generics_typevartuple_unpack.py:44:13: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation]'] """ output = """ -./generics_typevartuple_unpack.py:21:30: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation] ./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_unpack.py:44:13: Unrecognized annotation typing.Unpack[tuple[typing.Any, ...]] [invalid_annotation] """ From 9332fd68599f399e04c5fea8d701dcaf147ec1fa Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 26 Feb 2026 07:17:39 -0800 Subject: [PATCH 31/78] thought I already merged this --- .../pycroscope/annotations_forward_refs.toml | 4 +- .../pycroscope/callables_annotation.toml | 10 +- .../pycroscope/callables_protocol.toml | 12 +- .../results/pycroscope/classes_classvar.toml | 4 +- .../pycroscope/constructors_call_init.toml | 70 +++++----- .../pycroscope/constructors_call_new.toml | 56 ++++---- .../pycroscope/constructors_callable.toml | 52 ++++---- .../pycroscope/dataclasses_descriptors.toml | 12 +- .../pycroscope/dataclasses_match_args.toml | 14 +- .../results/pycroscope/dataclasses_slots.toml | 6 +- .../dataclasses_transform_class.toml | 4 +- .../dataclasses_transform_converter.toml | 4 +- .../results/pycroscope/dataclasses_usage.toml | 8 +- .../pycroscope/generics_base_class.toml | 22 ++-- .../results/pycroscope/generics_basic.toml | 2 +- .../results/pycroscope/generics_defaults.toml | 124 ++++++++++-------- .../generics_defaults_specialization.toml | 32 +++-- .../generics_paramspec_semantics.toml | 4 +- .../pycroscope/generics_self_basic.toml | 12 +- .../pycroscope/generics_self_usage.toml | 2 +- .../generics_syntax_infer_variance.toml | 100 +++++++------- .../pycroscope/generics_syntax_scoping.toml | 8 +- .../pycroscope/generics_type_erasure.toml | 64 ++++----- .../generics_typevartuple_args.toml | 4 +- .../generics_typevartuple_basic.toml | 18 +-- .../generics_typevartuple_concat.toml | 12 +- .../generics_typevartuple_specialization.toml | 32 ++--- .../results/pycroscope/generics_variance.toml | 110 ++++++++-------- .../pycroscope/protocols_class_objects.toml | 4 + .../pycroscope/protocols_recursive.toml | 4 +- .../pycroscope/protocols_subtyping.toml | 28 ++-- .../pycroscope/qualifiers_annotated.toml | 6 +- .../results/pycroscope/specialtypes_type.toml | 3 +- 33 files changed, 437 insertions(+), 410 deletions(-) diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 8ddd2423d..755c6688b 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -6,7 +6,7 @@ Line 14: Unexpected errors ['./annotations_forward_refs.py:14:8: Undefined name: Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name]'] Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] -Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] +Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[from_another]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] """ @@ -18,7 +18,7 @@ output = """ ./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[explicit]] +./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[from_another]] ./annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:22:6: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:23:11: Undefined name: ClassA [undefined_name] diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 1ca5d1375..1b8a7068c 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -5,10 +5,10 @@ Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors Line 148: Unexpected errors ["./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] -Line 150: Unexpected errors ['./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation]'] +Line 150: Unexpected errors ["./callables_annotation.py:150:9: Object does not support subscripting [unsupported_operation]"] Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] Line 154: Unexpected errors ["./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] -Line 155: Unexpected errors ['./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation]'] +Line 155: Unexpected errors ["./callables_annotation.py:155:9: Object does not support subscripting [unsupported_operation]"] Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ @@ -21,12 +21,12 @@ output = """ ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] ./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] -./callables_annotation.py:150:9: Object Proto5 does not support subscripting [unsupported_operation] +./callables_annotation.py:150:9: Object does not support subscripting [unsupported_operation] ./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] ./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] -./callables_annotation.py:155:9: Object Proto4 does not support subscripting [unsupported_operation] +./callables_annotation.py:155:9: Object does not support subscripting [unsupported_operation] ./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:159:10: Object Proto5 does not support subscripting [unsupported_operation] +./callables_annotation.py:159:10: Object does not support subscripting [unsupported_operation] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] ./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 510b168a6..3f7d1c181 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -11,10 +11,10 @@ Line 80: Unexpected errors ["./callables_protocol.py:80:0: Incompatible assignme Line 81: Unexpected errors ["./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment]"] Line 82: Unexpected errors ["./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] Line 109: Unexpected errors ["./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment]"] -Line 135: Unexpected errors ['./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation]'] -Line 144: Unexpected errors ['./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation]'] +Line 135: Unexpected errors ["./callables_protocol.py:135:7: Object does not support subscripting [unsupported_operation]"] +Line 144: Unexpected errors ["./callables_protocol.py:144:7: Object does not support subscripting [unsupported_operation]"] Line 168: Unexpected errors ["./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]"] -Line 184: Unexpected errors ['./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation]'] +Line 184: Unexpected errors ["./callables_protocol.py:184:21: Object does not support subscripting [unsupported_operation]"] Line 216: Unexpected errors ["./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment]"] Line 236: Unexpected errors ["./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] Line 237: Unexpected errors ["./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] @@ -45,11 +45,11 @@ output = """ ./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4 (Protocol with members '__call__', 'other_attribute'), got (x: int) -> None [incompatible_assignment] ./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:135:7: Object Proto7 does not support subscripting [unsupported_operation] -./callables_protocol.py:144:7: Object Proto7 does not support subscripting [unsupported_operation] +./callables_protocol.py:135:7: Object does not support subscripting [unsupported_operation] +./callables_protocol.py:144:7: Object does not support subscripting [unsupported_operation] ./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: int) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:184:21: Object Proto9 does not support subscripting [unsupported_operation] +./callables_protocol.py:184:21: Object does not support subscripting [unsupported_operation] ./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment] ./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 2c6cf7e3e..bb51d6dec 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -8,7 +8,7 @@ Line 71: Expected 1 errors Line 77: Expected 1 errors Line 78: Expected 1 errors Line 111: Expected 1 errors -Line 84: Unexpected errors ["./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute]"] +Line 84: Unexpected errors ["./classes_classvar.py:84:12: has no attribute 'good5' [undefined_attribute]"] """ output = """ ./classes_classvar.py:38:10: Invalid type annotation (, ) [invalid_annotation] @@ -19,6 +19,6 @@ output = """ ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] -./classes_classvar.py:84:12: ClassA has no attribute 'good5' [undefined_attribute] +./classes_classvar.py:84:12: has no attribute 'good5' [undefined_attribute] ./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA (Protocol with members 'x', 'y', 'z'), got Annotated[./classes_classvar.py.ProtoAImpl, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=KnownValue(val='')), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./classes_classvar.py.ProtoAImpl', literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index d7fd8b31c..c029f92ec 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -3,48 +3,48 @@ errors_diff = """ Line 42: Expected 1 errors Line 107: Expected 1 errors Line 130: Expected 1 errors -Line 19: Unexpected errors ['./constructors_call_init.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] -Line 20: Unexpected errors ['./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] -Line 24: Unexpected errors ["./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation]'] -Line 25: Unexpected errors ["./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation]'] -Line 37: Unexpected errors ['./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation]'] -Line 55: Unexpected errors ['./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation]'] -Line 72: Unexpected errors ["./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation]'] -Line 73: Unexpected errors ['./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation]', './constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation]'] -Line 74: Unexpected errors ["./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation]'] -Line 75: Unexpected errors ["./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", './constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation]'] -Line 91: Unexpected errors ["./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation]'] -Line 92: Unexpected errors ['./constructors_call_init.py:92:12: Object Class6 does not support subscripting [unsupported_operation]', './constructors_call_init.py:92:37: Object Class6 does not support subscripting [unsupported_operation]'] -Line 99: Unexpected errors ["./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation]'] -Line 100: Unexpected errors ['./constructors_call_init.py:100:12: Object Class7 does not support subscripting [unsupported_operation]', './constructors_call_init.py:100:37: Object Class7 does not support subscripting [unsupported_operation]'] +Line 19: Unexpected errors ["./constructors_call_init.py:19:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:19:28: Object does not support subscripting [unsupported_operation]"] +Line 20: Unexpected errors ["./constructors_call_init.py:20:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:20:30: Object does not support subscripting [unsupported_operation]"] +Line 24: Unexpected errors ["./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:24:23: Object does not support subscripting [unsupported_operation]"] +Line 25: Unexpected errors ["./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:25:25: Object does not support subscripting [unsupported_operation]"] +Line 37: Unexpected errors ["./constructors_call_init.py:37:13: Object does not support subscripting [unsupported_operation]"] +Line 55: Unexpected errors ["./constructors_call_init.py:55:0: Object does not support subscripting [unsupported_operation]"] +Line 72: Unexpected errors ["./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", "./constructors_call_init.py:72:23: Object does not support subscripting [unsupported_operation]"] +Line 73: Unexpected errors ["./constructors_call_init.py:73:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:73:28: Object does not support subscripting [unsupported_operation]"] +Line 74: Unexpected errors ["./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", "./constructors_call_init.py:74:24: Object does not support subscripting [unsupported_operation]"] +Line 75: Unexpected errors ["./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", "./constructors_call_init.py:75:25: Object does not support subscripting [unsupported_operation]"] +Line 91: Unexpected errors ["./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:91:27: Object does not support subscripting [unsupported_operation]"] +Line 92: Unexpected errors ["./constructors_call_init.py:92:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:92:37: Object does not support subscripting [unsupported_operation]"] +Line 99: Unexpected errors ["./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:99:27: Object does not support subscripting [unsupported_operation]"] +Line 100: Unexpected errors ["./constructors_call_init.py:100:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:100:37: Object does not support subscripting [unsupported_operation]"] """ output = """ -./constructors_call_init.py:19:12: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_init.py:19:28: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_init.py:20:12: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_init.py:20:30: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_init.py:21:0: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:19:12: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:19:28: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:20:12: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:20:30: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:21:0: Object does not support subscripting [unsupported_operation] ./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:24:23: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_init.py:24:23: Object does not support subscripting [unsupported_operation] ./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:25:25: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_init.py:37:13: Object Class2 does not support subscripting [unsupported_operation] -./constructors_call_init.py:55:0: Object Class4 does not support subscripting [unsupported_operation] -./constructors_call_init.py:56:0: Object Class4 does not support subscripting [unsupported_operation] +./constructors_call_init.py:25:25: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:37:13: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:55:0: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:56:0: Object does not support subscripting [unsupported_operation] ./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] -./constructors_call_init.py:72:23: Object Class5 does not support subscripting [unsupported_operation] -./constructors_call_init.py:73:12: Object Class5 does not support subscripting [unsupported_operation] -./constructors_call_init.py:73:28: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:72:23: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:73:12: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:73:28: Object does not support subscripting [unsupported_operation] ./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] -./constructors_call_init.py:74:24: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:74:24: Object does not support subscripting [unsupported_operation] ./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] -./constructors_call_init.py:75:25: Object Class5 does not support subscripting [unsupported_operation] +./constructors_call_init.py:75:25: Object does not support subscripting [unsupported_operation] ./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:91:27: Object Class6 does not support subscripting [unsupported_operation] -./constructors_call_init.py:92:12: Object Class6 does not support subscripting [unsupported_operation] -./constructors_call_init.py:92:37: Object Class6 does not support subscripting [unsupported_operation] +./constructors_call_init.py:91:27: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:92:12: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:92:37: Object does not support subscripting [unsupported_operation] ./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:99:27: Object Class7 does not support subscripting [unsupported_operation] -./constructors_call_init.py:100:12: Object Class7 does not support subscripting [unsupported_operation] -./constructors_call_init.py:100:37: Object Class7 does not support subscripting [unsupported_operation] +./constructors_call_init.py:99:27: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:100:12: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:100:37: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index bfb3bc3c8..40fe79bee 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,47 +1,47 @@ conformance_automated = "Fail" errors_diff = """ -Line 19: Unexpected errors ['./constructors_call_new.py:19:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:19:28: Object Class1 does not support subscripting [unsupported_operation]'] -Line 20: Unexpected errors ['./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation]', './constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation]'] -Line 23: Unexpected errors ["./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation]'] -Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation]'] -Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation]'] -Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation]'] +Line 19: Unexpected errors ["./constructors_call_new.py:19:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:19:28: Object does not support subscripting [unsupported_operation]"] +Line 20: Unexpected errors ["./constructors_call_new.py:20:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:20:30: Object does not support subscripting [unsupported_operation]"] +Line 23: Unexpected errors ["./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:23:23: Object does not support subscripting [unsupported_operation]"] +Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:24:25: Object does not support subscripting [unsupported_operation]"] +Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:35:23: Object does not support subscripting [unsupported_operation]"] +Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:36:24: Object does not support subscripting [unsupported_operation]"] Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation]'] -Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation]', './constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation]'] -Line 130: Unexpected errors ['./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation]'] -Line 134: Unexpected errors ['./constructors_call_new.py:134:5: Object Class9 does not support subscripting [unsupported_operation]'] -Line 147: Unexpected errors ['./constructors_call_new.py:147:0: Object Class11 does not support subscripting [unsupported_operation]'] +Line 117: Unexpected errors ["./constructors_call_new.py:117:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:117:27: Object does not support subscripting [unsupported_operation]"] +Line 118: Unexpected errors ["./constructors_call_new.py:118:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:118:27: Object does not support subscripting [unsupported_operation]"] +Line 130: Unexpected errors ["./constructors_call_new.py:130:14: Object does not support subscripting [unsupported_operation]"] +Line 134: Unexpected errors ["./constructors_call_new.py:134:5: Object does not support subscripting [unsupported_operation]"] +Line 147: Unexpected errors ["./constructors_call_new.py:147:0: Object does not support subscripting [unsupported_operation]"] """ output = """ -./constructors_call_new.py:19:12: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_new.py:19:28: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_new.py:20:12: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_new.py:20:30: Object Class1 does not support subscripting [unsupported_operation] -./constructors_call_new.py:21:0: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:19:12: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:19:28: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:20:12: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:20:30: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:21:0: Object does not support subscripting [unsupported_operation] ./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:23:23: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:23:23: Object does not support subscripting [unsupported_operation] ./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:24:25: Object Class1 does not support subscripting [unsupported_operation] +./constructors_call_new.py:24:25: Object does not support subscripting [unsupported_operation] ./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:35:23: Object Class2 does not support subscripting [unsupported_operation] +./constructors_call_new.py:35:23: Object does not support subscripting [unsupported_operation] ./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:36:24: Object Class2 does not support subscripting [unsupported_operation] +./constructors_call_new.py:36:24: Object does not support subscripting [unsupported_operation] ./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int ./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never ./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:117:12: Object Class8 does not support subscripting [unsupported_operation] -./constructors_call_new.py:117:27: Object Class8 does not support subscripting [unsupported_operation] -./constructors_call_new.py:118:12: Object Class8 does not support subscripting [unsupported_operation] -./constructors_call_new.py:118:27: Object Class8 does not support subscripting [unsupported_operation] -./constructors_call_new.py:130:14: Object Class9 does not support subscripting [unsupported_operation] -./constructors_call_new.py:134:5: Object Class9 does not support subscripting [unsupported_operation] -./constructors_call_new.py:147:0: Object Class11 does not support subscripting [unsupported_operation] -./constructors_call_new.py:148:0: Object Class11 does not support subscripting [unsupported_operation] +./constructors_call_new.py:117:12: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:117:27: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:118:12: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:118:27: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:130:14: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:134:5: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:147:0: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:148:0: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 1f622be1b..cfd75fc44 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -12,58 +12,58 @@ Line 129: Expected 1 errors Line 146: Expected 1 errors Line 186: Expected 1 errors Line 197: Expected 1 errors -Line 35: Unexpected errors ['./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument]'] +Line 35: Unexpected errors ["./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 37: Unexpected errors ['./constructors_callable.py:37:12: Any[error] is not equivalent to ./constructors_callable.py.Class1'] -Line 48: Unexpected errors ['./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument]'] +Line 48: Unexpected errors ["./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 50: Unexpected errors ['./constructors_callable.py:50:12: Any[error] is not equivalent to ./constructors_callable.py.Class2'] -Line 63: Unexpected errors ['./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument]'] +Line 63: Unexpected errors ["./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 65: Unexpected errors ['./constructors_callable.py:65:12: Any[error] is not equivalent to ./constructors_callable.py.Class3'] -Line 78: Unexpected errors ['./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument]'] +Line 78: Unexpected errors ["./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[error] is not equivalent to int'] -Line 98: Unexpected errors ['./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument]'] +Line 98: Unexpected errors ["./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[error] is not equivalent to Never'] Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[error] is not equivalent to Never'] -Line 126: Unexpected errors ['./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument]'] +Line 126: Unexpected errors ["./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[error] is not equivalent to ./constructors_callable.py.Class6Proxy'] -Line 143: Unexpected errors ['./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument]'] -Line 162: Unexpected errors ['./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument]'] -Line 166: Unexpected errors ['./constructors_callable.py:166:19: Object Class7 does not support subscripting [unsupported_operation]'] -Line 167: Unexpected errors ['./constructors_callable.py:167:20: Object Class7 does not support subscripting [unsupported_operation]'] -Line 183: Unexpected errors ['./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument]'] -Line 185: Unexpected errors ['./constructors_callable.py:185:28: Object Class8 does not support subscripting [unsupported_operation]'] -Line 194: Unexpected errors ['./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument]'] +Line 143: Unexpected errors ["./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] +Line 162: Unexpected errors ["./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] +Line 166: Unexpected errors ["./constructors_callable.py:166:19: Object does not support subscripting [unsupported_operation]"] +Line 167: Unexpected errors ["./constructors_callable.py:167:20: Object does not support subscripting [unsupported_operation]"] +Line 183: Unexpected errors ["./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] +Line 185: Unexpected errors ["./constructors_callable.py:185:28: Object does not support subscripting [unsupported_operation]"] +Line 194: Unexpected errors ["./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9'] """ output = """ -./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class1 [incompatible_argument] +./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:37:12: Any[error] is not equivalent to ./constructors_callable.py.Class1 -./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class2 [incompatible_argument] +./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:50:12: Any[error] is not equivalent to ./constructors_callable.py.Class2 -./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class3 [incompatible_argument] +./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:65:12: Any[error] is not equivalent to ./constructors_callable.py.Class3 -./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class4 [incompatible_argument] +./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:80:12: Any[error] is not equivalent to int -./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class5 [incompatible_argument] +./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:102:16: Any[error] is not equivalent to Never ./constructors_callable.py:107:16: Any[error] is not equivalent to Never -./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6 [incompatible_argument] +./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:128:12: Any[error] is not equivalent to ./constructors_callable.py.Class6Proxy -./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class6Any [incompatible_argument] +./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class7 [incompatible_argument] +./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:166:19: Object Class7 does not support subscripting [unsupported_operation] -./constructors_callable.py:167:20: Object Class7 does not support subscripting [unsupported_operation] -./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class8 [incompatible_argument] +./constructors_callable.py:166:19: Object does not support subscripting [unsupported_operation] +./constructors_callable.py:167:20: Object does not support subscripting [unsupported_operation] +./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:185:28: Object Class8 does not support subscripting [unsupported_operation] -./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got Class9 [incompatible_argument] +./constructors_callable.py:185:28: Object does not support subscripting [unsupported_operation] +./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9 """ diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index 55b9b1d04..27878a647 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,9 +1,9 @@ conformance_automated = "Fail" errors_diff = """ Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int'] -Line 56: Unexpected errors ['./dataclasses_descriptors.py:56:7: Object Desc2 does not support subscripting [unsupported_operation]'] -Line 57: Unexpected errors ['./dataclasses_descriptors.py:57:7: Object Desc2 does not support subscripting [unsupported_operation]'] -Line 58: Unexpected errors ['./dataclasses_descriptors.py:58:7: Object Desc2 does not support subscripting [unsupported_operation]'] +Line 56: Unexpected errors ["./dataclasses_descriptors.py:56:7: Object does not support subscripting [unsupported_operation]"] +Line 57: Unexpected errors ["./dataclasses_descriptors.py:57:7: Object does not support subscripting [unsupported_operation]"] +Line 58: Unexpected errors ["./dataclasses_descriptors.py:58:7: Object does not support subscripting [unsupported_operation]"] Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int]'] Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str]'] Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str]'] @@ -13,9 +13,9 @@ Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[error] is """ output = """ ./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int -./dataclasses_descriptors.py:56:7: Object Desc2 does not support subscripting [unsupported_operation] -./dataclasses_descriptors.py:57:7: Object Desc2 does not support subscripting [unsupported_operation] -./dataclasses_descriptors.py:58:7: Object Desc2 does not support subscripting [unsupported_operation] +./dataclasses_descriptors.py:56:7: Object does not support subscripting [unsupported_operation] +./dataclasses_descriptors.py:57:7: Object does not support subscripting [unsupported_operation] +./dataclasses_descriptors.py:58:7: Object does not support subscripting [unsupported_operation] ./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int] ./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str] ./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str] diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml index 8673d79cb..5e935aa4c 100644 --- a/conformance/results/pycroscope/dataclasses_match_args.toml +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -1,19 +1,19 @@ conformance_automated = "Fail" errors_diff = """ Line 15: Unexpected errors ['./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation]'] -Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:18:12: DC1 has no attribute '__match_args__' [undefined_attribute]"] -Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:26:12: DC2 has no attribute '__match_args__' [undefined_attribute]"] -Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:34:12: DC3 has no attribute '__match_args__' [undefined_attribute]"] +Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:18:12: has no attribute '__match_args__' [undefined_attribute]"] +Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:26:12: has no attribute '__match_args__' [undefined_attribute]"] +Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:34:12: has no attribute '__match_args__' [undefined_attribute]"] Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[]'] """ output = """ ./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation] ./dataclasses_match_args.py:18:12: Any[error] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:18:12: DC1 has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:18:12: has no attribute '__match_args__' [undefined_attribute] ./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:26:12: DC2 has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:26:12: has no attribute '__match_args__' [undefined_attribute] ./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:34:12: DC3 has no attribute '__match_args__' [undefined_attribute] -./dataclasses_match_args.py:42:0: DC4 has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:34:12: has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:42:0: has no attribute '__match_args__' [undefined_attribute] ./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[] """ diff --git a/conformance/results/pycroscope/dataclasses_slots.toml b/conformance/results/pycroscope/dataclasses_slots.toml index f48d629f4..e67fd8fc3 100644 --- a/conformance/results/pycroscope/dataclasses_slots.toml +++ b/conformance/results/pycroscope/dataclasses_slots.toml @@ -3,12 +3,12 @@ errors_diff = """ Line 25: Expected 1 errors Line 38: Expected 1 errors Lines 10, 11: Expected error (tag 'DC1') -Line 56: Unexpected errors ["./dataclasses_slots.py:56:0: DC5 has no attribute '__slots__' [undefined_attribute]"] +Line 56: Unexpected errors ["./dataclasses_slots.py:56:0: has no attribute '__slots__' [undefined_attribute]"] Line 57: Unexpected errors ["./dataclasses_slots.py:57:0: ./dataclasses_slots.py.DC5 has no attribute '__slots__' [undefined_attribute]"] """ output = """ -./dataclasses_slots.py:56:0: DC5 has no attribute '__slots__' [undefined_attribute] +./dataclasses_slots.py:56:0: has no attribute '__slots__' [undefined_attribute] ./dataclasses_slots.py:57:0: ./dataclasses_slots.py.DC5 has no attribute '__slots__' [undefined_attribute] -./dataclasses_slots.py:66:0: DC6 has no attribute '__slots__' [undefined_attribute] +./dataclasses_slots.py:66:0: has no attribute '__slots__' [undefined_attribute] ./dataclasses_slots.py:69:0: ./dataclasses_slots.py.DC6 has no attribute '__slots__' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 934d6e9f2..305fffe86 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -6,8 +6,8 @@ Line 66: Expected 1 errors Line 72: Expected 1 errors Line 82: Expected 1 errors Line 122: Expected 1 errors -Line 102: Unexpected errors ['./dataclasses_transform_class.py:102:22: Object GenericModelBase does not support subscripting [unsupported_operation]'] +Line 102: Unexpected errors ["./dataclasses_transform_class.py:102:22: Object does not support subscripting [unsupported_operation]"] """ output = """ -./dataclasses_transform_class.py:102:22: Object GenericModelBase does not support subscripting [unsupported_operation] +./dataclasses_transform_class.py:102:22: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index ac456b921..12b9aa1ad 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -5,12 +5,12 @@ Line 108: Expected 1 errors Line 109: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors -Line 102: Unexpected errors ['./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument]'] +Line 102: Unexpected errors ["./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got [incompatible_argument]"] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] -./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got ConverterClass [incompatible_argument] +./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got [incompatible_argument] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index dacefd965..2c9063097 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -22,8 +22,8 @@ Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:196:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_1' [undefined_attribute]"] Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute]"] Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment]"] -Line 213: Unexpected errors ["./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error]", './dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation]'] -Line 216: Unexpected errors ['./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation]'] +Line 213: Unexpected errors ["./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error]", "./dataclasses_usage.py:213:21: Object does not support subscripting [unsupported_operation]"] +Line 216: Unexpected errors ["./dataclasses_usage.py:216:11: Object does not support subscripting [unsupported_operation]"] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] """ output = """ @@ -44,7 +44,7 @@ output = """ ./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute] ./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error] -./dataclasses_usage.py:213:21: Object DC16 does not support subscripting [unsupported_operation] -./dataclasses_usage.py:216:11: Object DC16 does not support subscripting [unsupported_operation] +./dataclasses_usage.py:213:21: Object does not support subscripting [unsupported_operation] +./dataclasses_usage.py:216:11: Object does not support subscripting [unsupported_operation] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index 1221b9f7a..21f834e64 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -1,23 +1,27 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors Line 29: Expected 1 errors Line 30: Expected 1 errors Line 68: Expected 1 errors +Line 24: Unexpected errors ['./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] +Line 25: Unexpected errors ['./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[./generics_base_class.py.Node]] but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[generic_argument] is not equivalent to collections.abc.Iterator[int]'] Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool'] Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[from_another] is not equivalent to int'] -Line 84: Unexpected errors ['./generics_base_class.py:84:12: Object Parent1 does not support subscripting [unsupported_operation]', './generics_base_class.py:84:29: Object Parent2 does not support subscripting [unsupported_operation]'] -Line 97: Unexpected errors ['./generics_base_class.py:97:13: Object Grandparent does not support subscripting [unsupported_operation]'] +Line 84: Unexpected errors ["./generics_base_class.py:84:12: Object does not support subscripting [unsupported_operation]", "./generics_base_class.py:84:29: Object does not support subscripting [unsupported_operation]"] +Line 97: Unexpected errors ["./generics_base_class.py:97:13: Object does not support subscripting [unsupported_operation]"] """ output = """ +./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument] +./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[./generics_base_class.py.Node]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] +./generics_base_class.py:26:25: Incompatible argument type for x: expected dict[str, list[object]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] ./generics_base_class.py:45:16: Any[generic_argument] is not equivalent to collections.abc.Iterator[int] ./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool -./generics_base_class.py:49:21: Object LinkedList does not support subscripting [unsupported_operation] +./generics_base_class.py:49:21: Object does not support subscripting [unsupported_operation] ./generics_base_class.py:58:16: Any[from_another] is not equivalent to int -./generics_base_class.py:61:17: Object MyDict does not support subscripting [unsupported_operation] -./generics_base_class.py:84:12: Object Parent1 does not support subscripting [unsupported_operation] -./generics_base_class.py:84:29: Object Parent2 does not support subscripting [unsupported_operation] -./generics_base_class.py:97:13: Object Grandparent does not support subscripting [unsupported_operation] -./generics_base_class.py:98:31: Object Grandparent does not support subscripting [unsupported_operation] +./generics_base_class.py:61:17: Object does not support subscripting [unsupported_operation] +./generics_base_class.py:84:12: Object does not support subscripting [unsupported_operation] +./generics_base_class.py:84:29: Object does not support subscripting [unsupported_operation] +./generics_base_class.py:97:13: Object does not support subscripting [unsupported_operation] +./generics_base_class.py:98:31: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 31bc376cd..638fc65e2 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -37,5 +37,5 @@ output = """ ./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:154:16: Any[from_another] is not equivalent to int ./generics_basic.py:155:16: Any[from_another] is not equivalent to int -./generics_basic.py:208:36: Object GenericMeta does not support subscripting [unsupported_operation] +./generics_basic.py:208:36: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index eff67e7f5..062deb66d 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -4,67 +4,81 @@ Line 24: Expected 1 errors Line 107: Expected 1 errors Line 114: Expected 1 errors Line 143: Expected 1 errors -Line 30: Unexpected errors ['./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference]', './generics_defaults.py:30:32: Object NoNonDefaults does not support subscripting [unsupported_operation]'] -Line 31: Unexpected errors ['./generics_defaults.py:31:12: Object NoNonDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:31:37: Object NoNonDefaults does not support subscripting [unsupported_operation]'] -Line 32: Unexpected errors ['./generics_defaults.py:32:12: Object NoNonDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:32:42: Object NoNonDefaults does not support subscripting [unsupported_operation]'] -Line 38: Unexpected errors ['./generics_defaults.py:38:12: Object OneDefault does not support subscripting [unsupported_operation]', './generics_defaults.py:38:36: Object OneDefault does not support subscripting [unsupported_operation]'] -Line 39: Unexpected errors ['./generics_defaults.py:39:12: Object OneDefault does not support subscripting [unsupported_operation]', './generics_defaults.py:39:33: Object OneDefault does not support subscripting [unsupported_operation]'] -Line 45: Unexpected errors ['./generics_defaults.py:45:12: AllTheDefaults is not equivalent to Any[inference]', './generics_defaults.py:45:33: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 47: Unexpected errors ['./generics_defaults.py:47:4: Object AllTheDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:47:39: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 53: Unexpected errors ['./generics_defaults.py:53:4: Object AllTheDefaults does not support subscripting [unsupported_operation]', './generics_defaults.py:53:39: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 56: Unexpected errors ['./generics_defaults.py:56:4: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 57: Unexpected errors ['./generics_defaults.py:57:9: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 60: Unexpected errors ['./generics_defaults.py:60:4: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 61: Unexpected errors ['./generics_defaults.py:61:9: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 64: Unexpected errors ['./generics_defaults.py:64:4: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 65: Unexpected errors ['./generics_defaults.py:65:9: Object AllTheDefaults does not support subscripting [unsupported_operation]'] -Line 79: Unexpected errors ['./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference]', './generics_defaults.py:79:34: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] -Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] -Line 81: Unexpected errors ['./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation]', './generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation]'] -Line 94: Unexpected errors ['./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference]', './generics_defaults.py:94:37: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]'] -Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error]', './generics_defaults.py:95:34: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]'] -Line 96: Unexpected errors ['./generics_defaults.py:96:12: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]', './generics_defaults.py:96:45: Object Class_TypeVarTuple does not support subscripting [unsupported_operation]'] -Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error]', './generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation]'] +Line 30: Unexpected errors ["./generics_defaults.py:30:12: is not equivalent to type", "./generics_defaults.py:30:32: Object does not support subscripting [unsupported_operation]"] +Line 31: Unexpected errors ['./generics_defaults.py:31:12: Any[error] is not equivalent to type', "./generics_defaults.py:31:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:31:37: Object does not support subscripting [unsupported_operation]"] +Line 32: Unexpected errors ['./generics_defaults.py:32:12: Any[error] is not equivalent to type', "./generics_defaults.py:32:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:32:42: Object does not support subscripting [unsupported_operation]"] +Line 38: Unexpected errors ['./generics_defaults.py:38:12: Any[error] is not equivalent to type', "./generics_defaults.py:38:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:38:36: Object does not support subscripting [unsupported_operation]"] +Line 39: Unexpected errors ["./generics_defaults.py:39:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:39:33: Object does not support subscripting [unsupported_operation]"] +Line 45: Unexpected errors ["./generics_defaults.py:45:12: is not equivalent to type", "./generics_defaults.py:45:33: Object does not support subscripting [unsupported_operation]"] +Line 47: Unexpected errors ['./generics_defaults.py:47:4: Any[error] is not equivalent to type', "./generics_defaults.py:47:4: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:47:39: Object does not support subscripting [unsupported_operation]"] +Line 53: Unexpected errors ['./generics_defaults.py:53:4: Any[error] is not equivalent to type', "./generics_defaults.py:53:4: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:53:39: Object does not support subscripting [unsupported_operation]"] +Line 56: Unexpected errors ['./generics_defaults.py:56:4: Any[error] is not equivalent to type', "./generics_defaults.py:56:4: Object does not support subscripting [unsupported_operation]"] +Line 57: Unexpected errors ["./generics_defaults.py:57:9: Object does not support subscripting [unsupported_operation]"] +Line 60: Unexpected errors ['./generics_defaults.py:60:4: Any[error] is not equivalent to type', "./generics_defaults.py:60:4: Object does not support subscripting [unsupported_operation]"] +Line 61: Unexpected errors ["./generics_defaults.py:61:9: Object does not support subscripting [unsupported_operation]"] +Line 64: Unexpected errors ['./generics_defaults.py:64:4: Any[error] is not equivalent to type', "./generics_defaults.py:64:4: Object does not support subscripting [unsupported_operation]"] +Line 65: Unexpected errors ["./generics_defaults.py:65:9: Object does not support subscripting [unsupported_operation]"] +Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type", "./generics_defaults.py:79:34: Object does not support subscripting [unsupported_operation]"] +Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', "./generics_defaults.py:80:31: Object does not support subscripting [unsupported_operation]"] +Line 81: Unexpected errors ["./generics_defaults.py:81:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:81:45: Object does not support subscripting [unsupported_operation]"] +Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type", "./generics_defaults.py:94:37: Object does not support subscripting [unsupported_operation]"] +Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error]', "./generics_defaults.py:95:34: Object does not support subscripting [unsupported_operation]"] +Line 96: Unexpected errors ["./generics_defaults.py:96:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:96:45: Object does not support subscripting [unsupported_operation]"] +Line 156: Unexpected errors ["./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] +Line 157: Unexpected errors ["./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] +Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error]', "./generics_defaults.py:172:29: Object does not support subscripting [unsupported_operation]"] Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int'] """ output = """ -./generics_defaults.py:30:12: NoNonDefaults is not equivalent to Any[inference] -./generics_defaults.py:30:32: Object NoNonDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:31:12: Object NoNonDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:31:37: Object NoNonDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:32:12: Object NoNonDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:32:42: Object NoNonDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:38:12: Object OneDefault does not support subscripting [unsupported_operation] -./generics_defaults.py:38:36: Object OneDefault does not support subscripting [unsupported_operation] -./generics_defaults.py:39:12: Object OneDefault does not support subscripting [unsupported_operation] -./generics_defaults.py:39:33: Object OneDefault does not support subscripting [unsupported_operation] -./generics_defaults.py:45:12: AllTheDefaults is not equivalent to Any[inference] -./generics_defaults.py:45:33: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:47:4: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:47:39: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:50:0: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:53:4: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:53:39: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:56:4: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:57:9: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:60:4: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:61:9: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:64:4: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:65:9: Object AllTheDefaults does not support subscripting [unsupported_operation] -./generics_defaults.py:79:12: Class_ParamSpec is not equivalent to Any[inference] -./generics_defaults.py:79:34: Object Class_ParamSpec does not support subscripting [unsupported_operation] +./generics_defaults.py:30:12: is not equivalent to type +./generics_defaults.py:30:32: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:31:12: Any[error] is not equivalent to type +./generics_defaults.py:31:12: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:31:37: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:32:12: Any[error] is not equivalent to type +./generics_defaults.py:32:12: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:32:42: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:38:12: Any[error] is not equivalent to type +./generics_defaults.py:38:12: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:38:36: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:39:12: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:39:33: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:45:12: is not equivalent to type +./generics_defaults.py:45:33: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:47:4: Any[error] is not equivalent to type +./generics_defaults.py:47:4: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:47:39: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:50:0: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:53:4: Any[error] is not equivalent to type +./generics_defaults.py:53:4: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:53:39: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:56:4: Any[error] is not equivalent to type +./generics_defaults.py:56:4: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:57:9: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:60:4: Any[error] is not equivalent to type +./generics_defaults.py:60:4: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:61:9: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:64:4: Any[error] is not equivalent to type +./generics_defaults.py:64:4: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:65:9: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:79:12: is not equivalent to type +./generics_defaults.py:79:34: Object does not support subscripting [unsupported_operation] ./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] -./generics_defaults.py:80:31: Object Class_ParamSpec does not support subscripting [unsupported_operation] -./generics_defaults.py:81:12: Object Class_ParamSpec does not support subscripting [unsupported_operation] -./generics_defaults.py:81:45: Object Class_ParamSpec does not support subscripting [unsupported_operation] -./generics_defaults.py:94:12: Class_TypeVarTuple is not equivalent to Any[inference] -./generics_defaults.py:94:37: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] +./generics_defaults.py:80:31: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:81:12: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:81:45: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:94:12: is not equivalent to type +./generics_defaults.py:94:37: Object does not support subscripting [unsupported_operation] ./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error] -./generics_defaults.py:95:34: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] -./generics_defaults.py:96:12: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] -./generics_defaults.py:96:45: Object Class_TypeVarTuple does not support subscripting [unsupported_operation] +./generics_defaults.py:95:34: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:96:12: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:96:45: Object does not support subscripting [unsupported_operation] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int +./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] +./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] +./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] +./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation] ./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error] -./generics_defaults.py:172:29: Object Foo7 does not support subscripting [unsupported_operation] +./generics_defaults.py:172:29: Object does not support subscripting [unsupported_operation] ./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index a2aa90fad..706ea08bb 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -2,22 +2,26 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 55: Expected 1 errors -Line 22: Unexpected errors ['./generics_defaults_specialization.py:22:21: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation]'] -Line 26: Unexpected errors ['./generics_defaults_specialization.py:26:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation]'] -Line 27: Unexpected errors ['./generics_defaults_specialization.py:27:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation]'] -Line 42: Unexpected errors ['./generics_defaults_specialization.py:42:10: Object SubclassMe does not support subscripting [unsupported_operation]'] -Line 45: Unexpected errors ['./generics_defaults_specialization.py:45:12: Bar is not equivalent to Any[inference]'] -Line 50: Unexpected errors ['./generics_defaults_specialization.py:50:10: Object SubclassMe does not support subscripting [unsupported_operation]'] +Line 22: Unexpected errors ["./generics_defaults_specialization.py:22:21: Object does not support subscripting [unsupported_operation]"] +Line 26: Unexpected errors ["./generics_defaults_specialization.py:26:20: Object does not support subscripting [unsupported_operation]"] +Line 27: Unexpected errors ["./generics_defaults_specialization.py:27:20: Object does not support subscripting [unsupported_operation]"] +Line 42: Unexpected errors ["./generics_defaults_specialization.py:42:10: Object does not support subscripting [unsupported_operation]"] +Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]]"] +Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str]'] +Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool]'] +Line 50: Unexpected errors ["./generics_defaults_specialization.py:50:10: Object does not support subscripting [unsupported_operation]"] Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str'] -Line 65: Unexpected errors ['./generics_defaults_specialization.py:65:4: Object Baz does not support subscripting [unsupported_operation]'] +Line 65: Unexpected errors ["./generics_defaults_specialization.py:65:4: Object does not support subscripting [unsupported_operation]"] """ output = """ -./generics_defaults_specialization.py:22:21: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation] -./generics_defaults_specialization.py:26:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation] -./generics_defaults_specialization.py:27:20: Object SomethingWithNoDefaults does not support subscripting [unsupported_operation] -./generics_defaults_specialization.py:42:10: Object SubclassMe does not support subscripting [unsupported_operation] -./generics_defaults_specialization.py:45:12: Bar is not equivalent to Any[inference] -./generics_defaults_specialization.py:50:10: Object SubclassMe does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:22:21: Object does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:26:20: Object does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:27:20: Object does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:42:10: Object does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]] +./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str] +./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool] +./generics_defaults_specialization.py:50:10: Object does not support subscripting [unsupported_operation] ./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str -./generics_defaults_specialization.py:65:4: Object Baz does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:65:4: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index 4e34d5678..4b5b40d8a 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -1,6 +1,6 @@ conformance_automated = "Fail" errors_diff = """ -Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_paramspec_semantics.py.Y', literal_only=False)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation]'] +Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_paramspec_semantics.py.Y', literal_only=False)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_paramspec_semantics.py:82:20: Object does not support subscripting [unsupported_operation]"] Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str'] """ output = """ @@ -9,7 +9,7 @@ output = """ ./generics_paramspec_semantics.py:46:5: Cannot resolve type variables [incompatible_call] ./generics_paramspec_semantics.py:61:0: Cannot resolve type variables [incompatible_call] ./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_paramspec_semantics.py.Y', literal_only=False)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_paramspec_semantics.py:82:20: Object Y does not support subscripting [unsupported_operation] +./generics_paramspec_semantics.py:82:20: Object does not support subscripting [unsupported_operation] ./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str ./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] ./generics_paramspec_semantics.py:108:0: Incompatible argument type for args: expected tuple[bool, ...] but got tuple[Literal[1]] [incompatible_argument] diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index c98f5ed85..50b9df72c 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -6,9 +6,9 @@ Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle', "./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute]"] Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] -Line 75: Unexpected errors ['./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation]'] -Line 76: Unexpected errors ['./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation]'] -Line 84: Unexpected errors ['./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation]'] +Line 75: Unexpected errors ["./generics_self_basic.py:75:45: Object does not support subscripting [unsupported_operation]"] +Line 76: Unexpected errors ["./generics_self_basic.py:76:50: Object does not support subscripting [unsupported_operation]"] +Line 84: Unexpected errors ["./generics_self_basic.py:84:21: Object does not support subscripting [unsupported_operation]"] """ output = """ ./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape @@ -19,7 +19,7 @@ output = """ ./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle ./generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] -./generics_self_basic.py:75:45: Object Container does not support subscripting [unsupported_operation] -./generics_self_basic.py:76:50: Object Container does not support subscripting [unsupported_operation] -./generics_self_basic.py:84:21: Object Container does not support subscripting [unsupported_operation] +./generics_self_basic.py:75:45: Object does not support subscripting [unsupported_operation] +./generics_self_basic.py:76:50: Object does not support subscripting [unsupported_operation] +./generics_self_basic.py:84:21: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 1642f0924..d1d68852f 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -14,5 +14,5 @@ Line 93: Unexpected errors ["./generics_self_usage.py:93:12: ./generics_self_usa """ output = """ ./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child has no attribute 'return_concrete_type' [undefined_attribute] -./generics_self_usage.py:103:10: Object Bar does not support subscripting [unsupported_operation] +./generics_self_usage.py:103:10: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index ce8593ed9..176700e9d 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,63 +1,63 @@ conformance_automated = "Fail" errors_diff = """ -Line 28: Unexpected errors ['./generics_syntax_infer_variance.py:28:8: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:28:36: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation]'] -Line 46: Unexpected errors ['./generics_syntax_infer_variance.py:46:8: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:46:36: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation]'] -Line 55: Unexpected errors ['./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation]'] +Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:8: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:28:36: Object does not support subscripting [unsupported_operation]"] +Line 46: Unexpected errors ["./generics_syntax_infer_variance.py:46:8: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:46:36: Object does not support subscripting [unsupported_operation]"] +Line 55: Unexpected errors ["./generics_syntax_infer_variance.py:55:8: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:55:36: Object does not support subscripting [unsupported_operation]"] Line 81: Unexpected errors ["./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5 has no attribute '_x' [undefined_attribute]"] -Line 84: Unexpected errors ['./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation]'] -Line 95: Unexpected errors ['./generics_syntax_infer_variance.py:95:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:95:35: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation]'] +Line 84: Unexpected errors ["./generics_syntax_infer_variance.py:84:7: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:84:35: Object does not support subscripting [unsupported_operation]"] +Line 95: Unexpected errors ["./generics_syntax_infer_variance.py:95:7: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:95:35: Object does not support subscripting [unsupported_operation]"] Line 105: Unexpected errors ["./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1 has no attribute '_value' [undefined_attribute]"] Line 121: Unexpected errors ["./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2 has no attribute '_value' [undefined_attribute]"] -Line 166: Unexpected errors ['./generics_syntax_infer_variance.py:166:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]', './generics_syntax_infer_variance.py:166:42: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation]'] +Line 166: Unexpected errors ["./generics_syntax_infer_variance.py:166:12: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:166:42: Object does not support subscripting [unsupported_operation]"] """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:28:8: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:28:36: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:29:8: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:29:34: Object ShouldBeCovariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:46:8: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:46:36: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:47:8: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:47:34: Object ShouldBeCovariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:55:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:55:36: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:56:8: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:56:34: Object ShouldBeCovariant3 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:28:8: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:28:36: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:29:8: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:29:34: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:46:8: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:46:36: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:47:8: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:47:34: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:55:8: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:55:36: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:56:8: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:56:34: Object does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5 has no attribute '_x' [undefined_attribute] -./generics_syntax_infer_variance.py:84:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:84:35: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:85:7: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:85:33: Object ShouldBeCovariant5 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:95:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:95:35: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:96:7: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:96:33: Object ShouldBeCovariant6 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:84:7: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:84:35: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:85:7: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:85:33: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:95:7: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:95:35: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:96:7: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:96:33: Object does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1 has no attribute '_value' [undefined_attribute] -./generics_syntax_infer_variance.py:112:9: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:112:37: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:113:9: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:113:35: Object ShouldBeInvariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:112:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:112:37: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:113:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:113:35: Object does not support subscripting [unsupported_operation] ./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2 has no attribute '_value' [undefined_attribute] -./generics_syntax_infer_variance.py:127:9: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:127:37: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:128:9: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:128:35: Object ShouldBeInvariant2 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:135:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:135:42: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:136:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:136:40: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:137:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:137:42: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:138:9: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:138:40: Object ShouldBeInvariant3 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:146:9: Object ShouldBeInvariant4 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:146:37: Object ShouldBeInvariant4 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:154:9: Object ShouldBeInvariant5 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:154:37: Object ShouldBeInvariant5 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:165:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:165:44: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:166:12: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:166:42: Object ShouldBeContravariant1 does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:127:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:127:37: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:128:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:128:35: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:135:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:135:42: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:136:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:136:40: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:137:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:137:42: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:138:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:138:40: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:146:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:146:37: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:154:9: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:154:37: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:165:12: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:165:44: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:166:12: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:166:42: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index e6255e3ae..de9d26e76 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -6,14 +6,14 @@ Line 35: Expected 1 errors Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors -Line 31: Unexpected errors ['./generics_syntax_scoping.py:31:16: Object BaseClassC does not support subscripting [unsupported_operation]', './generics_syntax_scoping.py:31:37: Object Foo does not support subscripting [unsupported_operation]'] +Line 31: Unexpected errors ["./generics_syntax_scoping.py:31:16: Object does not support subscripting [unsupported_operation]", "./generics_syntax_scoping.py:31:37: Object does not support subscripting [unsupported_operation]"] Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] """ output = """ -./generics_syntax_scoping.py:31:16: Object BaseClassC does not support subscripting [unsupported_operation] -./generics_syntax_scoping.py:31:37: Object Foo does not support subscripting [unsupported_operation] -./generics_syntax_scoping.py:44:12: Object Foo does not support subscripting [unsupported_operation] +./generics_syntax_scoping.py:31:16: Object does not support subscripting [unsupported_operation] +./generics_syntax_scoping.py:31:37: Object does not support subscripting [unsupported_operation] +./generics_syntax_scoping.py:44:12: Object does not support subscripting [unsupported_operation] ./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index 38f03a398..2a94d6196 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -3,46 +3,46 @@ errors_diff = """ Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 17: Unexpected errors ["./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation]'] -Line 18: Unexpected errors ["./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation]'] -Line 19: Unexpected errors ["./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation]'] +Line 17: Unexpected errors ["./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_type_erasure.py:17:22: Object does not support subscripting [unsupported_operation]"] +Line 18: Unexpected errors ["./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_type_erasure.py:18:21: Object does not support subscripting [unsupported_operation]"] +Line 19: Unexpected errors ["./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_type_erasure.py:19:20: Object does not support subscripting [unsupported_operation]"] Line 21: Unexpected errors ['./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int'] -Line 27: Unexpected errors ['./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation]'] -Line 28: Unexpected errors ['./generics_type_erasure.py:28:16: Object Node does not support subscripting [unsupported_operation]'] -Line 29: Unexpected errors ['./generics_type_erasure.py:29:4: Object Node does not support subscripting [unsupported_operation]'] -Line 30: Unexpected errors ['./generics_type_erasure.py:30:16: Object Node does not support subscripting [unsupported_operation]'] -Line 32: Unexpected errors ['./generics_type_erasure.py:32:5: Object Node does not support subscripting [unsupported_operation]'] -Line 33: Unexpected errors ['./generics_type_erasure.py:33:16: Object Node does not support subscripting [unsupported_operation]'] -Line 34: Unexpected errors ['./generics_type_erasure.py:34:5: Object Node does not support subscripting [unsupported_operation]'] -Line 35: Unexpected errors ['./generics_type_erasure.py:35:16: Object Node does not support subscripting [unsupported_operation]'] -Line 37: Unexpected errors ['./generics_type_erasure.py:37:5: Object Node does not support subscripting [unsupported_operation]'] -Line 39: Unexpected errors ['./generics_type_erasure.py:39:5: Object Node does not support subscripting [unsupported_operation]'] +Line 27: Unexpected errors ["./generics_type_erasure.py:27:4: Object does not support subscripting [unsupported_operation]"] +Line 28: Unexpected errors ["./generics_type_erasure.py:28:16: Object does not support subscripting [unsupported_operation]"] +Line 29: Unexpected errors ["./generics_type_erasure.py:29:4: Object does not support subscripting [unsupported_operation]"] +Line 30: Unexpected errors ["./generics_type_erasure.py:30:16: Object does not support subscripting [unsupported_operation]"] +Line 32: Unexpected errors ["./generics_type_erasure.py:32:5: Object does not support subscripting [unsupported_operation]"] +Line 33: Unexpected errors ["./generics_type_erasure.py:33:16: Object does not support subscripting [unsupported_operation]"] +Line 34: Unexpected errors ["./generics_type_erasure.py:34:5: Object does not support subscripting [unsupported_operation]"] +Line 35: Unexpected errors ["./generics_type_erasure.py:35:16: Object does not support subscripting [unsupported_operation]"] +Line 37: Unexpected errors ["./generics_type_erasure.py:37:5: Object does not support subscripting [unsupported_operation]"] +Line 39: Unexpected errors ["./generics_type_erasure.py:39:5: Object does not support subscripting [unsupported_operation]"] Line 47: Unexpected errors ['./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int'] -Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int', './generics_type_erasure.py:48:12: Object Node does not support subscripting [unsupported_operation]'] +Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int', "./generics_type_erasure.py:48:12: Object does not support subscripting [unsupported_operation]"] """ output = """ ./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_type_erasure.py:17:22: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:17:22: Object does not support subscripting [unsupported_operation] ./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_type_erasure.py:18:21: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:18:21: Object does not support subscripting [unsupported_operation] ./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_type_erasure.py:19:20: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:19:20: Object does not support subscripting [unsupported_operation] ./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int -./generics_type_erasure.py:27:4: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:28:16: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:29:4: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:30:16: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:32:5: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:33:16: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:34:5: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:35:16: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:37:5: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:38:5: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:39:5: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:40:5: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:42:0: Object Node does not support subscripting [unsupported_operation] -./generics_type_erasure.py:43:0: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:27:4: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:28:16: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:29:4: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:30:16: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:32:5: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:33:16: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:34:5: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:35:16: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:37:5: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:38:5: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:39:5: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:40:5: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:42:0: Object does not support subscripting [unsupported_operation] +./generics_type_erasure.py:43:0: Object does not support subscripting [unsupported_operation] ./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int ./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int -./generics_type_erasure.py:48:12: Object Node does not support subscripting [unsupported_operation] +./generics_type_erasure.py:48:12: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 41da32134..6255d7f1c 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -11,7 +11,7 @@ Line 75: Expected 1 errors Line 76: Expected 1 errors Line 16: Unexpected errors ['./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] -Line 27: Unexpected errors ['./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation]'] +Line 27: Unexpected errors ["./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=PartialValue(operation=, root=KnownValue(val=), node=, members=(KnownValue(val=typing.Unpack[Ts]), SyntheticClassObjectValue(name='Env', class_type=TypedValue(typ='./generics_typevartuple_args.py.Env', literal_only=False))), runtime_value=TypedValue(typ=, literal_only=False)), node=) [invalid_annotation]"] Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[]'] Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] Line 42: Unexpected errors ['./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation]'] @@ -21,7 +21,7 @@ Line 62: Unexpected errors ['./generics_typevartuple_args.py:62:17: Unrecognized output = """ ./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[typing.Any]), node=) [invalid_annotation] +./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=PartialValue(operation=, root=KnownValue(val=), node=, members=(KnownValue(val=typing.Unpack[Ts]), SyntheticClassObjectValue(name='Env', class_type=TypedValue(typ='./generics_typevartuple_args.py.Env', literal_only=False))), runtime_value=TypedValue(typ=, literal_only=False)), node=) [invalid_annotation] ./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[] ./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] ./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index e06f8dd68..ca98eda97 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -11,21 +11,21 @@ Line 100: Expected 1 errors Line 106: Expected 1 errors Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] -Line 36: Unexpected errors ['./generics_typevartuple_basic.py:36:4: Object Array does not support subscripting [unsupported_operation]'] -Line 37: Unexpected errors ['./generics_typevartuple_basic.py:37:4: Object Array does not support subscripting [unsupported_operation]'] -Line 38: Unexpected errors ['./generics_typevartuple_basic.py:38:4: Object Array does not support subscripting [unsupported_operation]'] +Line 36: Unexpected errors ["./generics_typevartuple_basic.py:36:4: Object does not support subscripting [unsupported_operation]"] +Line 37: Unexpected errors ["./generics_typevartuple_basic.py:37:4: Object does not support subscripting [unsupported_operation]"] +Line 38: Unexpected errors ["./generics_typevartuple_basic.py:38:4: Object does not support subscripting [unsupported_operation]"] Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] """ output = """ ./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] -./generics_typevartuple_basic.py:36:4: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:37:4: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:38:4: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:42:4: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:43:4: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:44:4: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:36:4: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:37:4: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:38:4: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:42:4: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:43:4: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_basic.py:44:4: Object does not support subscripting [unsupported_operation] ./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index 00b28fb75..9afcbdcfc 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,13 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 40: Unexpected errors ['./generics_typevartuple_concat.py:40:19: Object Array does not support subscripting [unsupported_operation]'] -Line 42: Unexpected errors ['./generics_typevartuple_concat.py:42:19: Object Array does not support subscripting [unsupported_operation]'] -Line 44: Unexpected errors ['./generics_typevartuple_concat.py:44:19: Object Array does not support subscripting [unsupported_operation]'] +Line 40: Unexpected errors ["./generics_typevartuple_concat.py:40:19: Object does not support subscripting [unsupported_operation]"] +Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:19: Object does not support subscripting [unsupported_operation]"] +Line 44: Unexpected errors ["./generics_typevartuple_concat.py:44:19: Object does not support subscripting [unsupported_operation]"] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:40:19: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_concat.py:42:19: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_concat.py:44:19: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_concat.py:40:19: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_concat.py:42:19: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_concat.py:44:19: Object does not support subscripting [unsupported_operation] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 0bddd329b..6be5d10a2 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -5,15 +5,15 @@ Line 110: Expected 1 errors Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors -Line 42: Unexpected errors ['./generics_typevartuple_specialization.py:42:24: Object Array does not support subscripting [unsupported_operation]'] +Line 42: Unexpected errors ["./generics_typevartuple_specialization.py:42:24: Object does not support subscripting [unsupported_operation]"] Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]]', './generics_typevartuple_specialization.py:47:30: Object Array does not support subscripting [unsupported_operation]'] +Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, Any[error]]', "./generics_typevartuple_specialization.py:47:30: Object does not support subscripting [unsupported_operation]"] Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]]', './generics_typevartuple_specialization.py:52:30: Object Array does not support subscripting [unsupported_operation]'] -Line 63: Unexpected errors ['./generics_typevartuple_specialization.py:63:13: Object Array2 does not support subscripting [unsupported_operation]'] -Line 64: Unexpected errors ['./generics_typevartuple_specialization.py:64:10: Object Array2 does not support subscripting [unsupported_operation]'] -Line 68: Unexpected errors ['./generics_typevartuple_specialization.py:68:19: Object Array2 does not support subscripting [unsupported_operation]'] -Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:19: Object Array2 does not support subscripting [unsupported_operation]'] +Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]]', "./generics_typevartuple_specialization.py:52:30: Object does not support subscripting [unsupported_operation]"] +Line 63: Unexpected errors ["./generics_typevartuple_specialization.py:63:13: Object does not support subscripting [unsupported_operation]"] +Line 64: Unexpected errors ["./generics_typevartuple_specialization.py:64:10: Object does not support subscripting [unsupported_operation]"] +Line 68: Unexpected errors ["./generics_typevartuple_specialization.py:68:19: Object does not support subscripting [unsupported_operation]"] +Line 69: Unexpected errors ["./generics_typevartuple_specialization.py:69:19: Object does not support subscripting [unsupported_operation]"] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] @@ -21,17 +21,17 @@ Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] """ output = """ -./generics_typevartuple_specialization.py:42:24: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:42:24: Object does not support subscripting [unsupported_operation] ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[Any[explicit]] -./generics_typevartuple_specialization.py:47:30: Object Array does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, Any[error]] +./generics_typevartuple_specialization.py:47:30: Object does not support subscripting [unsupported_operation] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[Any[explicit]] -./generics_typevartuple_specialization.py:52:30: Object Array does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:63:13: Object Array2 does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:64:10: Object Array2 does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:68:19: Object Array2 does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:69:19: Object Array2 does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]] +./generics_typevartuple_specialization.py:52:30: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:63:13: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:64:10: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:68:19: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:69:19: Object does not support subscripting [unsupported_operation] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] ./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index a93c4f496..e218a5ecc 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -2,65 +2,65 @@ conformance_automated = "Fail" errors_diff = """ Line 191: Expected 1 errors Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') -Line 38: Unexpected errors ['./generics_variance.py:38:10: Object ImmutableList does not support subscripting [unsupported_operation]'] -Line 39: Unexpected errors ['./generics_variance.py:39:11: Object ImmutableList does not support subscripting [unsupported_operation]'] +Line 38: Unexpected errors ["./generics_variance.py:38:10: Object does not support subscripting [unsupported_operation]"] +Line 39: Unexpected errors ["./generics_variance.py:39:11: Object does not support subscripting [unsupported_operation]"] Line 45: Unexpected errors ['./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation]', './generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation]'] -Line 85: Unexpected errors ['./generics_variance.py:85:16: Object Co does not support subscripting [unsupported_operation]'] -Line 89: Unexpected errors ['./generics_variance.py:89:16: Object Co does not support subscripting [unsupported_operation]'] -Line 97: Unexpected errors ['./generics_variance.py:97:20: Object Contra does not support subscripting [unsupported_operation]'] -Line 101: Unexpected errors ['./generics_variance.py:101:20: Object Contra does not support subscripting [unsupported_operation]'] -Line 109: Unexpected errors ['./generics_variance.py:109:27: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:109:20: Object Contra does not support subscripting [unsupported_operation]'] -Line 117: Unexpected errors ['./generics_variance.py:117:27: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:117:20: Object Contra does not support subscripting [unsupported_operation]'] -Line 121: Unexpected errors ['./generics_variance.py:121:22: Object CoContra does not support subscripting [unsupported_operation]'] -Line 137: Unexpected errors ['./generics_variance.py:137:22: Object CoContra does not support subscripting [unsupported_operation]'] -Line 147: Unexpected errors ['./generics_variance.py:147:24: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:147:17: Object Contra does not support subscripting [unsupported_operation]'] -Line 151: Unexpected errors ['./generics_variance.py:151:28: Object Contra does not support subscripting [unsupported_operation]', './generics_variance.py:151:21: Object Contra does not support subscripting [unsupported_operation]'] -Line 155: Unexpected errors ['./generics_variance.py:155:16: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:155:13: Object Co does not support subscripting [unsupported_operation]'] -Line 159: Unexpected errors ['./generics_variance.py:159:17: Object Co does not support subscripting [unsupported_operation]', './generics_variance.py:159:20: Object Contra does not support subscripting [unsupported_operation]'] -Line 171: Unexpected errors ['./generics_variance.py:171:8: Object Co does not support subscripting [unsupported_operation]'] -Line 172: Unexpected errors ['./generics_variance.py:172:12: Object Contra does not support subscripting [unsupported_operation]'] +Line 85: Unexpected errors ["./generics_variance.py:85:16: Object does not support subscripting [unsupported_operation]"] +Line 89: Unexpected errors ["./generics_variance.py:89:16: Object does not support subscripting [unsupported_operation]"] +Line 97: Unexpected errors ["./generics_variance.py:97:20: Object does not support subscripting [unsupported_operation]"] +Line 101: Unexpected errors ["./generics_variance.py:101:20: Object does not support subscripting [unsupported_operation]"] +Line 109: Unexpected errors ["./generics_variance.py:109:27: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:109:20: Object does not support subscripting [unsupported_operation]"] +Line 117: Unexpected errors ["./generics_variance.py:117:27: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:117:20: Object does not support subscripting [unsupported_operation]"] +Line 121: Unexpected errors ["./generics_variance.py:121:22: Object does not support subscripting [unsupported_operation]"] +Line 137: Unexpected errors ["./generics_variance.py:137:22: Object does not support subscripting [unsupported_operation]"] +Line 147: Unexpected errors ["./generics_variance.py:147:24: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:147:17: Object does not support subscripting [unsupported_operation]"] +Line 151: Unexpected errors ["./generics_variance.py:151:28: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:151:21: Object does not support subscripting [unsupported_operation]"] +Line 155: Unexpected errors ["./generics_variance.py:155:16: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:155:13: Object does not support subscripting [unsupported_operation]"] +Line 159: Unexpected errors ["./generics_variance.py:159:17: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:159:20: Object does not support subscripting [unsupported_operation]"] +Line 171: Unexpected errors ["./generics_variance.py:171:8: Object does not support subscripting [unsupported_operation]"] +Line 172: Unexpected errors ["./generics_variance.py:172:12: Object does not support subscripting [unsupported_operation]"] """ output = """ ./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] -./generics_variance.py:38:10: Object ImmutableList does not support subscripting [unsupported_operation] -./generics_variance.py:39:11: Object ImmutableList does not support subscripting [unsupported_operation] +./generics_variance.py:38:10: Object does not support subscripting [unsupported_operation] +./generics_variance.py:39:11: Object does not support subscripting [unsupported_operation] ./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] ./generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation] -./generics_variance.py:77:13: Object Inv does not support subscripting [unsupported_operation] -./generics_variance.py:81:13: Object Inv does not support subscripting [unsupported_operation] -./generics_variance.py:85:16: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:89:16: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:93:16: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:97:20: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:101:20: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:105:20: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:109:27: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:109:20: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:113:27: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:113:20: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:117:27: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:117:20: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:121:22: Object CoContra does not support subscripting [unsupported_operation] -./generics_variance.py:126:4: Object CoContra does not support subscripting [unsupported_operation] -./generics_variance.py:132:4: Object CoContra does not support subscripting [unsupported_operation] -./generics_variance.py:137:22: Object CoContra does not support subscripting [unsupported_operation] -./generics_variance.py:142:13: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:142:23: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:142:4: Object CoContra does not support subscripting [unsupported_operation] -./generics_variance.py:147:24: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:147:17: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:151:28: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:151:21: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:155:16: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:155:13: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:159:17: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:159:20: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:163:32: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:163:35: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:163:25: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:167:43: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:167:36: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:167:29: Object Contra does not support subscripting [unsupported_operation] -./generics_variance.py:171:8: Object Co does not support subscripting [unsupported_operation] -./generics_variance.py:172:12: Object Contra does not support subscripting [unsupported_operation] +./generics_variance.py:77:13: Object does not support subscripting [unsupported_operation] +./generics_variance.py:81:13: Object does not support subscripting [unsupported_operation] +./generics_variance.py:85:16: Object does not support subscripting [unsupported_operation] +./generics_variance.py:89:16: Object does not support subscripting [unsupported_operation] +./generics_variance.py:93:16: Object does not support subscripting [unsupported_operation] +./generics_variance.py:97:20: Object does not support subscripting [unsupported_operation] +./generics_variance.py:101:20: Object does not support subscripting [unsupported_operation] +./generics_variance.py:105:20: Object does not support subscripting [unsupported_operation] +./generics_variance.py:109:27: Object does not support subscripting [unsupported_operation] +./generics_variance.py:109:20: Object does not support subscripting [unsupported_operation] +./generics_variance.py:113:27: Object does not support subscripting [unsupported_operation] +./generics_variance.py:113:20: Object does not support subscripting [unsupported_operation] +./generics_variance.py:117:27: Object does not support subscripting [unsupported_operation] +./generics_variance.py:117:20: Object does not support subscripting [unsupported_operation] +./generics_variance.py:121:22: Object does not support subscripting [unsupported_operation] +./generics_variance.py:126:4: Object does not support subscripting [unsupported_operation] +./generics_variance.py:132:4: Object does not support subscripting [unsupported_operation] +./generics_variance.py:137:22: Object does not support subscripting [unsupported_operation] +./generics_variance.py:142:13: Object does not support subscripting [unsupported_operation] +./generics_variance.py:142:23: Object does not support subscripting [unsupported_operation] +./generics_variance.py:142:4: Object does not support subscripting [unsupported_operation] +./generics_variance.py:147:24: Object does not support subscripting [unsupported_operation] +./generics_variance.py:147:17: Object does not support subscripting [unsupported_operation] +./generics_variance.py:151:28: Object does not support subscripting [unsupported_operation] +./generics_variance.py:151:21: Object does not support subscripting [unsupported_operation] +./generics_variance.py:155:16: Object does not support subscripting [unsupported_operation] +./generics_variance.py:155:13: Object does not support subscripting [unsupported_operation] +./generics_variance.py:159:17: Object does not support subscripting [unsupported_operation] +./generics_variance.py:159:20: Object does not support subscripting [unsupported_operation] +./generics_variance.py:163:32: Object does not support subscripting [unsupported_operation] +./generics_variance.py:163:35: Object does not support subscripting [unsupported_operation] +./generics_variance.py:163:25: Object does not support subscripting [unsupported_operation] +./generics_variance.py:167:43: Object does not support subscripting [unsupported_operation] +./generics_variance.py:167:36: Object does not support subscripting [unsupported_operation] +./generics_variance.py:167:29: Object does not support subscripting [unsupported_operation] +./generics_variance.py:171:8: Object does not support subscripting [unsupported_operation] +./generics_variance.py:172:12: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 381e8989c..cbcbf5f09 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -8,6 +8,10 @@ Line 104: Expected 1 errors Line 106: Expected 1 errors Line 107: Expected 1 errors Line 108: Expected 1 errors +Line 30: Unexpected errors ["./protocols_class_objects.py:30:4: Incompatible argument type for cls: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')] but got [incompatible_argument]"] +Line 35: Unexpected errors ["./protocols_class_objects.py:35:0: Incompatible assignment: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')], got [incompatible_assignment]"] """ output = """ +./protocols_class_objects.py:30:4: Incompatible argument type for cls: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')] but got [incompatible_argument] +./protocols_class_objects.py:35:0: Incompatible assignment: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')], got [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index 40b28b756..2a8091fd4 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,9 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 37: Unexpected errors ['./protocols_recursive.py:37:6: Object Tree does not support subscripting [unsupported_operation]'] +Line 37: Unexpected errors ["./protocols_recursive.py:37:6: Object does not support subscripting [unsupported_operation]"] Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ -./protocols_recursive.py:37:6: Object Tree does not support subscripting [unsupported_operation] +./protocols_recursive.py:37:6: Object does not support subscripting [unsupported_operation] ./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index 93f4ea7a1..abf8762ef 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -2,23 +2,23 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors Line 37: Unexpected errors ["./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment]"] -Line 77: Unexpected errors ['./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation]'] -Line 78: Unexpected errors ['./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation]'] -Line 98: Unexpected errors ['./protocols_subtyping.py:98:8: Object Proto7 does not support subscripting [unsupported_operation]'] -Line 99: Unexpected errors ['./protocols_subtyping.py:99:8: Object Proto7 does not support subscripting [unsupported_operation]'] -Line 100: Unexpected errors ['./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation]'] +Line 77: Unexpected errors ["./protocols_subtyping.py:77:8: Object does not support subscripting [unsupported_operation]"] +Line 78: Unexpected errors ["./protocols_subtyping.py:78:8: Object does not support subscripting [unsupported_operation]"] +Line 98: Unexpected errors ["./protocols_subtyping.py:98:8: Object does not support subscripting [unsupported_operation]"] +Line 99: Unexpected errors ["./protocols_subtyping.py:99:8: Object does not support subscripting [unsupported_operation]"] +Line 100: Unexpected errors ["./protocols_subtyping.py:100:8: Object does not support subscripting [unsupported_operation]"] """ output = """ ./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] ./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] ./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3 (Protocol with members 'method1', 'method2'), got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] -./protocols_subtyping.py:77:8: Object Proto4 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:78:8: Object Proto5 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:79:8: Object Proto4 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:80:8: Object Proto5 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:98:8: Object Proto7 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:99:8: Object Proto7 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:100:8: Object Proto7 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:102:8: Object Proto7 does not support subscripting [unsupported_operation] -./protocols_subtyping.py:103:8: Object Proto7 does not support subscripting [unsupported_operation] +./protocols_subtyping.py:77:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:78:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:79:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:80:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:98:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:99:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:100:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:102:8: Object does not support subscripting [unsupported_operation] +./protocols_subtyping.py:103:8: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index a698baa5f..beb3c33d6 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -1,20 +1,20 @@ conformance_automated = "Fail" errors_diff = """ -Line 39: Expected 1 errors -Line 40: Expected 1 errors Line 42: Expected 1 errors Line 43: Expected 1 errors Line 44: Expected 1 errors Line 49: Expected 1 errors -Line 59: Expected 1 errors """ output = """ ./qualifiers_annotated.py:38:6: Invalid type annotation [, ] [invalid_annotation] +./qualifiers_annotated.py:39:6: Invalid type annotation ((, ),) [invalid_annotation] +./qualifiers_annotated.py:40:6: Unrecognized annotation [invalid_annotation] ./qualifiers_annotated.py:41:6: Invalid type annotation {'a': 'b'} [invalid_annotation] ./qualifiers_annotated.py:45:16: Undefined name: var1 [undefined_name] ./qualifiers_annotated.py:46:6: Invalid type annotation True [invalid_annotation] ./qualifiers_annotated.py:47:7: Invalid type annotation 1 [invalid_annotation] ./qualifiers_annotated.py:48:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./qualifiers_annotated.py:59:7: Annotated[] requires at least two arguments [invalid_annotation] ./qualifiers_annotated.py:71:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:79:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[str, '']] [incompatible_argument] diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index b6e49ffbe..86408e066 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -4,13 +4,14 @@ Line 56: Expected 1 errors Line 76: Expected 1 errors Line 143: Expected 1 errors Line 144: Expected 1 errors -Line 38: Unexpected errors ['./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] +Line 38: Unexpected errors ['./specialtypes_type.py:38:22: Unrecognized annotation typing.TypeVar [invalid_annotation]', './specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] Line 44: Unexpected errors ['./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser'] Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] Line 127: Unexpected errors ['./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser'] """ output = """ +./specialtypes_type.py:38:22: Unrecognized annotation typing.TypeVar [invalid_annotation] ./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] ./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] From 70093de43dd4045d9bb3603bb7ea7cb61d63e50a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 26 Feb 2026 10:13:38 -0800 Subject: [PATCH 32/78] progress --- .../pycroscope/callables_annotation.toml | 12 ++- .../pycroscope/callables_protocol.toml | 16 +-- .../results/pycroscope/classes_classvar.toml | 2 - .../pycroscope/constructors_call_init.toml | 54 +++------- .../pycroscope/constructors_call_new.toml | 42 ++------ .../pycroscope/constructors_callable.toml | 12 +-- .../pycroscope/dataclasses_descriptors.toml | 30 +++--- .../dataclasses_transform_class.toml | 2 - .../results/pycroscope/dataclasses_usage.toml | 14 --- .../pycroscope/generics_base_class.toml | 24 +++-- .../results/pycroscope/generics_basic.toml | 32 +++--- .../results/pycroscope/generics_defaults.toml | 99 ++++++------------- .../generics_defaults_specialization.toml | 19 +--- .../generics_paramspec_semantics.toml | 9 +- .../pycroscope/generics_self_advanced.toml | 9 +- .../pycroscope/generics_self_basic.toml | 16 +-- .../pycroscope/generics_self_usage.toml | 8 +- .../generics_syntax_infer_variance.toml | 78 +++++---------- .../pycroscope/generics_syntax_scoping.toml | 4 - .../pycroscope/generics_type_erasure.toml | 48 ++------- .../generics_typevartuple_basic.toml | 16 ++- .../generics_typevartuple_concat.toml | 17 ++-- .../generics_typevartuple_specialization.toml | 26 ++--- .../pycroscope/generics_upper_bound.toml | 2 + .../results/pycroscope/generics_variance.toml | 68 ++----------- .../pycroscope/protocols_definition.toml | 6 +- .../pycroscope/protocols_recursive.toml | 4 +- .../pycroscope/protocols_subtyping.toml | 18 +--- .../results/pycroscope/specialtypes_type.toml | 21 +--- conformance/results/results.html | 2 +- 30 files changed, 226 insertions(+), 484 deletions(-) diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 1b8a7068c..e5d730800 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -5,10 +5,11 @@ Line 56: Expected 1 errors Line 58: Expected 1 errors Line 59: Expected 1 errors Line 148: Unexpected errors ["./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] -Line 150: Unexpected errors ["./callables_annotation.py:150:9: Object does not support subscripting [unsupported_operation]"] +Line 150: Unexpected errors ['./callables_annotation.py:150:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got (...) -> None [incompatible_assignment]'] Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] Line 154: Unexpected errors ["./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] -Line 155: Unexpected errors ["./callables_annotation.py:155:9: Object does not support subscripting [unsupported_operation]"] +Line 155: Unexpected errors ["./callables_annotation.py:155:4: Incompatible assignment: expected ./callables_annotation.py.Proto4[Any[explicit]], got ./callables_annotation.py.Proto3 (Protocol with members '__call__') [incompatible_assignment]"] +Line 156: Unexpected errors ["./callables_annotation.py:156:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got ./callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]"] Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ @@ -21,12 +22,13 @@ output = """ ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] ./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] -./callables_annotation.py:150:9: Object does not support subscripting [unsupported_operation] +./callables_annotation.py:150:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got (...) -> None [incompatible_assignment] ./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] ./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] -./callables_annotation.py:155:9: Object does not support subscripting [unsupported_operation] +./callables_annotation.py:155:4: Incompatible assignment: expected ./callables_annotation.py.Proto4[Any[explicit]], got ./callables_annotation.py.Proto3 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:156:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got ./callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] ./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:159:10: Object does not support subscripting [unsupported_operation] +./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] ./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 3f7d1c181..b9b111915 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -2,7 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 186: Expected 1 errors Line 187: Expected 1 errors -Line 197: Expected 1 errors Line 34: Unexpected errors ["./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment]"] Line 65: Unexpected errors ["./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] Line 78: Unexpected errors ["./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] @@ -11,10 +10,11 @@ Line 80: Unexpected errors ["./callables_protocol.py:80:0: Incompatible assignme Line 81: Unexpected errors ["./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment]"] Line 82: Unexpected errors ["./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] Line 109: Unexpected errors ["./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment]"] -Line 135: Unexpected errors ["./callables_protocol.py:135:7: Object does not support subscripting [unsupported_operation]"] -Line 144: Unexpected errors ["./callables_protocol.py:144:7: Object does not support subscripting [unsupported_operation]"] +Line 135: Unexpected errors ["./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_1, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_1', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 144: Unexpected errors ["./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_2, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_2', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] Line 168: Unexpected errors ["./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]"] -Line 184: Unexpected errors ["./callables_protocol.py:184:21: Object does not support subscripting [unsupported_operation]"] +Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] +Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] Line 216: Unexpected errors ["./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment]"] Line 236: Unexpected errors ["./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] Line 237: Unexpected errors ["./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] @@ -45,11 +45,13 @@ output = """ ./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4 (Protocol with members '__call__', 'other_attribute'), got (x: int) -> None [incompatible_assignment] ./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:135:7: Object does not support subscripting [unsupported_operation] -./callables_protocol.py:144:7: Object does not support subscripting [unsupported_operation] +./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_1, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_1', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_2, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_2', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: int) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:184:21: Object does not support subscripting [unsupported_operation] +./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute] +./callables_protocol.py:197:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] +./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable] ./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment] ./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index bb51d6dec..09efc9bbf 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -8,7 +8,6 @@ Line 71: Expected 1 errors Line 77: Expected 1 errors Line 78: Expected 1 errors Line 111: Expected 1 errors -Line 84: Unexpected errors ["./classes_classvar.py:84:12: has no attribute 'good5' [undefined_attribute]"] """ output = """ ./classes_classvar.py:38:10: Invalid type annotation (, ) [invalid_annotation] @@ -19,6 +18,5 @@ output = """ ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] -./classes_classvar.py:84:12: has no attribute 'good5' [undefined_attribute] ./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA (Protocol with members 'x', 'y', 'z'), got Annotated[./classes_classvar.py.ProtoAImpl, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=KnownValue(val='')), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./classes_classvar.py.ProtoAImpl', literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index c029f92ec..b54b09ac3 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,50 +1,20 @@ conformance_automated = "Fail" errors_diff = """ +Line 21: Expected 1 errors Line 42: Expected 1 errors +Line 56: Expected 1 errors Line 107: Expected 1 errors Line 130: Expected 1 errors -Line 19: Unexpected errors ["./constructors_call_init.py:19:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:19:28: Object does not support subscripting [unsupported_operation]"] -Line 20: Unexpected errors ["./constructors_call_init.py:20:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:20:30: Object does not support subscripting [unsupported_operation]"] -Line 24: Unexpected errors ["./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:24:23: Object does not support subscripting [unsupported_operation]"] -Line 25: Unexpected errors ["./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:25:25: Object does not support subscripting [unsupported_operation]"] -Line 37: Unexpected errors ["./constructors_call_init.py:37:13: Object does not support subscripting [unsupported_operation]"] -Line 55: Unexpected errors ["./constructors_call_init.py:55:0: Object does not support subscripting [unsupported_operation]"] -Line 72: Unexpected errors ["./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", "./constructors_call_init.py:72:23: Object does not support subscripting [unsupported_operation]"] -Line 73: Unexpected errors ["./constructors_call_init.py:73:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:73:28: Object does not support subscripting [unsupported_operation]"] -Line 74: Unexpected errors ["./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", "./constructors_call_init.py:74:24: Object does not support subscripting [unsupported_operation]"] -Line 75: Unexpected errors ["./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error]", "./constructors_call_init.py:75:25: Object does not support subscripting [unsupported_operation]"] -Line 91: Unexpected errors ["./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:91:27: Object does not support subscripting [unsupported_operation]"] -Line 92: Unexpected errors ["./constructors_call_init.py:92:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:92:37: Object does not support subscripting [unsupported_operation]"] -Line 99: Unexpected errors ["./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_init.py:99:27: Object does not support subscripting [unsupported_operation]"] -Line 100: Unexpected errors ["./constructors_call_init.py:100:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_init.py:100:37: Object does not support subscripting [unsupported_operation]"] +Line 19: Unexpected errors ['./constructors_call_init.py:19:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[int]'] +Line 20: Unexpected errors ['./constructors_call_init.py:20:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[float | int]'] +Line 73: Unexpected errors ['./constructors_call_init.py:73:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class5[int]'] +Line 92: Unexpected errors ['./constructors_call_init.py:92:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class6[int, str]'] +Line 100: Unexpected errors ['./constructors_call_init.py:100:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class7[str, int]'] """ output = """ -./constructors_call_init.py:19:12: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:19:28: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:20:12: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:20:30: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:21:0: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:24:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:24:23: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:25:12: Annotated[./constructors_call_init.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class1', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:25:25: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:37:13: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:55:0: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:56:0: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:72:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] -./constructors_call_init.py:72:23: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:73:12: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:73:28: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:74:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] -./constructors_call_init.py:74:24: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:75:12: Annotated[./constructors_call_init.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class5', literal_only=False, args=(GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)),))), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_init.py.Class5', literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] is not equivalent to Any[error] -./constructors_call_init.py:75:25: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:91:12: Annotated[./constructors_call_init.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class6', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:91:27: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:92:12: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:92:37: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:99:12: Annotated[./constructors_call_init.py.Class7, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./constructors_call_init.py.Class7', literal_only=False, args=(AnyValue(source=), AnyValue(source=)))), 'value1': SigParameter(name='value1', kind=, default=None, annotation=AnyValue(source=)), 'value2': SigParameter(name='value2', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_init.py:99:27: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:100:12: Object does not support subscripting [unsupported_operation] -./constructors_call_init.py:100:37: Object does not support subscripting [unsupported_operation] +./constructors_call_init.py:19:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[int] +./constructors_call_init.py:20:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[float | int] +./constructors_call_init.py:73:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class5[int] +./constructors_call_init.py:92:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class6[int, str] +./constructors_call_init.py:100:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class7[str, int] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 40fe79bee..f9a8f784f 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,47 +1,25 @@ conformance_automated = "Fail" errors_diff = """ -Line 19: Unexpected errors ["./constructors_call_new.py:19:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:19:28: Object does not support subscripting [unsupported_operation]"] -Line 20: Unexpected errors ["./constructors_call_new.py:20:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:20:30: Object does not support subscripting [unsupported_operation]"] -Line 23: Unexpected errors ["./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:23:23: Object does not support subscripting [unsupported_operation]"] -Line 24: Unexpected errors ["./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:24:25: Object does not support subscripting [unsupported_operation]"] -Line 35: Unexpected errors ["./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:35:23: Object does not support subscripting [unsupported_operation]"] -Line 36: Unexpected errors ["./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./constructors_call_new.py:36:24: Object does not support subscripting [unsupported_operation]"] +Line 21: Expected 1 errors +Line 148: Expected 1 errors +Line 19: Unexpected errors ['./constructors_call_new.py:19:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[int]'] +Line 20: Unexpected errors ['./constructors_call_new.py:20:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[float | int]'] Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 117: Unexpected errors ["./constructors_call_new.py:117:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:117:27: Object does not support subscripting [unsupported_operation]"] -Line 118: Unexpected errors ["./constructors_call_new.py:118:12: Object does not support subscripting [unsupported_operation]", "./constructors_call_new.py:118:27: Object does not support subscripting [unsupported_operation]"] -Line 130: Unexpected errors ["./constructors_call_new.py:130:14: Object does not support subscripting [unsupported_operation]"] -Line 134: Unexpected errors ["./constructors_call_new.py:134:5: Object does not support subscripting [unsupported_operation]"] -Line 147: Unexpected errors ["./constructors_call_new.py:147:0: Object does not support subscripting [unsupported_operation]"] +Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[int]]'] +Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[str]]'] """ output = """ -./constructors_call_new.py:19:12: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:19:28: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:20:12: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:20:30: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:21:0: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:23:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:23:23: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:24:12: Annotated[./constructors_call_new.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:24:25: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:35:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:35:23: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:36:12: Annotated[./constructors_call_new.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False))), 'args': SigParameter(name='args', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),))), 'kwargs': SigParameter(name='kwargs', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class2', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./constructors_call_new.py:36:24: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:19:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[int] +./constructors_call_new.py:20:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[float | int] ./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int ./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never ./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:117:12: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:117:27: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:118:12: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:118:27: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:130:14: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:134:5: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:147:0: Object does not support subscripting [unsupported_operation] -./constructors_call_new.py:148:0: Object does not support subscripting [unsupported_operation] +./constructors_call_new.py:117:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[int]] +./constructors_call_new.py:118:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[str]] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index cfd75fc44..25ca9c7e0 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -27,10 +27,10 @@ Line 126: Unexpected errors ["./constructors_callable.py:126:22: Incompatible ar Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[error] is not equivalent to ./constructors_callable.py.Class6Proxy'] Line 143: Unexpected errors ["./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 162: Unexpected errors ["./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 166: Unexpected errors ["./constructors_callable.py:166:19: Object does not support subscripting [unsupported_operation]"] -Line 167: Unexpected errors ["./constructors_callable.py:167:20: Object does not support subscripting [unsupported_operation]"] +Line 166: Unexpected errors ['./constructors_callable.py:166:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[int]'] +Line 167: Unexpected errors ['./constructors_callable.py:167:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[str]'] Line 183: Unexpected errors ["./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 185: Unexpected errors ["./constructors_callable.py:185:28: Object does not support subscripting [unsupported_operation]"] +Line 185: Unexpected errors ['./constructors_callable.py:185:12: Any[error] is not equivalent to ./constructors_callable.py.Class8[str]'] Line 194: Unexpected errors ["./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9'] """ @@ -58,11 +58,11 @@ output = """ ./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:166:19: Object does not support subscripting [unsupported_operation] -./constructors_callable.py:167:20: Object does not support subscripting [unsupported_operation] +./constructors_callable.py:166:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[int] +./constructors_callable.py:167:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[str] ./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:185:28: Object does not support subscripting [unsupported_operation] +./constructors_callable.py:185:12: Any[error] is not equivalent to ./constructors_callable.py.Class8[str] ./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] ./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[error]' [reveal_type] ./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9 diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index 27878a647..c9b8100b6 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,25 +1,19 @@ conformance_automated = "Fail" errors_diff = """ Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int'] -Line 56: Unexpected errors ["./dataclasses_descriptors.py:56:7: Object does not support subscripting [unsupported_operation]"] -Line 57: Unexpected errors ["./dataclasses_descriptors.py:57:7: Object does not support subscripting [unsupported_operation]"] -Line 58: Unexpected errors ["./dataclasses_descriptors.py:58:7: Object does not support subscripting [unsupported_operation]"] -Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int]'] -Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str]'] -Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str]'] -Line 66: Unexpected errors ['./dataclasses_descriptors.py:66:12: Any[error] is not equivalent to int'] -Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: Any[error] is not equivalent to str'] -Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: Any[error] is not equivalent to str'] +Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to list[int]'] +Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str]'] +Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str]'] +Line 66: Unexpected errors ['./dataclasses_descriptors.py:66:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to int'] +Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str'] +Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str'] """ output = """ ./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int -./dataclasses_descriptors.py:56:7: Object does not support subscripting [unsupported_operation] -./dataclasses_descriptors.py:57:7: Object does not support subscripting [unsupported_operation] -./dataclasses_descriptors.py:58:7: Object does not support subscripting [unsupported_operation] -./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int] -./dataclasses_descriptors.py:62:12: Any[error] is not equivalent to list[str] -./dataclasses_descriptors.py:63:12: Any[error] is not equivalent to list[str] -./dataclasses_descriptors.py:66:12: Any[error] is not equivalent to int -./dataclasses_descriptors.py:67:12: Any[error] is not equivalent to str -./dataclasses_descriptors.py:68:12: Any[error] is not equivalent to str +./dataclasses_descriptors.py:61:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to list[int] +./dataclasses_descriptors.py:62:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str] +./dataclasses_descriptors.py:63:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str] +./dataclasses_descriptors.py:66:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to int +./dataclasses_descriptors.py:67:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str +./dataclasses_descriptors.py:68:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str """ diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 305fffe86..1df80a155 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -6,8 +6,6 @@ Line 66: Expected 1 errors Line 72: Expected 1 errors Line 82: Expected 1 errors Line 122: Expected 1 errors -Line 102: Unexpected errors ["./dataclasses_transform_class.py:102:22: Object does not support subscripting [unsupported_operation]"] """ output = """ -./dataclasses_transform_class.py:102:22: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 2c9063097..444866ba4 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -10,7 +10,6 @@ Line 179: Expected 1 errors Lines 58, 60, 61: Expected error (tag 'DC1') Lines 64, 66, 67: Expected error (tag 'DC2') Lines 70, 72, 73: Expected error (tag 'DC3') -Line 22: Unexpected errors ["./dataclasses_usage.py:22:33: ./dataclasses_usage.py.InventoryItem has no attribute 'quantity_on_hand' [undefined_attribute]", "./dataclasses_usage.py:22:15: ./dataclasses_usage.py.InventoryItem has no attribute 'unit_price' [undefined_attribute]"] Line 35: Unexpected errors ["./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute]"] Line 38: Unexpected errors ["./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute]"] Line 39: Unexpected errors ["./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute]"] @@ -19,16 +18,10 @@ Line 41: Unexpected errors ["./dataclasses_usage.py:41:6: ./dataclasses_usage.py Line 42: Unexpected errors ["./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute]"] Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute]"] Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] -Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:196:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_1' [undefined_attribute]"] -Line 198: Unexpected errors ['./dataclasses_usage.py:198:12: Any[error] is not equivalent to str', "./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute]"] Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment]"] -Line 213: Unexpected errors ["./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error]", "./dataclasses_usage.py:213:21: Object does not support subscripting [unsupported_operation]"] -Line 216: Unexpected errors ["./dataclasses_usage.py:216:11: Object does not support subscripting [unsupported_operation]"] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] """ output = """ -./dataclasses_usage.py:22:33: ./dataclasses_usage.py.InventoryItem has no attribute 'quantity_on_hand' [undefined_attribute] -./dataclasses_usage.py:22:15: ./dataclasses_usage.py.InventoryItem has no attribute 'unit_price' [undefined_attribute] ./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute] ./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute] ./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute] @@ -38,13 +31,6 @@ output = """ ./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute] ./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute] ./dataclasses_usage.py:88:4: Incompatible assignment: expected int, got str [incompatible_assignment] -./dataclasses_usage.py:196:12: Any[error] is not equivalent to str -./dataclasses_usage.py:196:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_1' [undefined_attribute] -./dataclasses_usage.py:198:12: Any[error] is not equivalent to str -./dataclasses_usage.py:198:12: ./dataclasses_usage.py.DC15 has no attribute 'prop_3' [undefined_attribute] ./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] -./dataclasses_usage.py:213:12: Annotated[./dataclasses_usage.py.DC16, HasAttrExtension(attribute_name=KnownValue(val='value'), attribute_type=AnyValue(source=))] is not equivalent to Any[error] -./dataclasses_usage.py:213:21: Object does not support subscripting [unsupported_operation] -./dataclasses_usage.py:216:11: Object does not support subscripting [unsupported_operation] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index 21f834e64..c540472cb 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -2,26 +2,24 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors Line 30: Expected 1 errors +Line 49: Expected 1 errors +Line 61: Expected 1 errors Line 68: Expected 1 errors +Line 98: Expected 1 errors Line 24: Unexpected errors ['./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] Line 25: Unexpected errors ['./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[./generics_base_class.py.Node]] but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] -Line 45: Unexpected errors ['./generics_base_class.py:45:16: Any[generic_argument] is not equivalent to collections.abc.Iterator[int]'] -Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool'] -Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[from_another] is not equivalent to int'] -Line 84: Unexpected errors ["./generics_base_class.py:84:12: Object does not support subscripting [unsupported_operation]", "./generics_base_class.py:84:29: Object does not support subscripting [unsupported_operation]"] -Line 97: Unexpected errors ["./generics_base_class.py:97:13: Object does not support subscripting [unsupported_operation]"] +Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool', "./generics_base_class.py:46:16: collections.abc.Iterable[int] has no attribute '__contains__' [undefined_attribute]"] +Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[generic_argument] is not equivalent to int'] +Line 90: Unexpected errors ['./generics_base_class.py:90:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent1[int, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument]'] +Line 91: Unexpected errors ['./generics_base_class.py:91:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent2[str, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument]'] """ output = """ ./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument] ./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[./generics_base_class.py.Node]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] ./generics_base_class.py:26:25: Incompatible argument type for x: expected dict[str, list[object]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] -./generics_base_class.py:45:16: Any[generic_argument] is not equivalent to collections.abc.Iterator[int] ./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool -./generics_base_class.py:49:21: Object does not support subscripting [unsupported_operation] -./generics_base_class.py:58:16: Any[from_another] is not equivalent to int -./generics_base_class.py:61:17: Object does not support subscripting [unsupported_operation] -./generics_base_class.py:84:12: Object does not support subscripting [unsupported_operation] -./generics_base_class.py:84:29: Object does not support subscripting [unsupported_operation] -./generics_base_class.py:97:13: Object does not support subscripting [unsupported_operation] -./generics_base_class.py:98:31: Object does not support subscripting [unsupported_operation] +./generics_base_class.py:46:16: collections.abc.Iterable[int] has no attribute '__contains__' [undefined_attribute] +./generics_base_class.py:58:16: Any[generic_argument] is not equivalent to int +./generics_base_class.py:90:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent1[int, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument] +./generics_base_class.py:91:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent2[str, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 638fc65e2..5b1a8c73b 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -8,16 +8,17 @@ Line 162: Expected 1 errors Line 163: Expected 1 errors Line 171: Expected 1 errors Line 172: Expected 1 errors +Line 208: Expected 1 errors Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] -Line 92: Unexpected errors ["./generics_basic.py:92:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute]", "./generics_basic.py:92:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute]"] -Line 96: Unexpected errors ["./generics_basic.py:96:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute]", "./generics_basic.py:96:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute]"] -Line 97: Unexpected errors ["./generics_basic.py:97:15: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute]"] -Line 100: Unexpected errors ["./generics_basic.py:100:8: ./generics_basic.py.LoggedVar has no attribute 'logger' [undefined_attribute]", "./generics_basic.py:100:41: ./generics_basic.py.LoggedVar has no attribute 'name' [undefined_attribute]"] +Line 92: Unexpected errors ["./generics_basic.py:92:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute]", "./generics_basic.py:92:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute]"] +Line 96: Unexpected errors ["./generics_basic.py:96:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute]", "./generics_basic.py:96:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute]"] +Line 97: Unexpected errors ["./generics_basic.py:97:15: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute]"] +Line 100: Unexpected errors ["./generics_basic.py:100:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'logger' [undefined_attribute]", "./generics_basic.py:100:41: ./generics_basic.py.LoggedVar[~T] has no attribute 'name' [undefined_attribute]"] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int'] Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] -Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[from_another] is not equivalent to int'] -Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[from_another] is not equivalent to int'] +Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int'] +Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int'] """ output = """ ./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation] @@ -25,17 +26,16 @@ output = """ ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:92:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute] -./generics_basic.py:92:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] -./generics_basic.py:96:8: ./generics_basic.py.LoggedVar has no attribute 'log' [undefined_attribute] -./generics_basic.py:96:31: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] -./generics_basic.py:97:15: ./generics_basic.py.LoggedVar has no attribute 'value' [undefined_attribute] -./generics_basic.py:100:8: ./generics_basic.py.LoggedVar has no attribute 'logger' [undefined_attribute] -./generics_basic.py:100:41: ./generics_basic.py.LoggedVar has no attribute 'name' [undefined_attribute] +./generics_basic.py:92:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute] +./generics_basic.py:92:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute] +./generics_basic.py:96:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute] +./generics_basic.py:96:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute] +./generics_basic.py:97:15: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute] +./generics_basic.py:100:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'logger' [undefined_attribute] +./generics_basic.py:100:41: ./generics_basic.py.LoggedVar[~T] has no attribute 'name' [undefined_attribute] ./generics_basic.py:106:20: Any[from_another] is not equivalent to int ./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int -./generics_basic.py:154:16: Any[from_another] is not equivalent to int -./generics_basic.py:155:16: Any[from_another] is not equivalent to int -./generics_basic.py:208:36: Object does not support subscripting [unsupported_operation] +./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int +./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 062deb66d..b45d1b3b1 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,84 +1,47 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors +Line 50: Expected 1 errors Line 107: Expected 1 errors Line 114: Expected 1 errors Line 143: Expected 1 errors -Line 30: Unexpected errors ["./generics_defaults.py:30:12: is not equivalent to type", "./generics_defaults.py:30:32: Object does not support subscripting [unsupported_operation]"] -Line 31: Unexpected errors ['./generics_defaults.py:31:12: Any[error] is not equivalent to type', "./generics_defaults.py:31:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:31:37: Object does not support subscripting [unsupported_operation]"] -Line 32: Unexpected errors ['./generics_defaults.py:32:12: Any[error] is not equivalent to type', "./generics_defaults.py:32:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:32:42: Object does not support subscripting [unsupported_operation]"] -Line 38: Unexpected errors ['./generics_defaults.py:38:12: Any[error] is not equivalent to type', "./generics_defaults.py:38:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:38:36: Object does not support subscripting [unsupported_operation]"] -Line 39: Unexpected errors ["./generics_defaults.py:39:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:39:33: Object does not support subscripting [unsupported_operation]"] -Line 45: Unexpected errors ["./generics_defaults.py:45:12: is not equivalent to type", "./generics_defaults.py:45:33: Object does not support subscripting [unsupported_operation]"] -Line 47: Unexpected errors ['./generics_defaults.py:47:4: Any[error] is not equivalent to type', "./generics_defaults.py:47:4: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:47:39: Object does not support subscripting [unsupported_operation]"] -Line 53: Unexpected errors ['./generics_defaults.py:53:4: Any[error] is not equivalent to type', "./generics_defaults.py:53:4: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:53:39: Object does not support subscripting [unsupported_operation]"] -Line 56: Unexpected errors ['./generics_defaults.py:56:4: Any[error] is not equivalent to type', "./generics_defaults.py:56:4: Object does not support subscripting [unsupported_operation]"] -Line 57: Unexpected errors ["./generics_defaults.py:57:9: Object does not support subscripting [unsupported_operation]"] -Line 60: Unexpected errors ['./generics_defaults.py:60:4: Any[error] is not equivalent to type', "./generics_defaults.py:60:4: Object does not support subscripting [unsupported_operation]"] -Line 61: Unexpected errors ["./generics_defaults.py:61:9: Object does not support subscripting [unsupported_operation]"] -Line 64: Unexpected errors ['./generics_defaults.py:64:4: Any[error] is not equivalent to type', "./generics_defaults.py:64:4: Object does not support subscripting [unsupported_operation]"] -Line 65: Unexpected errors ["./generics_defaults.py:65:9: Object does not support subscripting [unsupported_operation]"] -Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type", "./generics_defaults.py:79:34: Object does not support subscripting [unsupported_operation]"] -Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', "./generics_defaults.py:80:31: Object does not support subscripting [unsupported_operation]"] -Line 81: Unexpected errors ["./generics_defaults.py:81:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:81:45: Object does not support subscripting [unsupported_operation]"] -Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type", "./generics_defaults.py:94:37: Object does not support subscripting [unsupported_operation]"] -Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error]', "./generics_defaults.py:95:34: Object does not support subscripting [unsupported_operation]"] -Line 96: Unexpected errors ["./generics_defaults.py:96:12: Object does not support subscripting [unsupported_operation]", "./generics_defaults.py:96:45: Object does not support subscripting [unsupported_operation]"] +Line 30: Unexpected errors ["./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] +Line 31: Unexpected errors ["./generics_defaults.py:31:12: Any[from_another] (partial from [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] +Line 32: Unexpected errors ["./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] +Line 38: Unexpected errors ["./generics_defaults.py:38:12: Any[from_another] (partial from [type 'float']) is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]]"] +Line 39: Unexpected errors ['./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool]'] +Line 45: Unexpected errors ["./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]]"] +Line 47: Unexpected errors ["./generics_defaults.py:47:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] +Line 53: Unexpected errors ["./generics_defaults.py:53:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] +Line 56: Unexpected errors ["./generics_defaults.py:56:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] +Line 60: Unexpected errors ["./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] +Line 64: Unexpected errors ["./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] +Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[str, int]]"] +Line 81: Unexpected errors ['./generics_defaults.py:81:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_ParamSpec[bool, bool]'] +Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]"] +Line 96: Unexpected errors ['./generics_defaults.py:96:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool]'] Line 156: Unexpected errors ["./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] Line 157: Unexpected errors ["./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] -Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error]', "./generics_defaults.py:172:29: Object does not support subscripting [unsupported_operation]"] -Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int'] """ output = """ -./generics_defaults.py:30:12: is not equivalent to type -./generics_defaults.py:30:32: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:31:12: Any[error] is not equivalent to type -./generics_defaults.py:31:12: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:31:37: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:32:12: Any[error] is not equivalent to type -./generics_defaults.py:32:12: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:32:42: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:38:12: Any[error] is not equivalent to type -./generics_defaults.py:38:12: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:38:36: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:39:12: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:39:33: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:45:12: is not equivalent to type -./generics_defaults.py:45:33: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:47:4: Any[error] is not equivalent to type -./generics_defaults.py:47:4: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:47:39: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:50:0: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:53:4: Any[error] is not equivalent to type -./generics_defaults.py:53:4: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:53:39: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:56:4: Any[error] is not equivalent to type -./generics_defaults.py:56:4: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:57:9: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:60:4: Any[error] is not equivalent to type -./generics_defaults.py:60:4: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:61:9: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:64:4: Any[error] is not equivalent to type -./generics_defaults.py:64:4: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:65:9: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:79:12: is not equivalent to type -./generics_defaults.py:79:34: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] -./generics_defaults.py:80:31: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:81:12: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:81:45: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:94:12: is not equivalent to type -./generics_defaults.py:94:37: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error] -./generics_defaults.py:95:34: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:96:12: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:96:45: Object does not support subscripting [unsupported_operation] +./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] +./generics_defaults.py:31:12: Any[from_another] (partial from [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] +./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] +./generics_defaults.py:38:12: Any[from_another] (partial from [type 'float']) is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]] +./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool] +./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]] +./generics_defaults.py:47:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:53:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:56:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[str, int]] +./generics_defaults.py:81:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_ParamSpec[bool, bool] +./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] +./generics_defaults.py:96:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] ./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] ./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] ./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation] -./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to Any[error] -./generics_defaults.py:172:29: Object does not support subscripting [unsupported_operation] -./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index 706ea08bb..f87934451 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -2,26 +2,17 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 55: Expected 1 errors -Line 22: Unexpected errors ["./generics_defaults_specialization.py:22:21: Object does not support subscripting [unsupported_operation]"] -Line 26: Unexpected errors ["./generics_defaults_specialization.py:26:20: Object does not support subscripting [unsupported_operation]"] -Line 27: Unexpected errors ["./generics_defaults_specialization.py:27:20: Object does not support subscripting [unsupported_operation]"] -Line 42: Unexpected errors ["./generics_defaults_specialization.py:42:10: Object does not support subscripting [unsupported_operation]"] +Line 27: Unexpected errors ['./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool]'] Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]]"] Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str]'] -Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool]'] -Line 50: Unexpected errors ["./generics_defaults_specialization.py:50:10: Object does not support subscripting [unsupported_operation]"] +Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Any[error] is not equivalent to ./generics_defaults_specialization.py.Bar[bool]', "./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar[type 'bool'] (partial from [type 'bool']) is not callable [not_callable]"] Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str'] -Line 65: Unexpected errors ["./generics_defaults_specialization.py:65:4: Object does not support subscripting [unsupported_operation]"] """ output = """ -./generics_defaults_specialization.py:22:21: Object does not support subscripting [unsupported_operation] -./generics_defaults_specialization.py:26:20: Object does not support subscripting [unsupported_operation] -./generics_defaults_specialization.py:27:20: Object does not support subscripting [unsupported_operation] -./generics_defaults_specialization.py:42:10: Object does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool] ./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]] ./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str] -./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool] -./generics_defaults_specialization.py:50:10: Object does not support subscripting [unsupported_operation] +./generics_defaults_specialization.py:47:12: Any[error] is not equivalent to ./generics_defaults_specialization.py.Bar[bool] +./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar[type 'bool'] (partial from [type 'bool']) is not callable [not_callable] ./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str -./generics_defaults_specialization.py:65:4: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index 4b5b40d8a..d13b67ca0 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -1,16 +1,15 @@ conformance_automated = "Fail" errors_diff = """ -Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_paramspec_semantics.py.Y', literal_only=False)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_paramspec_semantics.py:82:20: Object does not support subscripting [unsupported_operation]"] -Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str'] +Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:4: Invalid type annotation [] [invalid_annotation]"] +Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> str is not equivalent to (int, /) -> str'] """ output = """ ./generics_paramspec_semantics.py:26:0: Missing required positional argument 'a' [incompatible_call] ./generics_paramspec_semantics.py:27:8: Incompatible argument type for b: expected bool but got Literal['A'] [incompatible_argument] ./generics_paramspec_semantics.py:46:5: Cannot resolve type variables [incompatible_call] ./generics_paramspec_semantics.py:61:0: Cannot resolve type variables [incompatible_call] -./generics_paramspec_semantics.py:82:16: Annotated[./generics_paramspec_semantics.py.Y, HasAttrExtension(attribute_name=KnownValue(val='f'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='prop'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_paramspec_semantics.py.Y', literal_only=False)), 'f': SigParameter(name='f', kind=, default=None, annotation=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'__P': SigParameter(name='__P', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), 'prop': SigParameter(name='prop', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_paramspec_semantics.py:82:20: Object does not support subscripting [unsupported_operation] -./generics_paramspec_semantics.py:84:16: (__P) -> str is not equivalent to (int, /) -> str +./generics_paramspec_semantics.py:82:4: Invalid type annotation [] [invalid_annotation] +./generics_paramspec_semantics.py:84:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> str is not equivalent to (int, /) -> str ./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] ./generics_paramspec_semantics.py:108:0: Incompatible argument type for args: expected tuple[bool, ...] but got tuple[Literal[1]] [incompatible_argument] ./generics_paramspec_semantics.py:120:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index 71b71b4c8..c7556bdd5 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -2,18 +2,13 @@ conformance_automated = "Fail" errors_diff = """ Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA', "./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute]"] -Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: Any[error] is not equivalent to list[~SelfT]', "./generics_self_advanced.py:36:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute]"] -Line 37: Unexpected errors ["./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute]"] -Line 38: Unexpected errors ["./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB has no attribute 'method1' [undefined_attribute]"] +Line 38: Unexpected errors ["./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[~SelfT] has no attribute 'method1' [undefined_attribute]"] Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT]'] """ output = """ ./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA ./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA ./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute] -./generics_self_advanced.py:36:20: Any[error] is not equivalent to list[~SelfT] -./generics_self_advanced.py:36:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute] -./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB has no attribute 'a' [undefined_attribute] -./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB has no attribute 'method1' [undefined_attribute] +./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[~SelfT] has no attribute 'method1' [undefined_attribute] ./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 50b9df72c..6ba784f36 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -6,9 +6,10 @@ Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle', "./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute]"] Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] -Line 75: Unexpected errors ["./generics_self_basic.py:75:45: Object does not support subscripting [unsupported_operation]"] -Line 76: Unexpected errors ["./generics_self_basic.py:76:50: Object does not support subscripting [unsupported_operation]"] -Line 84: Unexpected errors ["./generics_self_basic.py:84:21: Object does not support subscripting [unsupported_operation]"] +Line 75: Unexpected errors ['./generics_self_basic.py:75:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[int]', "./generics_self_basic.py:75:16: ./generics_self_basic.py.Container[int] has no attribute 'set_value' [undefined_attribute]"] +Line 76: Unexpected errors ['./generics_self_basic.py:76:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[str]', "./generics_self_basic.py:76:16: ./generics_self_basic.py.Container[str] has no attribute 'set_value' [undefined_attribute]"] +Line 83: Unexpected errors ["./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute]"] +Line 84: Unexpected errors ['./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T]'] """ output = """ ./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape @@ -19,7 +20,10 @@ output = """ ./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle ./generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] -./generics_self_basic.py:75:45: Object does not support subscripting [unsupported_operation] -./generics_self_basic.py:76:50: Object does not support subscripting [unsupported_operation] -./generics_self_basic.py:84:21: Object does not support subscripting [unsupported_operation] +./generics_self_basic.py:75:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[int] +./generics_self_basic.py:75:16: ./generics_self_basic.py.Container[int] has no attribute 'set_value' [undefined_attribute] +./generics_self_basic.py:76:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[str] +./generics_self_basic.py:76:16: ./generics_self_basic.py.Container[str] has no attribute 'set_value' [undefined_attribute] +./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute] +./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index d1d68852f..ae32d1ea6 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -4,15 +4,17 @@ Line 73: Expected 1 errors Line 76: Expected 1 errors Line 82: Expected 1 errors Line 87: Expected 1 errors +Line 103: Expected 1 errors Line 105: Expected 1 errors Line 108: Expected 1 errors Line 113: Expected 1 errors Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors -Line 93: Unexpected errors ["./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child has no attribute 'return_concrete_type' [undefined_attribute]"] +Line 78: Unexpected errors ['./generics_self_usage.py:78:31: Undefined name: Foo2 [undefined_name]'] +Line 93: Unexpected errors ["./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child[~SelfT] has no attribute 'return_concrete_type' [undefined_attribute]"] """ output = """ -./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child has no attribute 'return_concrete_type' [undefined_attribute] -./generics_self_usage.py:103:10: Object does not support subscripting [unsupported_operation] +./generics_self_usage.py:78:31: Undefined name: Foo2 [undefined_name] +./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child[~SelfT] has no attribute 'return_concrete_type' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index 176700e9d..d6737d331 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,63 +1,29 @@ conformance_automated = "Fail" errors_diff = """ -Line 28: Unexpected errors ["./generics_syntax_infer_variance.py:28:8: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:28:36: Object does not support subscripting [unsupported_operation]"] -Line 46: Unexpected errors ["./generics_syntax_infer_variance.py:46:8: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:46:36: Object does not support subscripting [unsupported_operation]"] -Line 55: Unexpected errors ["./generics_syntax_infer_variance.py:55:8: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:55:36: Object does not support subscripting [unsupported_operation]"] -Line 81: Unexpected errors ["./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5 has no attribute '_x' [undefined_attribute]"] -Line 84: Unexpected errors ["./generics_syntax_infer_variance.py:84:7: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:84:35: Object does not support subscripting [unsupported_operation]"] -Line 95: Unexpected errors ["./generics_syntax_infer_variance.py:95:7: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:95:35: Object does not support subscripting [unsupported_operation]"] -Line 105: Unexpected errors ["./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1 has no attribute '_value' [undefined_attribute]"] -Line 121: Unexpected errors ["./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2 has no attribute '_value' [undefined_attribute]"] -Line 166: Unexpected errors ["./generics_syntax_infer_variance.py:166:12: Object does not support subscripting [unsupported_operation]", "./generics_syntax_infer_variance.py:166:42: Object does not support subscripting [unsupported_operation]"] +Line 29: Expected 1 errors +Line 56: Expected 1 errors +Line 85: Expected 1 errors +Line 96: Expected 1 errors +Line 112: Expected 1 errors +Line 113: Expected 1 errors +Line 127: Expected 1 errors +Line 128: Expected 1 errors +Line 165: Expected 1 errors +Line 81: Unexpected errors ["./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5[T] has no attribute '_x' [undefined_attribute]"] +Line 105: Unexpected errors ["./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1[T] has no attribute '_value' [undefined_attribute]"] +Line 121: Unexpected errors ["./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2[T] has no attribute '_value' [undefined_attribute]"] """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:28:8: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:28:36: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:29:8: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:29:34: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:46:8: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:46:36: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:47:8: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:47:34: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:55:8: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:55:36: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:56:8: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:56:34: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5 has no attribute '_x' [undefined_attribute] -./generics_syntax_infer_variance.py:84:7: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:84:35: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:85:7: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:85:33: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:95:7: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:95:35: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:96:7: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:96:33: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1 has no attribute '_value' [undefined_attribute] -./generics_syntax_infer_variance.py:112:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:112:37: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:113:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:113:35: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2 has no attribute '_value' [undefined_attribute] -./generics_syntax_infer_variance.py:127:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:127:37: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:128:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:128:35: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:135:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:135:42: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:136:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:136:40: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:137:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:137:42: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:138:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:138:40: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:146:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:146:37: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:154:9: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:154:37: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:165:12: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:165:44: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:166:12: Object does not support subscripting [unsupported_operation] -./generics_syntax_infer_variance.py:166:42: Object does not support subscripting [unsupported_operation] +./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected collections.abc.Sequence[int], got collections.abc.Sequence[float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5[T] has no attribute '_x' [undefined_attribute] +./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1[T] has no attribute '_value' [undefined_attribute] +./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2[T] has no attribute '_value' [undefined_attribute] +./generics_syntax_infer_variance.py:135:0: Incompatible assignment: expected dict[float | int, str], got dict[int, str] [incompatible_assignment] +./generics_syntax_infer_variance.py:136:0: Incompatible assignment: expected dict[int, str], got dict[float | int, str] [incompatible_assignment] +./generics_syntax_infer_variance.py:137:0: Incompatible assignment: expected dict[str, float | int], got dict[str, int] [incompatible_assignment] +./generics_syntax_infer_variance.py:138:0: Incompatible assignment: expected dict[str, int], got dict[str, float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:146:37: ./generics_syntax_infer_variance.py.ShouldBeInvariant4[type 'int'] (partial from [type 'int']) is not callable [not_callable] +./generics_syntax_infer_variance.py:154:37: ./generics_syntax_infer_variance.py.ShouldBeInvariant5[type 'int'] (partial from [type 'int']) is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index de9d26e76..b0fc891af 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -6,14 +6,10 @@ Line 35: Expected 1 errors Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors -Line 31: Unexpected errors ["./generics_syntax_scoping.py:31:16: Object does not support subscripting [unsupported_operation]", "./generics_syntax_scoping.py:31:37: Object does not support subscripting [unsupported_operation]"] Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] """ output = """ -./generics_syntax_scoping.py:31:16: Object does not support subscripting [unsupported_operation] -./generics_syntax_scoping.py:31:37: Object does not support subscripting [unsupported_operation] -./generics_syntax_scoping.py:44:12: Object does not support subscripting [unsupported_operation] ./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index 2a94d6196..0a3045384 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -1,48 +1,18 @@ conformance_automated = "Fail" errors_diff = """ +Line 38: Expected 1 errors +Line 40: Expected 1 errors +Line 42: Expected 1 errors +Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 17: Unexpected errors ["./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_type_erasure.py:17:22: Object does not support subscripting [unsupported_operation]"] -Line 18: Unexpected errors ["./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_type_erasure.py:18:21: Object does not support subscripting [unsupported_operation]"] -Line 19: Unexpected errors ["./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", "./generics_type_erasure.py:19:20: Object does not support subscripting [unsupported_operation]"] -Line 21: Unexpected errors ['./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int'] -Line 27: Unexpected errors ["./generics_type_erasure.py:27:4: Object does not support subscripting [unsupported_operation]"] -Line 28: Unexpected errors ["./generics_type_erasure.py:28:16: Object does not support subscripting [unsupported_operation]"] -Line 29: Unexpected errors ["./generics_type_erasure.py:29:4: Object does not support subscripting [unsupported_operation]"] -Line 30: Unexpected errors ["./generics_type_erasure.py:30:16: Object does not support subscripting [unsupported_operation]"] -Line 32: Unexpected errors ["./generics_type_erasure.py:32:5: Object does not support subscripting [unsupported_operation]"] -Line 33: Unexpected errors ["./generics_type_erasure.py:33:16: Object does not support subscripting [unsupported_operation]"] -Line 34: Unexpected errors ["./generics_type_erasure.py:34:5: Object does not support subscripting [unsupported_operation]"] -Line 35: Unexpected errors ["./generics_type_erasure.py:35:16: Object does not support subscripting [unsupported_operation]"] -Line 37: Unexpected errors ["./generics_type_erasure.py:37:5: Object does not support subscripting [unsupported_operation]"] -Line 39: Unexpected errors ["./generics_type_erasure.py:39:5: Object does not support subscripting [unsupported_operation]"] -Line 47: Unexpected errors ['./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int'] -Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int', "./generics_type_erasure.py:48:12: Object does not support subscripting [unsupported_operation]"] +Line 33: Unexpected errors ['./generics_type_erasure.py:33:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[int]'] +Line 35: Unexpected errors ['./generics_type_erasure.py:35:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[str]'] +Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int'] """ output = """ -./generics_type_erasure.py:17:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_type_erasure.py:17:22: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:18:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_type_erasure.py:18:21: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:19:12: Annotated[./generics_type_erasure.py.Node, HasAttrExtension(attribute_name=KnownValue(val='label'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./generics_type_erasure.py.Node', literal_only=False)), 'label': SigParameter(name='label', kind=, default=KnownValue(val=None), annotation=MultiValuedValue(vals=(AnyValue(source=), KnownValue(val=None))))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_type_erasure.py:19:20: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:21:12: Any[generic_argument] is not equivalent to int -./generics_type_erasure.py:27:4: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:28:16: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:29:4: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:30:16: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:32:5: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:33:16: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:34:5: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:35:16: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:37:5: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:38:5: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:39:5: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:40:5: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:42:0: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:43:0: Object does not support subscripting [unsupported_operation] -./generics_type_erasure.py:47:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:33:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[int] +./generics_type_erasure.py:35:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[str] ./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int -./generics_type_erasure.py:48:12: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index ca98eda97..7c6025b23 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -1,5 +1,7 @@ conformance_automated = "Fail" errors_diff = """ +Line 42: Expected 1 errors +Line 43: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors Line 56: Expected 1 errors @@ -9,26 +11,22 @@ Line 90: Expected 1 errors Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors +Lines 44, 45: Expected error (tag 'v6') Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] -Line 36: Unexpected errors ["./generics_typevartuple_basic.py:36:4: Object does not support subscripting [unsupported_operation]"] -Line 37: Unexpected errors ["./generics_typevartuple_basic.py:37:4: Object does not support subscripting [unsupported_operation]"] -Line 38: Unexpected errors ["./generics_typevartuple_basic.py:38:4: Object does not support subscripting [unsupported_operation]"] Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] +Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] """ output = """ ./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] -./generics_typevartuple_basic.py:36:4: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:37:4: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:38:4: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:42:4: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:43:4: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_basic.py:44:4: Object does not support subscripting [unsupported_operation] ./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] ./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int] +./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index 9afcbdcfc..4902859db 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,13 +1,18 @@ conformance_automated = "Fail" errors_diff = """ -Line 40: Unexpected errors ["./generics_typevartuple_concat.py:40:19: Object does not support subscripting [unsupported_operation]"] -Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:19: Object does not support subscripting [unsupported_operation]"] -Line 44: Unexpected errors ["./generics_typevartuple_concat.py:44:19: Object does not support subscripting [unsupported_operation]"] +Line 26: Unexpected errors ['./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 30: Unexpected errors ['./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 34: Unexpected errors ['./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 42: Unexpected errors ['./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[Any[unannotated], Any[unannotated]]'] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:40:19: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_concat.py:42:19: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_concat.py:44:19: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[Any[unannotated], Any[unannotated]] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 6be5d10a2..7ff3d5b72 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -5,15 +5,13 @@ Line 110: Expected 1 errors Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors -Line 42: Unexpected errors ["./generics_typevartuple_specialization.py:42:24: Object does not support subscripting [unsupported_operation]"] Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, Any[error]]', "./generics_typevartuple_specialization.py:47:30: Object does not support subscripting [unsupported_operation]"] +Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[Any[unannotated]]]'] Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]]', "./generics_typevartuple_specialization.py:52:30: Object does not support subscripting [unsupported_operation]"] -Line 63: Unexpected errors ["./generics_typevartuple_specialization.py:63:13: Object does not support subscripting [unsupported_operation]"] -Line 64: Unexpected errors ["./generics_typevartuple_specialization.py:64:10: Object does not support subscripting [unsupported_operation]"] -Line 68: Unexpected errors ["./generics_typevartuple_specialization.py:68:19: Object does not support subscripting [unsupported_operation]"] -Line 69: Unexpected errors ["./generics_typevartuple_specialization.py:69:19: Object does not support subscripting [unsupported_operation]"] +Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]]'] +Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]]'] +Line 72: Unexpected errors ['./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 84: Unexpected errors ['./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] @@ -21,17 +19,13 @@ Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] """ output = """ -./generics_typevartuple_specialization.py:42:24: Object does not support subscripting [unsupported_operation] ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, Any[error]] -./generics_typevartuple_specialization.py:47:30: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[Any[unannotated]]] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]] -./generics_typevartuple_specialization.py:52:30: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:63:13: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:64:10: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:68:19: Object does not support subscripting [unsupported_operation] -./generics_typevartuple_specialization.py:69:19: Object does not support subscripting [unsupported_operation] +./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]] +./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]] +./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] ./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index 6b356655f..a1aa95de9 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -1,10 +1,12 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors +Line 12: Unexpected errors ['./generics_upper_bound.py:12:35: Undefined name: ForwardRef [undefined_name]'] Line 37: Unexpected errors ['./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int]'] Line 38: Unexpected errors ['./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int]'] """ output = """ +./generics_upper_bound.py:12:35: Undefined name: ForwardRef [undefined_name] ./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int] ./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int] ./generics_upper_bound.py:43:12: Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index e218a5ecc..a307e712a 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -1,66 +1,18 @@ conformance_automated = "Fail" errors_diff = """ +Line 77: Expected 1 errors +Line 81: Expected 1 errors +Line 93: Expected 1 errors +Line 105: Expected 1 errors +Line 113: Expected 1 errors +Line 163: Expected 1 errors +Line 167: Expected 1 errors Line 191: Expected 1 errors +Lines 125, 126: Expected error (tag 'CoContra_Child2') +Lines 131, 132: Expected error (tag 'CoContra_Child3') +Lines 141, 142: Expected error (tag 'CoContra_Child5') Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') -Line 38: Unexpected errors ["./generics_variance.py:38:10: Object does not support subscripting [unsupported_operation]"] -Line 39: Unexpected errors ["./generics_variance.py:39:11: Object does not support subscripting [unsupported_operation]"] -Line 45: Unexpected errors ['./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation]', './generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation]'] -Line 85: Unexpected errors ["./generics_variance.py:85:16: Object does not support subscripting [unsupported_operation]"] -Line 89: Unexpected errors ["./generics_variance.py:89:16: Object does not support subscripting [unsupported_operation]"] -Line 97: Unexpected errors ["./generics_variance.py:97:20: Object does not support subscripting [unsupported_operation]"] -Line 101: Unexpected errors ["./generics_variance.py:101:20: Object does not support subscripting [unsupported_operation]"] -Line 109: Unexpected errors ["./generics_variance.py:109:27: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:109:20: Object does not support subscripting [unsupported_operation]"] -Line 117: Unexpected errors ["./generics_variance.py:117:27: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:117:20: Object does not support subscripting [unsupported_operation]"] -Line 121: Unexpected errors ["./generics_variance.py:121:22: Object does not support subscripting [unsupported_operation]"] -Line 137: Unexpected errors ["./generics_variance.py:137:22: Object does not support subscripting [unsupported_operation]"] -Line 147: Unexpected errors ["./generics_variance.py:147:24: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:147:17: Object does not support subscripting [unsupported_operation]"] -Line 151: Unexpected errors ["./generics_variance.py:151:28: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:151:21: Object does not support subscripting [unsupported_operation]"] -Line 155: Unexpected errors ["./generics_variance.py:155:16: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:155:13: Object does not support subscripting [unsupported_operation]"] -Line 159: Unexpected errors ["./generics_variance.py:159:17: Object does not support subscripting [unsupported_operation]", "./generics_variance.py:159:20: Object does not support subscripting [unsupported_operation]"] -Line 171: Unexpected errors ["./generics_variance.py:171:8: Object does not support subscripting [unsupported_operation]"] -Line 172: Unexpected errors ["./generics_variance.py:172:12: Object does not support subscripting [unsupported_operation]"] """ output = """ ./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] -./generics_variance.py:38:10: Object does not support subscripting [unsupported_operation] -./generics_variance.py:39:11: Object does not support subscripting [unsupported_operation] -./generics_variance.py:45:21: Unrecognized annotation typing.TypeVar [invalid_annotation] -./generics_variance.py:45:27: Unrecognized annotation typing.TypeVar [invalid_annotation] -./generics_variance.py:77:13: Object does not support subscripting [unsupported_operation] -./generics_variance.py:81:13: Object does not support subscripting [unsupported_operation] -./generics_variance.py:85:16: Object does not support subscripting [unsupported_operation] -./generics_variance.py:89:16: Object does not support subscripting [unsupported_operation] -./generics_variance.py:93:16: Object does not support subscripting [unsupported_operation] -./generics_variance.py:97:20: Object does not support subscripting [unsupported_operation] -./generics_variance.py:101:20: Object does not support subscripting [unsupported_operation] -./generics_variance.py:105:20: Object does not support subscripting [unsupported_operation] -./generics_variance.py:109:27: Object does not support subscripting [unsupported_operation] -./generics_variance.py:109:20: Object does not support subscripting [unsupported_operation] -./generics_variance.py:113:27: Object does not support subscripting [unsupported_operation] -./generics_variance.py:113:20: Object does not support subscripting [unsupported_operation] -./generics_variance.py:117:27: Object does not support subscripting [unsupported_operation] -./generics_variance.py:117:20: Object does not support subscripting [unsupported_operation] -./generics_variance.py:121:22: Object does not support subscripting [unsupported_operation] -./generics_variance.py:126:4: Object does not support subscripting [unsupported_operation] -./generics_variance.py:132:4: Object does not support subscripting [unsupported_operation] -./generics_variance.py:137:22: Object does not support subscripting [unsupported_operation] -./generics_variance.py:142:13: Object does not support subscripting [unsupported_operation] -./generics_variance.py:142:23: Object does not support subscripting [unsupported_operation] -./generics_variance.py:142:4: Object does not support subscripting [unsupported_operation] -./generics_variance.py:147:24: Object does not support subscripting [unsupported_operation] -./generics_variance.py:147:17: Object does not support subscripting [unsupported_operation] -./generics_variance.py:151:28: Object does not support subscripting [unsupported_operation] -./generics_variance.py:151:21: Object does not support subscripting [unsupported_operation] -./generics_variance.py:155:16: Object does not support subscripting [unsupported_operation] -./generics_variance.py:155:13: Object does not support subscripting [unsupported_operation] -./generics_variance.py:159:17: Object does not support subscripting [unsupported_operation] -./generics_variance.py:159:20: Object does not support subscripting [unsupported_operation] -./generics_variance.py:163:32: Object does not support subscripting [unsupported_operation] -./generics_variance.py:163:35: Object does not support subscripting [unsupported_operation] -./generics_variance.py:163:25: Object does not support subscripting [unsupported_operation] -./generics_variance.py:167:43: Object does not support subscripting [unsupported_operation] -./generics_variance.py:167:36: Object does not support subscripting [unsupported_operation] -./generics_variance.py:167:29: Object does not support subscripting [unsupported_operation] -./generics_variance.py:171:8: Object does not support subscripting [unsupported_operation] -./generics_variance.py:172:12: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index e5d9117e1..a2ed72b57 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -2,12 +2,9 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 67: Expected 1 errors -Line 115: Expected 1 errors Line 116: Expected 1 errors Line 117: Expected 1 errors Line 157: Expected 1 errors -Line 158: Expected 1 errors -Line 159: Expected 1 errors Line 160: Expected 1 errors Line 218: Expected 1 errors Line 285: Expected 1 errors @@ -23,6 +20,9 @@ Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assign output = """ ./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got Annotated[./protocols_definition.py.Concrete, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_definition.py.Concrete', literal_only=False)), 'name': SigParameter(name='name', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] +./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] ./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] +./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] +./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] ./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index 2a8091fd4..8581de1a3 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,9 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 37: Unexpected errors ["./protocols_recursive.py:37:6: Object does not support subscripting [unsupported_operation]"] +Line 38: Unexpected errors ["./protocols_recursive.py:38:5: Incompatible argument type for graph: expected ./protocols_recursive.py.Traversable (Protocol with members 'leaves') but got ./protocols_recursive.py.Tree[float | int] [incompatible_argument]"] Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ -./protocols_recursive.py:37:6: Object does not support subscripting [unsupported_operation] +./protocols_recursive.py:38:5: Incompatible argument type for graph: expected ./protocols_recursive.py.Traversable (Protocol with members 'leaves') but got ./protocols_recursive.py.Tree[float | int] [incompatible_argument] ./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index abf8762ef..892070837 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -1,24 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 16: Expected 1 errors +Line 79: Expected 1 errors +Line 80: Expected 1 errors +Line 102: Expected 1 errors +Line 103: Expected 1 errors Line 37: Unexpected errors ["./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment]"] -Line 77: Unexpected errors ["./protocols_subtyping.py:77:8: Object does not support subscripting [unsupported_operation]"] -Line 78: Unexpected errors ["./protocols_subtyping.py:78:8: Object does not support subscripting [unsupported_operation]"] -Line 98: Unexpected errors ["./protocols_subtyping.py:98:8: Object does not support subscripting [unsupported_operation]"] -Line 99: Unexpected errors ["./protocols_subtyping.py:99:8: Object does not support subscripting [unsupported_operation]"] -Line 100: Unexpected errors ["./protocols_subtyping.py:100:8: Object does not support subscripting [unsupported_operation]"] """ output = """ ./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] ./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] ./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3 (Protocol with members 'method1', 'method2'), got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] -./protocols_subtyping.py:77:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:78:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:79:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:80:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:98:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:99:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:100:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:102:8: Object does not support subscripting [unsupported_operation] -./protocols_subtyping.py:103:8: Object does not support subscripting [unsupported_operation] """ diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index 86408e066..23a7304a2 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -1,25 +1,14 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 56: Expected 1 errors -Line 76: Expected 1 errors -Line 143: Expected 1 errors -Line 144: Expected 1 errors -Line 38: Unexpected errors ['./specialtypes_type.py:38:22: Unrecognized annotation typing.TypeVar [invalid_annotation]', './specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation]'] -Line 44: Unexpected errors ['./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser'] -Line 116: Unexpected errors ["./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str"] -Line 119: Unexpected errors ["./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str"] -Line 127: Unexpected errors ['./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser'] """ output = """ -./specialtypes_type.py:38:22: Unrecognized annotation typing.TypeVar [invalid_annotation] -./specialtypes_type.py:38:34: Unrecognized annotation typing.TypeVar [invalid_annotation] -./specialtypes_type.py:44:12: Any[error] is not equivalent to ./specialtypes_type.py.TeamUser +./specialtypes_type.py:56:6: Incompatible argument type for user_class: expected type[./specialtypes_type.py.BasicUser] | type[./specialtypes_type.py.ProUser] but got [incompatible_argument] ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] -./specialtypes_type.py:116:16: Literal['object'] is not equivalent to str +./specialtypes_type.py:76:11: Type[] takes only one argument [invalid_annotation] ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] -./specialtypes_type.py:119:16: Literal['object'] is not equivalent to str ./specialtypes_type.py:120:4: type[object] has no attribute 'unknown' [undefined_attribute] -./specialtypes_type.py:127:16: Any[error] is not equivalent to ./specialtypes_type.py.ProUser +./specialtypes_type.py:143:0: Literal[typing.Type] has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:144:0: Literal[typing.Type[typing.Any]] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:145:0: type 'type' has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:146:0: Literal[type[typing.Any]] has no attribute 'unknown' [undefined_attribute] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 7ba5ecc19..a8d326a74 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -257,7 +257,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Generics From 0a378f7c6123dd87859fb321ca823dbf70d4cc80 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 26 Feb 2026 22:21:26 -0800 Subject: [PATCH 33/78] progress --- .../results/pycroscope/aliases_implicit.toml | 2 -- .../results/pycroscope/aliases_newtype.toml | 30 +++++++++---------- .../pycroscope/aliases_type_statement.toml | 27 ++++++++--------- .../pycroscope/aliases_typealiastype.toml | 10 +++++-- .../pycroscope/constructors_call_type.toml | 12 ++++---- .../results/pycroscope/dataclasses_final.toml | 6 +--- .../pycroscope/dataclasses_frozen.toml | 10 +++---- .../generics_defaults_referential.toml | 4 --- .../pycroscope/generics_self_usage.toml | 2 -- .../generics_syntax_compatibility.toml | 6 ++-- .../generics_typevartuple_concat.toml | 4 +-- .../generics_typevartuple_specialization.toml | 4 +-- .../pycroscope/generics_upper_bound.toml | 4 +-- .../protocols_runtime_checkable.toml | 2 +- conformance/results/results.html | 10 +++---- 15 files changed, 60 insertions(+), 73 deletions(-) diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index d242cd6b7..a250b8eda 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -14,7 +14,6 @@ Line 119: Expected 1 errors Line 135: Expected 1 errors Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] -Line 131: Unexpected errors ['./aliases_implicit.py:131:12: Literal[[]] is not equivalent to list[int]'] """ output = """ ./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None @@ -28,6 +27,5 @@ output = """ ./aliases_implicit.py:114:8: Invalid type annotation 3 [invalid_annotation] ./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] ./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] -./aliases_implicit.py:131:12: Literal[[]] is not equivalent to list[int] ./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/aliases_newtype.toml b/conformance/results/pycroscope/aliases_newtype.toml index f65302622..2363fc171 100644 --- a/conformance/results/pycroscope/aliases_newtype.toml +++ b/conformance/results/pycroscope/aliases_newtype.toml @@ -1,21 +1,19 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 11: Expected 1 errors -Line 12: Expected 1 errors -Line 18: Expected 1 errors -Line 23: Expected 1 errors -Line 26: Expected 1 errors -Line 35: Expected 1 errors -Line 41: Expected 1 errors -Line 47: Expected 1 errors -Line 50: Expected 1 errors -Line 52: Expected 1 errors -Line 54: Expected 1 errors -Line 61: Expected 1 errors -Line 65: Expected 1 errors -Line 15: Unexpected errors ['./aliases_newtype.py:15:12: Any[from_another] is not equivalent to int'] """ output = """ -./aliases_newtype.py:15:12: Any[from_another] is not equivalent to int +./aliases_newtype.py:11:7: Incompatible argument type for x: expected int but got Literal['user'] [incompatible_argument] +./aliases_newtype.py:12:0: Incompatible assignment: expected NewType('UserId', int), got Literal[42] [incompatible_assignment] +./aliases_newtype.py:18:0: Incompatible assignment: expected type, got Literal[pycroscope.implementation.UserId] [incompatible_assignment] +./aliases_newtype.py:23:15: Second argument to "isinstance" must be a type, union, or tuple of types, not "pycroscope.implementation.UserId" [incompatible_argument] +./aliases_newtype.py:26:20: NewType types cannot be used as base classes [invalid_base] +./aliases_newtype.py:35:19: NewType name argument must match the assignment target name [incompatible_call] +./aliases_newtype.py:41:5: Object Literal[pycroscope.implementation.GoodNewType1] does not support subscripting [unsupported_operation] +./aliases_newtype.py:47:37: NewType base type cannot be generic [incompatible_call] +./aliases_newtype.py:50:37: NewType base type cannot be generic [incompatible_call] +./aliases_newtype.py:52:37: NewType base type cannot be a protocol [incompatible_call] +./aliases_newtype.py:54:37: NewType base type cannot be a literal type [incompatible_call] +./aliases_newtype.py:61:37: NewType base type cannot be a TypedDict [incompatible_call] ./aliases_newtype.py:63:14: In call to typing.NewType: Takes 2 positional arguments but 3 were given [incompatible_call] +./aliases_newtype.py:65:37: NewType base type cannot be Any [incompatible_call] """ diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml index 183e44036..c1631e6a6 100644 --- a/conformance/results/pycroscope/aliases_type_statement.toml +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -1,8 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 17: Expected 1 errors -Line 26: Expected 1 errors -Line 31: Expected 1 errors Line 37: Expected 1 errors Line 38: Expected 1 errors Line 39: Expected 1 errors @@ -15,20 +12,22 @@ Line 45: Expected 1 errors Line 46: Expected 1 errors Line 47: Expected 1 errors Line 49: Expected 1 errors -Line 56: Expected 1 errors -Line 62: Expected 1 errors -Line 67: Expected 1 errors -Line 77: Expected 1 errors -Line 79: Expected 1 errors -Line 82: Expected 1 errors -Line 84: Expected 1 errors -Lines 51, 52: Expected error (tag 'TA14') -Lines 88, 89: Expected error (tag 'RTA6') -Line 21: Unexpected errors ["./aliases_type_statement.py:21:6: int has no attribute '__value__' [undefined_attribute]"] """ output = """ +./aliases_type_statement.py:17:0: int has no attribute 'bit_count' [undefined_attribute] ./aliases_type_statement.py:19:0: .GoodAlias1 = int is not callable [not_callable] -./aliases_type_statement.py:21:6: int has no attribute '__value__' [undefined_attribute] ./aliases_type_statement.py:23:6: int has no attribute 'other_attrib' [undefined_attribute] +./aliases_type_statement.py:26:17: Type aliases cannot be used as base classes [invalid_base] +./aliases_type_statement.py:31:21: Second argument to "isinstance" cannot be a type alias [incompatible_argument] ./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_type_statement.py:52:0: Type alias BadTypeAlias14 is already defined [invalid_annotation] +./aliases_type_statement.py:56:4: Type alias statements are not allowed inside functions [invalid_annotation] +./aliases_type_statement.py:62:0: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] +./aliases_type_statement.py:67:0: Type alias must declare type parameters in the type statement [invalid_annotation] +./aliases_type_statement.py:77:6: Type argument str is not compatible with ~S: int [invalid_annotation] +./aliases_type_statement.py:79:6: Type argument int is not compatible with ~T: str [invalid_annotation] +./aliases_type_statement.py:82:0: Type alias RecursiveTypeAlias3 has a circular definition [invalid_annotation] +./aliases_type_statement.py:84:0: Type alias RecursiveTypeAlias4 has a circular definition [invalid_annotation] +./aliases_type_statement.py:88:0: Type alias RecursiveTypeAlias6 has a circular definition [invalid_annotation] +./aliases_type_statement.py:89:0: Type alias RecursiveTypeAlias7 has a circular definition [invalid_annotation] """ diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index 9aa24aff2..d95d69366 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 40: Expected 1 errors Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors @@ -20,10 +19,15 @@ Line 61: Expected 1 errors Line 62: Expected 1 errors Line 64: Expected 1 errors Line 66: Expected 1 errors -Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation]"] +Line 37: Unexpected errors ['./aliases_typealiastype.py:37:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation]'] +Line 38: Unexpected errors ['./aliases_typealiastype.py:38:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation]'] +Line 39: Unexpected errors ['./aliases_typealiastype.py:39:4: Unpack[] used in unsupported context [invalid_annotation]'] """ output = """ ./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] -./aliases_typealiastype.py:39:4: Invalid type annotation [, ] [invalid_annotation] +./aliases_typealiastype.py:37:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation] +./aliases_typealiastype.py:38:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation] +./aliases_typealiastype.py:39:4: Unpack[] used in unsupported context [invalid_annotation] +./aliases_typealiastype.py:40:4: Expected 4 type arguments for type alias, got 3 [invalid_annotation] ./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] """ diff --git a/conformance/results/pycroscope/constructors_call_type.toml b/conformance/results/pycroscope/constructors_call_type.toml index 01a607870..01406f8c9 100644 --- a/conformance/results/pycroscope/constructors_call_type.toml +++ b/conformance/results/pycroscope/constructors_call_type.toml @@ -1,13 +1,13 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 59: Expected 1 errors -Line 64: Expected 1 errors -Line 72: Expected 1 errors -Line 81: Expected 1 errors -Line 82: Expected 1 errors """ output = """ ./constructors_call_type.py:30:4: In call to .../tests/constructors_call_type.py.Meta1.__call__: Missing required argument 'x' [incompatible_call] ./constructors_call_type.py:40:4: In call to .../tests/constructors_call_type.py.Class2: Missing required argument 'x' [incompatible_call] ./constructors_call_type.py:50:4: In call to .../tests/constructors_call_type.py.Class3: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:59:4: In call to .../tests/constructors_call_type.py.Class4: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_call_type.py:64:4: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_call_type.py:72:4: In call to .../tests/constructors_call_type.py.Meta1.__call__: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:81:4: In call to .../tests/constructors_call_type.py.Class2: Missing required argument 'y' [incompatible_call] +./constructors_call_type.py:82:11: Incompatible argument type for y: expected str but got Literal[2] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/dataclasses_final.toml b/conformance/results/pycroscope/dataclasses_final.toml index ef5b1a8b2..ac6030b45 100644 --- a/conformance/results/pycroscope/dataclasses_final.toml +++ b/conformance/results/pycroscope/dataclasses_final.toml @@ -1,11 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 16: Unexpected errors ['./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation]'] -Line 18: Unexpected errors ['./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation]'] """ output = """ -./dataclasses_final.py:16:4: Final class attributes without initializers must be assigned in __init__ [invalid_annotation] -./dataclasses_final.py:18:20: Final cannot be combined with ClassVar [invalid_annotation] ./dataclasses_final.py:27:0: Cannot assign to final name final_classvar [incompatible_assignment] ./dataclasses_final.py:35:0: Cannot assign to final name final_no_default [incompatible_assignment] ./dataclasses_final.py:36:0: Cannot assign to final name final_with_default [incompatible_assignment] diff --git a/conformance/results/pycroscope/dataclasses_frozen.toml b/conformance/results/pycroscope/dataclasses_frozen.toml index d789c7c92..06e616696 100644 --- a/conformance/results/pycroscope/dataclasses_frozen.toml +++ b/conformance/results/pycroscope/dataclasses_frozen.toml @@ -1,9 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 16: Expected 1 errors -Line 17: Expected 1 errors -Lines 22, 23: Expected error (tag 'DC2') -Lines 32, 33: Expected error (tag 'DC4') """ output = """ +./dataclasses_frozen.py:16:0: Dataclass is frozen [incompatible_assignment] +./dataclasses_frozen.py:17:0: Dataclass is frozen [incompatible_assignment] +./dataclasses_frozen.py:23:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] +./dataclasses_frozen.py:33:0: Frozen dataclass cannot inherit from a non-frozen dataclass [invalid_base] """ diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index f35c40bce..37ab58b57 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -8,19 +8,15 @@ Line 74: Expected 1 errors Line 78: Expected 1 errors Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]]"] Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None]'] -Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: .../tests/generics_defaults_referential.py.slice[str, Any[generic_argument], int | None] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None]'] Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str]"] Line 94: Unexpected errors ["./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]]"] Line 95: Unexpected errors ['./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]]'] -Line 96: Unexpected errors ['./generics_defaults_referential.py:96:12: .../tests/generics_defaults_referential.py.Bar[int, list[Any[unreachable]]] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]]'] """ output = """ ./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]] ./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None] -./generics_defaults_referential.py:25:12: .../tests/generics_defaults_referential.py.slice[str, Any[generic_argument], int | None] is not equivalent to .../tests/generics_defaults_referential.py.slice[str, str, int | None] ./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str] ./generics_defaults_referential.py:37:9: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] ./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]] ./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]] -./generics_defaults_referential.py:96:12: .../tests/generics_defaults_referential.py.Bar[int, list[Any[unreachable]]] is not equivalent to .../tests/generics_defaults_referential.py.Bar[int, list[int]] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index ae32d1ea6..66eaaabc7 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -11,10 +11,8 @@ Line 113: Expected 1 errors Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors -Line 78: Unexpected errors ['./generics_self_usage.py:78:31: Undefined name: Foo2 [undefined_name]'] Line 93: Unexpected errors ["./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child[~SelfT] has no attribute 'return_concrete_type' [undefined_attribute]"] """ output = """ -./generics_self_usage.py:78:31: Undefined name: Foo2 [undefined_name] ./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child[~SelfT] has no attribute 'return_concrete_type' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_syntax_compatibility.toml b/conformance/results/pycroscope/generics_syntax_compatibility.toml index c2a2f515c..b142b21a8 100644 --- a/conformance/results/pycroscope/generics_syntax_compatibility.toml +++ b/conformance/results/pycroscope/generics_syntax_compatibility.toml @@ -1,7 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 14: Expected 1 errors -Line 26: Expected 1 errors """ output = """ +./generics_syntax_compatibility.py:14:0: Class definition cannot combine old-style TypeVar declarations with type parameter syntax [invalid_annotation] +./generics_syntax_compatibility.py:26:4: Function definition cannot combine old-style TypeVar declarations with type parameter syntax [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index 4902859db..af56e1a50 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -3,7 +3,7 @@ errors_diff = """ Line 26: Unexpected errors ['./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] Line 30: Unexpected errors ['./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] Line 34: Unexpected errors ['./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 42: Unexpected errors ['./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[Any[unannotated], Any[unannotated]]'] +Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)]"] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ @@ -13,6 +13,6 @@ output = """ ./generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[Any[unannotated], Any[unannotated]] +./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 7ff3d5b72..a11f4beda 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -6,7 +6,7 @@ Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 47: Unexpected errors ['./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[Any[unannotated]]]'] +Line 47: Unexpected errors ["./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]]"] Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]]'] Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]]'] @@ -20,7 +20,7 @@ Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: """ output = """ ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[Any[unannotated]]] +./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]] ./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]] diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index a1aa95de9..548f81926 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -1,12 +1,10 @@ conformance_automated = "Fail" errors_diff = """ -Line 24: Expected 1 errors -Line 12: Unexpected errors ['./generics_upper_bound.py:12:35: Undefined name: ForwardRef [undefined_name]'] Line 37: Unexpected errors ['./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int]'] Line 38: Unexpected errors ['./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int]'] """ output = """ -./generics_upper_bound.py:12:35: Undefined name: ForwardRef [undefined_name] +./generics_upper_bound.py:24:37: TypeVar bound cannot be parameterized by type variables [invalid_annotation] ./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int] ./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int] ./generics_upper_bound.py:43:12: Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] diff --git a/conformance/results/pycroscope/protocols_runtime_checkable.toml b/conformance/results/pycroscope/protocols_runtime_checkable.toml index 58abba848..ddad6a3e2 100644 --- a/conformance/results/pycroscope/protocols_runtime_checkable.toml +++ b/conformance/results/pycroscope/protocols_runtime_checkable.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 23: Expected 1 errors Line 55: Expected 1 errors Line 61: Expected 1 errors Line 88: Expected 1 errors @@ -8,4 +7,5 @@ Line 92: Expected 1 errors Line 96: Expected 1 errors """ output = """ +./protocols_runtime_checkable.py:23:21: Second argument to "isinstance" cannot be a protocol that is not @runtime_checkable [incompatible_argument] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index a8d326a74..09f6d0fb1 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -372,7 +372,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_syntax_declarations Pass @@ -539,7 +539,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      aliases_recursive Pass @@ -740,7 +740,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      constructors_callable
Partial

Does not generate a union type for __new__ and __init__ when converting class to callable.

Does not ignore __init__ based on __new__ return type when converting class to callable.

Does not support __new__ return type that is different from class being constructed.

@@ -819,14 +819,14 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_frozen Pass Pass Pass Pass -Unknown +Pass      dataclasses_hash
Partial

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

From 8b438ad7d2b43bd7e46ecadc22945f6c74a9ccf6 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 26 Feb 2026 22:23:39 -0800 Subject: [PATCH 34/78] one more --- .../results/pycroscope/enums_members.toml | 10 +++++----- .../pycroscope/literals_literalstring.toml | 4 ++-- .../pycroscope/literals_parameterizations.toml | 16 ++++++++-------- conformance/results/results.html | 2 +- conformance/src/type_checker.py | 2 ++ 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 2347eef71..52f204835 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -1,12 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 82: Expected 1 errors -Line 83: Expected 1 errors -Line 84: Expected 1 errors -Line 85: Expected 1 errors """ output = """ ./enums_members.py:50:4: Enum members should not be explicitly annotated [invalid_annotation] +./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypeVarValue(typevar=~T1, bound=None, default=None, constraints=(), variance=, is_typevartuple=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:83:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:84:9: Arguments to Literal[] must be literals, not (TypedValue(typ=, literal_only=False),) [invalid_literal] +./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./enums_members.py.Pet4', literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:116:12: enum.nonmember[Literal[2]] is not equivalent to Any[unannotated] ./enums_members.py:128:20: Revealed type is 'int' [reveal_type] ./enums_members.py:129:20: int is not equivalent to Any[unannotated] diff --git a/conformance/results/pycroscope/literals_literalstring.toml b/conformance/results/pycroscope/literals_literalstring.toml index f7246d175..bfc8005ab 100644 --- a/conformance/results/pycroscope/literals_literalstring.toml +++ b/conformance/results/pycroscope/literals_literalstring.toml @@ -1,10 +1,10 @@ conformance_automated = "Fail" errors_diff = """ -Line 36: Expected 1 errors -Line 37: Expected 1 errors Line 63: Unexpected errors ['./literals_literalstring.py:63:16: str is not equivalent to LiteralString'] """ output = """ +./literals_literalstring.py:36:11: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got typing.LiteralString [invalid_literal] +./literals_literalstring.py:37:13: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got typing.LiteralString [invalid_literal] ./literals_literalstring.py:43:4: Incompatible assignment: expected Literal[''], got Literal['two'] [incompatible_assignment] ./literals_literalstring.py:63:16: str is not equivalent to LiteralString ./literals_literalstring.py:65:4: Incompatible assignment: expected LiteralString, got str [incompatible_assignment] diff --git a/conformance/results/pycroscope/literals_parameterizations.toml b/conformance/results/pycroscope/literals_parameterizations.toml index 51ae040a8..a269611d2 100644 --- a/conformance/results/pycroscope/literals_parameterizations.toml +++ b/conformance/results/pycroscope/literals_parameterizations.toml @@ -2,21 +2,21 @@ conformance_automated = "Fail" errors_diff = """ Line 41: Expected 1 errors Line 42: Expected 1 errors -Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors Line 49: Expected 1 errors -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 52: Expected 1 errors -Line 53: Expected 1 errors Line 56: Expected 1 errors -Line 61: Expected 1 errors """ output = """ +./literals_parameterizations.py:43:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got (4+3j) [invalid_literal] +./literals_parameterizations.py:47:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got {'a': 'b', 'c': 'd'} [invalid_literal] +./literals_parameterizations.py:48:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got [invalid_literal] +./literals_parameterizations.py:50:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got ~T [invalid_literal] +./literals_parameterizations.py:51:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got 3.14 [invalid_literal] +./literals_parameterizations.py:52:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got typing.Any [invalid_literal] +./literals_parameterizations.py:53:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got Ellipsis [invalid_literal] ./literals_parameterizations.py:60:3: Invalid type annotation typing.Literal [invalid_annotation] +./literals_parameterizations.py:61:3: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got [invalid_literal] ./literals_parameterizations.py:65:4: Incompatible assignment: expected Literal['Color.RED'], got Literal[] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 09f6d0fb1..e808f01fd 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -1118,7 +1118,7 @@

Python Type System Conformance Test Results

Pass*

Does not support `_ignore_` mechanism (optional).

Pass Pass -Unknown +Pass Type narrowing diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index cd2d27fdb..5c9e322a1 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -397,6 +397,8 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: "unused_variable", "--disable", "unused_assignment", + "--enable", + "invalid_literal", ] proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") lines = proc.stderr.splitlines() From 1f6b896398ac1642afe15cf0fecc3e05ae108bbc Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 06:35:01 -0800 Subject: [PATCH 35/78] progress --- .../results/pycroscope/callables_kwargs.toml | 8 ++++---- .../results/pycroscope/classes_override.toml | 4 +--- .../results/pycroscope/dataclasses_kwonly.toml | 10 ++++------ .../pycroscope/dataclasses_match_args.toml | 7 ++----- .../dataclasses_transform_converter.toml | 8 +++++++- .../pycroscope/dataclasses_transform_func.toml | 2 +- .../pycroscope/generics_paramspec_basic.toml | 1 - .../pycroscope/generics_self_attributes.toml | 4 ++-- .../pycroscope/generics_syntax_declarations.toml | 2 ++ .../results/pycroscope/generics_upper_bound.toml | 12 ++++-------- .../results/pycroscope/namedtuples_usage.toml | 6 +++--- .../results/pycroscope/protocols_generic.toml | 2 +- .../results/pycroscope/protocols_variance.toml | 16 ++++++++-------- conformance/results/results.html | 16 ++++++---------- 14 files changed, 45 insertions(+), 53 deletions(-) diff --git a/conformance/results/pycroscope/callables_kwargs.toml b/conformance/results/pycroscope/callables_kwargs.toml index 6d9e7c9f8..b3b3945bb 100644 --- a/conformance/results/pycroscope/callables_kwargs.toml +++ b/conformance/results/pycroscope/callables_kwargs.toml @@ -1,8 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 111: Expected 1 errors -Line 122: Expected 1 errors -Line 134: Expected 1 errors """ output = """ ./callables_kwargs.py:46:4: In call to .../tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] @@ -16,4 +13,7 @@ output = """ ./callables_kwargs.py:101:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol3, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] ./callables_kwargs.py:102:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol4, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] ./callables_kwargs.py:103:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol5, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:111:21: Parameter v1 overlaps with TypedDict key in **kwargs [invalid_annotation] +./callables_kwargs.py:122:12: Expected TypedDict type inside Unpack[] for **kwargs [invalid_annotation] +./callables_kwargs.py:134:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol6, got function '.../tests/callables_kwargs.py.func7' [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/classes_override.toml b/conformance/results/pycroscope/classes_override.toml index 504bf518a..b73910e7f 100644 --- a/conformance/results/pycroscope/classes_override.toml +++ b/conformance/results/pycroscope/classes_override.toml @@ -1,6 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 101: Unexpected errors ['./classes_override.py:101:4: Method does not override any base method [override_does_not_override]'] """ output = """ ./classes_override.py:53:4: Method does not override any base method [override_does_not_override] @@ -8,5 +7,4 @@ output = """ ./classes_override.py:79:4: Method does not override any base method [override_does_not_override] ./classes_override.py:84:4: Method does not override any base method [override_does_not_override] ./classes_override.py:89:4: Method does not override any base method [override_does_not_override] -./classes_override.py:101:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/dataclasses_kwonly.toml b/conformance/results/pycroscope/dataclasses_kwonly.toml index c19ae331d..e772cdcd0 100644 --- a/conformance/results/pycroscope/dataclasses_kwonly.toml +++ b/conformance/results/pycroscope/dataclasses_kwonly.toml @@ -1,10 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 23: Expected 1 errors -Line 38: Expected 1 errors -Line 53: Expected 1 errors -Line 13: Unexpected errors ['./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation]'] """ output = """ -./dataclasses_kwonly.py:13:7: Invalid type annotation [invalid_annotation] +./dataclasses_kwonly.py:23:0: In call to ./dataclasses_kwonly.py.DC1: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_kwonly.py:38:0: In call to ./dataclasses_kwonly.py.DC2: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_kwonly.py:53:0: In call to ./dataclasses_kwonly.py.DC3: Takes 1 positional arguments but 2 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml index 5e935aa4c..4b8bed1f0 100644 --- a/conformance/results/pycroscope/dataclasses_match_args.toml +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -1,15 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 15: Unexpected errors ['./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation]'] -Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:18:12: has no attribute '__match_args__' [undefined_attribute]"] +Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Literal[('x',)] is not equivalent to tuple[Literal['x']]"] Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:26:12: has no attribute '__match_args__' [undefined_attribute]"] Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:34:12: has no attribute '__match_args__' [undefined_attribute]"] Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[]'] """ output = """ -./dataclasses_match_args.py:15:7: Invalid type annotation [invalid_annotation] -./dataclasses_match_args.py:18:12: Any[error] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:18:12: has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:18:12: Literal[('x',)] is not equivalent to tuple[Literal['x']] ./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']] ./dataclasses_match_args.py:26:12: has no attribute '__match_args__' [undefined_attribute] ./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']] diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index 12b9aa1ad..a4b9c8553 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -4,13 +4,19 @@ Line 107: Expected 1 errors Line 108: Expected 1 errors Line 109: Expected 1 errors Line 118: Expected 1 errors -Line 119: Expected 1 errors Line 102: Unexpected errors ["./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got [incompatible_argument]"] +Line 114: Unexpected errors ["./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment]"] +Line 115: Unexpected errors ["./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment]"] +Line 116: Unexpected errors ["./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment]"] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] ./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got [incompatible_argument] +./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment] +./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment] +./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment] +./dataclasses_transform_converter.py:119:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[1] [incompatible_assignment] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_func.toml b/conformance/results/pycroscope/dataclasses_transform_func.toml index ec9648a77..d5a95ac58 100644 --- a/conformance/results/pycroscope/dataclasses_transform_func.toml +++ b/conformance/results/pycroscope/dataclasses_transform_func.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 56: Expected 1 errors Line 60: Expected 1 errors Line 64: Expected 1 errors Line 70: Expected 1 errors @@ -8,4 +7,5 @@ Line 96: Expected 1 errors Lines 88, 89: Expected error (tag 'Customer3Subclass') """ output = """ +./dataclasses_transform_func.py:56:0: Incompatible assignment: expected str, got Literal[3] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_paramspec_basic.toml b/conformance/results/pycroscope/generics_paramspec_basic.toml index c7b0919a5..fafa86d57 100644 --- a/conformance/results/pycroscope/generics_paramspec_basic.toml +++ b/conformance/results/pycroscope/generics_paramspec_basic.toml @@ -6,7 +6,6 @@ Line 31: Expected 1 errors Line 35: Expected 1 errors """ output = """ -./generics_paramspec_basic.py:23:0: Function may exit without returning a value [missing_return] ./generics_paramspec_basic.py:23:10: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:23:19: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:27:13: Unrecognized annotation typing.Concatenate[, ~P] [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_self_attributes.toml b/conformance/results/pycroscope/generics_self_attributes.toml index 913a04b76..13f57d1c3 100644 --- a/conformance/results/pycroscope/generics_self_attributes.toml +++ b/conformance/results/pycroscope/generics_self_attributes.toml @@ -1,7 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 32: Expected 1 errors """ output = """ ./generics_self_attributes.py:26:37: Incompatible argument type for next: expected .../tests/generics_self_attributes.py.OrdinalLinkedList | None but got .../tests/generics_self_attributes.py.LinkedList[int] [incompatible_argument] +./generics_self_attributes.py:32:4: Incompatible assignment: expected .../tests/generics_self_attributes.py.OrdinalLinkedList | NoneType, got .../tests/generics_self_attributes.py.LinkedList[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index b72cb3864..66702195e 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -5,10 +5,12 @@ Line 25: Expected 1 errors Line 44: Expected 1 errors Line 60: Expected 1 errors Line 64: Expected 1 errors +Line 21: Unexpected errors ['./generics_syntax_declarations.py:21:0: S should be covariant [invalid_annotation]'] Line 39: Unexpected errors ['./generics_syntax_declarations.py:39:16: Undefined name: ForwardReference [undefined_name]', './generics_syntax_declarations.py:39:39: Undefined name: ForwardReference [undefined_name]'] Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:17: Undefined name: ForwardReference [undefined_name]', './generics_syntax_declarations.py:56:13: Undefined name: ForwardReference [undefined_name]'] """ output = """ +./generics_syntax_declarations.py:21:0: S should be covariant [invalid_annotation] ./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] ./generics_syntax_declarations.py:39:16: Undefined name: ForwardReference [undefined_name] ./generics_syntax_declarations.py:39:39: Undefined name: ForwardReference [undefined_name] diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index 548f81926..9f6a74e19 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -1,13 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 37: Unexpected errors ['./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int]'] -Line 38: Unexpected errors ['./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int]'] """ output = """ ./generics_upper_bound.py:24:37: TypeVar bound cannot be parameterized by type variables [invalid_annotation] -./generics_upper_bound.py:37:12: Literal[[1], [1, 2]] is not equivalent to list[int] -./generics_upper_bound.py:38:12: Literal[{1}, {1, 2}] is not equivalent to set[int] -./generics_upper_bound.py:43:12: Literal[[1], {1, 2}] is not equivalent to list[int] | set[int] -./generics_upper_bound.py:51:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] -./generics_upper_bound.py:56:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] +./generics_upper_bound.py:44:16: list[int] | set[int] is not equivalent to collections.abc.Collection[int] +./generics_upper_bound.py:52:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] +./generics_upper_bound.py:57:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] """ diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml index 86a0dd98c..8654688b6 100644 --- a/conformance/results/pycroscope/namedtuples_usage.toml +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -1,12 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 40: Expected 1 errors -Line 42: Expected 1 errors """ output = """ ./namedtuples_usage.py:34:6: Tuple index out of range: Literal[3] [incompatible_call] ./namedtuples_usage.py:35:6: Tuple index out of range: Literal[-4] [incompatible_call] +./namedtuples_usage.py:40:0: Cannot mutate NamedTuple field 'x' [incompatible_assignment] ./namedtuples_usage.py:41:0: Object of type ./namedtuples_usage.py.Point does not support '__setitem__' [unsupported_operation] +./namedtuples_usage.py:42:4: Cannot mutate NamedTuple field 'x' [incompatible_assignment] ./namedtuples_usage.py:43:4: Object of type ./namedtuples_usage.py.Point does not support '__delitem__' [unsupported_operation] ./namedtuples_usage.py:52:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] ./namedtuples_usage.py:53:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index a5c23f7df..77e200f80 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 40: Expected 1 errors -Line 44: Expected 1 errors Line 145: Expected 1 errors Line 147: Expected 1 errors Line 39: Unexpected errors ['./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment]'] @@ -9,6 +8,7 @@ Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/ """ output = """ ./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment] +./protocols_generic.py:44:0: T_co should be invariant [invalid_annotation] ./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] ./protocols_generic.py:66:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[float | int], got .../tests/protocols_generic.py.Sender[int] [incompatible_assignment] ./protocols_generic.py:74:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[float | int], got .../tests/protocols_generic.py.AttrProto[int] [incompatible_assignment] diff --git a/conformance/results/pycroscope/protocols_variance.toml b/conformance/results/pycroscope/protocols_variance.toml index a5f099546..03101c7f4 100644 --- a/conformance/results/pycroscope/protocols_variance.toml +++ b/conformance/results/pycroscope/protocols_variance.toml @@ -1,12 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 21: Expected 1 errors -Line 40: Expected 1 errors -Line 56: Expected 1 errors -Line 66: Expected 1 errors -Line 104: Expected 1 errors -Lines 61, 62: Expected error (tag 'covariant_in_input') -Lines 71, 72: Expected error (tag 'contravariant_in_output') """ output = """ +./protocols_variance.py:21:0: T1 should be covariant [invalid_annotation] +./protocols_variance.py:40:0: T3 should be contravariant [invalid_annotation] +./protocols_variance.py:56:0: T1 should be contravariant [invalid_annotation] +./protocols_variance.py:61:0: T1_co should be contravariant [invalid_annotation] +./protocols_variance.py:66:0: T1 should be covariant [invalid_annotation] +./protocols_variance.py:71:0: T1_contra should be covariant [invalid_annotation] +./protocols_variance.py:104:0: T1 should be covariant [invalid_annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index e808f01fd..22838c919 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -344,7 +344,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_self_basic Pass @@ -455,12 +455,8 @@

Python Type System Conformance Test Results

Partial

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

Pass Pass -<<<<<<< HEAD
Partial

Cannot find a common supertype of `list[int]` and `set[int]` in order to solve a type variable bound to `Sized`.

-======= Pass -Unknown ->>>>>>> 7a5f235 (Initial pycroscope support)      generics_variance
Partial

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

@@ -515,7 +511,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Type aliases @@ -678,7 +674,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Callables @@ -695,7 +691,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      callables_protocol Pass @@ -847,7 +843,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_match_args Pass @@ -1073,7 +1069,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Enumerations From 6c0cbca7261a254c00b27c38959b5eae0eb40cdb Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 18:44:43 -0800 Subject: [PATCH 36/78] progress --- .../results/pycroscope/aliases_explicit.toml | 25 +++--- .../pycroscope/callables_protocol.toml | 10 ++- .../results/pycroscope/classes_classvar.toml | 2 +- .../pycroscope/constructors_call_init.toml | 7 +- .../constructors_call_metaclass.toml | 8 +- .../pycroscope/constructors_call_new.toml | 16 ++-- .../pycroscope/constructors_callable.toml | 88 +++++-------------- .../pycroscope/dataclasses_descriptors.toml | 2 + .../pycroscope/dataclasses_inheritance.toml | 5 ++ .../dataclasses_transform_class.toml | 16 +++- .../dataclasses_transform_converter.toml | 12 +-- .../dataclasses_transform_field.toml | 8 +- .../dataclasses_transform_func.toml | 12 ++- .../dataclasses_transform_meta.toml | 14 ++- .../results/pycroscope/dataclasses_usage.toml | 17 ++-- .../pycroscope/generics_paramspec_basic.toml | 10 +-- .../generics_typevartuple_basic.toml | 2 +- .../generics_typevartuple_callable.toml | 4 +- .../pycroscope/protocols_definition.toml | 4 +- .../protocols_runtime_checkable.toml | 12 +-- conformance/results/results.html | 6 +- 21 files changed, 144 insertions(+), 136 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 39af3692c..77b4f5dfa 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -3,18 +3,6 @@ errors_diff = """ Line 67: Expected 1 errors Line 70: Expected 1 errors Line 71: Expected 1 errors -Line 79: Expected 1 errors -Line 80: Expected 1 errors -Line 81: Expected 1 errors -Line 82: Expected 1 errors -Line 83: Expected 1 errors -Line 84: Expected 1 errors -Line 85: Expected 1 errors -Line 86: Expected 1 errors -Line 87: Expected 1 errors -Line 88: Expected 1 errors -Line 89: Expected 1 errors -Line 91: Expected 1 errors Line 100: Expected 1 errors Line 102: Expected 1 errors Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] @@ -23,6 +11,19 @@ output = """ ./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None ./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_explicit.py:79:20: Invalid type annotation [invalid_annotation] +./aliases_explicit.py:80:20: Unrecognized annotation [invalid_annotation] +./aliases_explicit.py:81:20: Unrecognized annotation tuple[tuple[type 'int', type 'str']] [invalid_annotation] +./aliases_explicit.py:82:20: Invalid type annotation [invalid_annotation] +./aliases_explicit.py:83:20: Unrecognized annotation [invalid_annotation] +./aliases_explicit.py:84:20: Invalid type annotation [invalid_annotation] +./aliases_explicit.py:85:20: Invalid type annotation 0 [invalid_annotation] +./aliases_explicit.py:86:20: Invalid type annotation [invalid_annotation] +./aliases_explicit.py:87:20: Invalid type annotation 3 [invalid_annotation] +./aliases_explicit.py:88:21: Invalid type annotation True [invalid_annotation] +./aliases_explicit.py:89:21: Invalid type annotation 1 [invalid_annotation] ./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_explicit.py:90:21: Invalid type annotation [invalid_annotation] +./aliases_explicit.py:91:21: Invalid type annotation [invalid_annotation] ./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index b9b111915..ba08effb3 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -10,8 +10,8 @@ Line 80: Unexpected errors ["./callables_protocol.py:80:0: Incompatible assignme Line 81: Unexpected errors ["./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment]"] Line 82: Unexpected errors ["./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] Line 109: Unexpected errors ["./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment]"] -Line 135: Unexpected errors ["./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_1, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_1', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] -Line 144: Unexpected errors ["./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_2, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_2', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 135: Unexpected errors ['./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment]', "./callables_protocol.py:135:26: Missing required argument 'self' [incompatible_call]"] +Line 144: Unexpected errors ['./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment]', "./callables_protocol.py:144:26: Missing required argument 'self' [incompatible_call]"] Line 168: Unexpected errors ["./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]"] Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] @@ -45,8 +45,10 @@ output = """ ./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4 (Protocol with members '__call__', 'other_attribute'), got (x: int) -> None [incompatible_assignment] ./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_1, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_1', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got Annotated[./callables_protocol.py.Class7_2, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./callables_protocol.py.Class7_2', literal_only=False)), 'inputs': SigParameter(name='inputs', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment] +./callables_protocol.py:135:26: Missing required argument 'self' [incompatible_call] +./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment] +./callables_protocol.py:144:26: Missing required argument 'self' [incompatible_call] ./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute] diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 09efc9bbf..834c54ae1 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -18,5 +18,5 @@ output = """ ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] -./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA (Protocol with members 'x', 'y', 'z'), got Annotated[./classes_classvar.py.ProtoAImpl, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=KnownValue(val='')), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./classes_classvar.py.ProtoAImpl', literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA (Protocol with members 'x', 'y', 'z'), got ./classes_classvar.py.ProtoAImpl [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index b54b09ac3..16ab71867 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,12 +1,11 @@ conformance_automated = "Fail" errors_diff = """ Line 21: Expected 1 errors -Line 42: Expected 1 errors Line 56: Expected 1 errors Line 107: Expected 1 errors -Line 130: Expected 1 errors Line 19: Unexpected errors ['./constructors_call_init.py:19:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[int]'] Line 20: Unexpected errors ['./constructors_call_init.py:20:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[float | int]'] +Line 41: Unexpected errors ['./constructors_call_init.py:41:7: Takes 0 positional arguments but 1 were given [incompatible_call]', './constructors_call_init.py:41:0: Takes 0 positional arguments but 1 were given [incompatible_call]'] Line 73: Unexpected errors ['./constructors_call_init.py:73:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class5[int]'] Line 92: Unexpected errors ['./constructors_call_init.py:92:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class6[int, str]'] Line 100: Unexpected errors ['./constructors_call_init.py:100:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class7[str, int]'] @@ -14,7 +13,11 @@ Line 100: Unexpected errors ['./constructors_call_init.py:100:12: Any[from_ano output = """ ./constructors_call_init.py:19:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[int] ./constructors_call_init.py:20:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[float | int] +./constructors_call_init.py:41:7: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_call_init.py:41:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_call_init.py:42:0: Takes 0 positional arguments but 1 were given [incompatible_call] ./constructors_call_init.py:73:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class5[int] ./constructors_call_init.py:92:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class6[int, str] ./constructors_call_init.py:100:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class7[str, int] +./constructors_call_init.py:130:0: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index 0c2e0db35..078980127 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -1,12 +1,10 @@ conformance_automated = "Fail" errors_diff = """ Line 54: Expected 1 errors -Line 68: Expected 1 errors -Line 26: Unexpected errors ["./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 39: Unexpected errors ["./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 39: Unexpected errors ['./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error]', './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] """ output = """ -./constructors_call_metaclass.py:26:16: Annotated[./constructors_call_metaclass.py.Class1, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class1', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never -./constructors_call_metaclass.py:39:12: Annotated[./constructors_call_metaclass.py.Class2, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_metaclass.py.Class2', literal_only=False))), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error] ./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_metaclass.py:68:0: Missing required argument 'x' [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index f9a8f784f..f7371f2f0 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -4,21 +4,21 @@ Line 21: Expected 1 errors Line 148: Expected 1 errors Line 19: Unexpected errors ['./constructors_call_new.py:19:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[int]'] Line 20: Unexpected errors ['./constructors_call_new.py:20:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[float | int]'] -Line 49: Unexpected errors ["./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int"] -Line 64: Unexpected errors ["./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 76: Unexpected errors ["./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never"] -Line 89: Unexpected errors ["./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] +Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error]', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[int]]'] Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[str]]'] """ output = """ ./constructors_call_new.py:19:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[int] ./constructors_call_new.py:20:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[float | int] -./constructors_call_new.py:49:12: Annotated[./constructors_call_new.py.Class3, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class3', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to int -./constructors_call_new.py:64:12: Annotated[./constructors_call_new.py.Class4, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False), AnyValue(source=))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class4', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] +./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:76:16: Annotated[./constructors_call_new.py.Class5, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)))}, return_value=MultiValuedValue(vals=()), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class5', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Never -./constructors_call_new.py:89:12: Annotated[./constructors_call_new.py.Class6, HasAttrExtension(attribute_name=KnownValue(val='__new__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'cls': SigParameter(name='cls', kind=, default=None, annotation=SubclassValue(typ=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./constructors_call_new.py.Class6', literal_only=False)), 'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never +./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] +./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:117:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[int]] ./constructors_call_new.py:118:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[str]] diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 25ca9c7e0..731a9eade 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -1,69 +1,27 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 38: Expected 1 errors -Line 39: Expected 1 errors -Line 51: Expected 1 errors -Line 66: Expected 1 errors -Line 67: Expected 1 errors -Line 68: Expected 1 errors -Line 81: Expected 1 errors -Line 82: Expected 1 errors -Line 129: Expected 1 errors -Line 146: Expected 1 errors -Line 186: Expected 1 errors -Line 197: Expected 1 errors -Line 35: Unexpected errors ["./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 37: Unexpected errors ['./constructors_callable.py:37:12: Any[error] is not equivalent to ./constructors_callable.py.Class1'] -Line 48: Unexpected errors ["./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 50: Unexpected errors ['./constructors_callable.py:50:12: Any[error] is not equivalent to ./constructors_callable.py.Class2'] -Line 63: Unexpected errors ["./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 65: Unexpected errors ['./constructors_callable.py:65:12: Any[error] is not equivalent to ./constructors_callable.py.Class3'] -Line 78: Unexpected errors ["./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 80: Unexpected errors ['./constructors_callable.py:80:12: Any[error] is not equivalent to int'] -Line 98: Unexpected errors ["./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 102: Unexpected errors ['./constructors_callable.py:102:16: Any[error] is not equivalent to Never'] -Line 107: Unexpected errors ['./constructors_callable.py:107:16: Any[error] is not equivalent to Never'] -Line 126: Unexpected errors ["./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 128: Unexpected errors ['./constructors_callable.py:128:12: Any[error] is not equivalent to ./constructors_callable.py.Class6Proxy'] -Line 143: Unexpected errors ["./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 162: Unexpected errors ["./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 166: Unexpected errors ['./constructors_callable.py:166:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[int]'] -Line 167: Unexpected errors ['./constructors_callable.py:167:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[str]'] -Line 183: Unexpected errors ["./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 185: Unexpected errors ['./constructors_callable.py:185:12: Any[error] is not equivalent to ./constructors_callable.py.Class8[str]'] -Line 194: Unexpected errors ["./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument]"] -Line 196: Unexpected errors ['./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9'] """ output = """ -./constructors_callable.py:35:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:36:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:37:12: Any[error] is not equivalent to ./constructors_callable.py.Class1 -./constructors_callable.py:48:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:49:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:50:12: Any[error] is not equivalent to ./constructors_callable.py.Class2 -./constructors_callable.py:63:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:64:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:65:12: Any[error] is not equivalent to ./constructors_callable.py.Class3 -./constructors_callable.py:78:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:79:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:80:12: Any[error] is not equivalent to int -./constructors_callable.py:98:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:99:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:102:16: Any[error] is not equivalent to Never -./constructors_callable.py:107:16: Any[error] is not equivalent to Never -./constructors_callable.py:126:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:127:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:128:12: Any[error] is not equivalent to ./constructors_callable.py.Class6Proxy -./constructors_callable.py:143:26: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:144:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:162:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:164:4: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:166:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[int] -./constructors_callable.py:167:12: Any[error] is not equivalent to ./constructors_callable.py.Class7[str] -./constructors_callable.py:183:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:184:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:185:12: Any[error] is not equivalent to ./constructors_callable.py.Class8[str] -./constructors_callable.py:194:22: Incompatible argument type for cb: expected (**__P: ParamSpecSig(param_spec=~P, default=None)) -> ~R but got [incompatible_argument] -./constructors_callable.py:195:12: Revealed type is '(__P) -> Any[error]' [reveal_type] -./constructors_callable.py:196:12: Any[error] is not equivalent to ./constructors_callable.py.Class9 +./constructors_callable.py:36:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class1' [reveal_type] +./constructors_callable.py:38:0: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:39:0: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:49:12: Revealed type is '() -> ./constructors_callable.py.Class2' [reveal_type] +./constructors_callable.py:51:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_callable.py:64:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class3' [reveal_type] +./constructors_callable.py:66:0: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:67:0: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:68:0: Takes 1 positional arguments but 2 were given [incompatible_call] +./constructors_callable.py:79:12: Revealed type is '(x: int) -> int' [reveal_type] +./constructors_callable.py:81:0: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:82:0: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:99:12: Revealed type is '(*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> Never' [reveal_type] +./constructors_callable.py:127:12: Revealed type is '() -> ./constructors_callable.py.Class6Proxy' [reveal_type] +./constructors_callable.py:129:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_callable.py:144:12: Revealed type is '() -> Any[explicit]' [reveal_type] +./constructors_callable.py:146:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T]' [reveal_type] +./constructors_callable.py:184:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class8[~T]' [reveal_type] +./constructors_callable.py:186:0: Cannot resolve type variables [incompatible_call] +./constructors_callable.py:195:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class9' [reveal_type] +./constructors_callable.py:197:0: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index c9b8100b6..f86ecb543 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,5 +1,6 @@ conformance_automated = "Fail" errors_diff = """ +Line 35: Unexpected errors ['./dataclasses_descriptors.py:35:10: Incompatible argument type for y: expected ./dataclasses_descriptors.py.Desc1 but got Literal[3] [incompatible_argument]'] Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int'] Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to list[int]'] Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str]'] @@ -9,6 +10,7 @@ Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: ./dataclasses Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str'] """ output = """ +./dataclasses_descriptors.py:35:10: Incompatible argument type for y: expected ./dataclasses_descriptors.py.Desc1 but got Literal[3] [incompatible_argument] ./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int ./dataclasses_descriptors.py:61:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to list[int] ./dataclasses_descriptors.py:62:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str] diff --git a/conformance/results/pycroscope/dataclasses_inheritance.toml b/conformance/results/pycroscope/dataclasses_inheritance.toml index 6973d93fa..6b0db8799 100644 --- a/conformance/results/pycroscope/dataclasses_inheritance.toml +++ b/conformance/results/pycroscope/dataclasses_inheritance.toml @@ -2,6 +2,11 @@ conformance_automated = "Fail" errors_diff = """ Line 62: Expected 1 errors Line 66: Expected 1 errors +Line 23: Unexpected errors ["./dataclasses_inheritance.py:23:15: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument]", './dataclasses_inheritance.py:23:12: Incompatible argument type for b: expected str but got Literal[1] [incompatible_argument]'] +Line 40: Unexpected errors ['./dataclasses_inheritance.py:40:8: Takes 2 positional arguments but 3 were given [incompatible_call]'] """ output = """ +./dataclasses_inheritance.py:23:15: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] +./dataclasses_inheritance.py:23:12: Incompatible argument type for b: expected str but got Literal[1] [incompatible_argument] +./dataclasses_inheritance.py:40:8: Takes 2 positional arguments but 3 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 1df80a155..36fe9af01 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -2,10 +2,22 @@ conformance_automated = "Fail" errors_diff = """ Line 51: Expected 1 errors Line 63: Expected 1 errors -Line 66: Expected 1 errors Line 72: Expected 1 errors -Line 82: Expected 1 errors Line 122: Expected 1 errors +Line 60: Unexpected errors ["./dataclasses_transform_class.py:60:7: Missing required argument 'not_a_field' [incompatible_call]"] +Line 68: Unexpected errors ["./dataclasses_transform_class.py:68:7: Missing required argument 'not_a_field' [incompatible_call]"] +Line 74: Unexpected errors ["./dataclasses_transform_class.py:74:7: Missing required argument 'not_a_field' [incompatible_call]"] +Line 76: Unexpected errors ["./dataclasses_transform_class.py:76:7: Missing required argument 'not_a_field' [incompatible_call]"] +Line 106: Unexpected errors ["./dataclasses_transform_class.py:106:7: Got an unexpected keyword argument 'id' [incompatible_call]"] +Line 119: Unexpected errors ["./dataclasses_transform_class.py:119:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] """ output = """ +./dataclasses_transform_class.py:60:7: Missing required argument 'not_a_field' [incompatible_call] +./dataclasses_transform_class.py:66:7: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_transform_class.py:68:7: Missing required argument 'not_a_field' [incompatible_call] +./dataclasses_transform_class.py:74:7: Missing required argument 'not_a_field' [incompatible_call] +./dataclasses_transform_class.py:76:7: Missing required argument 'not_a_field' [incompatible_call] +./dataclasses_transform_class.py:82:7: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_transform_class.py:106:7: Got an unexpected keyword argument 'id' [incompatible_call] +./dataclasses_transform_class.py:119:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index a4b9c8553..218ef2f6b 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -1,22 +1,24 @@ conformance_automated = "Fail" errors_diff = """ -Line 107: Expected 1 errors -Line 108: Expected 1 errors -Line 109: Expected 1 errors Line 118: Expected 1 errors -Line 102: Unexpected errors ["./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got [incompatible_argument]"] +Line 112: Unexpected errors ['./dataclasses_transform_converter.py:112:6: Takes 0 positional arguments but 5 were given [incompatible_call]'] Line 114: Unexpected errors ["./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment]"] Line 115: Unexpected errors ["./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment]"] Line 116: Unexpected errors ["./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment]"] +Line 121: Unexpected errors ['./dataclasses_transform_converter.py:121:6: Takes 0 positional arguments but 6 were given [incompatible_call]'] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] -./dataclasses_transform_converter.py:102:51: Incompatible argument type for converter: expected (~S, /) -> ~T but got [incompatible_argument] +./dataclasses_transform_converter.py:107:0: Takes 0 positional arguments but 5 were given [incompatible_call] +./dataclasses_transform_converter.py:108:0: Takes 0 positional arguments but 5 were given [incompatible_call] +./dataclasses_transform_converter.py:109:0: Takes 0 positional arguments but 5 were given [incompatible_call] +./dataclasses_transform_converter.py:112:6: Takes 0 positional arguments but 5 were given [incompatible_call] ./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment] ./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment] ./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment] ./dataclasses_transform_converter.py:119:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[1] [incompatible_assignment] +./dataclasses_transform_converter.py:121:6: Takes 0 positional arguments but 6 were given [incompatible_call] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_field.toml b/conformance/results/pycroscope/dataclasses_transform_field.toml index 47dcdb0bf..fc825584a 100644 --- a/conformance/results/pycroscope/dataclasses_transform_field.toml +++ b/conformance/results/pycroscope/dataclasses_transform_field.toml @@ -1,7 +1,11 @@ conformance_automated = "Fail" errors_diff = """ -Line 64: Expected 1 errors -Line 75: Expected 1 errors +Line 60: Unexpected errors ["./dataclasses_transform_field.py:60:0: Got an unexpected keyword argument 'name' [incompatible_call]"] +Line 77: Unexpected errors ["./dataclasses_transform_field.py:77:0: Got an unexpected keyword argument 'name' [incompatible_call]"] """ output = """ +./dataclasses_transform_field.py:60:0: Got an unexpected keyword argument 'name' [incompatible_call] +./dataclasses_transform_field.py:64:0: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_field.py:75:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./dataclasses_transform_field.py:77:0: Got an unexpected keyword argument 'name' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_func.toml b/conformance/results/pycroscope/dataclasses_transform_func.toml index d5a95ac58..d50780702 100644 --- a/conformance/results/pycroscope/dataclasses_transform_func.toml +++ b/conformance/results/pycroscope/dataclasses_transform_func.toml @@ -1,11 +1,19 @@ conformance_automated = "Fail" errors_diff = """ Line 60: Expected 1 errors -Line 64: Expected 1 errors -Line 70: Expected 1 errors Line 96: Expected 1 errors Lines 88, 89: Expected error (tag 'Customer3Subclass') +Line 49: Unexpected errors ["./dataclasses_transform_func.py:49:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] +Line 52: Unexpected errors ['./dataclasses_transform_func.py:52:7: Takes 0 positional arguments but 2 were given [incompatible_call]'] +Line 66: Unexpected errors ["./dataclasses_transform_func.py:66:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] +Line 93: Unexpected errors ["./dataclasses_transform_func.py:93:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] """ output = """ +./dataclasses_transform_func.py:49:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_func.py:52:7: Takes 0 positional arguments but 2 were given [incompatible_call] ./dataclasses_transform_func.py:56:0: Incompatible assignment: expected str, got Literal[3] [incompatible_assignment] +./dataclasses_transform_func.py:64:7: Got unexpected keyword arguments 'id', 'name', 'salary' [incompatible_call] +./dataclasses_transform_func.py:66:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_func.py:70:7: Takes 0 positional arguments but 2 were given [incompatible_call] +./dataclasses_transform_func.py:93:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_meta.toml b/conformance/results/pycroscope/dataclasses_transform_meta.toml index 23f707a1e..40b5e77f3 100644 --- a/conformance/results/pycroscope/dataclasses_transform_meta.toml +++ b/conformance/results/pycroscope/dataclasses_transform_meta.toml @@ -2,10 +2,20 @@ conformance_automated = "Fail" errors_diff = """ Line 51: Expected 1 errors Line 63: Expected 1 errors -Line 66: Expected 1 errors Line 73: Expected 1 errors -Line 83: Expected 1 errors Line 103: Expected 1 errors +Line 60: Unexpected errors ["./dataclasses_transform_meta.py:60:7: Got unexpected keyword arguments 'id', 'name', 'other_name' [incompatible_call]"] +Line 69: Unexpected errors ["./dataclasses_transform_meta.py:69:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] +Line 75: Unexpected errors ["./dataclasses_transform_meta.py:75:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] +Line 77: Unexpected errors ["./dataclasses_transform_meta.py:77:7: Got an unexpected keyword argument 'id' [incompatible_call]"] +Line 100: Unexpected errors ["./dataclasses_transform_meta.py:100:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] """ output = """ +./dataclasses_transform_meta.py:60:7: Got unexpected keyword arguments 'id', 'name', 'other_name' [incompatible_call] +./dataclasses_transform_meta.py:66:7: Takes 0 positional arguments but 2 were given [incompatible_call] +./dataclasses_transform_meta.py:69:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_meta.py:75:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_meta.py:77:7: Got an unexpected keyword argument 'id' [incompatible_call] +./dataclasses_transform_meta.py:83:7: Takes 0 positional arguments but 2 were given [incompatible_call] +./dataclasses_transform_meta.py:100:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 444866ba4..36859af75 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -1,12 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 52: Expected 1 errors -Line 83: Expected 1 errors -Line 127: Expected 1 errors -Line 130: Expected 1 errors -Line 179: Expected 1 errors Lines 58, 60, 61: Expected error (tag 'DC1') Lines 64, 66, 67: Expected error (tag 'DC2') Lines 70, 72, 73: Expected error (tag 'DC3') @@ -19,7 +12,7 @@ Line 42: Unexpected errors ["./dataclasses_usage.py:42:6: ./dataclasses_usage.py Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute]"] Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment]"] -Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17'] +Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17', './dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call]'] """ output = """ ./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute] @@ -30,7 +23,15 @@ output = """ ./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute] ./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute] ./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute] +./dataclasses_usage.py:50:5: Missing required argument 'unit_price' [incompatible_call] +./dataclasses_usage.py:51:27: Incompatible argument type for unit_price: expected float | int but got Literal['price'] [incompatible_argument] +./dataclasses_usage.py:52:5: Takes 3 positional arguments but 4 were given [incompatible_call] +./dataclasses_usage.py:83:5: Takes 1 positional arguments but 2 were given [incompatible_call] ./dataclasses_usage.py:88:4: Incompatible assignment: expected int, got str [incompatible_assignment] +./dataclasses_usage.py:127:0: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_usage.py:130:0: Missing required argument 'y' [incompatible_call] +./dataclasses_usage.py:179:0: Missing required argument 'x_squared' [incompatible_call] ./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 +./dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_paramspec_basic.toml b/conformance/results/pycroscope/generics_paramspec_basic.toml index fafa86d57..e91bf83de 100644 --- a/conformance/results/pycroscope/generics_paramspec_basic.toml +++ b/conformance/results/pycroscope/generics_paramspec_basic.toml @@ -1,14 +1,14 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 10: Expected 1 errors -Line 15: Expected 1 errors -Line 31: Expected 1 errors -Line 35: Expected 1 errors """ output = """ +./generics_paramspec_basic.py:10:22: ParamSpec name argument must match the assignment target name [incompatible_call] +./generics_paramspec_basic.py:15:17: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:23:10: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:23:19: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:27:13: Unrecognized annotation typing.Concatenate[, ~P] [invalid_annotation] +./generics_paramspec_basic.py:31:10: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_basic.py:35:10: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:39:11: ParamSpec cannot be used in this annotation context [invalid_annotation] ./generics_paramspec_basic.py:39:22: ParamSpec cannot be used in this annotation context [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 7c6025b23..f9c94432a 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 42: Expected 1 errors Line 43: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors @@ -21,6 +20,7 @@ Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unrecognize output = """ ./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] +./generics_typevartuple_basic.py:42:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument] ./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 8254b02bd..2eca4e2d4 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,7 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors Line 17: Unexpected errors ['./generics_typevartuple_callable.py:17:31: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation]'] +Line 25: Unexpected errors ['./generics_typevartuple_callable.py:25:15: Incompatible argument type for target: expected (Any[error], /) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument]'] Line 29: Unexpected errors ['./generics_typevartuple_callable.py:29:13: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation]'] Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str, int, complex | float | int]', './generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument]'] Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str]', './generics_typevartuple_callable.py:42:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, d: str) -> tuple[str] [incompatible_argument]'] @@ -10,6 +10,8 @@ Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[ """ output = """ ./generics_typevartuple_callable.py:17:31: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation] +./generics_typevartuple_callable.py:25:15: Incompatible argument type for target: expected (Any[error], /) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument] +./generics_typevartuple_callable.py:26:15: Incompatible argument type for target: expected (Any[error], /) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument] ./generics_typevartuple_callable.py:29:13: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation] ./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str, int, complex | float | int] ./generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument] diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index a2ed72b57..407062516 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -15,10 +15,10 @@ Line 289: Expected 1 errors Line 339: Expected 1 errors Line 340: Expected 1 errors Line 341: Expected 1 errors -Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got Annotated[./protocols_definition.py.Concrete, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_definition.py.Concrete', literal_only=False)), 'name': SigParameter(name='name', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] +Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment]"] """ output = """ -./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got Annotated[./protocols_definition.py.Concrete, HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_definition.py.Concrete', literal_only=False)), 'name': SigParameter(name='name', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'value': SigParameter(name='value', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment] ./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] ./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] ./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] diff --git a/conformance/results/pycroscope/protocols_runtime_checkable.toml b/conformance/results/pycroscope/protocols_runtime_checkable.toml index ddad6a3e2..0d33fccdb 100644 --- a/conformance/results/pycroscope/protocols_runtime_checkable.toml +++ b/conformance/results/pycroscope/protocols_runtime_checkable.toml @@ -1,11 +1,11 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 55: Expected 1 errors -Line 61: Expected 1 errors -Line 88: Expected 1 errors -Line 92: Expected 1 errors -Line 96: Expected 1 errors """ output = """ ./protocols_runtime_checkable.py:23:21: Second argument to "isinstance" cannot be a protocol that is not @runtime_checkable [incompatible_argument] +./protocols_runtime_checkable.py:55:21: Second argument to "issubclass" cannot be a runtime-checkable protocol with non-method members [incompatible_argument] +./protocols_runtime_checkable.py:61:21: Second argument to "issubclass" cannot be a runtime-checkable protocol with non-method members [incompatible_argument] +./protocols_runtime_checkable.py:88:18: First argument to "isinstance" has unsafe overlap between 'Concrete3A' and protocol 'Proto3' [incompatible_argument] +./protocols_runtime_checkable.py:92:8: First argument to "isinstance" has unsafe overlap between 'Concrete3B' and protocol 'Proto3' [incompatible_argument] +./protocols_runtime_checkable.py:96:18: First argument to "issubclass" has unsafe overlap between 'Concrete3A' and protocol 'Proto3' [incompatible_argument] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 22838c919..9b040b090 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -302,7 +302,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_paramspec_components Pass @@ -653,7 +653,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      protocols_self Pass @@ -743,7 +743,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Converting constructor to callable does not preserve class-scoped type params.

Converting constructor to callable does not substitute Self in __new__

Converting constructor to callable uses __new__ signature instead of __init__

-Unknown +Pass      constructors_consistency
Pass*

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

From e1c7f35b992b65b2f8fb8976961f4dbe2434b84e Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 19:54:53 -0800 Subject: [PATCH 37/78] limited dataclass_transform --- .../pycroscope/dataclasses_inheritance.toml | 6 ++-- .../dataclasses_transform_class.toml | 12 ++++---- .../dataclasses_transform_converter.toml | 29 ++++++++++++++----- .../dataclasses_transform_field.toml | 14 +++++---- .../dataclasses_transform_func.toml | 16 +++------- .../dataclasses_transform_meta.toml | 22 +++++--------- .../results/pycroscope/dataclasses_usage.toml | 6 +++- 7 files changed, 55 insertions(+), 50 deletions(-) diff --git a/conformance/results/pycroscope/dataclasses_inheritance.toml b/conformance/results/pycroscope/dataclasses_inheritance.toml index 6b0db8799..a197e110b 100644 --- a/conformance/results/pycroscope/dataclasses_inheritance.toml +++ b/conformance/results/pycroscope/dataclasses_inheritance.toml @@ -3,10 +3,12 @@ errors_diff = """ Line 62: Expected 1 errors Line 66: Expected 1 errors Line 23: Unexpected errors ["./dataclasses_inheritance.py:23:15: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument]", './dataclasses_inheritance.py:23:12: Incompatible argument type for b: expected str but got Literal[1] [incompatible_argument]'] -Line 40: Unexpected errors ['./dataclasses_inheritance.py:40:8: Takes 2 positional arguments but 3 were given [incompatible_call]'] +Line 40: Unexpected errors ['./dataclasses_inheritance.py:40:21: Incompatible argument type for x: expected float | int but got Literal[(1,)] [incompatible_argument]', './dataclasses_inheritance.py:40:12: Incompatible argument type for y: expected str but got Literal[0.0] [incompatible_argument]', "./dataclasses_inheritance.py:40:17: Incompatible argument type for z: expected tuple[int] but got Literal[''] [incompatible_argument]"] """ output = """ ./dataclasses_inheritance.py:23:15: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] ./dataclasses_inheritance.py:23:12: Incompatible argument type for b: expected str but got Literal[1] [incompatible_argument] -./dataclasses_inheritance.py:40:8: Takes 2 positional arguments but 3 were given [incompatible_call] +./dataclasses_inheritance.py:40:21: Incompatible argument type for x: expected float | int but got Literal[(1,)] [incompatible_argument] +./dataclasses_inheritance.py:40:12: Incompatible argument type for y: expected str but got Literal[0.0] [incompatible_argument] +./dataclasses_inheritance.py:40:17: Incompatible argument type for z: expected tuple[int] but got Literal[''] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 36fe9af01..44ce8d495 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -1,23 +1,21 @@ conformance_automated = "Fail" errors_diff = """ -Line 51: Expected 1 errors -Line 63: Expected 1 errors Line 72: Expected 1 errors -Line 122: Expected 1 errors Line 60: Unexpected errors ["./dataclasses_transform_class.py:60:7: Missing required argument 'not_a_field' [incompatible_call]"] Line 68: Unexpected errors ["./dataclasses_transform_class.py:68:7: Missing required argument 'not_a_field' [incompatible_call]"] Line 74: Unexpected errors ["./dataclasses_transform_class.py:74:7: Missing required argument 'not_a_field' [incompatible_call]"] Line 76: Unexpected errors ["./dataclasses_transform_class.py:76:7: Missing required argument 'not_a_field' [incompatible_call]"] Line 106: Unexpected errors ["./dataclasses_transform_class.py:106:7: Got an unexpected keyword argument 'id' [incompatible_call]"] -Line 119: Unexpected errors ["./dataclasses_transform_class.py:119:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] """ output = """ +./dataclasses_transform_class.py:51:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] ./dataclasses_transform_class.py:60:7: Missing required argument 'not_a_field' [incompatible_call] -./dataclasses_transform_class.py:66:7: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_transform_class.py:63:0: Dataclass is frozen [incompatible_assignment] +./dataclasses_transform_class.py:66:7: Missing required argument 'id' [incompatible_call] ./dataclasses_transform_class.py:68:7: Missing required argument 'not_a_field' [incompatible_call] ./dataclasses_transform_class.py:74:7: Missing required argument 'not_a_field' [incompatible_call] ./dataclasses_transform_class.py:76:7: Missing required argument 'not_a_field' [incompatible_call] -./dataclasses_transform_class.py:82:7: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_transform_class.py:82:7: Missing required argument 'id' [incompatible_call] ./dataclasses_transform_class.py:106:7: Got an unexpected keyword argument 'id' [incompatible_call] -./dataclasses_transform_class.py:119:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_class.py:122:0: Dataclass is frozen [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index 218ef2f6b..e8eb89310 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -1,24 +1,39 @@ conformance_automated = "Fail" errors_diff = """ Line 118: Expected 1 errors -Line 112: Unexpected errors ['./dataclasses_transform_converter.py:112:6: Takes 0 positional arguments but 5 were given [incompatible_call]'] +Line 112: Unexpected errors ["./dataclasses_transform_converter.py:112:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument]", "./dataclasses_transform_converter.py:112:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument]", "./dataclasses_transform_converter.py:112:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument]", "./dataclasses_transform_converter.py:112:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[b'f6'] [incompatible_argument]", './dataclasses_transform_converter.py:112:35: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument]'] Line 114: Unexpected errors ["./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment]"] Line 115: Unexpected errors ["./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment]"] Line 116: Unexpected errors ["./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment]"] -Line 121: Unexpected errors ['./dataclasses_transform_converter.py:121:6: Takes 0 positional arguments but 6 were given [incompatible_call]'] +Line 121: Unexpected errors ["./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[~_KT, ~_VT] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument]"] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] -./dataclasses_transform_converter.py:107:0: Takes 0 positional arguments but 5 were given [incompatible_call] -./dataclasses_transform_converter.py:108:0: Takes 0 positional arguments but 5 were given [incompatible_call] -./dataclasses_transform_converter.py:109:0: Takes 0 positional arguments but 5 were given [incompatible_call] -./dataclasses_transform_converter.py:112:6: Takes 0 positional arguments but 5 were given [incompatible_call] +./dataclasses_transform_converter.py:107:7: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] +./dataclasses_transform_converter.py:107:13: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] +./dataclasses_transform_converter.py:107:19: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[b'f3'] [incompatible_argument] +./dataclasses_transform_converter.py:107:26: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument] +./dataclasses_transform_converter.py:108:4: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] +./dataclasses_transform_converter.py:108:10: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] +./dataclasses_transform_converter.py:108:16: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] +./dataclasses_transform_converter.py:108:22: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[1] [incompatible_argument] +./dataclasses_transform_converter.py:108:25: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument] +./dataclasses_transform_converter.py:109:4: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] +./dataclasses_transform_converter.py:109:10: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] +./dataclasses_transform_converter.py:109:16: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] +./dataclasses_transform_converter.py:109:22: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal['f3'] [incompatible_argument] +./dataclasses_transform_converter.py:109:28: Incompatible argument type for field4: expected int but got Literal[3j] [incompatible_argument] +./dataclasses_transform_converter.py:112:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] +./dataclasses_transform_converter.py:112:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] +./dataclasses_transform_converter.py:112:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] +./dataclasses_transform_converter.py:112:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[b'f6'] [incompatible_argument] +./dataclasses_transform_converter.py:112:35: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument] ./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment] ./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment] ./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment] ./dataclasses_transform_converter.py:119:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[1] [incompatible_assignment] -./dataclasses_transform_converter.py:121:6: Takes 0 positional arguments but 6 were given [incompatible_call] +./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[~_KT, ~_VT] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_field.toml b/conformance/results/pycroscope/dataclasses_transform_field.toml index fc825584a..add09d8fc 100644 --- a/conformance/results/pycroscope/dataclasses_transform_field.toml +++ b/conformance/results/pycroscope/dataclasses_transform_field.toml @@ -1,11 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 60: Unexpected errors ["./dataclasses_transform_field.py:60:0: Got an unexpected keyword argument 'name' [incompatible_call]"] -Line 77: Unexpected errors ["./dataclasses_transform_field.py:77:0: Got an unexpected keyword argument 'name' [incompatible_call]"] +Line 64: Expected 1 errors +Line 59: Unexpected errors ["./dataclasses_transform_field.py:59:0: Missing required argument 'id' [incompatible_call]"] +Line 60: Unexpected errors ["./dataclasses_transform_field.py:60:0: Missing required argument 'id' [incompatible_call]"] +Line 77: Unexpected errors ["./dataclasses_transform_field.py:77:0: Missing required argument 'id' [incompatible_call]"] """ output = """ -./dataclasses_transform_field.py:60:0: Got an unexpected keyword argument 'name' [incompatible_call] -./dataclasses_transform_field.py:64:0: Got unexpected keyword arguments 'id', 'name' [incompatible_call] -./dataclasses_transform_field.py:75:0: Takes 0 positional arguments but 1 were given [incompatible_call] -./dataclasses_transform_field.py:77:0: Got an unexpected keyword argument 'name' [incompatible_call] +./dataclasses_transform_field.py:59:0: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_field.py:60:0: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_field.py:75:0: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_field.py:77:0: Missing required argument 'id' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_func.toml b/conformance/results/pycroscope/dataclasses_transform_func.toml index d50780702..b9bea8dfc 100644 --- a/conformance/results/pycroscope/dataclasses_transform_func.toml +++ b/conformance/results/pycroscope/dataclasses_transform_func.toml @@ -1,19 +1,11 @@ conformance_automated = "Fail" errors_diff = """ Line 60: Expected 1 errors -Line 96: Expected 1 errors -Lines 88, 89: Expected error (tag 'Customer3Subclass') -Line 49: Unexpected errors ["./dataclasses_transform_func.py:49:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] -Line 52: Unexpected errors ['./dataclasses_transform_func.py:52:7: Takes 0 positional arguments but 2 were given [incompatible_call]'] -Line 66: Unexpected errors ["./dataclasses_transform_func.py:66:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] -Line 93: Unexpected errors ["./dataclasses_transform_func.py:93:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] """ output = """ -./dataclasses_transform_func.py:49:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] -./dataclasses_transform_func.py:52:7: Takes 0 positional arguments but 2 were given [incompatible_call] ./dataclasses_transform_func.py:56:0: Incompatible assignment: expected str, got Literal[3] [incompatible_assignment] -./dataclasses_transform_func.py:64:7: Got unexpected keyword arguments 'id', 'name', 'salary' [incompatible_call] -./dataclasses_transform_func.py:66:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] -./dataclasses_transform_func.py:70:7: Takes 0 positional arguments but 2 were given [incompatible_call] -./dataclasses_transform_func.py:93:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_func.py:64:7: Got an unexpected keyword argument 'salary' [incompatible_call] +./dataclasses_transform_func.py:70:7: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_func.py:89:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] +./dataclasses_transform_func.py:96:0: Dataclass is frozen [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_meta.toml b/conformance/results/pycroscope/dataclasses_transform_meta.toml index 40b5e77f3..785a9672f 100644 --- a/conformance/results/pycroscope/dataclasses_transform_meta.toml +++ b/conformance/results/pycroscope/dataclasses_transform_meta.toml @@ -1,21 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 51: Expected 1 errors -Line 63: Expected 1 errors Line 73: Expected 1 errors -Line 103: Expected 1 errors -Line 60: Unexpected errors ["./dataclasses_transform_meta.py:60:7: Got unexpected keyword arguments 'id', 'name', 'other_name' [incompatible_call]"] -Line 69: Unexpected errors ["./dataclasses_transform_meta.py:69:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] -Line 75: Unexpected errors ["./dataclasses_transform_meta.py:75:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] -Line 77: Unexpected errors ["./dataclasses_transform_meta.py:77:7: Got an unexpected keyword argument 'id' [incompatible_call]"] -Line 100: Unexpected errors ["./dataclasses_transform_meta.py:100:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call]"] +Line 43: Unexpected errors ['./dataclasses_transform_meta.py:43:0: Frozen dataclass cannot inherit from a non-frozen dataclass [invalid_base]'] """ output = """ -./dataclasses_transform_meta.py:60:7: Got unexpected keyword arguments 'id', 'name', 'other_name' [incompatible_call] -./dataclasses_transform_meta.py:66:7: Takes 0 positional arguments but 2 were given [incompatible_call] -./dataclasses_transform_meta.py:69:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] -./dataclasses_transform_meta.py:75:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] -./dataclasses_transform_meta.py:77:7: Got an unexpected keyword argument 'id' [incompatible_call] -./dataclasses_transform_meta.py:83:7: Takes 0 positional arguments but 2 were given [incompatible_call] -./dataclasses_transform_meta.py:100:7: Got unexpected keyword arguments 'id', 'name' [incompatible_call] +./dataclasses_transform_meta.py:43:0: Frozen dataclass cannot inherit from a non-frozen dataclass [invalid_base] +./dataclasses_transform_meta.py:51:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] +./dataclasses_transform_meta.py:63:0: Dataclass is frozen [incompatible_assignment] +./dataclasses_transform_meta.py:66:7: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_meta.py:83:7: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_meta.py:103:0: Dataclass is frozen [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 36859af75..078e7fc7f 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -1,5 +1,6 @@ conformance_automated = "Fail" errors_diff = """ +Line 88: Expected 1 errors Lines 58, 60, 61: Expected error (tag 'DC1') Lines 64, 66, 67: Expected error (tag 'DC2') Lines 70, 72, 73: Expected error (tag 'DC3') @@ -11,6 +12,8 @@ Line 41: Unexpected errors ["./dataclasses_usage.py:41:6: ./dataclasses_usage.py Line 42: Unexpected errors ["./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute]"] Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute]"] Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] +Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[explicit] is not equivalent to str'] +Line 198: Unexpected errors ["./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str"] Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment]"] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17', './dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call]'] """ @@ -27,10 +30,11 @@ output = """ ./dataclasses_usage.py:51:27: Incompatible argument type for unit_price: expected float | int but got Literal['price'] [incompatible_argument] ./dataclasses_usage.py:52:5: Takes 3 positional arguments but 4 were given [incompatible_call] ./dataclasses_usage.py:83:5: Takes 1 positional arguments but 2 were given [incompatible_call] -./dataclasses_usage.py:88:4: Incompatible assignment: expected int, got str [incompatible_assignment] ./dataclasses_usage.py:127:0: Takes 1 positional arguments but 2 were given [incompatible_call] ./dataclasses_usage.py:130:0: Missing required argument 'y' [incompatible_call] ./dataclasses_usage.py:179:0: Missing required argument 'x_squared' [incompatible_call] +./dataclasses_usage.py:196:12: Any[explicit] is not equivalent to str +./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str ./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 ./dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call] From e984649b079cdb1a8c7a9a891ea324912db1212d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 20:58:31 -0800 Subject: [PATCH 38/78] progress --- .../pycroscope/callables_annotation.toml | 8 ++--- .../results/pycroscope/dataclasses_order.toml | 4 +-- .../dataclasses_transform_class.toml | 14 ++------ .../dataclasses_transform_func.toml | 4 +-- .../dataclasses_transform_meta.toml | 2 +- .../pycroscope/directives_type_ignore.toml | 10 +----- .../directives_type_ignore_file1.toml | 4 +-- .../generics_typevartuple_args.toml | 32 ++++++------------- .../generics_typevartuple_basic.toml | 10 +++--- .../generics_typevartuple_callable.toml | 20 ++---------- .../generics_typevartuple_concat.toml | 20 ++++++------ .../generics_typevartuple_specialization.toml | 13 ++++++++ .../generics_typevartuple_unpack.toml | 8 +++-- conformance/results/results.html | 12 +++---- 14 files changed, 62 insertions(+), 99 deletions(-) diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index e5d730800..2c1c1d2dc 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -1,9 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 55: Expected 1 errors -Line 56: Expected 1 errors -Line 58: Expected 1 errors -Line 59: Expected 1 errors Line 148: Unexpected errors ["./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] Line 150: Unexpected errors ['./callables_annotation.py:150:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got (...) -> None [incompatible_assignment]'] Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] @@ -18,7 +14,11 @@ output = """ ./callables_annotation.py:27:4: Takes 2 positional arguments but 3 were given [incompatible_call] ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] +./callables_annotation.py:55:4: Callable requires exactly two arguments [invalid_annotation] +./callables_annotation.py:56:4: Invalid arguments to Callable: [invalid_annotation] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] +./callables_annotation.py:58:4: Callable requires exactly two arguments [invalid_annotation] +./callables_annotation.py:59:4: Ellipsis must be used directly in Callable[..., T], not in Callable[[...], T] [invalid_annotation] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] ./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] diff --git a/conformance/results/pycroscope/dataclasses_order.toml b/conformance/results/pycroscope/dataclasses_order.toml index 8a6afe99a..69aaa4a36 100644 --- a/conformance/results/pycroscope/dataclasses_order.toml +++ b/conformance/results/pycroscope/dataclasses_order.toml @@ -1,6 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Expected 1 errors """ output = """ +./dataclasses_order.py:50:3: Unsupported operands for less than: ./dataclasses_order.py.DC1 and ./dataclasses_order.py.DC2 [unsupported_operation] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_class.toml b/conformance/results/pycroscope/dataclasses_transform_class.toml index 44ce8d495..38ce7fe3b 100644 --- a/conformance/results/pycroscope/dataclasses_transform_class.toml +++ b/conformance/results/pycroscope/dataclasses_transform_class.toml @@ -1,21 +1,11 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 72: Expected 1 errors -Line 60: Unexpected errors ["./dataclasses_transform_class.py:60:7: Missing required argument 'not_a_field' [incompatible_call]"] -Line 68: Unexpected errors ["./dataclasses_transform_class.py:68:7: Missing required argument 'not_a_field' [incompatible_call]"] -Line 74: Unexpected errors ["./dataclasses_transform_class.py:74:7: Missing required argument 'not_a_field' [incompatible_call]"] -Line 76: Unexpected errors ["./dataclasses_transform_class.py:76:7: Missing required argument 'not_a_field' [incompatible_call]"] -Line 106: Unexpected errors ["./dataclasses_transform_class.py:106:7: Got an unexpected keyword argument 'id' [incompatible_call]"] """ output = """ ./dataclasses_transform_class.py:51:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] -./dataclasses_transform_class.py:60:7: Missing required argument 'not_a_field' [incompatible_call] ./dataclasses_transform_class.py:63:0: Dataclass is frozen [incompatible_assignment] ./dataclasses_transform_class.py:66:7: Missing required argument 'id' [incompatible_call] -./dataclasses_transform_class.py:68:7: Missing required argument 'not_a_field' [incompatible_call] -./dataclasses_transform_class.py:74:7: Missing required argument 'not_a_field' [incompatible_call] -./dataclasses_transform_class.py:76:7: Missing required argument 'not_a_field' [incompatible_call] +./dataclasses_transform_class.py:72:5: Unsupported operands for less than: ./dataclasses_transform_class.py.Customer1 and ./dataclasses_transform_class.py.Customer1 [unsupported_operation] ./dataclasses_transform_class.py:82:7: Missing required argument 'id' [incompatible_call] -./dataclasses_transform_class.py:106:7: Got an unexpected keyword argument 'id' [incompatible_call] ./dataclasses_transform_class.py:122:0: Dataclass is frozen [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_func.toml b/conformance/results/pycroscope/dataclasses_transform_func.toml index b9bea8dfc..c2bfa4ea6 100644 --- a/conformance/results/pycroscope/dataclasses_transform_func.toml +++ b/conformance/results/pycroscope/dataclasses_transform_func.toml @@ -1,9 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 60: Expected 1 errors """ output = """ ./dataclasses_transform_func.py:56:0: Incompatible assignment: expected str, got Literal[3] [incompatible_assignment] +./dataclasses_transform_func.py:60:5: Unsupported operands for less than: ./dataclasses_transform_func.py.Customer1 and ./dataclasses_transform_func.py.Customer1 [unsupported_operation] ./dataclasses_transform_func.py:64:7: Got an unexpected keyword argument 'salary' [incompatible_call] ./dataclasses_transform_func.py:70:7: Missing required argument 'id' [incompatible_call] ./dataclasses_transform_func.py:89:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] diff --git a/conformance/results/pycroscope/dataclasses_transform_meta.toml b/conformance/results/pycroscope/dataclasses_transform_meta.toml index 785a9672f..badddc364 100644 --- a/conformance/results/pycroscope/dataclasses_transform_meta.toml +++ b/conformance/results/pycroscope/dataclasses_transform_meta.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 73: Expected 1 errors Line 43: Unexpected errors ['./dataclasses_transform_meta.py:43:0: Frozen dataclass cannot inherit from a non-frozen dataclass [invalid_base]'] """ output = """ @@ -8,6 +7,7 @@ output = """ ./dataclasses_transform_meta.py:51:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] ./dataclasses_transform_meta.py:63:0: Dataclass is frozen [incompatible_assignment] ./dataclasses_transform_meta.py:66:7: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_meta.py:73:5: Unsupported operands for less than: ./dataclasses_transform_meta.py.Customer1 and ./dataclasses_transform_meta.py.Customer1 [unsupported_operation] ./dataclasses_transform_meta.py:83:7: Missing required argument 'id' [incompatible_call] ./dataclasses_transform_meta.py:103:0: Dataclass is frozen [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/directives_type_ignore.toml b/conformance/results/pycroscope/directives_type_ignore.toml index 112ff680c..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/directives_type_ignore.toml +++ b/conformance/results/pycroscope/directives_type_ignore.toml @@ -1,13 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 8: Unexpected errors ["./directives_type_ignore.py:8:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] -Line 11: Unexpected errors ["./directives_type_ignore.py:11:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] -Line 14: Unexpected errors ["./directives_type_ignore.py:14:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] -Line 20: Unexpected errors ["./directives_type_ignore.py:20:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] """ output = """ -./directives_type_ignore.py:8:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] -./directives_type_ignore.py:11:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] -./directives_type_ignore.py:14:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] -./directives_type_ignore.py:20:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/directives_type_ignore_file1.toml b/conformance/results/pycroscope/directives_type_ignore_file1.toml index 998e85f05..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/directives_type_ignore_file1.toml +++ b/conformance/results/pycroscope/directives_type_ignore_file1.toml @@ -1,7 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 16: Unexpected errors ["./directives_type_ignore_file1.py:16:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] """ output = """ -./directives_type_ignore_file1.py:16:0: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 6255d7f1c..9fd841bbe 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -1,30 +1,16 @@ conformance_automated = "Fail" errors_diff = """ -Line 33: Expected 1 errors -Line 34: Expected 1 errors -Line 48: Expected 1 errors -Line 57: Expected 1 errors -Line 58: Expected 1 errors -Line 59: Expected 1 errors -Line 67: Expected 1 errors Line 75: Expected 1 errors Line 76: Expected 1 errors -Line 16: Unexpected errors ['./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] -Line 20: Unexpected errors ['./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] -Line 27: Unexpected errors ["./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=PartialValue(operation=, root=KnownValue(val=), node=, members=(KnownValue(val=typing.Unpack[Ts]), SyntheticClassObjectValue(name='Env', class_type=TypedValue(typ='./generics_typevartuple_args.py.Env', literal_only=False))), runtime_value=TypedValue(typ=, literal_only=False)), node=) [invalid_annotation]"] -Line 31: Unexpected errors ['./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[]'] -Line 32: Unexpected errors ['./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str]'] -Line 42: Unexpected errors ['./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation]'] -Line 51: Unexpected errors ['./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation]'] -Line 62: Unexpected errors ['./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation]'] +Line 20: Unexpected errors ["./generics_typevartuple_args.py:20:12: tuple[Literal[1], Literal['a']] is not equivalent to tuple[int, str]"] """ output = """ -./generics_typevartuple_args.py:16:25: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] -./generics_typevartuple_args.py:20:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:27:30: Unrecognized annotation _StarredValue(value=PartialValue(operation=, root=KnownValue(val=), node=, members=(KnownValue(val=typing.Unpack[Ts]), SyntheticClassObjectValue(name='Env', class_type=TypedValue(typ='./generics_typevartuple_args.py.Env', literal_only=False))), runtime_value=TypedValue(typ=, literal_only=False)), node=) [invalid_annotation] -./generics_typevartuple_args.py:31:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[] -./generics_typevartuple_args.py:32:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:42:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, ...]), node=) [invalid_annotation] -./generics_typevartuple_args.py:51:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, *tuple[str, ...], str]), node=) [invalid_annotation] -./generics_typevartuple_args.py:62:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, str]), node=) [invalid_annotation] +./generics_typevartuple_args.py:20:12: tuple[Literal[1], Literal['a']] is not equivalent to tuple[int, str] +./generics_typevartuple_args.py:33:0: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], ./generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:34:0: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], ./generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:48:0: Incompatible argument type for args: expected tuple[int, ...] but got tuple[Literal[1], Literal['2'], Literal[3]] [incompatible_argument] +./generics_typevartuple_args.py:57:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal[1], Literal[1], Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:58:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal[1]] [incompatible_argument] +./generics_typevartuple_args.py:59:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:67:0: Missing required positional argument at position 1 [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index f9c94432a..0eb5954e1 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -11,14 +11,12 @@ Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') -Line 16: Unexpected errors ['./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation]'] Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] -Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_basic.py:93:34: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_basic.py:93:52: Unpack[] used in unsupported context [invalid_annotation]'] """ output = """ -./generics_typevartuple_basic.py:16:17: Unrecognized annotation _StarredValue(value=KnownValue(val=Ts), node=) [invalid_annotation] ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:42:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument] ./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] @@ -26,7 +24,7 @@ output = """ ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] ./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int] -./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_basic.py:93:16: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_basic.py:93:34: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_basic.py:93:52: Unpack[] used in unsupported context [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 2eca4e2d4..4c6513993 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,22 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 17: Unexpected errors ['./generics_typevartuple_callable.py:17:31: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation]'] -Line 25: Unexpected errors ['./generics_typevartuple_callable.py:25:15: Incompatible argument type for target: expected (Any[error], /) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument]'] -Line 29: Unexpected errors ['./generics_typevartuple_callable.py:29:13: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation]'] -Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str, int, complex | float | int]', './generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument]'] -Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str]', './generics_typevartuple_callable.py:42:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, d: str) -> tuple[str] [incompatible_argument]'] -Line 45: Unexpected errors ['./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation]'] -Line 49: Unexpected errors ['./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ -./generics_typevartuple_callable.py:17:31: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation] -./generics_typevartuple_callable.py:25:15: Incompatible argument type for target: expected (Any[error], /) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument] -./generics_typevartuple_callable.py:26:15: Incompatible argument type for target: expected (Any[error], /) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument] -./generics_typevartuple_callable.py:29:13: Unrecognized annotation typing.Unpack[Ts] [invalid_annotation] -./generics_typevartuple_callable.py:41:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str, int, complex | float | int] -./generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument] -./generics_typevartuple_callable.py:42:12: tuple[*tuple[Any[error], ...], Any[error]] is not equivalent to tuple[str] -./generics_typevartuple_callable.py:42:18: Incompatible argument type for f: expected (int, Any[error], ~T, /) -> tuple[~T, *tuple[Ts, ...]] but got (a: int, d: str) -> tuple[str] [incompatible_argument] -./generics_typevartuple_callable.py:45:17: Unrecognized annotation _StarredValue(value=KnownValue(val=tuple[int, typing.Unpack[Ts], ~T]), node=) [invalid_annotation] -./generics_typevartuple_callable.py:49:12: tuple[Any[generic_argument], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[float | int, str, complex | float | int] +./generics_typevartuple_callable.py:26:27: Incompatible argument type for args: expected tuple[int, str] but got Literal[('', 0)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index af56e1a50..2b9833173 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,18 +1,16 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Unexpected errors ['./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 30: Unexpected errors ['./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 34: Unexpected errors ['./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)]"] +Line 26: Unexpected errors ['./generics_typevartuple_concat.py:26:22: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_concat.py:26:40: Unpack[] used in unsupported context [invalid_annotation]'] +Line 30: Unexpected errors ['./generics_typevartuple_concat.py:30:22: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_concat.py:30:47: Unpack[] used in unsupported context [invalid_annotation]'] +Line 34: Unexpected errors ['./generics_typevartuple_concat.py:34:26: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_concat.py:34:44: Unpack[] used in unsupported context [invalid_annotation]'] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)] +./generics_typevartuple_concat.py:26:22: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_concat.py:26:40: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_concat.py:30:22: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_concat.py:30:47: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_concat.py:34:26: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_concat.py:34:44: Unpack[] used in unsupported context [invalid_annotation] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index a11f4beda..8393472a3 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -5,6 +5,7 @@ Line 110: Expected 1 errors Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors +Line 24: Unexpected errors ['./generics_typevartuple_specialization.py:24:26: Unpack[] used in unsupported context [invalid_annotation]'] Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 47: Unexpected errors ["./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]]"] Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] @@ -12,13 +13,19 @@ Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]]'] Line 72: Unexpected errors ['./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] Line 84: Unexpected errors ['./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] +Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] +Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] +Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] +Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] """ output = """ +./generics_typevartuple_specialization.py:24:26: Unpack[] used in unsupported context [invalid_annotation] ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] @@ -27,9 +34,15 @@ output = """ ./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] ./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] ./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] +./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] ./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] +./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] +./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index c986e09a8..5772babd5 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -1,8 +1,12 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors -Line 36: Unexpected errors ['./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 21: Unexpected errors ['./generics_typevartuple_unpack.py:21:30: Unpack[] used in unsupported context [invalid_annotation]'] +Line 36: Unexpected errors ['./generics_typevartuple_unpack.py:36:29: Unpack[] used in unsupported context [invalid_annotation]'] +Line 44: Unexpected errors ['./generics_typevartuple_unpack.py:44:13: Unpack[] used in unsupported context [invalid_annotation]'] """ output = """ -./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_unpack.py:21:30: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_unpack.py:36:29: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_unpack.py:44:13: Unpack[] used in unsupported context [invalid_annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 9b040b090..4709b56b9 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -421,7 +421,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_typevartuple_concat Pass @@ -857,7 +857,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_postinit Pass @@ -878,7 +878,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_transform_converter
Unsupported

Converter parameter not yet supported.

@@ -899,7 +899,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_transform_meta Pass @@ -1183,14 +1183,14 @@

Python Type System Conformance Test Results

Pass
Partial

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

Pass -Unknown +Pass      directives_type_ignore_file1 Pass Pass Pass Pass -Unknown +Pass      directives_type_ignore_file2 Pass From 45c644d79911feaf85f86061446adcdeb646e45f Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:10:36 -0800 Subject: [PATCH 39/78] one more --- .../results/pycroscope/aliases_variance.toml | 10 +++--- .../results/pycroscope/generics_variance.toml | 36 +++++++++++++------ conformance/results/results.html | 2 +- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/conformance/results/pycroscope/aliases_variance.toml b/conformance/results/pycroscope/aliases_variance.toml index 5add77e80..9098075f0 100644 --- a/conformance/results/pycroscope/aliases_variance.toml +++ b/conformance/results/pycroscope/aliases_variance.toml @@ -1,9 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 24: Expected 1 errors -Line 28: Expected 1 errors -Line 32: Expected 1 errors -Line 44: Expected 1 errors """ output = """ +./aliases_variance.py:24:15: T_co has incompatible variance in base class [invalid_annotation] +./aliases_variance.py:28:15: T_co has incompatible variance in base class [invalid_annotation] +./aliases_variance.py:32:15: T_co has incompatible variance in base class [invalid_annotation] +./aliases_variance.py:44:15: T_contra has incompatible variance in base class [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index a307e712a..99971fa3e 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -1,18 +1,34 @@ conformance_automated = "Fail" errors_diff = """ -Line 77: Expected 1 errors -Line 81: Expected 1 errors -Line 93: Expected 1 errors -Line 105: Expected 1 errors -Line 113: Expected 1 errors -Line 163: Expected 1 errors -Line 167: Expected 1 errors Line 191: Expected 1 errors -Lines 125, 126: Expected error (tag 'CoContra_Child2') -Lines 131, 132: Expected error (tag 'CoContra_Child3') -Lines 141, 142: Expected error (tag 'CoContra_Child5') Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') +Line 85: Unexpected errors ['./generics_variance.py:85:16: T_co has incompatible variance in base class [invalid_annotation]'] +Line 97: Unexpected errors ['./generics_variance.py:97:20: T_contra has incompatible variance in base class [invalid_annotation]'] +Line 109: Unexpected errors ['./generics_variance.py:109:20: T_contra has incompatible variance in base class [invalid_annotation]'] +Line 121: Unexpected errors ['./generics_variance.py:121:22: T_co has incompatible variance in base class [invalid_annotation]'] +Line 147: Unexpected errors ['./generics_variance.py:147:17: T_contra has incompatible variance in base class [invalid_annotation]'] +Line 151: Unexpected errors ['./generics_variance.py:151:21: T_co has incompatible variance in base class [invalid_annotation]'] +Line 155: Unexpected errors ['./generics_variance.py:155:13: T_co has incompatible variance in base class [invalid_annotation]'] +Line 159: Unexpected errors ['./generics_variance.py:159:17: T_contra has incompatible variance in base class [invalid_annotation]'] """ output = """ ./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] +./generics_variance.py:77:13: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:81:13: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:85:16: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:93:16: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:97:20: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:105:20: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:109:20: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:113:20: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:121:22: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:126:4: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:132:4: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:142:4: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:147:17: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:151:21: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:155:13: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:159:17: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:163:25: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:167:29: T_co has incompatible variance in base class [invalid_annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 4709b56b9..8b52afdfa 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -563,7 +563,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Literals From 4ba79a2cf38b14cbc5926f18a922bd18da0473a0 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:13:08 -0800 Subject: [PATCH 40/78] rerun full --- conformance/results/mypy/classes_classvar.toml | 2 +- conformance/results/mypy/dataclasses_final.toml | 2 ++ .../mypy/generics_typevartuple_callable.toml | 4 +++- .../results/mypy/generics_variance_inference.toml | 4 +--- conformance/results/mypy/overloads_basic.toml | 8 ++++---- .../results/mypy/qualifiers_final_annotation.toml | 4 ++-- .../pycroscope/generics_typevartuple_args.toml | 8 +++----- .../pycroscope/generics_typevartuple_callable.toml | 4 +++- .../results/pyrefly/aliases_typealiastype.toml | 7 ------- .../results/pyrefly/annotations_forward_refs.toml | 4 ++-- .../pyrefly/generics_typevartuple_callable.toml | 4 +++- conformance/results/pyrefly/overloads_basic.toml | 2 +- .../results/pyright/annotations_forward_refs.toml | 7 +++++-- .../pyright/generics_typevartuple_callable.toml | 4 +++- .../pyright/generics_variance_inference.toml | 9 +++------ conformance/results/pyright/overloads_basic.toml | 4 ++-- conformance/results/results.html | 13 +++---------- .../zuban/generics_typevartuple_callable.toml | 4 +++- conformance/results/zuban/overloads_basic.toml | 8 ++++---- 19 files changed, 48 insertions(+), 54 deletions(-) diff --git a/conformance/results/mypy/classes_classvar.toml b/conformance/results/mypy/classes_classvar.toml index 072593eed..fd95469f5 100644 --- a/conformance/results/mypy/classes_classvar.toml +++ b/conformance/results/mypy/classes_classvar.toml @@ -10,6 +10,7 @@ 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? [valid-type] classes_classvar.py:40: error: Name "var" is not defined [name-defined] 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 [valid-type] classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type] classes_classvar.py:69: error: ClassVar can only be used for assignments in class body [misc] @@ -31,7 +32,6 @@ errors_diff = """ Line 45: Expected 1 errors Line 46: Expected 1 errors Line 47: Expected 1 errors -Line 54: Expected 1 errors Line 67: Unexpected errors ['classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type]'] Line 130: Unexpected errors ['classes_classvar.py:130: error: All protocol members must have explicitly declared types [misc]'] """ diff --git a/conformance/results/mypy/dataclasses_final.toml b/conformance/results/mypy/dataclasses_final.toml index eb917058d..fdf86919a 100644 --- a/conformance/results/mypy/dataclasses_final.toml +++ b/conformance/results/mypy/dataclasses_final.toml @@ -7,10 +7,12 @@ 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 [misc]'] +Line 18: Unexpected errors ['dataclasses_final.py:18: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type]'] Line 24: Unexpected errors ['dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type]'] """ output = """ 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 [valid-type] dataclasses_final.py:24: error: Expression is of type "Any", not "int" [assert-type] 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] diff --git a/conformance/results/mypy/generics_typevartuple_callable.toml b/conformance/results/mypy/generics_typevartuple_callable.toml index 904ddc9fd..81efe3504 100644 --- a/conformance/results/mypy/generics_typevartuple_callable.toml +++ b/conformance/results/mypy/generics_typevartuple_callable.toml @@ -1,7 +1,9 @@ conformant = "Pass" output = """ generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type] +generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type] """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]'] """ diff --git a/conformance/results/mypy/generics_variance_inference.toml b/conformance/results/mypy/generics_variance_inference.toml index ef877e1ee..b1158c7e9 100644 --- a/conformance/results/mypy/generics_variance_inference.toml +++ b/conformance/results/mypy/generics_variance_inference.toml @@ -6,7 +6,6 @@ generics_variance_inference.py:28: error: Incompatible types in assignment (expr 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:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [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] @@ -25,7 +24,6 @@ generics_variance_inference.py:170: error: Incompatible types in assignment (exp 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] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 66: Unexpected errors ['generics_variance_inference.py:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [assignment]'] """ diff --git a/conformance/results/mypy/overloads_basic.toml b/conformance/results/mypy/overloads_basic.toml index e6de0f6f9..f592ea606 100644 --- a/conformance/results/mypy/overloads_basic.toml +++ b/conformance/results/mypy/overloads_basic.toml @@ -1,9 +1,9 @@ conformant = "Pass" output = """ -overloads_basic.py:36: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload] -overloads_basic.py:36: note: Possible overload variants: -overloads_basic.py:36: note: def __getitem__(self, int, /) -> int -overloads_basic.py:36: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes +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 """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/mypy/qualifiers_final_annotation.toml b/conformance/results/mypy/qualifiers_final_annotation.toml index 8c0830f54..2d0cea337 100644 --- a/conformance/results/mypy/qualifiers_final_annotation.toml +++ b/conformance/results/mypy/qualifiers_final_annotation.toml @@ -20,6 +20,8 @@ qualifiers_final_annotation.py:71: error: Cannot assign to final name "RATE" [m 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:96: error: Cannot assign to final name "__private" [misc] +qualifiers_final_annotation.py:107: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] +qualifiers_final_annotation.py:108: error: Variable should not be annotated with both ClassVar and Final [misc] qualifiers_final_annotation.py:118: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:121: error: Final can be only used as an outermost qualifier in a variable annotation [valid-type] qualifiers_final_annotation.py:131: error: Invalid "NamedTuple()" field name [misc] @@ -38,8 +40,6 @@ qualifiers_final_annotation.py:170: error: Cannot assign to final name "PI" [mi """ conformance_automated = "Fail" errors_diff = """ -Line 107: Expected 1 errors -Line 108: Expected 1 errors Line 149: Expected 1 errors Line 59: Unexpected errors ['qualifiers_final_annotation.py:59: error: Cannot assign to final attribute "ID6" [misc]'] Line 96: Unexpected errors ['qualifiers_final_annotation.py:96: error: Cannot assign to final name "__private" [misc]'] diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 9fd841bbe..f8bfa9279 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -2,15 +2,13 @@ conformance_automated = "Fail" errors_diff = """ Line 75: Expected 1 errors Line 76: Expected 1 errors -Line 20: Unexpected errors ["./generics_typevartuple_args.py:20:12: tuple[Literal[1], Literal['a']] is not equivalent to tuple[int, str]"] """ output = """ -./generics_typevartuple_args.py:20:12: tuple[Literal[1], Literal['a']] is not equivalent to tuple[int, str] -./generics_typevartuple_args.py:33:0: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], ./generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] -./generics_typevartuple_args.py:34:0: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], ./generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:33:4: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], .../tests/generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:34:4: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], .../tests/generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] ./generics_typevartuple_args.py:48:0: Incompatible argument type for args: expected tuple[int, ...] but got tuple[Literal[1], Literal['2'], Literal[3]] [incompatible_argument] ./generics_typevartuple_args.py:57:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal[1], Literal[1], Literal['']] [incompatible_argument] ./generics_typevartuple_args.py:58:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal[1]] [incompatible_argument] ./generics_typevartuple_args.py:59:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal['']] [incompatible_argument] -./generics_typevartuple_args.py:67:0: Missing required positional argument at position 1 [incompatible_call] +./generics_typevartuple_args.py:67:0: In call to .../tests/generics_typevartuple_args.py.func3: Missing required positional argument at position 1 [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 4c6513993..1c96ea5c6 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,6 +1,8 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['./generics_typevartuple_callable.py:50:16: tuple[complex | float | int, str, float | int] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ ./generics_typevartuple_callable.py:26:27: Incompatible argument type for args: expected tuple[int, str] but got Literal[('', 0)] [incompatible_argument] +./generics_typevartuple_callable.py:50:16: tuple[complex | float | int, str, float | int] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pyrefly/aliases_typealiastype.toml b/conformance/results/pyrefly/aliases_typealiastype.toml index 07b60e83f..c4e98a923 100644 --- a/conformance/results/pyrefly/aliases_typealiastype.toml +++ b/conformance/results/pyrefly/aliases_typealiastype.toml @@ -1,10 +1,3 @@ -<<<<<<< HEAD -conformant = "Partial" -notes = """ -Does not detect circular definitions. -""" -======= ->>>>>>> upstream/main conformance_automated = "Pass" errors_diff = """ """ diff --git a/conformance/results/pyrefly/annotations_forward_refs.toml b/conformance/results/pyrefly/annotations_forward_refs.toml index cbf25ce24..77859140a 100644 --- a/conformance/results/pyrefly/annotations_forward_refs.toml +++ b/conformance/results/pyrefly/annotations_forward_refs.toml @@ -5,12 +5,12 @@ Does not reject some type forms that require quotes. """ conformance_automated = "Fail" errors_diff = """ -Line 24: Expected 1 errors -Line 25: Expected 1 errors Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@ClassD) -> None` [not-a-type]'] Line 96: Unexpected errors ['assert_type(Any, int) failed [assert-type]'] """ output = """ +ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation] +ERROR annotations_forward_refs.py:25:7-21: `|` union syntax does not work with string literals [invalid-annotation] ERROR annotations_forward_refs.py:41:10-50: Function call cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:42:10-20: List literal cannot be used in annotations [invalid-annotation] ERROR annotations_forward_refs.py:43:10-20: Tuple literal cannot be used in annotations [invalid-annotation] diff --git a/conformance/results/pyrefly/generics_typevartuple_callable.toml b/conformance/results/pyrefly/generics_typevartuple_callable.toml index 4c3a32c03..552f9eedc 100644 --- a/conformance/results/pyrefly/generics_typevartuple_callable.toml +++ b/conformance/results/pyrefly/generics_typevartuple_callable.toml @@ -1,7 +1,9 @@ conformant = "Pass" -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]'] """ output = """ ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] +ERROR generics_typevartuple_callable.py:50:16-63: assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type] """ diff --git a/conformance/results/pyrefly/overloads_basic.toml b/conformance/results/pyrefly/overloads_basic.toml index 08256881b..9dd079a23 100644 --- a/conformance/results/pyrefly/overloads_basic.toml +++ b/conformance/results/pyrefly/overloads_basic.toml @@ -3,5 +3,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR overloads_basic.py:36:1-6: Cannot index into `Bytes` [bad-index] +ERROR overloads_basic.py:39:1-6: Cannot index into `Bytes` [bad-index] """ diff --git a/conformance/results/pyright/annotations_forward_refs.toml b/conformance/results/pyright/annotations_forward_refs.toml index 7caac6289..ca35b5bb1 100644 --- a/conformance/results/pyright/annotations_forward_refs.toml +++ b/conformance/results/pyright/annotations_forward_refs.toml @@ -1,5 +1,7 @@ conformant = "Pass" output = """ +annotations_forward_refs.py:22:7 - error: "ClassA" is not defined (reportUndefinedVariable) +annotations_forward_refs.py:23:12 - error: "ClassA" is not defined (reportUndefinedVariable) annotations_forward_refs.py:24:7 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:25:13 - error: Union syntax cannot be used with string operand; use quotes around entire expression (reportGeneralTypeIssues) annotations_forward_refs.py:41:10 - error: Call expression not allowed in type expression (reportInvalidTypeForm) @@ -27,10 +29,11 @@ annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type ex annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type expression (reportInvalidTypeForm) annotations_forward_refs.py:54:11 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues) annotations_forward_refs.py:55:10 - error: Module cannot be used as a type (reportGeneralTypeIssues) +annotations_forward_refs.py:66:26 - error: "ClassB" is not defined (reportUndefinedVariable) annotations_forward_refs.py:80:14 - error: Type of "ClassF" could not be determined because it refers to itself (reportGeneralTypeIssues) annotations_forward_refs.py:80:14 - error: Variable not allowed in type expression (reportInvalidTypeForm) +annotations_forward_refs.py:89:8 - error: Expected class but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 89: Expected 1 errors """ diff --git a/conformance/results/pyright/generics_typevartuple_callable.toml b/conformance/results/pyright/generics_typevartuple_callable.toml index fb569c88c..bc4d7952b 100644 --- a/conformance/results/pyright/generics_typevartuple_callable.toml +++ b/conformance/results/pyright/generics_typevartuple_callable.toml @@ -3,7 +3,9 @@ output = """ generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"   "Literal['']" is not assignable to "int"   "Literal[0]" is not assignable to "str" (reportArgumentType) +generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure) """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)'] """ diff --git a/conformance/results/pyright/generics_variance_inference.toml b/conformance/results/pyright/generics_variance_inference.toml index 5c0f32e2a..9a378ad6f 100644 --- a/conformance/results/pyright/generics_variance_inference.toml +++ b/conformance/results/pyright/generics_variance_inference.toml @@ -23,12 +23,10 @@ generics_variance_inference.py:58:35 - error: Type "ShouldBeCovariant3[float]" i   "ShouldBeCovariant3[float]" is not assignable to "ShouldBeCovariant3[int]"     Type parameter "T@ShouldBeCovariant3" is covariant, but "float" is not a subtype of "int"       "float" is not assignable to "int" (reportAssignmentType) -generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]" -  "ShouldBeCovariant4[int]" is not assignable to "ShouldBeCovariant4[float]" -    Type parameter "T@ShouldBeCovariant4" is invariant, but "int" is not the same as "float" (reportAssignmentType) generics_variance_inference.py:67:34 - error: Type "ShouldBeCovariant4[float]" is not assignable to declared type "ShouldBeCovariant4[int]"   "ShouldBeCovariant4[float]" is not assignable to "ShouldBeCovariant4[int]" -    Type parameter "T@ShouldBeCovariant4" is invariant, but "float" is not the same as "int" (reportAssignmentType) +    Type parameter "T@ShouldBeCovariant4" is covariant, but "float" is not a subtype of "int" +      "float" is not assignable to "int" (reportAssignmentType) generics_variance_inference.py:80:34 - error: Type "ShouldBeCovariant5[float]" is not assignable to declared type "ShouldBeCovariant5[int]"   "ShouldBeCovariant5[float]" is not assignable to "ShouldBeCovariant5[int]"     Type parameter "T@ShouldBeCovariant5" is covariant, but "float" is not a subtype of "int" @@ -82,7 +80,6 @@ generics_variance_inference.py:194:37 - error: Type "ShouldBeContravariant2[int]     Type parameter "T@ShouldBeContravariant2" is contravariant, but "int" is not a supertype of "float"       "float" is not assignable to "int" (reportAssignmentType) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 66: Unexpected errors ['generics_variance_inference.py:66:36 - error: Type "ShouldBeCovariant4[int]" is not assignable to declared type "ShouldBeCovariant4[float]"'] """ diff --git a/conformance/results/pyright/overloads_basic.toml b/conformance/results/pyright/overloads_basic.toml index bba504e00..14bfb58bf 100644 --- a/conformance/results/pyright/overloads_basic.toml +++ b/conformance/results/pyright/overloads_basic.toml @@ -2,8 +2,8 @@ conformant = "Pass" notes = """ """ output = """ -overloads_basic.py:36:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue) -overloads_basic.py:36:1 - error: Argument of type "Literal['']" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__" +overloads_basic.py:39:1 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue) +overloads_basic.py:39:1 - error: Argument of type "Literal['']" cannot be assigned to parameter "__s" of type "slice[Any, Any, Any]" in function "__getitem__"   "Literal['']" is not assignable to "slice[Any, Any, Any]" (reportArgumentType) """ conformance_automated = "Pass" diff --git a/conformance/results/results.html b/conformance/results/results.html index 867ae2315..b9e2913a1 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -179,11 +179,8 @@

Python Type System Conformance Test Results

zuban 0.6.1
pyrefly 0.54.0
-<<<<<<< HEAD
pycroscope 0.2.0
-======= ->>>>>>> upstream/main @@ -422,9 +419,9 @@

Python Type System Conformance Test Results

     generics_typevartuple_callable Pass Pass +Unknown Pass -Pass -Pass +Unknown      generics_typevartuple_concat Pass @@ -558,12 +555,8 @@

Python Type System Conformance Test Results

Partial

Incorrectly rejects some recursive type aliases using TypeAliasType.

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

Pass Pass -<<<<<<< HEAD -
Partial

Does not detect circular definitions.

-Unknown -======= Pass ->>>>>>> upstream/main +Unknown      aliases_variance Pass diff --git a/conformance/results/zuban/generics_typevartuple_callable.toml b/conformance/results/zuban/generics_typevartuple_callable.toml index d18ba3c57..32e917dba 100644 --- a/conformance/results/zuban/generics_typevartuple_callable.toml +++ b/conformance/results/zuban/generics_typevartuple_callable.toml @@ -1,6 +1,8 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]'] """ output = """ generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type] +generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc] """ diff --git a/conformance/results/zuban/overloads_basic.toml b/conformance/results/zuban/overloads_basic.toml index 8e40dd2b6..6c3455642 100644 --- a/conformance/results/zuban/overloads_basic.toml +++ b/conformance/results/zuban/overloads_basic.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -overloads_basic.py:36: error: No overload variant of "__getitem__" of "Bytes" matches argument type "str" [call-overload] -overloads_basic.py:36: note: Possible overload variants: -overloads_basic.py:36: note: def __getitem__(self, int, /) -> int -overloads_basic.py:36: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes +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 """ From 3d910e66c4315fe6ae7fc42fe3da0a404a04b024 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:34:17 -0800 Subject: [PATCH 41/78] Conformance: lock checker env and add freshness CI --- .github/workflows/conformance.yml | 42 +++++ conformance/README.md | 23 ++- conformance/pyproject.toml | 15 ++ conformance/requirements.txt | 7 - conformance/scripts/bump_type_checkers.py | 29 ++++ conformance/src/type_checker.py | 102 +++++------- conformance/uv.lock | 179 ++++++++++++++++++++++ 7 files changed, 322 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/conformance.yml create mode 100644 conformance/pyproject.toml delete mode 100644 conformance/requirements.txt create mode 100755 conformance/scripts/bump_type_checkers.py create mode 100644 conformance/uv.lock diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml new file mode 100644 index 000000000..8ad72d8d3 --- /dev/null +++ b/.github/workflows/conformance.yml @@ -0,0 +1,42 @@ +name: Conformance + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + conformance: + name: Run conformance suite + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Set up Python 3.12 + uses: actions/setup-python@v6 + with: + python-version: "3.12" + cache: "pip" + + - name: Install uv + run: | + python -m pip install --upgrade pip + python -m pip install uv + + - name: Run conformance suite + working-directory: conformance + run: | + uv sync --python 3.12 --frozen + uv run --python 3.12 --frozen python src/main.py + + - name: Assert conformance results are up to date + run: | + if [ -n "$(git status --porcelain -- conformance/results)" ]; then + git status --short conformance/results + git diff -- conformance/results + echo "Conformance results are out of date. Run conformance/src/main.py and commit updated results." + exit 1 + fi diff --git a/conformance/README.md b/conformance/README.md index e0302c806..f4510de2d 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -70,9 +70,9 @@ by the scoring system. To run the conformance test suite: * Clone the https://github.com/python/typing repo. -* Create and activate a Python 3.12 virtual environment. -* Switch to the `conformance` subdirectory and install all dependencies (`pip install -r requirements.txt`). -* Switch to the `src` subdirectory and run `python main.py`. +* Install [uv](https://docs.astral.sh/uv/) and ensure Python 3.12 is available. +* Switch to the `conformance` subdirectory and install locked dependencies (`uv sync --python 3.12 --frozen`). +* Run the conformance tool (`uv run --python 3.12 --frozen python src/main.py`). Note that some type checkers may not run on some platforms. If a type checker fails to install, tests will be skipped for that type checker. @@ -92,7 +92,22 @@ If a test is updated (augmented or fixed), the process is similar to when adding ## Updating a Type Checker -If a new version of a type checker is released, re-run the test tool with the new version. If the type checker output has changed for any test cases, the tool will supply the old and new outputs. Examine these to determine whether the conformance status has changed. Once the conformance status has been updated, re-run the test tool again to regenerate the summary report. +Type checker versions are locked in `uv.lock`. + +To bump all supported checkers to their latest released versions: + +```bash +python scripts/bump_type_checkers.py +``` + +After bumping, install the new lockfile and rerun conformance: + +```bash +uv sync --python 3.12 --frozen +uv run --python 3.12 --frozen python src/main.py +``` + +If checker output changes for any test cases, examine those deltas to determine whether the conformance status has changed. Once the conformance status has been updated, rerun the tool to regenerate the summary report. ## Automated Conformance Checking diff --git a/conformance/pyproject.toml b/conformance/pyproject.toml new file mode 100644 index 000000000..9b5119331 --- /dev/null +++ b/conformance/pyproject.toml @@ -0,0 +1,15 @@ +[project] +name = "typing-conformance" +version = "0.1.0" +requires-python = "==3.12.*" +dependencies = [ + "mypy", + "pyrefly", + "pyright", + "tomli", + "tomlkit", + "zuban", +] + +[tool.uv] +package = false diff --git a/conformance/requirements.txt b/conformance/requirements.txt deleted file mode 100644 index eac56a058..000000000 --- a/conformance/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -tomli -tomlkit -pyright -mypy -pip -zuban -pyrefly diff --git a/conformance/scripts/bump_type_checkers.py b/conformance/scripts/bump_type_checkers.py new file mode 100755 index 000000000..da7f698ea --- /dev/null +++ b/conformance/scripts/bump_type_checkers.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +""" +Update the conformance checker versions in uv.lock to the latest releases. +""" + +from pathlib import Path +from subprocess import CalledProcessError, run + + +TYPE_CHECKERS = ("mypy", "pyright", "zuban", "pyrefly") + + +def main() -> int: + root_dir = Path(__file__).resolve().parents[1] + lock_command = ["uv", "lock", "--python", "3.12"] + for checker in TYPE_CHECKERS: + lock_command.extend(["--upgrade-package", checker]) + + try: + print("+", " ".join(lock_command)) + run(lock_command, cwd=root_dir, check=True) + except CalledProcessError as exc: + print(f"Failed with exit code {exc.returncode}") + return exc.returncode + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 7406a8ac0..865821f4b 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -5,8 +5,6 @@ from abc import ABC, abstractmethod import json from pathlib import Path -import os -import re import shutil from subprocess import PIPE, CalledProcessError, run import sys @@ -25,8 +23,8 @@ def name(self) -> str: @abstractmethod def install(self) -> bool: """ - Ensures that the latest version of the type checker is installed. - Returns False if installation fails. + Ensures that the type checker is available in the current environment. + Returns False if it cannot be executed. """ raise NotImplementedError @@ -67,29 +65,24 @@ def install(self) -> bool: pass try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "mypy", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "mypy"], - check=True, - ) - - # Run "mypy --version" to ensure that it's installed and to work + # Run "mypy --version" to ensure that it's available and to work # around timing issues caused by malware scanners on some systems. self.get_version() - return True - except CalledProcessError: - print("Unable to install mypy") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run mypy. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: - proc = run([sys.executable, "-m", "mypy", "--version"], stdout=PIPE, text=True) + proc = run( + [sys.executable, "-m", "mypy", "--version"], + check=True, + stdout=PIPE, + text=True, + ) version = proc.stdout.strip() # Remove the " (compiled)" if it's present. @@ -137,29 +130,23 @@ def name(self) -> str: def install(self) -> bool: try: - # Uninstall any old version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "pyright", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "pyright"], - check=True, - ) - # Force the Python wrapper to install node if needed - # and download the latest version of pyright. + # and use the locked version of pyright. self.get_version() return True - except CalledProcessError: - print("Unable to install pyright") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run pyright. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: proc = run( - [sys.executable, "-m", "pyright", "--version"], stdout=PIPE, text=True + [sys.executable, "-m", "pyright", "--version"], + check=True, + stdout=PIPE, + text=True, ) return proc.stdout.strip() @@ -208,24 +195,17 @@ def name(self) -> str: def install(self) -> bool: try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "zuban", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "zuban"], - check=True, - ) + self.get_version() return True - except CalledProcessError: - print("Unable to install zuban") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run zuban. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: - proc = run(["zuban", "--version"], stdout=PIPE, text=True) + proc = run(["zuban", "--version"], check=True, stdout=PIPE, text=True) return proc.stdout.strip() def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: @@ -268,23 +248,17 @@ def name(self) -> str: def install(self) -> bool: try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "pyrefly", "-y"], - check=True, - ) - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "pyrefly"], - check=True, - ) + self.get_version() return True - except CalledProcessError: - print("Unable to install pyrefly") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run pyrefly. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: - proc = run(["pyrefly", "--version"], stdout=PIPE, text=True) + proc = run(["pyrefly", "--version"], check=True, stdout=PIPE, text=True) version = proc.stdout.strip() return version diff --git a/conformance/uv.lock b/conformance/uv.lock new file mode 100644 index 000000000..2c2c6ba74 --- /dev/null +++ b/conformance/uv.lock @@ -0,0 +1,179 @@ +version = 1 +revision = 3 +requires-python = "==3.12.*" + +[[package]] +name = "librt" +version = "0.8.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/56/9c/b4b0c54d84da4a94b37bd44151e46d5e583c9534c7e02250b961b1b6d8a8/librt-0.8.1.tar.gz", hash = "sha256:be46a14693955b3bd96014ccbdb8339ee8c9346fbe11c1b78901b55125f14c73", size = 177471, upload-time = "2026-02-17T16:13:06.101Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/21/d39b0a87ac52fc98f621fb6f8060efb017a767ebbbac2f99fbcbc9ddc0d7/librt-0.8.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a28f2612ab566b17f3698b0da021ff9960610301607c9a5e8eaca62f5e1c350a", size = 66516, upload-time = "2026-02-17T16:11:41.604Z" }, + { url = "https://files.pythonhosted.org/packages/69/f1/46375e71441c43e8ae335905e069f1c54febee63a146278bcee8782c84fd/librt-0.8.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:60a78b694c9aee2a0f1aaeaa7d101cf713e92e8423a941d2897f4fa37908dab9", size = 68634, upload-time = "2026-02-17T16:11:43.268Z" }, + { url = "https://files.pythonhosted.org/packages/0a/33/c510de7f93bf1fa19e13423a606d8189a02624a800710f6e6a0a0f0784b3/librt-0.8.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:758509ea3f1eba2a57558e7e98f4659d0ea7670bff49673b0dde18a3c7e6c0eb", size = 198941, upload-time = "2026-02-17T16:11:44.28Z" }, + { url = "https://files.pythonhosted.org/packages/dd/36/e725903416409a533d92398e88ce665476f275081d0d7d42f9c4951999e5/librt-0.8.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:039b9f2c506bd0ab0f8725aa5ba339c6f0cd19d3b514b50d134789809c24285d", size = 209991, upload-time = "2026-02-17T16:11:45.462Z" }, + { url = "https://files.pythonhosted.org/packages/30/7a/8d908a152e1875c9f8eac96c97a480df425e657cdb47854b9efaa4998889/librt-0.8.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bb54f1205a3a6ab41a6fd71dfcdcbd278670d3a90ca502a30d9da583105b6f7", size = 224476, upload-time = "2026-02-17T16:11:46.542Z" }, + { url = "https://files.pythonhosted.org/packages/a8/b8/a22c34f2c485b8903a06f3fe3315341fe6876ef3599792344669db98fcff/librt-0.8.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:05bd41cdee35b0c59c259f870f6da532a2c5ca57db95b5f23689fcb5c9e42440", size = 217518, upload-time = "2026-02-17T16:11:47.746Z" }, + { url = "https://files.pythonhosted.org/packages/79/6f/5c6fea00357e4f82ba44f81dbfb027921f1ab10e320d4a64e1c408d035d9/librt-0.8.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adfab487facf03f0d0857b8710cf82d0704a309d8ffc33b03d9302b4c64e91a9", size = 225116, upload-time = "2026-02-17T16:11:49.298Z" }, + { url = "https://files.pythonhosted.org/packages/f2/a0/95ced4e7b1267fe1e2720a111685bcddf0e781f7e9e0ce59d751c44dcfe5/librt-0.8.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:153188fe98a72f206042be10a2c6026139852805215ed9539186312d50a8e972", size = 217751, upload-time = "2026-02-17T16:11:50.49Z" }, + { url = "https://files.pythonhosted.org/packages/93/c2/0517281cb4d4101c27ab59472924e67f55e375bc46bedae94ac6dc6e1902/librt-0.8.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:dd3c41254ee98604b08bd5b3af5bf0a89740d4ee0711de95b65166bf44091921", size = 218378, upload-time = "2026-02-17T16:11:51.783Z" }, + { url = "https://files.pythonhosted.org/packages/43/e8/37b3ac108e8976888e559a7b227d0ceac03c384cfd3e7a1c2ee248dbae79/librt-0.8.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e0d138c7ae532908cbb342162b2611dbd4d90c941cd25ab82084aaf71d2c0bd0", size = 241199, upload-time = "2026-02-17T16:11:53.561Z" }, + { url = "https://files.pythonhosted.org/packages/4b/5b/35812d041c53967fedf551a39399271bbe4257e681236a2cf1a69c8e7fa1/librt-0.8.1-cp312-cp312-win32.whl", hash = "sha256:43353b943613c5d9c49a25aaffdba46f888ec354e71e3529a00cca3f04d66a7a", size = 54917, upload-time = "2026-02-17T16:11:54.758Z" }, + { url = "https://files.pythonhosted.org/packages/de/d1/fa5d5331b862b9775aaf2a100f5ef86854e5d4407f71bddf102f4421e034/librt-0.8.1-cp312-cp312-win_amd64.whl", hash = "sha256:ff8baf1f8d3f4b6b7257fcb75a501f2a5499d0dda57645baa09d4d0d34b19444", size = 62017, upload-time = "2026-02-17T16:11:55.748Z" }, + { url = "https://files.pythonhosted.org/packages/c7/7c/c614252f9acda59b01a66e2ddfd243ed1c7e1deab0293332dfbccf862808/librt-0.8.1-cp312-cp312-win_arm64.whl", hash = "sha256:0f2ae3725904f7377e11cc37722d5d401e8b3d5851fb9273d7f4fe04f6b3d37d", size = 52441, upload-time = "2026-02-17T16:11:56.801Z" }, +] + +[[package]] +name = "mypy" +version = "1.19.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "librt", marker = "platform_python_implementation != 'PyPy'" }, + { name = "mypy-extensions" }, + { name = "pathspec" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404, upload-time = "2025-12-15T05:03:48.42Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/06/8a/19bfae96f6615aa8a0604915512e0289b1fad33d5909bf7244f02935d33a/mypy-1.19.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a8174a03289288c1f6c46d55cef02379b478bfbc8e358e02047487cad44c6ca1", size = 13206053, upload-time = "2025-12-15T05:03:46.622Z" }, + { url = "https://files.pythonhosted.org/packages/a5/34/3e63879ab041602154ba2a9f99817bb0c85c4df19a23a1443c8986e4d565/mypy-1.19.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffcebe56eb09ff0c0885e750036a095e23793ba6c2e894e7e63f6d89ad51f22e", size = 12219134, upload-time = "2025-12-15T05:03:24.367Z" }, + { url = "https://files.pythonhosted.org/packages/89/cc/2db6f0e95366b630364e09845672dbee0cbf0bbe753a204b29a944967cd9/mypy-1.19.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b64d987153888790bcdb03a6473d321820597ab8dd9243b27a92153c4fa50fd2", size = 12731616, upload-time = "2025-12-15T05:02:44.725Z" }, + { url = "https://files.pythonhosted.org/packages/00/be/dd56c1fd4807bc1eba1cf18b2a850d0de7bacb55e158755eb79f77c41f8e/mypy-1.19.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c35d298c2c4bba75feb2195655dfea8124d855dfd7343bf8b8c055421eaf0cf8", size = 13620847, upload-time = "2025-12-15T05:03:39.633Z" }, + { url = "https://files.pythonhosted.org/packages/6d/42/332951aae42b79329f743bf1da088cd75d8d4d9acc18fbcbd84f26c1af4e/mypy-1.19.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:34c81968774648ab5ac09c29a375fdede03ba253f8f8287847bd480782f73a6a", size = 13834976, upload-time = "2025-12-15T05:03:08.786Z" }, + { url = "https://files.pythonhosted.org/packages/6f/63/e7493e5f90e1e085c562bb06e2eb32cae27c5057b9653348d38b47daaecc/mypy-1.19.1-cp312-cp312-win_amd64.whl", hash = "sha256:b10e7c2cd7870ba4ad9b2d8a6102eb5ffc1f16ca35e3de6bfa390c1113029d13", size = 10118104, upload-time = "2025-12-15T05:03:10.834Z" }, + { url = "https://files.pythonhosted.org/packages/8d/f4/4ce9a05ce5ded1de3ec1c1d96cf9f9504a04e54ce0ed55cfa38619a32b8d/mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247", size = 2471239, upload-time = "2025-12-15T05:03:07.248Z" }, +] + +[[package]] +name = "mypy-extensions" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, +] + +[[package]] +name = "nodeenv" +version = "1.10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, +] + +[[package]] +name = "pathspec" +version = "1.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, +] + +[[package]] +name = "pyrefly" +version = "0.54.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/81/44/c10b16a302fda90d0af1328f880b232761b510eab546616a7be2fdf35a57/pyrefly-0.54.0.tar.gz", hash = "sha256:c6663be64d492f0d2f2a411ada9f28a6792163d34133639378b7f3dd9a8dca94", size = 5098893, upload-time = "2026-02-23T15:44:35.111Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5f/99/8fdcdb4e55f0227fdd9f6abce36b619bab1ecb0662b83b66adc8cba3c788/pyrefly-0.54.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:58a3f092b6dc25ef79b2dc6c69a40f36784ca157c312bfc0baea463926a9db6d", size = 12223973, upload-time = "2026-02-23T15:44:14.278Z" }, + { url = "https://files.pythonhosted.org/packages/90/35/c2aaf87a76003ad27b286594d2e5178f811eaa15bfe3d98dba2b47d56dd1/pyrefly-0.54.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:615081414106dd95873bc39c3a4bed68754c6cc24a8177ac51d22f88f88d3eb3", size = 11785585, upload-time = "2026-02-23T15:44:17.468Z" }, + { url = "https://files.pythonhosted.org/packages/c4/4a/ced02691ed67e5a897714979196f08ad279ec7ec7f63c45e00a75a7f3c0e/pyrefly-0.54.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbcaf20f5fe585079079a95205c1f3cd4542d17228cdf1df560288880623b70", size = 33381977, upload-time = "2026-02-23T15:44:19.736Z" }, + { url = "https://files.pythonhosted.org/packages/0b/ce/72a117ed437c8f6950862181014b41e36f3c3997580e29b772b71e78d587/pyrefly-0.54.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d5da116c0d34acfbd66663addd3ca8aa78a636f6692a66e078126d3620a883", size = 35962821, upload-time = "2026-02-23T15:44:22.357Z" }, + { url = "https://files.pythonhosted.org/packages/85/de/89013f5ae0a35d2b6b01274a92a35ee91431ea001050edf0a16748d39875/pyrefly-0.54.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef3ac27f1a4baaf67aead64287d3163350844794aca6315ad1a9650b16ec26a", size = 38496689, upload-time = "2026-02-23T15:44:25.236Z" }, + { url = "https://files.pythonhosted.org/packages/9f/9a/33b097c7bf498b924742dca32dd5d9c6a3fa6c2b52b63a58eb9e1980ca89/pyrefly-0.54.0-py3-none-win32.whl", hash = "sha256:7d607d72200a8afbd2db10bfefb40160a7a5d709d207161c21649cedd5cfc09a", size = 11295268, upload-time = "2026-02-23T15:44:27.551Z" }, + { url = "https://files.pythonhosted.org/packages/d4/21/9263fd1144d2a3d7342b474f183f7785b3358a1565c864089b780110b933/pyrefly-0.54.0-py3-none-win_amd64.whl", hash = "sha256:fd416f04f89309385696f685bd5c9141011f18c8072f84d31ca20c748546e791", size = 12081810, upload-time = "2026-02-23T15:44:29.461Z" }, + { url = "https://files.pythonhosted.org/packages/ea/5b/fad062a196c064cbc8564de5b2f4d3cb6315f852e3b31e8a1ce74c69a1ea/pyrefly-0.54.0-py3-none-win_arm64.whl", hash = "sha256:f06ab371356c7b1925e0bffe193b738797e71e5dbbff7fb5a13f90ee7521211d", size = 11564930, upload-time = "2026-02-23T15:44:33.053Z" }, +] + +[[package]] +name = "pyright" +version = "1.1.408" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodeenv" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/74/b2/5db700e52554b8f025faa9c3c624c59f1f6c8841ba81ab97641b54322f16/pyright-1.1.408.tar.gz", hash = "sha256:f28f2321f96852fa50b5829ea492f6adb0e6954568d1caa3f3af3a5f555eb684", size = 4400578, upload-time = "2026-01-08T08:07:38.795Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/82/a2c93e32800940d9573fb28c346772a14778b84ba7524e691b324620ab89/pyright-1.1.408-py3-none-any.whl", hash = "sha256:090b32865f4fdb1e0e6cd82bf5618480d48eecd2eb2e70f960982a3d9a4c17c1", size = 6399144, upload-time = "2026-01-08T08:07:37.082Z" }, +] + +[[package]] +name = "tomli" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" }, + { url = "https://files.pythonhosted.org/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" }, + { url = "https://files.pythonhosted.org/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" }, + { url = "https://files.pythonhosted.org/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" }, + { url = "https://files.pythonhosted.org/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" }, + { url = "https://files.pythonhosted.org/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" }, + { url = "https://files.pythonhosted.org/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" }, + { url = "https://files.pythonhosted.org/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" }, + { url = "https://files.pythonhosted.org/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" }, + { url = "https://files.pythonhosted.org/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" }, +] + +[[package]] +name = "tomlkit" +version = "0.14.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c3/af/14b24e41977adb296d6bd1fb59402cf7d60ce364f90c890bd2ec65c43b5a/tomlkit-0.14.0.tar.gz", hash = "sha256:cf00efca415dbd57575befb1f6634c4f42d2d87dbba376128adb42c121b87064", size = 187167, upload-time = "2026-01-13T01:14:53.304Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b5/11/87d6d29fb5d237229d67973a6c9e06e048f01cf4994dee194ab0ea841814/tomlkit-0.14.0-py3-none-any.whl", hash = "sha256:592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680", size = 39310, upload-time = "2026-01-13T01:14:51.965Z" }, +] + +[[package]] +name = "typing-conformance" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "mypy" }, + { name = "pyrefly" }, + { name = "pyright" }, + { name = "tomli" }, + { name = "tomlkit" }, + { name = "zuban" }, +] + +[package.metadata] +requires-dist = [ + { name = "mypy" }, + { name = "pyrefly" }, + { name = "pyright" }, + { name = "tomli" }, + { name = "tomlkit" }, + { name = "zuban" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + +[[package]] +name = "zuban" +version = "0.6.1" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/91/2e3f5f095ff45c8052e320b99359ec03b266df1eedd3ea4ab4a2d68b134d/zuban-0.6.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:bf3ed1b85cedafaf51e51527bdc2ae089db121546aaa96a252beb0708a7f4306", size = 11186573, upload-time = "2026-02-25T02:04:49.434Z" }, + { url = "https://files.pythonhosted.org/packages/77/44/fc318d17c500ba0b1733b8d661d33acb117aaf6b20d9e2a74ce7a33de18d/zuban-0.6.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e9e310e27eaa6c2184f3b50fbea6cd3cc0776549868837145d3156352156bb6c", size = 10925136, upload-time = "2026-02-25T02:04:52.562Z" }, + { url = "https://files.pythonhosted.org/packages/46/86/56a04bea43584b01d438b943bf1501b33a71db746183ab9b5cfa3818a2de/zuban-0.6.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1d78ad0af5b4b44d4201e1f1add0b5495da813593b57ecfb39a5a526f998602", size = 27757976, upload-time = "2026-02-25T02:04:56.017Z" }, + { url = "https://files.pythonhosted.org/packages/83/9f/c5cd3d5c130603116b1614e013a1feac2ee7a804622aa5830a35d97b1dc5/zuban-0.6.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a9d86ac6f23cf020978a94e47054af92ac3c26a7f884c27eb4fb28361a907bd6", size = 27883668, upload-time = "2026-02-25T02:04:59.839Z" }, + { url = "https://files.pythonhosted.org/packages/f8/09/5da69bc26fdce24b1a89c0e35d7134cd60960374e7aa48851b2d989447ad/zuban-0.6.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66ede8809b0231b050d543004ac27dd031dc9053839337006fad18157e3e5440", size = 29237524, upload-time = "2026-02-25T02:05:03.86Z" }, + { url = "https://files.pythonhosted.org/packages/d3/6d/a7b8a8531495e64e27a8c4a25bfd7865f7d94c82c1d549c103bc5bf3bbc1/zuban-0.6.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:859e8917ed579e9018de6f6e4bb8a2ec6204df95bcf9ff9165c3067257ff3f05", size = 30224734, upload-time = "2026-02-25T02:05:07.586Z" }, + { url = "https://files.pythonhosted.org/packages/04/9a/0b963861ea2e594ab3669245825dde90ff3a25d6a916a48007be3b0f7db9/zuban-0.6.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a07738374ddfca72fdf925cd275a3216a6fe8373bf91b49931c1c9f87561b729", size = 28034025, upload-time = "2026-02-25T02:05:12.99Z" }, + { url = "https://files.pythonhosted.org/packages/21/5d/5c588e77087fc649e84b409ac11c8b8ba48ee49a554531647af5b044a6c1/zuban-0.6.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:619815ac6cb9f48c9891cd4150cf3bce70a79c9a15fc349a0f860a3d9e44acf9", size = 28484806, upload-time = "2026-02-25T02:05:16.224Z" }, + { url = "https://files.pythonhosted.org/packages/3e/0b/4c67a559c0f9d405ca87685b65b16243e555c1d3c3c613d6fbb284c9b16a/zuban-0.6.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f912f2db095e5715b757c31d73cef3509ba6da5ba99295d36b166420e9884992", size = 29355542, upload-time = "2026-02-25T02:05:20.097Z" }, + { url = "https://files.pythonhosted.org/packages/65/a2/8a38a910f40a090effbcc65e0272a7d33b16149b452f74a67b5537ba5f2f/zuban-0.6.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:80a9f18aa327378846258b06277f9f7bba7127513aa591ad8b9b28bb48f4e3b8", size = 28658304, upload-time = "2026-02-25T02:05:24.106Z" }, + { url = "https://files.pythonhosted.org/packages/1c/50/65a34b02e162845155efea4f393761634f7f39311d3b59249c9c7f3f53f7/zuban-0.6.1-py3-none-win32.whl", hash = "sha256:7737d566cb4202ea5c37e1f03397dcfbd437d1f33e6ee4090a0d2941383531c5", size = 9734143, upload-time = "2026-02-25T02:05:27.409Z" }, + { url = "https://files.pythonhosted.org/packages/37/45/2724c34fa769cf2cb29c9c178166b1689e936f810eb55f799e87a6acb248/zuban-0.6.1-py3-none-win_amd64.whl", hash = "sha256:9494dac40d4a23f92d7833e8fb15e8925e2c5d2561bc4edb18277ff35bea5ac8", size = 10490401, upload-time = "2026-02-25T02:05:29.817Z" }, +] From b88dedaebcaf4ae499174d5a952bb127c45f2a91 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:34:34 -0800 Subject: [PATCH 42/78] Update generated conformance results --- conformance/results/mypy/generics_typevartuple_callable.toml | 4 +++- .../results/pyrefly/generics_typevartuple_callable.toml | 4 +++- .../results/pyright/generics_typevartuple_callable.toml | 4 +++- conformance/results/pyright/qualifiers_final_decorator.toml | 1 - conformance/results/results.html | 2 +- conformance/results/zuban/generics_typevartuple_callable.toml | 4 +++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/conformance/results/mypy/generics_typevartuple_callable.toml b/conformance/results/mypy/generics_typevartuple_callable.toml index 904ddc9fd..81efe3504 100644 --- a/conformance/results/mypy/generics_typevartuple_callable.toml +++ b/conformance/results/mypy/generics_typevartuple_callable.toml @@ -1,7 +1,9 @@ conformant = "Pass" output = """ generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type] +generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type] """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]'] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_callable.toml b/conformance/results/pyrefly/generics_typevartuple_callable.toml index 4c3a32c03..552f9eedc 100644 --- a/conformance/results/pyrefly/generics_typevartuple_callable.toml +++ b/conformance/results/pyrefly/generics_typevartuple_callable.toml @@ -1,7 +1,9 @@ conformant = "Pass" -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]'] """ output = """ ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] +ERROR generics_typevartuple_callable.py:50:16-63: assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type] """ diff --git a/conformance/results/pyright/generics_typevartuple_callable.toml b/conformance/results/pyright/generics_typevartuple_callable.toml index fb569c88c..bc4d7952b 100644 --- a/conformance/results/pyright/generics_typevartuple_callable.toml +++ b/conformance/results/pyright/generics_typevartuple_callable.toml @@ -3,7 +3,9 @@ output = """ generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"   "Literal['']" is not assignable to "int"   "Literal[0]" is not assignable to "str" (reportArgumentType) +generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure) """ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)'] """ diff --git a/conformance/results/pyright/qualifiers_final_decorator.toml b/conformance/results/pyright/qualifiers_final_decorator.toml index 36b1e38bb..94448af44 100644 --- a/conformance/results/pyright/qualifiers_final_decorator.toml +++ b/conformance/results/pyright/qualifiers_final_decorator.toml @@ -1,6 +1,5 @@ conformant = "Pass" output = """ -qualifiers_final_decorator.py:8:6 - warning: Import "_qualifiers_final_decorator" could not be resolved from source (reportMissingModuleSource) qualifiers_final_decorator.py:21:16 - error: Base class "Base1" is marked final and cannot be subclassed (reportGeneralTypeIssues) qualifiers_final_decorator.py:56:9 - error: Method "method1" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride) qualifiers_final_decorator.py:60:9 - error: Method "method2" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride) diff --git a/conformance/results/results.html b/conformance/results/results.html index a99606a66..6f9f704e2 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -385,7 +385,7 @@

Python Type System Conformance Test Results

     generics_typevartuple_callable Pass Pass -Pass +Unknown Pass      generics_typevartuple_concat diff --git a/conformance/results/zuban/generics_typevartuple_callable.toml b/conformance/results/zuban/generics_typevartuple_callable.toml index d18ba3c57..32e917dba 100644 --- a/conformance/results/zuban/generics_typevartuple_callable.toml +++ b/conformance/results/zuban/generics_typevartuple_callable.toml @@ -1,6 +1,8 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]'] """ output = """ generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type] +generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc] """ From 1b7046065eb24ba0e409a84ea0bc984ff3f0549a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:39:45 -0800 Subject: [PATCH 43/78] Fix incorrect test --- conformance/results/mypy/generics_typevartuple_callable.toml | 4 +--- .../results/pyrefly/generics_typevartuple_callable.toml | 4 +--- .../results/pyright/generics_typevartuple_callable.toml | 4 +--- conformance/results/results.html | 2 +- conformance/results/zuban/generics_typevartuple_callable.toml | 4 +--- conformance/tests/generics_typevartuple_callable.py | 4 ++-- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/conformance/results/mypy/generics_typevartuple_callable.toml b/conformance/results/mypy/generics_typevartuple_callable.toml index 81efe3504..904ddc9fd 100644 --- a/conformance/results/mypy/generics_typevartuple_callable.toml +++ b/conformance/results/mypy/generics_typevartuple_callable.toml @@ -1,9 +1,7 @@ conformant = "Pass" output = """ generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type] -generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]'] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_callable.toml b/conformance/results/pyrefly/generics_typevartuple_callable.toml index 552f9eedc..4c3a32c03 100644 --- a/conformance/results/pyrefly/generics_typevartuple_callable.toml +++ b/conformance/results/pyrefly/generics_typevartuple_callable.toml @@ -1,9 +1,7 @@ conformant = "Pass" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]'] """ output = """ ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] -ERROR generics_typevartuple_callable.py:50:16-63: assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type] """ diff --git a/conformance/results/pyright/generics_typevartuple_callable.toml b/conformance/results/pyright/generics_typevartuple_callable.toml index bc4d7952b..fb569c88c 100644 --- a/conformance/results/pyright/generics_typevartuple_callable.toml +++ b/conformance/results/pyright/generics_typevartuple_callable.toml @@ -3,9 +3,7 @@ output = """ generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"   "Literal['']" is not assignable to "int"   "Literal[0]" is not assignable to "str" (reportArgumentType) -generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)'] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 6f9f704e2..a99606a66 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -385,7 +385,7 @@

Python Type System Conformance Test Results

     generics_typevartuple_callable Pass Pass -Unknown +Pass Pass      generics_typevartuple_concat diff --git a/conformance/results/zuban/generics_typevartuple_callable.toml b/conformance/results/zuban/generics_typevartuple_callable.toml index 32e917dba..d18ba3c57 100644 --- a/conformance/results/zuban/generics_typevartuple_callable.toml +++ b/conformance/results/zuban/generics_typevartuple_callable.toml @@ -1,8 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]'] """ output = """ generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type] -generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc] """ diff --git a/conformance/tests/generics_typevartuple_callable.py b/conformance/tests/generics_typevartuple_callable.py index 11e596573..b8a9f577e 100644 --- a/conformance/tests/generics_typevartuple_callable.py +++ b/conformance/tests/generics_typevartuple_callable.py @@ -42,9 +42,9 @@ def callback2(a: int, d: str) -> tuple[str]: assert_type(func2(callback2), tuple[str]) -def func3(*args: * tuple[int, *Ts, T]) -> tuple[T, *Ts]: +def func3(*args: *tuple[int, *Ts, T]) -> tuple[T, *Ts]: raise NotImplementedError def has_int_and_str(a: int, b: str, c: float, d: complex): - assert_type(func3(a, b, c, d), tuple[float, str, complex]) + assert_type(func3(a, b, c, d), tuple[complex, str, float]) From cb314002f40056be6596757f1ed2041fa252b54f Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 21:47:04 -0800 Subject: [PATCH 44/78] undo --- conformance/tests/generics_typevartuple_callable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance/tests/generics_typevartuple_callable.py b/conformance/tests/generics_typevartuple_callable.py index b8a9f577e..11e596573 100644 --- a/conformance/tests/generics_typevartuple_callable.py +++ b/conformance/tests/generics_typevartuple_callable.py @@ -42,9 +42,9 @@ def callback2(a: int, d: str) -> tuple[str]: assert_type(func2(callback2), tuple[str]) -def func3(*args: *tuple[int, *Ts, T]) -> tuple[T, *Ts]: +def func3(*args: * tuple[int, *Ts, T]) -> tuple[T, *Ts]: raise NotImplementedError def has_int_and_str(a: int, b: str, c: float, d: complex): - assert_type(func3(a, b, c, d), tuple[complex, str, float]) + assert_type(func3(a, b, c, d), tuple[float, str, complex]) From f259ab256e734d9e28382343c65fa0953423d705 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 22:16:43 -0800 Subject: [PATCH 45/78] progress --- .../pycroscope/aliases_typealiastype.toml | 2 -- .../pycroscope/callables_protocol.toml | 4 ++++ .../results/pycroscope/classes_classvar.toml | 18 ++++++++--------- .../pycroscope/dataclasses_inheritance.toml | 7 ------- .../pycroscope/dataclasses_postinit.toml | 10 +++++----- .../dataclasses_transform_meta.toml | 4 +--- .../results/pycroscope/dataclasses_usage.toml | 6 ++++-- .../pycroscope/directives_deprecated.toml | 6 ++---- .../pycroscope/generics_self_advanced.toml | 9 ++++----- .../pycroscope/generics_self_basic.toml | 11 ---------- .../pycroscope/generics_self_usage.toml | 2 -- .../generics_typevartuple_basic.toml | 8 ++++---- .../generics_typevartuple_concat.toml | 20 ++++++++++--------- .../generics_typevartuple_specialization.toml | 13 ------------ .../generics_typevartuple_unpack.toml | 8 ++------ .../pycroscope/namedtuples_define_class.toml | 4 ++-- conformance/results/results.html | 8 ++++---- conformance/src/type_checker.py | 5 +++++ 18 files changed, 57 insertions(+), 88 deletions(-) diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index d95d69366..e51386afd 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -21,13 +21,11 @@ Line 64: Expected 1 errors Line 66: Expected 1 errors Line 37: Unexpected errors ['./aliases_typealiastype.py:37:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation]'] Line 38: Unexpected errors ['./aliases_typealiastype.py:38:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation]'] -Line 39: Unexpected errors ['./aliases_typealiastype.py:39:4: Unpack[] used in unsupported context [invalid_annotation]'] """ output = """ ./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] ./aliases_typealiastype.py:37:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation] ./aliases_typealiastype.py:38:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation] -./aliases_typealiastype.py:39:4: Unpack[] used in unsupported context [invalid_annotation] ./aliases_typealiastype.py:40:4: Expected 4 type arguments for type alias, got 3 [invalid_annotation] ./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] """ diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index ba08effb3..b08e7ee85 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -15,6 +15,8 @@ Line 144: Unexpected errors ['./callables_protocol.py:144:0: Incompatible assign Line 168: Unexpected errors ["./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]"] Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] +Line 204: Unexpected errors ["./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override]"] +Line 206: Unexpected errors ["./callables_protocol.py:206:4: Value of __annotations__ incompatible with base class [incompatible_override]"] Line 216: Unexpected errors ["./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment]"] Line 236: Unexpected errors ["./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] Line 237: Unexpected errors ["./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] @@ -54,6 +56,8 @@ output = """ ./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute] ./callables_protocol.py:197:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] ./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable] +./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override] +./callables_protocol.py:206:4: Value of __annotations__ incompatible with base class [incompatible_override] ./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment] ./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 834c54ae1..5db7ee5d2 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -1,22 +1,22 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 70: Expected 1 errors -Line 71: Expected 1 errors -Line 77: Expected 1 errors -Line 78: Expected 1 errors -Line 111: Expected 1 errors """ output = """ ./classes_classvar.py:38:10: Invalid type annotation (, ) [invalid_annotation] ./classes_classvar.py:39:10: Invalid type annotation 3 [invalid_annotation] ./classes_classvar.py:40:13: Undefined name: var [undefined_name] +./classes_classvar.py:45:10: ClassVar type cannot include type parameters [classvar_type_parameters] +./classes_classvar.py:46:10: ClassVar type cannot include type parameters [classvar_type_parameters] +./classes_classvar.py:47:10: ClassVar type cannot include type parameters [classvar_type_parameters] ./classes_classvar.py:52:4: Incompatible assignment: expected list[str], got Literal[{}] [incompatible_assignment] ./classes_classvar.py:54:10: Final cannot be combined with ClassVar [invalid_annotation] ./classes_classvar.py:55:11: Unrecognized annotation typing.ClassVar[] [invalid_annotation] ./classes_classvar.py:69:25: Unexpected ClassVar annotation [invalid_annotation] +./classes_classvar.py:70:11: ClassVar can only be used for assignments in class body [invalid_annotation] +./classes_classvar.py:71:17: ClassVar can only be used for assignments in class body [invalid_annotation] ./classes_classvar.py:73:25: Unexpected ClassVar annotation [invalid_annotation] +./classes_classvar.py:77:7: ClassVar can only be used for assignments in class body [invalid_annotation] +./classes_classvar.py:78:19: ClassVar cannot be used in type aliases [invalid_annotation] +./classes_classvar.py:111:0: Cannot assign to class variable 'stats' via instance [incompatible_assignment] ./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA (Protocol with members 'x', 'y', 'z'), got ./classes_classvar.py.ProtoAImpl [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_inheritance.toml b/conformance/results/pycroscope/dataclasses_inheritance.toml index a197e110b..6973d93fa 100644 --- a/conformance/results/pycroscope/dataclasses_inheritance.toml +++ b/conformance/results/pycroscope/dataclasses_inheritance.toml @@ -2,13 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 62: Expected 1 errors Line 66: Expected 1 errors -Line 23: Unexpected errors ["./dataclasses_inheritance.py:23:15: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument]", './dataclasses_inheritance.py:23:12: Incompatible argument type for b: expected str but got Literal[1] [incompatible_argument]'] -Line 40: Unexpected errors ['./dataclasses_inheritance.py:40:21: Incompatible argument type for x: expected float | int but got Literal[(1,)] [incompatible_argument]', './dataclasses_inheritance.py:40:12: Incompatible argument type for y: expected str but got Literal[0.0] [incompatible_argument]', "./dataclasses_inheritance.py:40:17: Incompatible argument type for z: expected tuple[int] but got Literal[''] [incompatible_argument]"] """ output = """ -./dataclasses_inheritance.py:23:15: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] -./dataclasses_inheritance.py:23:12: Incompatible argument type for b: expected str but got Literal[1] [incompatible_argument] -./dataclasses_inheritance.py:40:21: Incompatible argument type for x: expected float | int but got Literal[(1,)] [incompatible_argument] -./dataclasses_inheritance.py:40:12: Incompatible argument type for y: expected str but got Literal[0.0] [incompatible_argument] -./dataclasses_inheritance.py:40:17: Incompatible argument type for z: expected tuple[int] but got Literal[''] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/dataclasses_postinit.toml b/conformance/results/pycroscope/dataclasses_postinit.toml index 67e9675bc..225afffc6 100644 --- a/conformance/results/pycroscope/dataclasses_postinit.toml +++ b/conformance/results/pycroscope/dataclasses_postinit.toml @@ -1,9 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 19: Expected 1 errors -Line 28: Expected 1 errors -Line 29: Expected 1 errors -Line 36: Expected 1 errors """ output = """ +./dataclasses_postinit.py:19:4: Dataclass __post_init__ is incompatible with InitVar fields [incompatible_override] +./dataclasses_postinit.py:28:6: ./dataclasses_postinit.py.DC1 has no attribute 'x' [undefined_attribute] +./dataclasses_postinit.py:29:6: ./dataclasses_postinit.py.DC1 has no attribute 'y' [undefined_attribute] +./dataclasses_postinit.py:36:4: Dataclass __post_init__ is incompatible with InitVar fields [incompatible_override] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_meta.toml b/conformance/results/pycroscope/dataclasses_transform_meta.toml index badddc364..340630a39 100644 --- a/conformance/results/pycroscope/dataclasses_transform_meta.toml +++ b/conformance/results/pycroscope/dataclasses_transform_meta.toml @@ -1,9 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 43: Unexpected errors ['./dataclasses_transform_meta.py:43:0: Frozen dataclass cannot inherit from a non-frozen dataclass [invalid_base]'] """ output = """ -./dataclasses_transform_meta.py:43:0: Frozen dataclass cannot inherit from a non-frozen dataclass [invalid_base] ./dataclasses_transform_meta.py:51:0: Non-frozen dataclass cannot inherit from a frozen dataclass [invalid_base] ./dataclasses_transform_meta.py:63:0: Dataclass is frozen [incompatible_assignment] ./dataclasses_transform_meta.py:66:7: Missing required argument 'id' [incompatible_call] diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 078e7fc7f..a2ae73346 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -12,7 +12,8 @@ Line 41: Unexpected errors ["./dataclasses_usage.py:41:6: ./dataclasses_usage.py Line 42: Unexpected errors ["./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute]"] Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute]"] Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] -Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[explicit] is not equivalent to str'] +Line 191: Unexpected errors ['./dataclasses_usage.py:191:4: Value of prop_2 incompatible with base class ./dataclasses_usage.py.DC14 [incompatible_override]'] +Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] Line 198: Unexpected errors ["./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str"] Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment]"] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17', './dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call]'] @@ -33,7 +34,8 @@ output = """ ./dataclasses_usage.py:127:0: Takes 1 positional arguments but 2 were given [incompatible_call] ./dataclasses_usage.py:130:0: Missing required argument 'y' [incompatible_call] ./dataclasses_usage.py:179:0: Missing required argument 'x_squared' [incompatible_call] -./dataclasses_usage.py:196:12: Any[explicit] is not equivalent to str +./dataclasses_usage.py:191:4: Value of prop_2 incompatible with base class ./dataclasses_usage.py.DC14 [incompatible_override] +./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str ./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 8541b1a40..590cfac72 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -9,14 +9,12 @@ 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 99: Unexpected errors ["./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute]"] +Line 98: Expected 1 errors Line 119: Unexpected errors ["./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 (Protocol with members 'foo') but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument]"] """ output = """ -./directives_deprecated.py:58:0: Annotated[./directives_deprecated.py.Invocable, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=AnyValue(source=))] is not callable [not_callable] ./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] -./directives_deprecated.py:98:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'foo' [undefined_attribute] -./directives_deprecated.py:99:4: ./directives_deprecated.py.SupportsFoo1 has no attribute 'bar' [undefined_attribute] ./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 (Protocol with members 'foo') but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index c7556bdd5..5848ccccd 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -1,14 +1,13 @@ conformance_automated = "Fail" errors_diff = """ Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] -Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA', "./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute]"] -Line 38: Unexpected errors ["./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[~SelfT] has no attribute 'method1' [undefined_attribute]"] +Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA'] +Line 38: Unexpected errors ['./generics_self_advanced.py:38:20: classmethod[./generics_self_advanced.py.ParentB, () -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT]'] """ output = """ ./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA -./generics_self_advanced.py:19:12: Any[error] is not equivalent to ./generics_self_advanced.py.ChildA -./generics_self_advanced.py:19:12: ./generics_self_advanced.py.ChildA has no attribute 'prop1' [undefined_attribute] -./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[~SelfT] has no attribute 'method1' [undefined_attribute] +./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA +./generics_self_advanced.py:38:20: classmethod[./generics_self_advanced.py.ParentB, () -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 6ba784f36..f91f7f0a4 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,28 +2,17 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors -Line 51: Unexpected errors ['./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape'] -Line 52: Unexpected errors ['./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle', "./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute]"] Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] -Line 75: Unexpected errors ['./generics_self_basic.py:75:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[int]', "./generics_self_basic.py:75:16: ./generics_self_basic.py.Container[int] has no attribute 'set_value' [undefined_attribute]"] -Line 76: Unexpected errors ['./generics_self_basic.py:76:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[str]', "./generics_self_basic.py:76:16: ./generics_self_basic.py.Container[str] has no attribute 'set_value' [undefined_attribute]"] Line 83: Unexpected errors ["./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T]'] """ output = """ -./generics_self_basic.py:51:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Shape -./generics_self_basic.py:52:12: Any[from_another] is not equivalent to ./generics_self_basic.py.Circle -./generics_self_basic.py:52:12: ./generics_self_basic.py.Circle has no attribute 'set_scale' [undefined_attribute] ./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape ./generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle ./generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] -./generics_self_basic.py:75:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[int] -./generics_self_basic.py:75:16: ./generics_self_basic.py.Container[int] has no attribute 'set_value' [undefined_attribute] -./generics_self_basic.py:76:16: Any[from_another] is not equivalent to ./generics_self_basic.py.Container[str] -./generics_self_basic.py:76:16: ./generics_self_basic.py.Container[str] has no attribute 'set_value' [undefined_attribute] ./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute] ./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 66eaaabc7..7e7f3f25b 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -11,8 +11,6 @@ Line 113: Expected 1 errors Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors -Line 93: Unexpected errors ["./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child[~SelfT] has no attribute 'return_concrete_type' [undefined_attribute]"] """ output = """ -./generics_self_usage.py:93:12: ./generics_self_usage.py.Foo3Child[~SelfT] has no attribute 'return_concrete_type' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 0eb5954e1..6987f321b 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -14,7 +14,7 @@ Lines 44, 45: Expected error (tag 'v6') Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] -Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_basic.py:93:34: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_basic.py:93:52: Unpack[] used in unsupported context [invalid_annotation]'] +Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] """ output = """ ./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] @@ -24,7 +24,7 @@ output = """ ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] ./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int] -./generics_typevartuple_basic.py:93:16: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_basic.py:93:34: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_basic.py:93:52: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index 2b9833173..af56e1a50 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,16 +1,18 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Unexpected errors ['./generics_typevartuple_concat.py:26:22: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_concat.py:26:40: Unpack[] used in unsupported context [invalid_annotation]'] -Line 30: Unexpected errors ['./generics_typevartuple_concat.py:30:22: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_concat.py:30:47: Unpack[] used in unsupported context [invalid_annotation]'] -Line 34: Unexpected errors ['./generics_typevartuple_concat.py:34:26: Unpack[] used in unsupported context [invalid_annotation]', './generics_typevartuple_concat.py:34:44: Unpack[] used in unsupported context [invalid_annotation]'] +Line 26: Unexpected errors ['./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 30: Unexpected errors ['./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 34: Unexpected errors ['./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] +Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)]"] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:26:22: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_concat.py:26:40: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_concat.py:30:22: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_concat.py:30:47: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_concat.py:34:26: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_concat.py:34:44: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 8393472a3..a11f4beda 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -5,7 +5,6 @@ Line 110: Expected 1 errors Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors -Line 24: Unexpected errors ['./generics_typevartuple_specialization.py:24:26: Unpack[] used in unsupported context [invalid_annotation]'] Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 47: Unexpected errors ["./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]]"] Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] @@ -13,19 +12,13 @@ Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]]'] Line 72: Unexpected errors ['./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] Line 84: Unexpected errors ['./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 130: Unexpected errors ['./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] -Line 143: Unexpected errors ['./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] -Line 156: Unexpected errors ['./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation]', './generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] -Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str]'] """ output = """ -./generics_typevartuple_specialization.py:24:26: Unpack[] used in unsupported context [invalid_annotation] ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] @@ -34,15 +27,9 @@ output = """ ./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:130:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] ./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] ./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] -./generics_typevartuple_specialization.py:143:13: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] ./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] -./generics_typevartuple_specialization.py:156:23: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:156:54: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:158:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] -./generics_typevartuple_specialization.py:159:16: Any[error] is not equivalent to tuple[*tuple[int, ...], str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index 5772babd5..c986e09a8 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -1,12 +1,8 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors -Line 21: Unexpected errors ['./generics_typevartuple_unpack.py:21:30: Unpack[] used in unsupported context [invalid_annotation]'] -Line 36: Unexpected errors ['./generics_typevartuple_unpack.py:36:29: Unpack[] used in unsupported context [invalid_annotation]'] -Line 44: Unexpected errors ['./generics_typevartuple_unpack.py:44:13: Unpack[] used in unsupported context [invalid_annotation]'] +Line 36: Unexpected errors ['./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] """ output = """ -./generics_typevartuple_unpack.py:21:30: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_unpack.py:36:29: Unpack[] used in unsupported context [invalid_annotation] -./generics_typevartuple_unpack.py:44:13: Unpack[] used in unsupported context [invalid_annotation] +./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index 5ea9b6c26..621056231 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,6 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 106: Expected 1 errors """ output = """ ./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] @@ -14,6 +13,7 @@ output = """ ./namedtuples_define_class.py:69:6: In call to ./namedtuples_define_class.py.Point2: Takes 2 positional arguments but 3 were given [incompatible_call] ./namedtuples_define_class.py:76:4: NamedTuple field names cannot start with an underscore [invalid_annotation] ./namedtuples_define_class.py:86:4: NamedTuple fields without defaults cannot follow fields with defaults [invalid_annotation] +./namedtuples_define_class.py:106:4: Field 'x' conflicts with base NamedTuple field [incompatible_override] ./namedtuples_define_class.py:125:18: Incompatible argument type for value: expected str but got Literal[3.1] [incompatible_argument] ./namedtuples_define_class.py:132:23: NamedTuple classes may only inherit from NamedTuple and Generic [invalid_base] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index b9e2913a1..48ab10e52 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -504,7 +504,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      classes_override Pass @@ -864,7 +864,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_slots
Partial

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

@@ -906,7 +906,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_usage
Pass*

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

@@ -1048,7 +1048,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      namedtuples_define_functional Pass diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 11c517d26..4ed2e39f7 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -5,6 +5,7 @@ from abc import ABC, abstractmethod import json from pathlib import Path +import re import shutil from subprocess import PIPE, CalledProcessError, run import sys @@ -373,6 +374,10 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: "unused_assignment", "--enable", "invalid_literal", + "--enable", + "incompatible_override", + "--enable", + "classvar_type_parameters", ] proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") lines = proc.stderr.splitlines() From 205e11aaa5c87f73d31b99a516e2bb9945afb5e2 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Feb 2026 22:51:29 -0800 Subject: [PATCH 46/78] one more --- conformance/results/pycroscope/dataclasses_hash.toml | 6 +++--- conformance/results/pycroscope/dataclasses_usage.toml | 4 ++-- conformance/results/results.html | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conformance/results/pycroscope/dataclasses_hash.toml b/conformance/results/pycroscope/dataclasses_hash.toml index a7f264ee3..9a3397167 100644 --- a/conformance/results/pycroscope/dataclasses_hash.toml +++ b/conformance/results/pycroscope/dataclasses_hash.toml @@ -1,7 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 15: Expected 1 errors -Line 32: Expected 1 errors """ output = """ +./dataclasses_hash.py:15:0: Incompatible assignment: expected pycroscope.relations.HashableProto (Protocol with members '__hash__'), got .../tests/dataclasses_hash.py.DC1 [incompatible_assignment] +./dataclasses_hash.py:32:0: Incompatible assignment: expected pycroscope.relations.HashableProto (Protocol with members '__hash__'), got .../tests/dataclasses_hash.py.DC3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index a2ae73346..a316d8e3c 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -15,7 +15,7 @@ Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py Line 191: Unexpected errors ['./dataclasses_usage.py:191:4: Value of prop_2 incompatible with base class ./dataclasses_usage.py.DC14 [incompatible_override]'] Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] Line 198: Unexpected errors ["./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str"] -Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment]"] +Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment]"] Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17', './dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call]'] """ output = """ @@ -37,7 +37,7 @@ output = """ ./dataclasses_usage.py:191:4: Value of prop_2 incompatible with base class ./dataclasses_usage.py.DC14 [incompatible_override] ./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str -./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] +./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] ./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 ./dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 48ab10e52..b79effee4 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -829,7 +829,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_inheritance Pass From e93bf9c2475e1eb8c63738fb9798ca561ae7f26c Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 28 Feb 2026 14:51:19 -0800 Subject: [PATCH 47/78] progress --- .../pycroscope/callables_annotation.toml | 20 ++-------- .../pycroscope/callables_protocol.toml | 40 ------------------- .../pycroscope/constructors_call_init.toml | 12 +----- .../pycroscope/constructors_call_new.toml | 10 +---- .../pycroscope/constructors_callable.toml | 2 +- .../results/pycroscope/dataclasses_slots.toml | 12 ++---- .../results/pycroscope/generics_basic.toml | 11 ----- .../results/pycroscope/generics_defaults.toml | 6 --- .../generics_defaults_specialization.toml | 5 +-- .../pycroscope/generics_self_advanced.toml | 2 - .../pycroscope/generics_self_basic.toml | 6 --- .../generics_syntax_infer_variance.toml | 10 +---- .../pycroscope/generics_type_erasure.toml | 10 +---- .../generics_typevartuple_basic.toml | 6 +-- .../pycroscope/protocols_definition.toml | 4 +- .../results/pycroscope/specialtypes_type.toml | 2 +- conformance/results/results.html | 4 +- 17 files changed, 23 insertions(+), 139 deletions(-) diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 2c1c1d2dc..e21310af6 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -1,12 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 148: Unexpected errors ["./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] -Line 150: Unexpected errors ['./callables_annotation.py:150:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got (...) -> None [incompatible_assignment]'] -Line 152: Unexpected errors ["./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment]"] -Line 154: Unexpected errors ["./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment]"] -Line 155: Unexpected errors ["./callables_annotation.py:155:4: Incompatible assignment: expected ./callables_annotation.py.Proto4[Any[explicit]], got ./callables_annotation.py.Proto3 (Protocol with members '__call__') [incompatible_assignment]"] -Line 156: Unexpected errors ["./callables_annotation.py:156:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got ./callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment]"] -Line 157: Unexpected errors ["./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment]"] """ output = """ ./callables_annotation.py:25:4: Missing required positional argument at position 1 [incompatible_call] @@ -14,20 +7,13 @@ output = """ ./callables_annotation.py:27:4: Takes 2 positional arguments but 3 were given [incompatible_call] ./callables_annotation.py:29:4: Missing required positional argument at position 0 [incompatible_call] ./callables_annotation.py:35:4: Takes 0 positional arguments but 1 were given [incompatible_call] -./callables_annotation.py:55:4: Callable requires exactly two arguments [invalid_annotation] +./callables_annotation.py:55:4: Callable[] requires exactly two arguments [invalid_annotation] ./callables_annotation.py:56:4: Invalid arguments to Callable: [invalid_annotation] ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] -./callables_annotation.py:58:4: Callable requires exactly two arguments [invalid_annotation] +./callables_annotation.py:58:4: Callable[] requires exactly two arguments [invalid_annotation] ./callables_annotation.py:59:4: Ellipsis must be used directly in Callable[..., T], not in Callable[[...], T] [invalid_annotation] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] -./callables_annotation.py:148:4: Incompatible assignment: expected ./callables_annotation.py.Proto1 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] -./callables_annotation.py:150:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got (...) -> None [incompatible_assignment] -./callables_annotation.py:152:4: Incompatible assignment: expected ./callables_annotation.py.Proto2 (Protocol with members '__call__'), got (int, /, **Any[explicit]) -> None [incompatible_assignment] -./callables_annotation.py:154:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got (...) -> None [incompatible_assignment] -./callables_annotation.py:155:4: Incompatible assignment: expected ./callables_annotation.py.Proto4[Any[explicit]], got ./callables_annotation.py.Proto3 (Protocol with members '__call__') [incompatible_assignment] -./callables_annotation.py:156:4: Incompatible assignment: expected ./callables_annotation.py.Proto3 (Protocol with members '__call__'), got ./callables_annotation.py.Proto4[Any[explicit]] [incompatible_assignment] -./callables_annotation.py:157:4: Incompatible assignment: expected ./callables_annotation.py.Proto6 (Protocol with members '__call__'), got ./callables_annotation.py.Proto7 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index b08e7ee85..4de460770 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -2,75 +2,35 @@ conformance_automated = "Fail" errors_diff = """ Line 186: Expected 1 errors Line 187: Expected 1 errors -Line 34: Unexpected errors ["./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment]"] -Line 65: Unexpected errors ["./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] -Line 78: Unexpected errors ["./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] -Line 79: Unexpected errors ["./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment]"] -Line 80: Unexpected errors ["./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] -Line 81: Unexpected errors ["./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment]"] -Line 82: Unexpected errors ["./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment]"] -Line 109: Unexpected errors ["./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment]"] Line 135: Unexpected errors ['./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment]', "./callables_protocol.py:135:26: Missing required argument 'self' [incompatible_call]"] Line 144: Unexpected errors ['./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment]', "./callables_protocol.py:144:26: Missing required argument 'self' [incompatible_call]"] -Line 168: Unexpected errors ["./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment]"] Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] Line 204: Unexpected errors ["./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override]"] Line 206: Unexpected errors ["./callables_protocol.py:206:4: Value of __annotations__ incompatible with base class [incompatible_override]"] -Line 216: Unexpected errors ["./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment]"] -Line 236: Unexpected errors ["./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] -Line 237: Unexpected errors ["./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment]"] -Line 258: Unexpected errors ["./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment]"] -Line 259: Unexpected errors ["./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment]"] -Line 283: Unexpected errors ["./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment]"] -Line 286: Unexpected errors ["./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment]"] -Line 287: Unexpected errors ["./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment]"] -Line 310: Unexpected errors ["./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment]"] -Line 312: Unexpected errors ["./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment]"] -Line 313: Unexpected errors ["./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str) -> str [incompatible_assignment]"] """ output = """ -./callables_protocol.py:34:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:36:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...]) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:37:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: str | None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:65:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] ./callables_protocol.py:67:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] ./callables_protocol.py:68:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] ./callables_protocol.py:69:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] ./callables_protocol.py:70:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:78:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:79:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:80:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:81:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:82:0: Incompatible assignment: expected ./callables_protocol.py.Proto3 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] ./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4 (Protocol with members '__call__', 'other_attribute'), got (x: int) -> None [incompatible_assignment] -./callables_protocol.py:109:0: Incompatible assignment: expected ./callables_protocol.py.Proto5 (Protocol with members '__call__'), got (a: int, b: str) -> int [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment] ./callables_protocol.py:135:26: Missing required argument 'self' [incompatible_call] ./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment] ./callables_protocol.py:144:26: Missing required argument 'self' [incompatible_call] -./callables_protocol.py:168:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: Any[explicit]) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute] ./callables_protocol.py:197:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] ./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable] ./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override] ./callables_protocol.py:206:4: Value of __annotations__ incompatible with base class [incompatible_override] -./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment] -./callables_protocol.py:236:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, /, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:237:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, z: None = None) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:258:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit], kwarg1: Any[explicit]) -> None [incompatible_assignment] -./callables_protocol.py:259:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> None [incompatible_assignment] ./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] -./callables_protocol.py:283:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment] ./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment] -./callables_protocol.py:286:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str = Literal['']) -> str [incompatible_assignment] -./callables_protocol.py:287:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_NoDefault (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment] -./callables_protocol.py:310:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment] ./callables_protocol.py:311:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default (Protocol with members '__call__'), got (*, path: str) -> str [incompatible_assignment] -./callables_protocol.py:312:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str = Literal['']) -> str [incompatible_assignment] -./callables_protocol.py:313:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_NoDefault (Protocol with members '__call__'), got (*, path: str) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 16ab71867..a5273767f 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,23 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 21: Expected 1 errors Line 56: Expected 1 errors Line 107: Expected 1 errors -Line 19: Unexpected errors ['./constructors_call_init.py:19:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[int]'] -Line 20: Unexpected errors ['./constructors_call_init.py:20:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[float | int]'] Line 41: Unexpected errors ['./constructors_call_init.py:41:7: Takes 0 positional arguments but 1 were given [incompatible_call]', './constructors_call_init.py:41:0: Takes 0 positional arguments but 1 were given [incompatible_call]'] -Line 73: Unexpected errors ['./constructors_call_init.py:73:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class5[int]'] -Line 92: Unexpected errors ['./constructors_call_init.py:92:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class6[int, str]'] -Line 100: Unexpected errors ['./constructors_call_init.py:100:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class7[str, int]'] """ output = """ -./constructors_call_init.py:19:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[int] -./constructors_call_init.py:20:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class1[float | int] +./constructors_call_init.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] ./constructors_call_init.py:41:7: Takes 0 positional arguments but 1 were given [incompatible_call] ./constructors_call_init.py:41:0: Takes 0 positional arguments but 1 were given [incompatible_call] ./constructors_call_init.py:42:0: Takes 0 positional arguments but 1 were given [incompatible_call] -./constructors_call_init.py:73:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class5[int] -./constructors_call_init.py:92:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class6[int, str] -./constructors_call_init.py:100:12: Any[from_another] is not equivalent to ./constructors_call_init.py.Class7[str, int] ./constructors_call_init.py:130:0: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index f7371f2f0..afc2dbebe 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,18 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 21: Expected 1 errors Line 148: Expected 1 errors -Line 19: Unexpected errors ['./constructors_call_new.py:19:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[int]'] -Line 20: Unexpected errors ['./constructors_call_new.py:20:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[float | int]'] Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error]', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 117: Unexpected errors ['./constructors_call_new.py:117:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[int]]'] -Line 118: Unexpected errors ['./constructors_call_new.py:118:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[str]]'] """ output = """ -./constructors_call_new.py:19:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[int] -./constructors_call_new.py:20:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class1[float | int] +./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] ./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] ./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] @@ -20,6 +14,4 @@ output = """ ./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:117:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[int]] -./constructors_call_new.py:118:12: Any[from_another] is not equivalent to ./constructors_call_new.py.Class8[list[str]] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 731a9eade..c15371e03 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -14,7 +14,7 @@ output = """ ./constructors_callable.py:79:12: Revealed type is '(x: int) -> int' [reveal_type] ./constructors_callable.py:81:0: Missing required argument 'x' [incompatible_call] ./constructors_callable.py:82:0: Missing required argument 'x' [incompatible_call] -./constructors_callable.py:99:12: Revealed type is '(*args: tuple[Any[explicit], ...], **kwargs: dict[str, Any[explicit]]) -> Never' [reveal_type] +./constructors_callable.py:99:12: Revealed type is '(*args: tuple[Any[ellipsis_callable], ...], **kwargs: dict[str, Any[ellipsis_callable]]) -> Never' [reveal_type] ./constructors_callable.py:127:12: Revealed type is '() -> ./constructors_callable.py.Class6Proxy' [reveal_type] ./constructors_callable.py:129:0: Takes 0 positional arguments but 1 were given [incompatible_call] ./constructors_callable.py:144:12: Revealed type is '() -> Any[explicit]' [reveal_type] diff --git a/conformance/results/pycroscope/dataclasses_slots.toml b/conformance/results/pycroscope/dataclasses_slots.toml index e67fd8fc3..888f1600e 100644 --- a/conformance/results/pycroscope/dataclasses_slots.toml +++ b/conformance/results/pycroscope/dataclasses_slots.toml @@ -1,14 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 25: Expected 1 errors -Line 38: Expected 1 errors -Lines 10, 11: Expected error (tag 'DC1') -Line 56: Unexpected errors ["./dataclasses_slots.py:56:0: has no attribute '__slots__' [undefined_attribute]"] -Line 57: Unexpected errors ["./dataclasses_slots.py:57:0: ./dataclasses_slots.py.DC5 has no attribute '__slots__' [undefined_attribute]"] """ output = """ -./dataclasses_slots.py:56:0: has no attribute '__slots__' [undefined_attribute] -./dataclasses_slots.py:57:0: ./dataclasses_slots.py.DC5 has no attribute '__slots__' [undefined_attribute] +./dataclasses_slots.py:11:0: Class cannot define __slots__ when dataclass slots=True [invalid_annotation] +./dataclasses_slots.py:25:8: Cannot assign to attribute 'y'; it is not in __slots__ [incompatible_assignment] +./dataclasses_slots.py:38:8: Cannot assign to attribute 'y'; it is not in __slots__ [incompatible_assignment] ./dataclasses_slots.py:66:0: has no attribute '__slots__' [undefined_attribute] ./dataclasses_slots.py:69:0: ./dataclasses_slots.py.DC6 has no attribute '__slots__' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 5b1a8c73b..cb38a94a7 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -10,10 +10,6 @@ Line 171: Expected 1 errors Line 172: Expected 1 errors Line 208: Expected 1 errors Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] -Line 92: Unexpected errors ["./generics_basic.py:92:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute]", "./generics_basic.py:92:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute]"] -Line 96: Unexpected errors ["./generics_basic.py:96:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute]", "./generics_basic.py:96:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute]"] -Line 97: Unexpected errors ["./generics_basic.py:97:15: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute]"] -Line 100: Unexpected errors ["./generics_basic.py:100:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'logger' [undefined_attribute]", "./generics_basic.py:100:41: ./generics_basic.py.LoggedVar[~T] has no attribute 'name' [undefined_attribute]"] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int'] Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] @@ -26,13 +22,6 @@ output = """ ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:92:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute] -./generics_basic.py:92:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute] -./generics_basic.py:96:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'log' [undefined_attribute] -./generics_basic.py:96:31: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute] -./generics_basic.py:97:15: ./generics_basic.py.LoggedVar[~T] has no attribute 'value' [undefined_attribute] -./generics_basic.py:100:8: ./generics_basic.py.LoggedVar[~T] has no attribute 'logger' [undefined_attribute] -./generics_basic.py:100:41: ./generics_basic.py.LoggedVar[~T] has no attribute 'name' [undefined_attribute] ./generics_basic.py:106:20: Any[from_another] is not equivalent to int ./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index b45d1b3b1..46fedef18 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -9,7 +9,6 @@ Line 30: Unexpected errors ["./generics_defaults.py:30:12: [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] Line 32: Unexpected errors ["./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] Line 38: Unexpected errors ["./generics_defaults.py:38:12: Any[from_another] (partial from [type 'float']) is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]]"] -Line 39: Unexpected errors ['./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool]'] Line 45: Unexpected errors ["./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]]"] Line 47: Unexpected errors ["./generics_defaults.py:47:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] Line 53: Unexpected errors ["./generics_defaults.py:53:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] @@ -17,9 +16,7 @@ Line 56: Unexpected errors ["./generics_defaults.py:56:4: Any[from_another] (p Line 60: Unexpected errors ["./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] Line 64: Unexpected errors ["./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[str, int]]"] -Line 81: Unexpected errors ['./generics_defaults.py:81:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_ParamSpec[bool, bool]'] Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]"] -Line 96: Unexpected errors ['./generics_defaults.py:96:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool]'] Line 156: Unexpected errors ["./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] Line 157: Unexpected errors ["./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] """ @@ -28,7 +25,6 @@ output = """ ./generics_defaults.py:31:12: Any[from_another] (partial from [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] ./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] ./generics_defaults.py:38:12: Any[from_another] (partial from [type 'float']) is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]] -./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool] ./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]] ./generics_defaults.py:47:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] ./generics_defaults.py:53:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] @@ -36,9 +32,7 @@ output = """ ./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] ./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] ./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[str, int]] -./generics_defaults.py:81:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_ParamSpec[bool, bool] ./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] -./generics_defaults.py:96:12: Any[from_another] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] ./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index f87934451..fe951b67b 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -5,14 +5,13 @@ Line 55: Expected 1 errors Line 27: Unexpected errors ['./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool]'] Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]]"] Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str]'] -Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Any[error] is not equivalent to ./generics_defaults_specialization.py.Bar[bool]', "./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar[type 'bool'] (partial from [type 'bool']) is not callable [not_callable]"] +Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool]'] Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str'] """ output = """ ./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool] ./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]] ./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str] -./generics_defaults_specialization.py:47:12: Any[error] is not equivalent to ./generics_defaults_specialization.py.Bar[bool] -./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar[type 'bool'] (partial from [type 'bool']) is not callable [not_callable] +./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool] ./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index 5848ccccd..874cd4097 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -2,12 +2,10 @@ conformance_automated = "Fail" errors_diff = """ Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA'] -Line 38: Unexpected errors ['./generics_self_advanced.py:38:20: classmethod[./generics_self_advanced.py.ParentB, () -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT]'] """ output = """ ./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA ./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA -./generics_self_advanced.py:38:20: classmethod[./generics_self_advanced.py.ParentB, () -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index f91f7f0a4..d26f4d78f 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,16 +2,10 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors -Line 54: Unexpected errors ['./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape', './generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] -Line 55: Unexpected errors ['./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle', './generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable]'] Line 83: Unexpected errors ["./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute]"] Line 84: Unexpected errors ['./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T]'] """ output = """ -./generics_self_basic.py:54:12: Any[error] is not equivalent to ./generics_self_basic.py.Shape -./generics_self_basic.py:54:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] -./generics_self_basic.py:55:12: Any[error] is not equivalent to ./generics_self_basic.py.Circle -./generics_self_basic.py:55:12: classmethod[./generics_self_basic.py.Shape, (config: dict[str, float | int]) -> Any[unannotated], Any[generic_argument]] is not callable [not_callable] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] ./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute] ./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T] diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index d6737d331..d4a2cd1fc 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -8,22 +8,16 @@ Line 112: Expected 1 errors Line 113: Expected 1 errors Line 127: Expected 1 errors Line 128: Expected 1 errors +Line 146: Expected 1 errors Line 165: Expected 1 errors -Line 81: Unexpected errors ["./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5[T] has no attribute '_x' [undefined_attribute]"] -Line 105: Unexpected errors ["./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1[T] has no attribute '_value' [undefined_attribute]"] -Line 121: Unexpected errors ["./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2[T] has no attribute '_value' [undefined_attribute]"] """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected collections.abc.Sequence[int], got collections.abc.Sequence[float | int] [incompatible_assignment] -./generics_syntax_infer_variance.py:81:15: ./generics_syntax_infer_variance.py.ShouldBeCovariant5[T] has no attribute '_x' [undefined_attribute] -./generics_syntax_infer_variance.py:105:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant1[T] has no attribute '_value' [undefined_attribute] -./generics_syntax_infer_variance.py:121:15: ./generics_syntax_infer_variance.py.ShouldBeInvariant2[T] has no attribute '_value' [undefined_attribute] ./generics_syntax_infer_variance.py:135:0: Incompatible assignment: expected dict[float | int, str], got dict[int, str] [incompatible_assignment] ./generics_syntax_infer_variance.py:136:0: Incompatible assignment: expected dict[int, str], got dict[float | int, str] [incompatible_assignment] ./generics_syntax_infer_variance.py:137:0: Incompatible assignment: expected dict[str, float | int], got dict[str, int] [incompatible_assignment] ./generics_syntax_infer_variance.py:138:0: Incompatible assignment: expected dict[str, int], got dict[str, float | int] [incompatible_assignment] -./generics_syntax_infer_variance.py:146:37: ./generics_syntax_infer_variance.py.ShouldBeInvariant4[type 'int'] (partial from [type 'int']) is not callable [not_callable] -./generics_syntax_infer_variance.py:154:37: ./generics_syntax_infer_variance.py.ShouldBeInvariant5[type 'int'] (partial from [type 'int']) is not callable [not_callable] +./generics_syntax_infer_variance.py:154:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant5[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant5[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index 0a3045384..f3b9b4a55 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -1,18 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 38: Expected 1 errors -Line 40: Expected 1 errors Line 42: Expected 1 errors Line 43: Expected 1 errors Line 44: Expected 1 errors Line 45: Expected 1 errors Line 46: Expected 1 errors -Line 33: Unexpected errors ['./generics_type_erasure.py:33:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[int]'] -Line 35: Unexpected errors ['./generics_type_erasure.py:35:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[str]'] -Line 48: Unexpected errors ['./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int'] """ output = """ -./generics_type_erasure.py:33:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[int] -./generics_type_erasure.py:35:12: Any[from_another] is not equivalent to ./generics_type_erasure.py.Node[str] -./generics_type_erasure.py:48:12: Any[from_another] is not equivalent to int +./generics_type_erasure.py:38:15: Incompatible argument type for label: expected int | None but got Literal[''] [incompatible_argument] +./generics_type_erasure.py:40:15: Incompatible argument type for label: expected str | None but got Literal[0] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 6987f321b..5b9af621e 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -11,15 +11,13 @@ Line 99: Expected 1 errors Line 100: Expected 1 errors Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') -Line 28: Unexpected errors ["./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute]"] -Line 57: Unexpected errors ["./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute]"] +Line 57: Unexpected errors ['./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Shape], got tuple[*tuple[Shape, ...]] [incompatible_return_value]'] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] """ output = """ -./generics_typevartuple_basic.py:28:15: ./generics_typevartuple_basic.py.Array has no attribute '_shape' [undefined_attribute] ./generics_typevartuple_basic.py:42:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument] -./generics_typevartuple_basic.py:57:15: ./generics_typevartuple_basic.py.ClassA has no attribute '_shape' [undefined_attribute] +./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Shape], got tuple[*tuple[Shape, ...]] [incompatible_return_value] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 407062516..de6670500 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -15,10 +15,10 @@ Line 289: Expected 1 errors Line 339: Expected 1 errors Line 340: Expected 1 errors Line 341: Expected 1 errors -Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment]"] +Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'temp', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment]"] """ output = """ -./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment] +./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'temp', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment] ./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] ./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] ./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index 23a7304a2..ec197e28b 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -4,7 +4,7 @@ errors_diff = """ output = """ ./specialtypes_type.py:56:6: Incompatible argument type for user_class: expected type[./specialtypes_type.py.BasicUser] | type[./specialtypes_type.py.ProUser] but got [incompatible_argument] ./specialtypes_type.py:70:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Callable] [incompatible_argument] -./specialtypes_type.py:76:11: Type[] takes only one argument [invalid_annotation] +./specialtypes_type.py:76:11: Type[] requires a single argument [invalid_annotation] ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:120:4: type[object] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:143:0: Literal[typing.Type] has no attribute 'unknown' [undefined_attribute] diff --git a/conformance/results/results.html b/conformance/results/results.html index b79effee4..7deed99e5 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -684,7 +684,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Parameter names are lost when resolving ParamSpec

-Unknown +Pass      callables_kwargs
Partial

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

@@ -871,7 +871,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

__slots__ is generated but not checked during attribute assignment

-Unknown +Pass      dataclasses_transform_class Pass From 1ad32dbabdda6b02879b9bfe13f3e0a237ae339d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 28 Feb 2026 19:38:34 -0800 Subject: [PATCH 48/78] progress --- .../pycroscope/aliases_typealiastype.toml | 25 +++++++-------- .../pycroscope/constructors_call_init.toml | 11 +++---- .../pycroscope/constructors_call_new.toml | 10 ++++-- .../pycroscope/constructors_callable.toml | 16 +++++++--- .../dataclasses_transform_field.toml | 12 ++----- .../results/pycroscope/dataclasses_usage.toml | 7 ++-- .../pycroscope/directives_deprecated.toml | 4 +-- .../results/pycroscope/generics_basic.toml | 4 --- .../generics_defaults_specialization.toml | 13 ++++---- .../generics_typevartuple_callable.toml | 4 +-- .../pycroscope/protocols_class_objects.toml | 4 --- .../pycroscope/protocols_definition.toml | 32 +++++++++++++++---- .../pycroscope/protocols_explicit.toml | 2 -- .../pycroscope/protocols_recursive.toml | 2 -- .../pycroscope/protocols_subtyping.toml | 14 ++++---- conformance/results/results.html | 10 +++--- 16 files changed, 86 insertions(+), 84 deletions(-) diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index e51386afd..36507a318 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -1,11 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors Line 52: Expected 1 errors Line 53: Expected 1 errors Line 54: Expected 1 errors @@ -17,15 +11,18 @@ Line 59: Expected 1 errors Line 60: Expected 1 errors Line 61: Expected 1 errors Line 62: Expected 1 errors +Line 63: Expected 1 errors Line 64: Expected 1 errors -Line 66: Expected 1 errors -Line 37: Unexpected errors ['./aliases_typealiastype.py:37:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation]'] -Line 38: Unexpected errors ['./aliases_typealiastype.py:38:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation]'] """ output = """ -./aliases_typealiastype.py:32:6: Literal[GoodAlias1] has no attribute 'other_attrib' [undefined_attribute] -./aliases_typealiastype.py:37:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation] -./aliases_typealiastype.py:38:4: Expected 4 type arguments for type alias, got 5 [invalid_annotation] -./aliases_typealiastype.py:40:4: Expected 4 type arguments for type alias, got 3 [invalid_annotation] -./aliases_typealiastype.py:63:41: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./aliases_typealiastype.py:32:6: int has no attribute 'other_attrib' [undefined_attribute] +./aliases_typealiastype.py:40:4: Type argument int is not compatible with ~TStr: str [invalid_annotation] +./aliases_typealiastype.py:43:0: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] +./aliases_typealiastype.py:44:0: Type alias must declare type parameters in the type statement [invalid_annotation] +./aliases_typealiastype.py:45:56: type_params argument to TypeAliasType must be a literal tuple [invalid_annotation] +./aliases_typealiastype.py:46:0: Type alias BadAlias4 has a circular definition [invalid_annotation] +./aliases_typealiastype.py:47:0: Type alias BadAlias5 has a circular definition [invalid_annotation] +./aliases_typealiastype.py:48:0: Type alias BadAlias6 has a circular definition [invalid_annotation] +./aliases_typealiastype.py:49:0: Type alias BadAlias7 has a circular definition [invalid_annotation] +./aliases_typealiastype.py:66:0: Type alias BadAlias21 has a circular definition [invalid_annotation] """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index a5273767f..c6d013cab 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,13 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 56: Expected 1 errors -Line 107: Expected 1 errors -Line 41: Unexpected errors ['./constructors_call_init.py:41:7: Takes 0 positional arguments but 1 were given [incompatible_call]', './constructors_call_init.py:41:0: Takes 0 positional arguments but 1 were given [incompatible_call]'] """ output = """ ./constructors_call_init.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] -./constructors_call_init.py:41:7: Takes 0 positional arguments but 1 were given [incompatible_call] -./constructors_call_init.py:41:0: Takes 0 positional arguments but 1 were given [incompatible_call] -./constructors_call_init.py:42:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_call_init.py:42:7: Incompatible argument type for x: expected ./constructors_call_init.py.Class3 | None but got ./constructors_call_init.py.Class2[Any[generic_argument]] [incompatible_argument] +./constructors_call_init.py:56:0: Missing required positional argument '%self' [incompatible_call] +./constructors_call_init.py:107:17: Class-scoped type variables are not allowed in __init__ self annotation [invalid_annotation] ./constructors_call_init.py:130:0: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index afc2dbebe..143939c17 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,17 +1,23 @@ conformance_automated = "Fail" errors_diff = """ Line 148: Expected 1 errors +Line 49: Unexpected errors ['./constructors_call_new.py:49:12: ./constructors_call_new.py.Class3 is not equivalent to int', "./constructors_call_new.py:49:12: Missing required argument 'x' [incompatible_call]"] Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] -Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error]', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 89: Unexpected errors ['./constructors_call_new.py:89:12: ./constructors_call_new.py.Class6 is not equivalent to Any[error]', "./constructors_call_new.py:89:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 134: Unexpected errors ['./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment]'] """ output = """ ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] +./constructors_call_new.py:49:12: ./constructors_call_new.py.Class3 is not equivalent to int +./constructors_call_new.py:49:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] ./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never ./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] -./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] +./constructors_call_new.py:89:12: ./constructors_call_new.py.Class6 is not equivalent to Any[error] +./constructors_call_new.py:89:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index c15371e03..004b2e14c 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -1,5 +1,9 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 129: Expected 1 errors +Line 146: Expected 1 errors +Line 128: Unexpected errors ['./constructors_callable.py:128:12: ./constructors_callable.py.Class6 is not equivalent to ./constructors_callable.py.Class6Proxy', "./constructors_callable.py:128:12: Missing required argument 'x' [incompatible_call]"] +Line 145: Unexpected errors ['./constructors_callable.py:145:12: ./constructors_callable.py.Class6Any is not equivalent to Any[explicit]', "./constructors_callable.py:145:12: Missing required argument 'x' [incompatible_call]"] """ output = """ ./constructors_callable.py:36:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class1' [reveal_type] @@ -15,10 +19,12 @@ output = """ ./constructors_callable.py:81:0: Missing required argument 'x' [incompatible_call] ./constructors_callable.py:82:0: Missing required argument 'x' [incompatible_call] ./constructors_callable.py:99:12: Revealed type is '(*args: tuple[Any[ellipsis_callable], ...], **kwargs: dict[str, Any[ellipsis_callable]]) -> Never' [reveal_type] -./constructors_callable.py:127:12: Revealed type is '() -> ./constructors_callable.py.Class6Proxy' [reveal_type] -./constructors_callable.py:129:0: Takes 0 positional arguments but 1 were given [incompatible_call] -./constructors_callable.py:144:12: Revealed type is '() -> Any[explicit]' [reveal_type] -./constructors_callable.py:146:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_callable.py:127:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class6' [reveal_type] +./constructors_callable.py:128:12: ./constructors_callable.py.Class6 is not equivalent to ./constructors_callable.py.Class6Proxy +./constructors_callable.py:128:12: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:144:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class6Any' [reveal_type] +./constructors_callable.py:145:12: ./constructors_callable.py.Class6Any is not equivalent to Any[explicit] +./constructors_callable.py:145:12: Missing required argument 'x' [incompatible_call] ./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T]' [reveal_type] ./constructors_callable.py:184:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class8[~T]' [reveal_type] ./constructors_callable.py:186:0: Cannot resolve type variables [incompatible_call] diff --git a/conformance/results/pycroscope/dataclasses_transform_field.toml b/conformance/results/pycroscope/dataclasses_transform_field.toml index add09d8fc..527ade972 100644 --- a/conformance/results/pycroscope/dataclasses_transform_field.toml +++ b/conformance/results/pycroscope/dataclasses_transform_field.toml @@ -1,13 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 64: Expected 1 errors -Line 59: Unexpected errors ["./dataclasses_transform_field.py:59:0: Missing required argument 'id' [incompatible_call]"] -Line 60: Unexpected errors ["./dataclasses_transform_field.py:60:0: Missing required argument 'id' [incompatible_call]"] -Line 77: Unexpected errors ["./dataclasses_transform_field.py:77:0: Missing required argument 'id' [incompatible_call]"] """ output = """ -./dataclasses_transform_field.py:59:0: Missing required argument 'id' [incompatible_call] -./dataclasses_transform_field.py:60:0: Missing required argument 'id' [incompatible_call] -./dataclasses_transform_field.py:75:0: Missing required argument 'id' [incompatible_call] -./dataclasses_transform_field.py:77:0: Missing required argument 'id' [incompatible_call] +./dataclasses_transform_field.py:64:0: Got an unexpected keyword argument 'id' [incompatible_call] +./dataclasses_transform_field.py:75:0: Missing required argument 'name' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index a316d8e3c..3a886b69d 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -12,11 +12,12 @@ Line 41: Unexpected errors ["./dataclasses_usage.py:41:6: ./dataclasses_usage.py Line 42: Unexpected errors ["./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute]"] Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute]"] Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] +Line 106: Unexpected errors ['./dataclasses_usage.py:106:12: () -> int is not equivalent to (str, /) -> int'] Line 191: Unexpected errors ['./dataclasses_usage.py:191:4: Value of prop_2 incompatible with base class ./dataclasses_usage.py.DC14 [incompatible_override]'] Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] Line 198: Unexpected errors ["./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str"] Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment]"] -Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17', './dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call]'] +Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call]'] """ output = """ ./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute] @@ -31,6 +32,7 @@ output = """ ./dataclasses_usage.py:51:27: Incompatible argument type for unit_price: expected float | int but got Literal['price'] [incompatible_argument] ./dataclasses_usage.py:52:5: Takes 3 positional arguments but 4 were given [incompatible_call] ./dataclasses_usage.py:83:5: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_usage.py:106:12: () -> int is not equivalent to (str, /) -> int ./dataclasses_usage.py:127:0: Takes 1 positional arguments but 2 were given [incompatible_call] ./dataclasses_usage.py:130:0: Missing required argument 'y' [incompatible_call] ./dataclasses_usage.py:179:0: Missing required argument 'x_squared' [incompatible_call] @@ -38,6 +40,5 @@ output = """ ./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str ./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str ./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] -./dataclasses_usage.py:220:12: Any[from_another] is not equivalent to ./dataclasses_usage.py.DC17 -./dataclasses_usage.py:220:12: Takes 0 positional arguments but 1 were given [incompatible_call] +./dataclasses_usage.py:220:12: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 590cfac72..976309e74 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -9,12 +9,10 @@ Line 42: Expected 1 errors Line 44: Expected 1 errors Line 47: Expected 1 errors Line 48: Expected 1 errors -Line 58: Expected 1 errors Line 69: Expected 1 errors Line 98: Expected 1 errors -Line 119: Unexpected errors ["./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 (Protocol with members 'foo') but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument]"] """ output = """ +./directives_deprecated.py:58:0: Annotated[./directives_deprecated.py.Invocable, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=AnyValue(source=))] is not callable [not_callable] ./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] -./directives_deprecated.py:119:8: Incompatible argument type for f: expected ./directives_deprecated.py.SupportsFoo2 (Protocol with members 'foo') but got ./directives_deprecated.py.FooConcrete2 [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index cb38a94a7..5bed7e3cf 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -11,8 +11,6 @@ Line 172: Expected 1 errors Line 208: Expected 1 errors Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] -Line 139: Unexpected errors ['./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int'] -Line 140: Unexpected errors ['./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int'] Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int'] Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int'] """ @@ -23,8 +21,6 @@ output = """ ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:106:20: Any[from_another] is not equivalent to int -./generics_basic.py:139:16: Any[generic_argument] is not equivalent to int -./generics_basic.py:140:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index fe951b67b..05fb5f189 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -4,14 +4,15 @@ Line 30: Expected 1 errors Line 55: Expected 1 errors Line 27: Unexpected errors ['./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool]'] Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]]"] -Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str]'] -Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool]'] -Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str'] +Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[str]'] +Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[bool]'] +Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[error] is not equivalent to str', "./generics_defaults_specialization.py:53:12: ./generics_defaults_specialization.py.Foo has no attribute 'x' [undefined_attribute]"] """ output = """ ./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool] ./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]] -./generics_defaults_specialization.py:46:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[str] -./generics_defaults_specialization.py:47:12: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.Bar[bool] -./generics_defaults_specialization.py:53:12: Any[from_another] is not equivalent to str +./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[str] +./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[bool] +./generics_defaults_specialization.py:53:12: Any[error] is not equivalent to str +./generics_defaults_specialization.py:53:12: ./generics_defaults_specialization.py.Foo has no attribute 'x' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 1c96ea5c6..4c6513993 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,8 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['./generics_typevartuple_callable.py:50:16: tuple[complex | float | int, str, float | int] is not equivalent to tuple[float | int, str, complex | float | int]'] """ output = """ ./generics_typevartuple_callable.py:26:27: Incompatible argument type for args: expected tuple[int, str] but got Literal[('', 0)] [incompatible_argument] -./generics_typevartuple_callable.py:50:16: tuple[complex | float | int, str, float | int] is not equivalent to tuple[float | int, str, complex | float | int] """ diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index cbcbf5f09..381e8989c 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -8,10 +8,6 @@ Line 104: Expected 1 errors Line 106: Expected 1 errors Line 107: Expected 1 errors Line 108: Expected 1 errors -Line 30: Unexpected errors ["./protocols_class_objects.py:30:4: Incompatible argument type for cls: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')] but got [incompatible_argument]"] -Line 35: Unexpected errors ["./protocols_class_objects.py:35:0: Incompatible assignment: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')], got [incompatible_assignment]"] """ output = """ -./protocols_class_objects.py:30:4: Incompatible argument type for cls: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')] but got [incompatible_argument] -./protocols_class_objects.py:35:0: Incompatible assignment: expected type[./protocols_class_objects.py.Proto (Protocol with members 'meth')], got [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index de6670500..4fb9822a7 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -6,16 +6,18 @@ Line 116: Expected 1 errors Line 117: Expected 1 errors Line 157: Expected 1 errors Line 160: Expected 1 errors -Line 218: Expected 1 errors -Line 285: Expected 1 errors -Line 286: Expected 1 errors -Line 287: Expected 1 errors -Line 288: Expected 1 errors Line 289: Expected 1 errors Line 339: Expected 1 errors -Line 340: Expected 1 errors -Line 341: Expected 1 errors Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'temp', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment]"] +Line 213: Unexpected errors ["./protocols_definition.py:213:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment]"] +Line 214: Unexpected errors ["./protocols_definition.py:214:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment]"] +Line 215: Unexpected errors ["./protocols_definition.py:215:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment]"] +Line 216: Unexpected errors ["./protocols_definition.py:216:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Good6 [incompatible_assignment]"] +Line 217: Unexpected errors ["./protocols_definition.py:217:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good7, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment]"] +Line 283: Unexpected errors ["./protocols_definition.py:283:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ='./protocols_definition.py.Concrete5_Good4', literal_only=False), InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment]"] +Line 284: Unexpected errors ["./protocols_definition.py:284:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment]"] +Line 337: Unexpected errors ["./protocols_definition.py:337:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment]"] +Line 338: Unexpected errors ["./protocols_definition.py:338:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment]"] """ output = """ ./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'temp', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment] @@ -24,5 +26,21 @@ output = """ ./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] ./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] +./protocols_definition.py:213:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] +./protocols_definition.py:214:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] +./protocols_definition.py:215:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] +./protocols_definition.py:216:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Good6 [incompatible_assignment] +./protocols_definition.py:217:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good7, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] +./protocols_definition.py:283:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ='./protocols_definition.py.Concrete5_Good4', literal_only=False), InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment] +./protocols_definition.py:284:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment] +./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad1, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=AnyValue(source=)), 'c': SigParameter(name='c', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:337:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] +./protocols_definition.py:338:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete6_Bad2 [incompatible_assignment] +./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=AnyValue(source=))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_explicit.toml b/conformance/results/pycroscope/protocols_explicit.toml index a64a7e5ec..d80bfe872 100644 --- a/conformance/results/pycroscope/protocols_explicit.toml +++ b/conformance/results/pycroscope/protocols_explicit.toml @@ -6,8 +6,6 @@ Line 60: Expected 1 errors Line 89: Expected 1 errors Line 134: Expected 1 errors Line 164: Expected 1 errors -Line 38: Unexpected errors ["./protocols_explicit.py:38:0: Incompatible assignment: expected ./protocols_explicit.py.PColor (Protocol with members 'complex_method', 'draw'), got Annotated[./protocols_explicit.py.NiceColor, HasAttrExtension(attribute_name=KnownValue(val='draw'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment]"] """ output = """ -./protocols_explicit.py:38:0: Incompatible assignment: expected ./protocols_explicit.py.PColor (Protocol with members 'complex_method', 'draw'), got Annotated[./protocols_explicit.py.NiceColor, HasAttrExtension(attribute_name=KnownValue(val='draw'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index 8581de1a3..dd0b0a876 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,9 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 38: Unexpected errors ["./protocols_recursive.py:38:5: Incompatible argument type for graph: expected ./protocols_recursive.py.Traversable (Protocol with members 'leaves') but got ./protocols_recursive.py.Tree[float | int] [incompatible_argument]"] Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] """ output = """ -./protocols_recursive.py:38:5: Incompatible argument type for graph: expected ./protocols_recursive.py.Traversable (Protocol with members 'leaves') but got ./protocols_recursive.py.Tree[float | int] [incompatible_argument] ./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index 892070837..e5cc6c8bc 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -1,14 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 16: Expected 1 errors -Line 79: Expected 1 errors -Line 80: Expected 1 errors -Line 102: Expected 1 errors -Line 103: Expected 1 errors -Line 37: Unexpected errors ["./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment]"] """ output = """ -./protocols_subtyping.py:37:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto2 (Protocol with members 'method1'), got ./protocols_subtyping.py.Concrete2 [incompatible_assignment] +./protocols_subtyping.py:16:5: Cannot instantiate protocol class Proto1 [incompatible_call] ./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] ./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3 (Protocol with members 'method1', 'method2'), got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] +./protocols_subtyping.py:79:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto4[int, float | int], got ./protocols_subtyping.py.Proto5[int] [incompatible_assignment] +./protocols_subtyping.py:80:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto5[float | int], got ./protocols_subtyping.py.Proto4[int, int] [incompatible_assignment] +./protocols_subtyping.py:102:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto7[int, float | int], got ./protocols_subtyping.py.Proto6[float | int, float | int] [incompatible_assignment] +./protocols_subtyping.py:103:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto7[float | int, object], got ./protocols_subtyping.py.Proto6[float | int, float | int] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 7deed99e5..25d808064 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -421,7 +421,7 @@

Python Type System Conformance Test Results

Pass Unknown Pass -Unknown +Pass      generics_typevartuple_concat Pass @@ -667,7 +667,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      protocols_variance Pass @@ -715,7 +715,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      constructors_call_metaclass
Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

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

@@ -743,7 +743,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Converting constructor to callable does not preserve class-scoped type params.

Converting constructor to callable does not substitute Self in __new__

Converting constructor to callable uses __new__ signature instead of __init__

-Pass +Unknown      constructors_consistency
Pass*

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

@@ -892,7 +892,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_transform_func
Partial

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

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

From 5243c1fa5837a2d3aa89f114b473e1c7f1e3e7d1 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 28 Feb 2026 20:10:43 -0800 Subject: [PATCH 49/78] update --- .../pycroscope/callables_protocol.toml | 6 --- .../pycroscope/constructors_call_init.toml | 2 +- .../pycroscope/constructors_call_new.toml | 8 +--- .../pycroscope/constructors_callable.toml | 16 +++----- .../dataclasses_transform_converter.toml | 11 +++++- .../results/pycroscope/dataclasses_usage.toml | 38 +++---------------- .../pycroscope/directives_deprecated.toml | 2 +- .../results/pycroscope/generics_variance.toml | 22 ++--------- conformance/results/results.html | 6 +-- 9 files changed, 29 insertions(+), 82 deletions(-) diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 4de460770..42af9073b 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -2,8 +2,6 @@ conformance_automated = "Fail" errors_diff = """ Line 186: Expected 1 errors Line 187: Expected 1 errors -Line 135: Unexpected errors ['./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment]', "./callables_protocol.py:135:26: Missing required argument 'self' [incompatible_call]"] -Line 144: Unexpected errors ['./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment]', "./callables_protocol.py:144:26: Missing required argument 'self' [incompatible_call]"] Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] Line 204: Unexpected errors ["./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override]"] @@ -19,10 +17,6 @@ output = """ ./callables_protocol.py:70:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] ./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4 (Protocol with members '__call__', 'other_attribute'), got (x: int) -> None [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:135:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment] -./callables_protocol.py:135:26: Missing required argument 'self' [incompatible_call] -./callables_protocol.py:144:0: Incompatible assignment: expected ./callables_protocol.py.Proto7[int, int], got int [incompatible_assignment] -./callables_protocol.py:144:26: Missing required argument 'self' [incompatible_call] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute] ./callables_protocol.py:197:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index c6d013cab..28c24c705 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -6,5 +6,5 @@ output = """ ./constructors_call_init.py:42:7: Incompatible argument type for x: expected ./constructors_call_init.py.Class3 | None but got ./constructors_call_init.py.Class2[Any[generic_argument]] [incompatible_argument] ./constructors_call_init.py:56:0: Missing required positional argument '%self' [incompatible_call] ./constructors_call_init.py:107:17: Class-scoped type variables are not allowed in __init__ self annotation [invalid_annotation] -./constructors_call_init.py:130:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_call_init.py:130:0: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 143939c17..e31811108 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,23 +1,19 @@ conformance_automated = "Fail" errors_diff = """ Line 148: Expected 1 errors -Line 49: Unexpected errors ['./constructors_call_new.py:49:12: ./constructors_call_new.py.Class3 is not equivalent to int', "./constructors_call_new.py:49:12: Missing required argument 'x' [incompatible_call]"] Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] -Line 89: Unexpected errors ['./constructors_call_new.py:89:12: ./constructors_call_new.py.Class6 is not equivalent to Any[error]', "./constructors_call_new.py:89:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error]', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 134: Unexpected errors ['./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment]'] """ output = """ ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] -./constructors_call_new.py:49:12: ./constructors_call_new.py.Class3 is not equivalent to int -./constructors_call_new.py:49:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] ./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never ./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] -./constructors_call_new.py:89:12: ./constructors_call_new.py.Class6 is not equivalent to Any[error] -./constructors_call_new.py:89:12: Missing required argument 'x' [incompatible_call] +./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 004b2e14c..c15371e03 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -1,9 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 129: Expected 1 errors -Line 146: Expected 1 errors -Line 128: Unexpected errors ['./constructors_callable.py:128:12: ./constructors_callable.py.Class6 is not equivalent to ./constructors_callable.py.Class6Proxy', "./constructors_callable.py:128:12: Missing required argument 'x' [incompatible_call]"] -Line 145: Unexpected errors ['./constructors_callable.py:145:12: ./constructors_callable.py.Class6Any is not equivalent to Any[explicit]', "./constructors_callable.py:145:12: Missing required argument 'x' [incompatible_call]"] """ output = """ ./constructors_callable.py:36:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class1' [reveal_type] @@ -19,12 +15,10 @@ output = """ ./constructors_callable.py:81:0: Missing required argument 'x' [incompatible_call] ./constructors_callable.py:82:0: Missing required argument 'x' [incompatible_call] ./constructors_callable.py:99:12: Revealed type is '(*args: tuple[Any[ellipsis_callable], ...], **kwargs: dict[str, Any[ellipsis_callable]]) -> Never' [reveal_type] -./constructors_callable.py:127:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class6' [reveal_type] -./constructors_callable.py:128:12: ./constructors_callable.py.Class6 is not equivalent to ./constructors_callable.py.Class6Proxy -./constructors_callable.py:128:12: Missing required argument 'x' [incompatible_call] -./constructors_callable.py:144:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class6Any' [reveal_type] -./constructors_callable.py:145:12: ./constructors_callable.py.Class6Any is not equivalent to Any[explicit] -./constructors_callable.py:145:12: Missing required argument 'x' [incompatible_call] +./constructors_callable.py:127:12: Revealed type is '() -> ./constructors_callable.py.Class6Proxy' [reveal_type] +./constructors_callable.py:129:0: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_callable.py:144:12: Revealed type is '() -> Any[explicit]' [reveal_type] +./constructors_callable.py:146:0: Takes 0 positional arguments but 1 were given [incompatible_call] ./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T]' [reveal_type] ./constructors_callable.py:184:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class8[~T]' [reveal_type] ./constructors_callable.py:186:0: Cannot resolve type variables [incompatible_call] diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index e8eb89310..237ee1e88 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -5,7 +5,8 @@ Line 112: Unexpected errors ["./dataclasses_transform_converter.py:112:10: Incom Line 114: Unexpected errors ["./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment]"] Line 115: Unexpected errors ["./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment]"] Line 116: Unexpected errors ["./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment]"] -Line 121: Unexpected errors ["./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[~_KT, ~_VT] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument]"] +Line 121: Unexpected errors ["./dataclasses_transform_converter.py:121:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal['f6'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:34: Incompatible argument type for field4: expected int but got Literal['1'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[str, str] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument]"] +Line 132: Unexpected errors ['./dataclasses_transform_converter.py:132:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment]'] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] @@ -33,7 +34,13 @@ output = """ ./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment] ./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment] ./dataclasses_transform_converter.py:119:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[1] [incompatible_assignment] -./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[~_KT, ~_VT] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument] +./dataclasses_transform_converter.py:121:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] +./dataclasses_transform_converter.py:121:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] +./dataclasses_transform_converter.py:121:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] +./dataclasses_transform_converter.py:121:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal['f6'] [incompatible_argument] +./dataclasses_transform_converter.py:121:34: Incompatible argument type for field4: expected int but got Literal['1'] [incompatible_argument] +./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[str, str] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] +./dataclasses_transform_converter.py:132:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 3a886b69d..2bf53f1f8 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -1,44 +1,16 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 88: Expected 1 errors -Lines 58, 60, 61: Expected error (tag 'DC1') -Lines 64, 66, 67: Expected error (tag 'DC2') -Lines 70, 72, 73: Expected error (tag 'DC3') -Line 35: Unexpected errors ["./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute]"] -Line 38: Unexpected errors ["./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute]"] -Line 39: Unexpected errors ["./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute]"] -Line 40: Unexpected errors ["./dataclasses_usage.py:40:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ne__' [undefined_attribute]"] -Line 41: Unexpected errors ["./dataclasses_usage.py:41:6: ./dataclasses_usage.py.InventoryItem has no attribute '__lt__' [undefined_attribute]"] -Line 42: Unexpected errors ["./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute]"] -Line 43: Unexpected errors ["./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute]"] -Line 44: Unexpected errors ["./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute]"] -Line 106: Unexpected errors ['./dataclasses_usage.py:106:12: () -> int is not equivalent to (str, /) -> int'] -Line 191: Unexpected errors ['./dataclasses_usage.py:191:4: Value of prop_2 incompatible with base class ./dataclasses_usage.py.DC14 [incompatible_override]'] -Line 196: Unexpected errors ['./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str'] -Line 198: Unexpected errors ["./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str"] -Line 205: Unexpected errors ["./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment]"] -Line 220: Unexpected errors ['./dataclasses_usage.py:220:12: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call]'] """ output = """ -./dataclasses_usage.py:35:29: ./dataclasses_usage.py.InventoryItem has no attribute '__init__' [undefined_attribute] -./dataclasses_usage.py:38:6: ./dataclasses_usage.py.InventoryItem has no attribute '__repr__' [undefined_attribute] -./dataclasses_usage.py:39:6: ./dataclasses_usage.py.InventoryItem has no attribute '__eq__' [undefined_attribute] -./dataclasses_usage.py:40:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ne__' [undefined_attribute] -./dataclasses_usage.py:41:6: ./dataclasses_usage.py.InventoryItem has no attribute '__lt__' [undefined_attribute] -./dataclasses_usage.py:42:6: ./dataclasses_usage.py.InventoryItem has no attribute '__le__' [undefined_attribute] -./dataclasses_usage.py:43:6: ./dataclasses_usage.py.InventoryItem has no attribute '__gt__' [undefined_attribute] -./dataclasses_usage.py:44:6: ./dataclasses_usage.py.InventoryItem has no attribute '__ge__' [undefined_attribute] ./dataclasses_usage.py:50:5: Missing required argument 'unit_price' [incompatible_call] ./dataclasses_usage.py:51:27: Incompatible argument type for unit_price: expected float | int but got Literal['price'] [incompatible_argument] ./dataclasses_usage.py:52:5: Takes 3 positional arguments but 4 were given [incompatible_call] +./dataclasses_usage.py:58:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_annotation] +./dataclasses_usage.py:64:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_annotation] +./dataclasses_usage.py:70:1: Dataclass fields without defaults cannot follow fields with defaults [invalid_annotation] ./dataclasses_usage.py:83:5: Takes 1 positional arguments but 2 were given [incompatible_call] -./dataclasses_usage.py:106:12: () -> int is not equivalent to (str, /) -> int +./dataclasses_usage.py:88:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment] ./dataclasses_usage.py:127:0: Takes 1 positional arguments but 2 were given [incompatible_call] ./dataclasses_usage.py:130:0: Missing required argument 'y' [incompatible_call] ./dataclasses_usage.py:179:0: Missing required argument 'x_squared' [incompatible_call] -./dataclasses_usage.py:191:4: Value of prop_2 incompatible with base class ./dataclasses_usage.py.DC14 [incompatible_override] -./dataclasses_usage.py:196:12: Any[from_another] is not equivalent to str -./dataclasses_usage.py:198:12: Literal['hello'] is not equivalent to str -./dataclasses_usage.py:205:0: Incompatible assignment: expected ./dataclasses_usage.py.DataclassProto (Protocol with members '__dataclass_fields__'), got Annotated[./dataclasses_usage.py.DC15, HasAttrExtension(attribute_name=KnownValue(val='prop_2'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] -./dataclasses_usage.py:220:12: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 976309e74..4d5a97060 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -9,10 +9,10 @@ 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:58:0: Annotated[./directives_deprecated.py.Invocable, HasAttrExtension(attribute_name=KnownValue(val='__call__'), attribute_type=AnyValue(source=))] is not callable [not_callable] ./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index 99971fa3e..0d0c9e828 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -1,34 +1,18 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 191: Expected 1 errors -Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') -Line 85: Unexpected errors ['./generics_variance.py:85:16: T_co has incompatible variance in base class [invalid_annotation]'] -Line 97: Unexpected errors ['./generics_variance.py:97:20: T_contra has incompatible variance in base class [invalid_annotation]'] -Line 109: Unexpected errors ['./generics_variance.py:109:20: T_contra has incompatible variance in base class [invalid_annotation]'] -Line 121: Unexpected errors ['./generics_variance.py:121:22: T_co has incompatible variance in base class [invalid_annotation]'] -Line 147: Unexpected errors ['./generics_variance.py:147:17: T_contra has incompatible variance in base class [invalid_annotation]'] -Line 151: Unexpected errors ['./generics_variance.py:151:21: T_co has incompatible variance in base class [invalid_annotation]'] -Line 155: Unexpected errors ['./generics_variance.py:155:13: T_co has incompatible variance in base class [invalid_annotation]'] -Line 159: Unexpected errors ['./generics_variance.py:159:17: T_contra has incompatible variance in base class [invalid_annotation]'] """ output = """ ./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] ./generics_variance.py:77:13: T_co has incompatible variance in base class [invalid_annotation] ./generics_variance.py:81:13: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:85:16: T_co has incompatible variance in base class [invalid_annotation] ./generics_variance.py:93:16: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:97:20: T_contra has incompatible variance in base class [invalid_annotation] ./generics_variance.py:105:20: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:109:20: T_contra has incompatible variance in base class [invalid_annotation] ./generics_variance.py:113:20: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:121:22: T_co has incompatible variance in base class [invalid_annotation] ./generics_variance.py:126:4: T_co has incompatible variance in base class [invalid_annotation] ./generics_variance.py:132:4: T_contra has incompatible variance in base class [invalid_annotation] ./generics_variance.py:142:4: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:147:17: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:151:21: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:155:13: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:159:17: T_contra has incompatible variance in base class [invalid_annotation] ./generics_variance.py:163:25: T_contra has incompatible variance in base class [invalid_annotation] ./generics_variance.py:167:29: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:191:32: T_contra has incompatible variance in base class [invalid_annotation] +./generics_variance.py:196:4: T_co has incompatible variance in base class [invalid_annotation] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 25d808064..10c1a3871 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -463,7 +463,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_variance_inference Pass @@ -743,7 +743,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Converting constructor to callable does not preserve class-scoped type params.

Converting constructor to callable does not substitute Self in __new__

Converting constructor to callable uses __new__ signature instead of __init__

-Unknown +Pass      constructors_consistency
Pass*

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

@@ -913,7 +913,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Typed dictionaries From e768b51c0a33405f4be9fc2e4f02de9c1cb87ca7 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 28 Feb 2026 20:46:40 -0800 Subject: [PATCH 50/78] progress --- .../pycroscope/dataclasses_match_args.toml | 10 ++++------ .../results/pycroscope/dataclasses_usage.toml | 2 +- .../generics_typevartuple_basic.toml | 18 +++++++----------- .../generics_typevartuple_concat.toml | 13 ++----------- .../generics_typevartuple_specialization.toml | 4 ---- .../generics_typevartuple_unpack.toml | 2 -- 6 files changed, 14 insertions(+), 35 deletions(-) diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml index 4b8bed1f0..29dddd76d 100644 --- a/conformance/results/pycroscope/dataclasses_match_args.toml +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -1,16 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Literal[('x',)] is not equivalent to tuple[Literal['x']]"] -Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:26:12: has no attribute '__match_args__' [undefined_attribute]"] -Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']]", "./dataclasses_match_args.py:34:12: has no attribute '__match_args__' [undefined_attribute]"] +Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Literal[('x',)] is not equivalent to tuple[Literal['x']]"] +Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Literal[('x',)] is not equivalent to tuple[Literal['x']]"] Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[]'] """ output = """ ./dataclasses_match_args.py:18:12: Literal[('x',)] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:26:12: Any[error] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:26:12: has no attribute '__match_args__' [undefined_attribute] -./dataclasses_match_args.py:34:12: Any[error] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:34:12: has no attribute '__match_args__' [undefined_attribute] +./dataclasses_match_args.py:26:12: Literal[('x',)] is not equivalent to tuple[Literal['x']] +./dataclasses_match_args.py:34:12: Literal[('x',)] is not equivalent to tuple[Literal['x']] ./dataclasses_match_args.py:42:0: has no attribute '__match_args__' [undefined_attribute] ./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[] """ diff --git a/conformance/results/pycroscope/dataclasses_usage.toml b/conformance/results/pycroscope/dataclasses_usage.toml index 2bf53f1f8..cb4f6835f 100644 --- a/conformance/results/pycroscope/dataclasses_usage.toml +++ b/conformance/results/pycroscope/dataclasses_usage.toml @@ -12,5 +12,5 @@ output = """ ./dataclasses_usage.py:88:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment] ./dataclasses_usage.py:127:0: Takes 1 positional arguments but 2 were given [incompatible_call] ./dataclasses_usage.py:130:0: Missing required argument 'y' [incompatible_call] -./dataclasses_usage.py:179:0: Missing required argument 'x_squared' [incompatible_call] +./dataclasses_usage.py:179:0: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 5b9af621e..255996591 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -1,28 +1,24 @@ conformance_automated = "Fail" errors_diff = """ Line 43: Expected 1 errors -Line 52: Expected 1 errors -Line 53: Expected 1 errors -Line 56: Expected 1 errors -Line 59: Expected 1 errors Line 89: Expected 1 errors Line 90: Expected 1 errors Line 99: Expected 1 errors Line 100: Expected 1 errors -Line 106: Expected 1 errors Lines 44, 45: Expected error (tag 'v6') -Line 57: Unexpected errors ['./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Shape], got tuple[*tuple[Shape, ...]] [incompatible_return_value]'] +Line 57: Unexpected errors ['./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Any[error]], got tuple[*tuple[Shape, ...]] [incompatible_return_value]'] Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] -Line 93: Unexpected errors ['./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] """ output = """ ./generics_typevartuple_basic.py:42:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument] -./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Shape], got tuple[*tuple[Shape, ...]] [incompatible_return_value] +./generics_typevartuple_basic.py:52:21: TypeVarTuple must be unpacked [invalid_annotation] +./generics_typevartuple_basic.py:53:30: TypeVarTuple must be unpacked [invalid_annotation] +./generics_typevartuple_basic.py:56:27: TypeVarTuple must be unpacked [invalid_annotation] +./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Any[error]], got tuple[*tuple[Shape, ...]] [incompatible_return_value] +./generics_typevartuple_basic.py:59:17: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] ./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int] -./generics_typevartuple_basic.py:93:16: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_basic.py:93:34: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_basic.py:93:52: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] +./generics_typevartuple_basic.py:106:21: Only one TypeVarTuple can be used in a type parameter list [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index af56e1a50..0bf18b003 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,18 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Unexpected errors ['./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 30: Unexpected errors ['./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 34: Unexpected errors ['./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]', './generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)]"] +Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:16: typing.Generic[Any[generic_argument]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)]"] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:26:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:26:40: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:30:22: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:30:47: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:34:26: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:34:44: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_concat.py:42:16: typing.Generic[Any[error]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)] +./generics_typevartuple_concat.py:42:16: typing.Generic[Any[generic_argument]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index a11f4beda..4613745e6 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -10,8 +10,6 @@ Line 47: Unexpected errors ["./generics_typevartuple_specialization.py:47:16: Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]]'] Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]]'] -Line 72: Unexpected errors ['./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] -Line 84: Unexpected errors ['./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] @@ -24,8 +22,6 @@ output = """ ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]] ./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]] -./generics_typevartuple_specialization.py:72:38: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] -./generics_typevartuple_specialization.py:84:15: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] ./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index c986e09a8..0ad3bee37 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -1,8 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors -Line 36: Unexpected errors ['./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation]'] """ output = """ -./generics_typevartuple_unpack.py:36:29: Unrecognized annotation typing.Unpack[Shape] [invalid_annotation] """ From 489e82bd86c73677e9835a8c5e6a8e8c0148c1f8 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 28 Feb 2026 21:14:30 -0800 Subject: [PATCH 51/78] one more --- conformance/results/pycroscope/callables_protocol.toml | 2 -- .../results/pycroscope/dataclasses_match_args.toml | 10 +--------- conformance/results/pycroscope/protocols_merging.toml | 2 +- conformance/results/results.html | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 42af9073b..dfbbac9ea 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -5,7 +5,6 @@ Line 187: Expected 1 errors Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] Line 204: Unexpected errors ["./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override]"] -Line 206: Unexpected errors ["./callables_protocol.py:206:4: Value of __annotations__ incompatible with base class [incompatible_override]"] """ output = """ ./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] @@ -22,7 +21,6 @@ output = """ ./callables_protocol.py:197:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] ./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable] ./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override] -./callables_protocol.py:206:4: Value of __annotations__ incompatible with base class [incompatible_override] ./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] ./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/dataclasses_match_args.toml b/conformance/results/pycroscope/dataclasses_match_args.toml index 29dddd76d..6b3009b7e 100644 --- a/conformance/results/pycroscope/dataclasses_match_args.toml +++ b/conformance/results/pycroscope/dataclasses_match_args.toml @@ -1,14 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 18: Unexpected errors ["./dataclasses_match_args.py:18:12: Literal[('x',)] is not equivalent to tuple[Literal['x']]"] -Line 26: Unexpected errors ["./dataclasses_match_args.py:26:12: Literal[('x',)] is not equivalent to tuple[Literal['x']]"] -Line 34: Unexpected errors ["./dataclasses_match_args.py:34:12: Literal[('x',)] is not equivalent to tuple[Literal['x']]"] -Line 49: Unexpected errors ['./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[]'] """ output = """ -./dataclasses_match_args.py:18:12: Literal[('x',)] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:26:12: Literal[('x',)] is not equivalent to tuple[Literal['x']] -./dataclasses_match_args.py:34:12: Literal[('x',)] is not equivalent to tuple[Literal['x']] ./dataclasses_match_args.py:42:0: has no attribute '__match_args__' [undefined_attribute] -./dataclasses_match_args.py:49:12: Literal[()] is not equivalent to tuple[] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index df4b0bb50..0cfa0cbc7 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,5 +7,5 @@ output = """ ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 10c1a3871..6539b8fb4 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -850,7 +850,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_order Pass From 3f7118c366fb8063c60dfae316ee2ecf3dd00026 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 1 Mar 2026 10:24:17 -0800 Subject: [PATCH 52/78] update --- .../results/pycroscope/aliases_explicit.toml | 4 +- .../results/pycroscope/aliases_implicit.toml | 4 +- .../pycroscope/callables_protocol.toml | 2 + .../constructors_call_metaclass.toml | 4 +- .../pycroscope/constructors_call_new.toml | 8 ++-- .../results/pycroscope/generics_basic.toml | 4 +- .../results/pycroscope/generics_defaults.toml | 8 ++-- .../generics_defaults_referential.toml | 8 ++-- .../pycroscope/protocols_class_objects.toml | 6 ++- .../pycroscope/protocols_definition.toml | 38 +++++-------------- .../results/pycroscope/protocols_merging.toml | 2 +- conformance/results/results.html | 2 +- 12 files changed, 38 insertions(+), 52 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 77b4f5dfa..49c089a58 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -1,14 +1,13 @@ conformance_automated = "Fail" errors_diff = """ -Line 67: Expected 1 errors Line 70: Expected 1 errors Line 71: Expected 1 errors Line 100: Expected 1 errors -Line 102: Expected 1 errors Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] """ output = """ ./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None +./aliases_explicit.py:67:8: Unrecognized annotation object [invalid_annotation] ./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_explicit.py:79:20: Invalid type annotation [invalid_annotation] @@ -26,4 +25,5 @@ output = """ ./aliases_explicit.py:90:21: Invalid type annotation [invalid_annotation] ./aliases_explicit.py:91:21: Invalid type annotation [invalid_annotation] ./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] +./aliases_explicit.py:102:4: Unrecognized annotation object [invalid_annotation] """ diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index a250b8eda..0a452a836 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 76: Expected 1 errors Line 79: Expected 1 errors Line 80: Expected 1 errors Line 81: Expected 1 errors @@ -11,12 +10,12 @@ Line 113: Expected 1 errors Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors -Line 135: Expected 1 errors Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] """ output = """ ./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None +./aliases_implicit.py:76:8: Unrecognized annotation object [invalid_annotation] ./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:78:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] @@ -28,4 +27,5 @@ output = """ ./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] ./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] ./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] +./aliases_implicit.py:135:4: Unrecognized annotation object [invalid_annotation] """ diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index dfbbac9ea..9b461736e 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -5,6 +5,7 @@ Line 187: Expected 1 errors Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] Line 204: Unexpected errors ["./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override]"] +Line 216: Unexpected errors ["./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment]"] """ output = """ ./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] @@ -21,6 +22,7 @@ output = """ ./callables_protocol.py:197:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] ./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable] ./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override] +./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment] ./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] ./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index 078980127..a442f0d1f 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -1,10 +1,10 @@ conformance_automated = "Fail" errors_diff = """ Line 54: Expected 1 errors -Line 39: Unexpected errors ['./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error]', './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 39: Unexpected errors ['./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error] | int', './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] """ output = """ -./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error] +./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error] | int ./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_metaclass.py:68:0: Missing required argument 'x' [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index e31811108..4e16a701a 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,19 +1,19 @@ conformance_automated = "Fail" errors_diff = """ Line 148: Expected 1 errors -Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] | Any[explicit]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] -Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error]', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] | int', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 134: Unexpected errors ['./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment]'] """ output = """ ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] -./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] +./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] | Any[explicit] ./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never ./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] -./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] +./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] | int ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 5bed7e3cf..af6954eac 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -10,7 +10,7 @@ Line 171: Expected 1 errors Line 172: Expected 1 errors Line 208: Expected 1 errors Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] -Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[from_another] is not equivalent to int'] +Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[generic_argument] is not equivalent to int'] Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int'] Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int'] """ @@ -20,7 +20,7 @@ output = """ ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:106:20: Any[from_another] is not equivalent to int +./generics_basic.py:106:20: Any[generic_argument] is not equivalent to int ./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int ./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 46fedef18..cd8cdb739 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,10 +1,6 @@ conformance_automated = "Fail" errors_diff = """ -Line 24: Expected 1 errors Line 50: Expected 1 errors -Line 107: Expected 1 errors -Line 114: Expected 1 errors -Line 143: Expected 1 errors Line 30: Unexpected errors ["./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] Line 31: Unexpected errors ["./generics_defaults.py:31:12: Any[from_another] (partial from [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] Line 32: Unexpected errors ["./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] @@ -21,6 +17,7 @@ Line 156: Unexpected errors ["./generics_defaults.py:156:12: Any[from_another] Line 157: Unexpected errors ["./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] """ output = """ +./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] ./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] ./generics_defaults.py:31:12: Any[from_another] (partial from [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] ./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] @@ -33,7 +30,10 @@ output = """ ./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] ./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[str, int]] ./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] +./generics_defaults.py:107:11: the bound and default are incompatible [invalid_annotation] +./generics_defaults.py:114:11: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int +./generics_defaults.py:143:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_annotation] ./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] ./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] ./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index 37ab58b57..937a96bd0 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -3,12 +3,10 @@ errors_diff = """ Line 36: Expected 1 errors Line 53: Expected 1 errors Line 60: Expected 1 errors -Line 68: Expected 1 errors -Line 74: Expected 1 errors -Line 78: Expected 1 errors Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]]"] Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None]'] Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str]"] +Line 77: Unexpected errors ['./generics_defaults_referential.py:77:10: TypeVar default must be one of its constraints [invalid_annotation]'] Line 94: Unexpected errors ["./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]]"] Line 95: Unexpected errors ['./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]]'] """ @@ -17,6 +15,10 @@ output = """ ./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None] ./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str] ./generics_defaults_referential.py:37:9: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] +./generics_defaults_referential.py:68:11: the bound and default are incompatible [invalid_annotation] +./generics_defaults_referential.py:74:11: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults_referential.py:77:10: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults_referential.py:78:15: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]] ./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]] """ diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 381e8989c..b4439a9eb 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -5,9 +5,11 @@ Line 34: Expected 1 errors Line 58: Expected 1 errors Line 74: Expected 1 errors Line 104: Expected 1 errors -Line 106: Expected 1 errors Line 107: Expected 1 errors -Line 108: Expected 1 errors +Line 105: Unexpected errors ["./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment]"] """ output = """ +./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment] +./protocols_class_objects.py:106:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] +./protocols_class_objects.py:108:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 4fb9822a7..b31346e10 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -1,46 +1,26 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 30: Expected 1 errors -Line 67: Expected 1 errors -Line 116: Expected 1 errors -Line 117: Expected 1 errors -Line 157: Expected 1 errors -Line 160: Expected 1 errors -Line 289: Expected 1 errors -Line 339: Expected 1 errors -Line 79: Unexpected errors ["./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'temp', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment]"] -Line 213: Unexpected errors ["./protocols_definition.py:213:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment]"] -Line 214: Unexpected errors ["./protocols_definition.py:214:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment]"] -Line 215: Unexpected errors ["./protocols_definition.py:215:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment]"] -Line 216: Unexpected errors ["./protocols_definition.py:216:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Good6 [incompatible_assignment]"] -Line 217: Unexpected errors ["./protocols_definition.py:217:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good7, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment]"] -Line 283: Unexpected errors ["./protocols_definition.py:283:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ='./protocols_definition.py.Concrete5_Good4', literal_only=False), InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment]"] -Line 284: Unexpected errors ["./protocols_definition.py:284:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment]"] -Line 337: Unexpected errors ["./protocols_definition.py:337:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment]"] -Line 338: Unexpected errors ["./protocols_definition.py:338:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment]"] """ output = """ -./protocols_definition.py:79:0: Incompatible assignment: expected ./protocols_definition.py.Template (Protocol with members 'method', 'name', 'temp', 'value'), got ./protocols_definition.py.Concrete [incompatible_assignment] +./protocols_definition.py:30:10: Incompatible argument type for things: expected collections.abc.Iterable[./protocols_definition.py.SupportsClose (Protocol with members 'close')] but got Literal[[1]] [incompatible_argument] +./protocols_definition.py:67:8: Protocol members cannot be defined via assignment to self [invalid_annotation] ./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] ./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] +./protocols_definition.py:116:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] +./protocols_definition.py:117:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] ./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] +./protocols_definition.py:157:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] ./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:213:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:214:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:215:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:216:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Good6 [incompatible_assignment] -./protocols_definition.py:217:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Good7, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./protocols_definition.py:160:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] ./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] -./protocols_definition.py:283:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ='./protocols_definition.py.Concrete5_Good4', literal_only=False), InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment] -./protocols_definition.py:284:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Good5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=GenericValue(typ=, literal_only=False, args=(InputSigValue(input_sig=FullSignature(sig=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))] [incompatible_assignment] ./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad1, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=AnyValue(source=)), 'c': SigParameter(name='c', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:337:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:338:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Good3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete6_Bad2 [incompatible_assignment] ./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=AnyValue(source=))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index 0cfa0cbc7..df4b0bb50 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,5 +7,5 @@ output = """ ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 6539b8fb4..279977ac4 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -611,7 +611,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      protocols_explicit
Pass*

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

From fdcbb9e0b022398af9c021839695cce3d89bd4d0 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 1 Mar 2026 11:42:09 -0800 Subject: [PATCH 53/78] little bit of change --- conformance/results/pycroscope/protocols_class_objects.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index b4439a9eb..3ee2a7f22 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -6,9 +6,13 @@ Line 58: Expected 1 errors Line 74: Expected 1 errors Line 104: Expected 1 errors Line 107: Expected 1 errors +Line 26: Unexpected errors ['./protocols_class_objects.py:26:11: Cannot instantiate protocol class Proto [incompatible_call]'] +Line 36: Unexpected errors ['./protocols_class_objects.py:36:0: Cannot instantiate protocol class Proto [incompatible_call]'] Line 105: Unexpected errors ["./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment]"] """ output = """ +./protocols_class_objects.py:26:11: Cannot instantiate protocol class Proto [incompatible_call] +./protocols_class_objects.py:36:0: Cannot instantiate protocol class Proto [incompatible_call] ./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment] ./protocols_class_objects.py:106:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] ./protocols_class_objects.py:108:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] From 4781f37b749ee7e54c3f2a45dcb256705c524231 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 1 Mar 2026 13:42:57 -0800 Subject: [PATCH 54/78] . --- .../generics_paramspec_specialization.toml | 18 ++++-------------- .../results/pycroscope/protocols_merging.toml | 2 +- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/conformance/results/pycroscope/generics_paramspec_specialization.toml b/conformance/results/pycroscope/generics_paramspec_specialization.toml index 3cd41967f..79916f679 100644 --- a/conformance/results/pycroscope/generics_paramspec_specialization.toml +++ b/conformance/results/pycroscope/generics_paramspec_specialization.toml @@ -1,20 +1,10 @@ conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors -Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 60: Expected 1 errors -Line 61: Expected 1 errors -Line 28: Unexpected errors ["./generics_paramspec_specialization.py:28:14: Unrecognized annotation typing.Concatenate[, ~P2] [invalid_annotation]"] -Line 32: Unexpected errors ["./generics_paramspec_specialization.py:32:14: Invalid type annotation (, ) [invalid_annotation]"] -Line 40: Unexpected errors ['./generics_paramspec_specialization.py:40:14: Invalid type annotation () [invalid_annotation]'] -Line 52: Unexpected errors ["./generics_paramspec_specialization.py:52:14: Invalid type annotation (, , ) [invalid_annotation]"] -Line 58: Unexpected errors ["./generics_paramspec_specialization.py:58:14: Invalid type annotation (, , ) [invalid_annotation]"] """ output = """ -./generics_paramspec_specialization.py:28:14: Unrecognized annotation typing.Concatenate[, ~P2] [invalid_annotation] -./generics_paramspec_specialization.py:32:14: Invalid type annotation (, ) [invalid_annotation] -./generics_paramspec_specialization.py:40:14: Invalid type annotation () [invalid_annotation] -./generics_paramspec_specialization.py:52:14: Invalid type annotation (, , ) [invalid_annotation] -./generics_paramspec_specialization.py:58:14: Invalid type annotation (, , ) [invalid_annotation] +./generics_paramspec_specialization.py:54:8: Incompatible argument type for @0: expected int but got Literal[''] [incompatible_argument] +./generics_paramspec_specialization.py:55:15: Incompatible argument type for @2: expected bool but got Literal[''] [incompatible_argument] +./generics_paramspec_specialization.py:60:8: Incompatible argument type for @0: expected int but got Literal[''] [incompatible_argument] +./generics_paramspec_specialization.py:61:15: Incompatible argument type for @2: expected bool but got Literal[''] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index df4b0bb50..0cfa0cbc7 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,5 +7,5 @@ output = """ ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ From 5ef4094343d99fd4220b63abeee6a6bf07951e22 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 1 Mar 2026 17:26:50 -0800 Subject: [PATCH 55/78] more --- .../pycroscope/dataclasses_descriptors.toml | 18 +---------- .../generics_paramspec_components.toml | 30 +++++++++---------- .../generics_paramspec_specialization.toml | 4 +-- .../pycroscope/protocols_class_objects.toml | 10 +++---- .../results/pycroscope/protocols_merging.toml | 2 +- conformance/results/results.html | 6 ++-- 6 files changed, 26 insertions(+), 44 deletions(-) diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index f86ecb543..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,21 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 35: Unexpected errors ['./dataclasses_descriptors.py:35:10: Incompatible argument type for y: expected ./dataclasses_descriptors.py.Desc1 but got Literal[3] [incompatible_argument]'] -Line 37: Unexpected errors ['./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int'] -Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to list[int]'] -Line 62: Unexpected errors ['./dataclasses_descriptors.py:62:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str]'] -Line 63: Unexpected errors ['./dataclasses_descriptors.py:63:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str]'] -Line 66: Unexpected errors ['./dataclasses_descriptors.py:66:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to int'] -Line 67: Unexpected errors ['./dataclasses_descriptors.py:67:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str'] -Line 68: Unexpected errors ['./dataclasses_descriptors.py:68:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str'] """ output = """ -./dataclasses_descriptors.py:35:10: Incompatible argument type for y: expected ./dataclasses_descriptors.py.Desc1 but got Literal[3] [incompatible_argument] -./dataclasses_descriptors.py:37:12: ./dataclasses_descriptors.py.Desc1 is not equivalent to int -./dataclasses_descriptors.py:61:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to list[int] -./dataclasses_descriptors.py:62:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str] -./dataclasses_descriptors.py:63:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to list[str] -./dataclasses_descriptors.py:66:12: ./dataclasses_descriptors.py.Desc2[int] is not equivalent to int -./dataclasses_descriptors.py:67:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str -./dataclasses_descriptors.py:68:12: ./dataclasses_descriptors.py.Desc2[str] is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_paramspec_components.toml b/conformance/results/pycroscope/generics_paramspec_components.toml index 4657cbdfd..b1fbff4cd 100644 --- a/conformance/results/pycroscope/generics_paramspec_components.toml +++ b/conformance/results/pycroscope/generics_paramspec_components.toml @@ -1,23 +1,23 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 17: Expected 1 errors -Line 23: Expected 1 errors -Line 26: Expected 1 errors -Line 30: Expected 1 errors -Line 35: Expected 1 errors -Line 36: Expected 1 errors -Line 38: Expected 1 errors -Line 51: Expected 1 errors -Line 60: Expected 1 errors -Line 70: Expected 1 errors -Line 82: Unexpected errors ['./generics_paramspec_components.py:82:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument]'] """ output = """ -./generics_paramspec_components.py:20:19: ParamSpec.args must be used on *args, not x [invalid_annotation] +./generics_paramspec_components.py:17:18: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:17:36: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:20:19: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:23:37: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:26:37: ParamSpec.args must be used together with ParamSpec.kwargs [invalid_annotation] +./generics_paramspec_components.py:30:18: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:30:34: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:35:17: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:36:19: ParamSpec cannot be used in this annotation context [invalid_annotation] +./generics_paramspec_components.py:38:19: ParamSpec.args must be used together with ParamSpec.kwargs [invalid_annotation] ./generics_paramspec_components.py:41:22: ParamSpec.kwargs must be used together with ParamSpec.args [invalid_annotation] ./generics_paramspec_components.py:49:8: tuple[object, ...] is not a mapping [incompatible_call] +./generics_paramspec_components.py:51:8: Takes 0 positional arguments but 1 were given [incompatible_call] +./generics_paramspec_components.py:60:37: ParamSpec.args and ParamSpec.kwargs must be adjacent [invalid_annotation] +./generics_paramspec_components.py:70:17: Arguments cannot follow ParamSpec.args [incompatible_call] ./generics_paramspec_components.py:72:8: Missing required positional argument at position 0 [incompatible_call] -./generics_paramspec_components.py:82:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument] -./generics_paramspec_components.py:83:8: Incompatible argument type for args: expected ~P.args but got tuple[] [incompatible_argument] +./generics_paramspec_components.py:83:14: Arguments cannot follow ParamSpec.args [incompatible_call] ./generics_paramspec_components.py:98:0: In call to .../tests/generics_paramspec_components.py.twice: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_paramspec_specialization.toml b/conformance/results/pycroscope/generics_paramspec_specialization.toml index 79916f679..5dd4d8c8c 100644 --- a/conformance/results/pycroscope/generics_paramspec_specialization.toml +++ b/conformance/results/pycroscope/generics_paramspec_specialization.toml @@ -1,8 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 44: Expected 1 errors """ output = """ +./generics_paramspec_specialization.py:44:14: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation] ./generics_paramspec_specialization.py:54:8: Incompatible argument type for @0: expected int but got Literal[''] [incompatible_argument] ./generics_paramspec_specialization.py:55:15: Incompatible argument type for @2: expected bool but got Literal[''] [incompatible_argument] ./generics_paramspec_specialization.py:60:8: Incompatible argument type for @0: expected int but got Literal[''] [incompatible_argument] diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 3ee2a7f22..f3a4a78e8 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -2,18 +2,16 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors Line 34: Expected 1 errors -Line 58: Expected 1 errors -Line 74: Expected 1 errors -Line 104: Expected 1 errors -Line 107: Expected 1 errors Line 26: Unexpected errors ['./protocols_class_objects.py:26:11: Cannot instantiate protocol class Proto [incompatible_call]'] Line 36: Unexpected errors ['./protocols_class_objects.py:36:0: Cannot instantiate protocol class Proto [incompatible_call]'] -Line 105: Unexpected errors ["./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment]"] """ output = """ ./protocols_class_objects.py:26:11: Cannot instantiate protocol class Proto [incompatible_call] ./protocols_class_objects.py:36:0: Cannot instantiate protocol class Proto [incompatible_call] -./protocols_class_objects.py:105:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment] +./protocols_class_objects.py:58:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA1 (Protocol with members 'method1'), got [incompatible_assignment] +./protocols_class_objects.py:74:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoB1 (Protocol with members 'prop1'), got [incompatible_assignment] +./protocols_class_objects.py:104:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] ./protocols_class_objects.py:106:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] +./protocols_class_objects.py:107:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment] ./protocols_class_objects.py:108:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index 0cfa0cbc7..df4b0bb50 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,5 +7,5 @@ output = """ ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 279977ac4..a1757f9d3 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -309,7 +309,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Does not reject usage of args/kwargs for out-of-scope ParamSpec

-Unknown +Pass      generics_paramspec_semantics Pass @@ -323,7 +323,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_scoping Pass @@ -808,7 +808,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

* Assumes descriptor behavior only when field is assigned in class body

* Doesn't allow non-data descriptors or data descriptors with differing `__get__` and `__set__` types

-Unknown +Pass      dataclasses_final
Partial

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

Doesn't support Final nested inside ClassVar.

From aa40aa2869deee5528a769ec4197135374ef414b Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 1 Mar 2026 20:10:57 -0800 Subject: [PATCH 56/78] progress --- .../pycroscope/callables_annotation.toml | 2 +- .../pycroscope/callables_protocol.toml | 38 ++++++------ .../pycroscope/callables_subtyping.toml | 60 +++++++++---------- .../results/pycroscope/classes_classvar.toml | 2 +- .../results/pycroscope/dataclasses_hash.toml | 4 +- .../results/pycroscope/generics_defaults.toml | 16 +++-- .../generics_paramspec_semantics.toml | 6 +- .../pycroscope/generics_self_protocols.toml | 4 +- .../pycroscope/generics_upper_bound.toml | 2 +- .../pycroscope/narrowing_typeguard.toml | 2 +- .../results/pycroscope/narrowing_typeis.toml | 2 +- .../pycroscope/protocols_class_objects.toml | 12 ++-- .../pycroscope/protocols_definition.toml | 40 ++++++------- .../results/pycroscope/protocols_generic.toml | 8 +-- .../results/pycroscope/protocols_merging.toml | 4 +- .../pycroscope/protocols_subtyping.toml | 4 +- conformance/results/results.html | 2 +- 17 files changed, 101 insertions(+), 107 deletions(-) diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index e21310af6..722887a9b 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -14,7 +14,7 @@ output = """ ./callables_annotation.py:59:4: Ellipsis must be used directly in Callable[..., T], not in Callable[[...], T] [invalid_annotation] ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] -./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 (Protocol with members '__call__') [incompatible_assignment] +./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 [incompatible_assignment] ./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] ./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 9b461736e..52b8dc483 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -1,30 +1,26 @@ conformance_automated = "Fail" errors_diff = """ -Line 186: Expected 1 errors Line 187: Expected 1 errors -Line 196: Unexpected errors ["./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute]"] -Line 199: Unexpected errors ['./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable]'] Line 204: Unexpected errors ["./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override]"] -Line 216: Unexpected errors ["./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment]"] +Line 216: Unexpected errors ['./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment]'] """ output = """ -./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:36:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...]) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:37:0: Incompatible assignment: expected ./callables_protocol.py.Proto1 (Protocol with members '__call__'), got (*vals: tuple[bytes, ...], max_len: str | None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:67:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:68:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:69:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:70:0: Incompatible assignment: expected ./callables_protocol.py.Proto2 (Protocol with members '__call__'), got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] -./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4 (Protocol with members '__call__', 'other_attribute'), got (x: int) -> None [incompatible_assignment] +./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:36:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...]) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:37:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_len: str | None) -> list[bytes] [incompatible_assignment] +./callables_protocol.py:67:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:68:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[str, ...], **b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:69:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (*a: tuple[bytes, ...], **b: dict[str, bytes]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:70:0: Incompatible assignment: expected ./callables_protocol.py.Proto2, got (**b: dict[str, str]) -> Any[unannotated] [incompatible_assignment] +./callables_protocol.py:97:0: Incompatible assignment: expected ./callables_protocol.py.Proto4, got (x: int) -> None [incompatible_assignment] ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] -./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8 (Protocol with members '__call__'), got (x: int) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:196:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute' [undefined_attribute] -./callables_protocol.py:197:6: typing.Protocol[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] -./callables_protocol.py:199:0: typing.Protocol[(x: int) -> Any[unannotated], str] is not callable [not_callable] +./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:186:4: Incompatible assignment: expected int, got Literal['str'] [incompatible_assignment] +./callables_protocol.py:197:6: ./callables_protocol.py.Proto9[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] ./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override] -./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10 (Protocol with members '__call__', '__name__', '__qualname__'), got () -> None [incompatible_assignment] -./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11 (Protocol with members '__call__'), got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] -./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12 (Protocol with members '__call__'), got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] -./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default (Protocol with members '__call__'), got (path: str) -> str [incompatible_assignment] -./callables_protocol.py:311:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default (Protocol with members '__call__'), got (*, path: str) -> str [incompatible_assignment] +./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment] +./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] +./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] +./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str) -> str [incompatible_assignment] +./callables_protocol.py:311:0: Incompatible assignment: expected ./callables_protocol.py.Proto14_Default, got (*, path: str) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index a89204bf1..d664d1fdf 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -4,34 +4,34 @@ errors_diff = """ output = """ ./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment] ./callables_subtyping.py:29:4: Incompatible assignment: expected (int, /) -> int, got (float | int, /) -> float | int [incompatible_assignment] -./callables_subtyping.py:51:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:52:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:55:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly2, got .../tests/callables_subtyping.py.KwOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:58:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly2, got .../tests/callables_subtyping.py.PosOnly2 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:82:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs3, got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:85:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.NoArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:86:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.IntArgs3 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:116:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly4, got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:119:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:120:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:122:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrArgs4, got .../tests/callables_subtyping.py.IntArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:124:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs4, got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:125:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.IntStrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:126:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.StrArgs4 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:151:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:154:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:155:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.IntKwargs5 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:187:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly6, got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:190:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:191:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:193:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:195:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:196:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.IntStrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:197:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.StrKwargs6 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:236:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8, got .../tests/callables_subtyping.py.NoX8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8, got .../tests/callables_subtyping.py.NoDefaultArg8 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:273:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArg9, got .../tests/callables_subtyping.py.Overloaded9 (Protocol with members '__call__') [incompatible_assignment] -./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10, got .../tests/callables_subtyping.py.StrArg10 (Protocol with members '__call__') [incompatible_assignment] +./callables_subtyping.py:51:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.PosOnly2 [incompatible_assignment] +./callables_subtyping.py:52:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.KwOnly2 [incompatible_assignment] +./callables_subtyping.py:55:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly2, got .../tests/callables_subtyping.py.KwOnly2 [incompatible_assignment] +./callables_subtyping.py:58:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly2, got .../tests/callables_subtyping.py.PosOnly2 [incompatible_assignment] +./callables_subtyping.py:82:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs3, got .../tests/callables_subtyping.py.NoArgs3 [incompatible_assignment] +./callables_subtyping.py:85:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.NoArgs3 [incompatible_assignment] +./callables_subtyping.py:86:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.IntArgs3 [incompatible_assignment] +./callables_subtyping.py:116:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly4, got .../tests/callables_subtyping.py.IntArgs4 [incompatible_assignment] +./callables_subtyping.py:119:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.StrArgs4 [incompatible_assignment] +./callables_subtyping.py:120:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.IntArgs4 [incompatible_assignment] +./callables_subtyping.py:122:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrArgs4, got .../tests/callables_subtyping.py.IntArgs4 [incompatible_assignment] +./callables_subtyping.py:124:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs4, got .../tests/callables_subtyping.py.StrArgs4 [incompatible_assignment] +./callables_subtyping.py:125:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.IntStrArgs4 [incompatible_assignment] +./callables_subtyping.py:126:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.StrArgs4 [incompatible_assignment] +./callables_subtyping.py:151:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 [incompatible_assignment] +./callables_subtyping.py:154:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 [incompatible_assignment] +./callables_subtyping.py:155:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.IntKwargs5 [incompatible_assignment] +./callables_subtyping.py:187:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly6, got .../tests/callables_subtyping.py.IntKwargs6 [incompatible_assignment] +./callables_subtyping.py:190:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 [incompatible_assignment] +./callables_subtyping.py:191:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 [incompatible_assignment] +./callables_subtyping.py:193:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 [incompatible_assignment] +./callables_subtyping.py:195:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 [incompatible_assignment] +./callables_subtyping.py:196:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.IntStrKwargs6 [incompatible_assignment] +./callables_subtyping.py:197:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.StrKwargs6 [incompatible_assignment] +./callables_subtyping.py:236:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoDefaultArg8 [incompatible_assignment] +./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoX8 [incompatible_assignment] +./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8, got .../tests/callables_subtyping.py.NoX8 [incompatible_assignment] +./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8, got .../tests/callables_subtyping.py.NoDefaultArg8 [incompatible_assignment] +./callables_subtyping.py:273:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArg9, got .../tests/callables_subtyping.py.Overloaded9 [incompatible_assignment] +./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10, got .../tests/callables_subtyping.py.StrArg10 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/classes_classvar.toml b/conformance/results/pycroscope/classes_classvar.toml index 5db7ee5d2..379895af3 100644 --- a/conformance/results/pycroscope/classes_classvar.toml +++ b/conformance/results/pycroscope/classes_classvar.toml @@ -18,5 +18,5 @@ output = """ ./classes_classvar.py:77:7: ClassVar can only be used for assignments in class body [invalid_annotation] ./classes_classvar.py:78:19: ClassVar cannot be used in type aliases [invalid_annotation] ./classes_classvar.py:111:0: Cannot assign to class variable 'stats' via instance [incompatible_assignment] -./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA (Protocol with members 'x', 'y', 'z'), got ./classes_classvar.py.ProtoAImpl [incompatible_assignment] +./classes_classvar.py:140:0: Incompatible assignment: expected ./classes_classvar.py.ProtoA, got ./classes_classvar.py.ProtoAImpl [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_hash.toml b/conformance/results/pycroscope/dataclasses_hash.toml index 9a3397167..010d1818e 100644 --- a/conformance/results/pycroscope/dataclasses_hash.toml +++ b/conformance/results/pycroscope/dataclasses_hash.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./dataclasses_hash.py:15:0: Incompatible assignment: expected pycroscope.relations.HashableProto (Protocol with members '__hash__'), got .../tests/dataclasses_hash.py.DC1 [incompatible_assignment] -./dataclasses_hash.py:32:0: Incompatible assignment: expected pycroscope.relations.HashableProto (Protocol with members '__hash__'), got .../tests/dataclasses_hash.py.DC3 [incompatible_assignment] +./dataclasses_hash.py:15:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got .../tests/dataclasses_hash.py.DC1 [incompatible_assignment] +./dataclasses_hash.py:32:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got .../tests/dataclasses_hash.py.DC3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index cd8cdb739..ab090e313 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -11,10 +11,12 @@ Line 53: Unexpected errors ["./generics_defaults.py:53:4: Any[from_another] (p Line 56: Unexpected errors ["./generics_defaults.py:56:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] Line 60: Unexpected errors ["./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] Line 64: Unexpected errors ["./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] -Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[str, int]]"] +Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[tuple[str, int]]]"] +Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[str, int]]'] +Line 81: Unexpected errors ['./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]]'] Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]"] -Line 156: Unexpected errors ["./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] -Line 157: Unexpected errors ["./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] +Line 156: Unexpected errors ["./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] +Line 157: Unexpected errors ["./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] """ output = """ ./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] @@ -28,14 +30,16 @@ output = """ ./generics_defaults.py:56:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] ./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] ./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[str, int]] +./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[tuple[str, int]]] +./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[str, int]] +./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]] ./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] ./generics_defaults.py:107:11: the bound and default are incompatible [invalid_annotation] ./generics_defaults.py:114:11: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:143:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_annotation] -./generics_defaults.py:156:12: Any[from_another] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] +./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] ./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] -./generics_defaults.py:157:12: Any[from_another] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] +./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] ./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index d13b67ca0..116a4fd27 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -1,15 +1,11 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 82: Unexpected errors ["./generics_paramspec_semantics.py:82:4: Invalid type annotation [] [invalid_annotation]"] -Line 84: Unexpected errors ['./generics_paramspec_semantics.py:84:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> str is not equivalent to (int, /) -> str'] """ output = """ ./generics_paramspec_semantics.py:26:0: Missing required positional argument 'a' [incompatible_call] ./generics_paramspec_semantics.py:27:8: Incompatible argument type for b: expected bool but got Literal['A'] [incompatible_argument] ./generics_paramspec_semantics.py:46:5: Cannot resolve type variables [incompatible_call] ./generics_paramspec_semantics.py:61:0: Cannot resolve type variables [incompatible_call] -./generics_paramspec_semantics.py:82:4: Invalid type annotation [] [invalid_annotation] -./generics_paramspec_semantics.py:84:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> str is not equivalent to (int, /) -> str ./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] ./generics_paramspec_semantics.py:108:0: Incompatible argument type for args: expected tuple[bool, ...] but got tuple[Literal[1]] [incompatible_argument] ./generics_paramspec_semantics.py:120:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] diff --git a/conformance/results/pycroscope/generics_self_protocols.toml b/conformance/results/pycroscope/generics_self_protocols.toml index 1e1cf320f..769807d08 100644 --- a/conformance/results/pycroscope/generics_self_protocols.toml +++ b/conformance/results/pycroscope/generics_self_protocols.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got .../tests/generics_self_protocols.py.BadReturnType [incompatible_argument] -./generics_self_protocols.py:64:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol (Protocol with members 'set_scale') but got .../tests/generics_self_protocols.py.ReturnDifferentClass [incompatible_argument] +./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol but got .../tests/generics_self_protocols.py.BadReturnType [incompatible_argument] +./generics_self_protocols.py:64:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol but got .../tests/generics_self_protocols.py.ReturnDifferentClass [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index 9f6a74e19..9224421f7 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -4,6 +4,6 @@ errors_diff = """ output = """ ./generics_upper_bound.py:24:37: TypeVar bound cannot be parameterized by type variables [invalid_annotation] ./generics_upper_bound.py:44:16: list[int] | set[int] is not equivalent to collections.abc.Collection[int] -./generics_upper_bound.py:52:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized (Protocol with members '__len__') but got Literal[3] [incompatible_argument] +./generics_upper_bound.py:52:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized but got Literal[3] [incompatible_argument] ./generics_upper_bound.py:57:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] """ diff --git a/conformance/results/pycroscope/narrowing_typeguard.toml b/conformance/results/pycroscope/narrowing_typeguard.toml index 812407aab..8ffb21555 100644 --- a/conformance/results/pycroscope/narrowing_typeguard.toml +++ b/conformance/results/pycroscope/narrowing_typeguard.toml @@ -5,5 +5,5 @@ output = """ ./narrowing_typeguard.py:102:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:107:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] -./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected .../tests/narrowing_typeguard.py.CallableStrProto (Protocol with members '__call__') but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] +./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected .../tests/narrowing_typeguard.py.CallableStrProto but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] """ diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml index 9901d1237..cc4cfc782 100644 --- a/conformance/results/pycroscope/narrowing_typeis.toml +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -5,7 +5,7 @@ output = """ ./narrowing_typeis.py:105:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:110:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] -./narrowing_typeis.py:152:25: Incompatible argument type for f: expected .../tests/narrowing_typeis.py.CallableStrProto (Protocol with members '__call__') but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] +./narrowing_typeis.py:152:25: Incompatible argument type for f: expected .../tests/narrowing_typeis.py.CallableStrProto but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] ./narrowing_typeis.py:169:16: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeGuardExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeis' [incompatible_argument] ./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeguard' [incompatible_argument] ./narrowing_typeis.py:191:17: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.bool_typeis' [incompatible_argument] diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index f3a4a78e8..209a38ba7 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -8,10 +8,10 @@ Line 36: Unexpected errors ['./protocols_class_objects.py:36:0: Cannot instantia output = """ ./protocols_class_objects.py:26:11: Cannot instantiate protocol class Proto [incompatible_call] ./protocols_class_objects.py:36:0: Cannot instantiate protocol class Proto [incompatible_call] -./protocols_class_objects.py:58:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA1 (Protocol with members 'method1'), got [incompatible_assignment] -./protocols_class_objects.py:74:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoB1 (Protocol with members 'prop1'), got [incompatible_assignment] -./protocols_class_objects.py:104:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] -./protocols_class_objects.py:106:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] -./protocols_class_objects.py:107:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2 (Protocol with members 'attr1'), got [incompatible_assignment] -./protocols_class_objects.py:108:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1 (Protocol with members 'attr1'), got [incompatible_assignment] +./protocols_class_objects.py:58:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA1, got [incompatible_assignment] +./protocols_class_objects.py:74:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoB1, got [incompatible_assignment] +./protocols_class_objects.py:104:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got [incompatible_assignment] +./protocols_class_objects.py:106:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got [incompatible_assignment] +./protocols_class_objects.py:107:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC2, got [incompatible_assignment] +./protocols_class_objects.py:108:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index b31346e10..8834f7aae 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -2,25 +2,25 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./protocols_definition.py:30:10: Incompatible argument type for things: expected collections.abc.Iterable[./protocols_definition.py.SupportsClose (Protocol with members 'close')] but got Literal[[1]] [incompatible_argument] +./protocols_definition.py:30:10: Incompatible argument type for things: expected collections.abc.Iterable[./protocols_definition.py.SupportsClose] but got Literal[[1]] [incompatible_argument] ./protocols_definition.py:67:8: Protocol members cannot be defined via assignment to self [invalid_annotation] -./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] -./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:116:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:117:0: Incompatible assignment: expected ./protocols_definition.py.Template2 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete2_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] -./protocols_definition.py:157:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] -./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:160:0: Incompatible assignment: expected ./protocols_definition.py.Template3 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete3_Bad5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete4_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] -./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad1, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=AnyValue(source=)), 'c': SigParameter(name='c', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5 (Protocol with members 'method1'), got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] -./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got ./protocols_definition.py.Concrete6_Bad2 [incompatible_assignment] -./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6 (Protocol with members 'val1'), got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=AnyValue(source=))] [incompatible_assignment] +./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] +./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got Annotated[./protocols_definition.py.Concrete2_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] +./protocols_definition.py:116:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got Annotated[./protocols_definition.py.Concrete2_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] +./protocols_definition.py:117:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got Annotated[./protocols_definition.py.Concrete2_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] +./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] +./protocols_definition.py:157:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] +./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] +./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] +./protocols_definition.py:160:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] +./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got Annotated[./protocols_definition.py.Concrete4_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] +./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad1, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=AnyValue(source=)), 'c': SigParameter(name='c', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] +./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got ./protocols_definition.py.Concrete6_Bad2 [incompatible_assignment] +./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=AnyValue(source=))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 77e200f80..8bb814a9e 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -1,18 +1,16 @@ conformance_automated = "Fail" errors_diff = """ -Line 40: Expected 1 errors -Line 145: Expected 1 errors -Line 147: Expected 1 errors -Line 39: Unexpected errors ['./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment]'] Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent'] """ output = """ -./protocols_generic.py:39:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[str, int], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment] +./protocols_generic.py:40:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[int, str], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment] ./protocols_generic.py:44:0: T_co should be invariant [invalid_annotation] ./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] ./protocols_generic.py:66:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[float | int], got .../tests/protocols_generic.py.Sender[int] [incompatible_assignment] ./protocols_generic.py:74:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[float | int], got .../tests/protocols_generic.py.AttrProto[int] [incompatible_assignment] ./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] ./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent +./protocols_generic.py:145:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty2 [incompatible_assignment] ./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] +./protocols_generic.py:147:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty4 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index df4b0bb50..f4e45509c 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1 (Protocol with members '__len__', 'close'), got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:53:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2 (Protocol with members '__len__', 'close'), got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:53:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] diff --git a/conformance/results/pycroscope/protocols_subtyping.toml b/conformance/results/pycroscope/protocols_subtyping.toml index e5cc6c8bc..3e0ba0a35 100644 --- a/conformance/results/pycroscope/protocols_subtyping.toml +++ b/conformance/results/pycroscope/protocols_subtyping.toml @@ -3,8 +3,8 @@ errors_diff = """ """ output = """ ./protocols_subtyping.py:16:5: Cannot instantiate protocol class Proto1 [incompatible_call] -./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] -./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3 (Protocol with members 'method1', 'method2'), got ./protocols_subtyping.py.Proto2 (Protocol with members 'method1') [incompatible_assignment] +./protocols_subtyping.py:38:4: Incompatible assignment: expected ./protocols_subtyping.py.Concrete2, got ./protocols_subtyping.py.Proto2 [incompatible_assignment] +./protocols_subtyping.py:55:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto3, got ./protocols_subtyping.py.Proto2 [incompatible_assignment] ./protocols_subtyping.py:79:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto4[int, float | int], got ./protocols_subtyping.py.Proto5[int] [incompatible_assignment] ./protocols_subtyping.py:80:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto5[float | int], got ./protocols_subtyping.py.Proto4[int, int] [incompatible_assignment] ./protocols_subtyping.py:102:4: Incompatible assignment: expected ./protocols_subtyping.py.Proto7[int, float | int], got ./protocols_subtyping.py.Proto6[float | int, float | int] [incompatible_assignment] diff --git a/conformance/results/results.html b/conformance/results/results.html index a1757f9d3..2c0956d86 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -316,7 +316,7 @@

Python Type System Conformance Test Results

Pass*

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

Pass Pass -Unknown +Pass      generics_paramspec_specialization Pass From 4ce486cfa92374989a2cca3e8fbe506676a331e9 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 1 Mar 2026 22:53:31 -0800 Subject: [PATCH 57/78] one step backwards two steps back --- .../pycroscope/constructors_call_new.toml | 2 - .../pycroscope/generics_base_class.toml | 27 ++----- .../results/pycroscope/generics_basic.toml | 11 ++- .../results/pycroscope/generics_defaults.toml | 81 ++++++++++++------- .../generics_defaults_specialization.toml | 24 +++--- .../pycroscope/generics_self_basic.toml | 4 +- .../generics_syntax_declarations.toml | 2 +- .../generics_syntax_infer_variance.toml | 10 +-- .../generics_typevartuple_args.toml | 2 +- .../generics_typevartuple_basic.toml | 19 +++-- .../generics_typevartuple_callable.toml | 4 +- .../generics_typevartuple_concat.toml | 13 ++- .../generics_typevartuple_specialization.toml | 15 +--- .../generics_typevartuple_unpack.toml | 10 ++- .../pycroscope/namedtuples_define_class.toml | 8 +- .../pycroscope/protocols_definition.toml | 2 +- .../results/pycroscope/protocols_merging.toml | 2 +- .../pycroscope/protocols_recursive.toml | 6 +- conformance/results/pycroscope/version.toml | 2 +- conformance/results/results.html | 8 +- 20 files changed, 140 insertions(+), 112 deletions(-) diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 4e16a701a..716b68bcb 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -4,7 +4,6 @@ Line 148: Expected 1 errors Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] | Any[explicit]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] | int', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] -Line 134: Unexpected errors ['./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment]'] """ output = """ ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] @@ -15,5 +14,4 @@ output = """ ./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] ./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] | int ./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] -./constructors_call_new.py:134:0: Incompatible assignment: expected ./constructors_call_new.py.Class9[int], got ./constructors_call_new.py.Class10 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index c540472cb..75bb4045b 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -1,25 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 29: Expected 1 errors -Line 30: Expected 1 errors -Line 49: Expected 1 errors -Line 61: Expected 1 errors -Line 68: Expected 1 errors -Line 98: Expected 1 errors -Line 24: Unexpected errors ['./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] -Line 25: Unexpected errors ['./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[./generics_base_class.py.Node]] but got ./generics_base_class.py.SymbolTable [incompatible_argument]'] -Line 46: Unexpected errors ['./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool', "./generics_base_class.py:46:16: collections.abc.Iterable[int] has no attribute '__contains__' [undefined_attribute]"] -Line 58: Unexpected errors ['./generics_base_class.py:58:16: Any[generic_argument] is not equivalent to int'] -Line 90: Unexpected errors ['./generics_base_class.py:90:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent1[int, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument]'] -Line 91: Unexpected errors ['./generics_base_class.py:91:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent2[str, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument]'] """ output = """ -./generics_base_class.py:24:15: Incompatible argument type for x: expected dict but got ./generics_base_class.py.SymbolTable [incompatible_argument] -./generics_base_class.py:25:21: Incompatible argument type for x: expected dict[str, list[./generics_base_class.py.Node]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] ./generics_base_class.py:26:25: Incompatible argument type for x: expected dict[str, list[object]] but got ./generics_base_class.py.SymbolTable [incompatible_argument] -./generics_base_class.py:46:16: Any[from_another] is not equivalent to bool -./generics_base_class.py:46:16: collections.abc.Iterable[int] has no attribute '__contains__' [undefined_attribute] -./generics_base_class.py:58:16: Any[generic_argument] is not equivalent to int -./generics_base_class.py:90:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent1[int, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument] -./generics_base_class.py:91:14: Incompatible argument type for x: expected ./generics_base_class.py.Parent2[str, bytes] but got ./generics_base_class.py.Child[int, bytes, str] [incompatible_argument] +./generics_base_class.py:29:10: Generic[...] is valid only as a base class [invalid_annotation] +./generics_base_class.py:30:7: Generic[...] is valid only as a base class [invalid_annotation] +./generics_base_class.py:49:21: Expected 1 type arguments for ./generics_base_class.py.LinkedList [invalid_annotation] +./generics_base_class.py:61:17: Expected 1 type arguments for ./generics_base_class.py.MyDict [invalid_annotation] +./generics_base_class.py:68:24: Type parameter list cannot contain duplicate type variables [invalid_annotation] +./generics_base_class.py:98:31: Inconsistent type variable order in base classes [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index af6954eac..ed31e03fb 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -1,8 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 55: Expected 1 errors -Line 121: Expected 1 errors -Line 157: Expected 1 errors Line 158: Expected 1 errors Line 162: Expected 1 errors Line 163: Expected 1 errors @@ -11,8 +9,7 @@ Line 172: Expected 1 errors Line 208: Expected 1 errors Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[generic_argument] is not equivalent to int'] -Line 154: Unexpected errors ['./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int'] -Line 155: Unexpected errors ['./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int'] +Line 155: Unexpected errors ['./generics_basic.py:155:16: str is not equivalent to int', "./generics_basic.py:155:19: Incompatible argument type for key: expected int but got Literal['key'] [incompatible_argument]"] """ output = """ ./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation] @@ -21,6 +18,8 @@ output = """ ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:106:20: Any[generic_argument] is not equivalent to int -./generics_basic.py:154:16: Any[generic_argument] is not equivalent to int -./generics_basic.py:155:16: Any[generic_argument] is not equivalent to int +./generics_basic.py:121:20: Type parameter list cannot contain duplicate type variables [invalid_annotation] +./generics_basic.py:155:16: str is not equivalent to int +./generics_basic.py:155:19: Incompatible argument type for key: expected int but got Literal['key'] [incompatible_argument] +./generics_basic.py:157:7: Incompatible argument type for key: expected str but got Literal[0] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index ab090e313..b632570df 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,45 +1,68 @@ conformance_automated = "Fail" errors_diff = """ -Line 50: Expected 1 errors Line 30: Unexpected errors ["./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] -Line 31: Unexpected errors ["./generics_defaults.py:31:12: Any[from_another] (partial from [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] -Line 32: Unexpected errors ["./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] -Line 38: Unexpected errors ["./generics_defaults.py:38:12: Any[from_another] (partial from [type 'float']) is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]]"] +Line 31: Unexpected errors ['./generics_defaults.py:31:12: Any[error] is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]', './generics_defaults.py:31:12: Expected 2 type arguments for ./generics_defaults.py.NoNonDefaults [invalid_annotation]'] +Line 32: Unexpected errors ["./generics_defaults.py:32:12: ./generics_defaults.py.NoNonDefaults[str, int] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] +Line 38: Unexpected errors ['./generics_defaults.py:38:12: Any[error] is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]]', './generics_defaults.py:38:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation]'] +Line 39: Unexpected errors ['./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool]', './generics_defaults.py:39:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation]'] Line 45: Unexpected errors ["./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]]"] -Line 47: Unexpected errors ["./generics_defaults.py:47:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] -Line 53: Unexpected errors ["./generics_defaults.py:53:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] -Line 56: Unexpected errors ["./generics_defaults.py:56:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] -Line 60: Unexpected errors ["./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] -Line 64: Unexpected errors ["./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] -Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[tuple[str, int]]]"] -Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[str, int]]'] -Line 81: Unexpected errors ['./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]]'] +Line 47: Unexpected errors ['./generics_defaults.py:47:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:47:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] +Line 53: Unexpected errors ['./generics_defaults.py:53:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:53:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] +Line 56: Unexpected errors ['./generics_defaults.py:56:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:56:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] +Line 60: Unexpected errors ['./generics_defaults.py:60:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:60:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] +Line 64: Unexpected errors ["./generics_defaults.py:64:4: ./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] +Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type", './generics_defaults.py:79:34: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:80:31: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 81: Unexpected errors ['./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]"] -Line 156: Unexpected errors ["./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] -Line 157: Unexpected errors ["./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] +Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error]', './generics_defaults.py:95:34: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation]'] +Line 96: Unexpected errors ['./generics_defaults.py:96:12: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation]', './generics_defaults.py:96:45: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation]'] +Line 156: Unexpected errors ["./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type", './generics_defaults.py:156:33: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation]'] +Line 157: Unexpected errors ['./generics_defaults.py:157:12: Any[error] is not equivalent to type', './generics_defaults.py:157:12: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation]', './generics_defaults.py:157:42: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation]'] +Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int]'] +Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int'] """ output = """ ./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] ./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] -./generics_defaults.py:31:12: Any[from_another] (partial from [type 'str']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] -./generics_defaults.py:32:12: Any[from_another] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] -./generics_defaults.py:38:12: Any[from_another] (partial from [type 'float']) is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]] +./generics_defaults.py:31:12: Any[error] is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] +./generics_defaults.py:31:12: Expected 2 type arguments for ./generics_defaults.py.NoNonDefaults [invalid_annotation] +./generics_defaults.py:32:12: ./generics_defaults.py.NoNonDefaults[str, int] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] +./generics_defaults.py:38:12: Any[error] is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]] +./generics_defaults.py:38:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation] +./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool] +./generics_defaults.py:39:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation] ./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]] -./generics_defaults.py:47:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:53:4: Any[from_another] (partial from [type 'int', type 'complex']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:56:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:60:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:64:4: Any[from_another] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_ParamSpec[tuple[str, int]]] -./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[str, int]] -./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]] +./generics_defaults.py:47:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:47:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] +./generics_defaults.py:50:0: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] +./generics_defaults.py:53:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:53:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] +./generics_defaults.py:56:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:56:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] +./generics_defaults.py:60:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:60:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] +./generics_defaults.py:64:4: ./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] +./generics_defaults.py:79:12: is not equivalent to type +./generics_defaults.py:79:34: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] +./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] +./generics_defaults.py:80:31: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] +./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] +./generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] ./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] +./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error] +./generics_defaults.py:95:34: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation] +./generics_defaults.py:96:12: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation] +./generics_defaults.py:96:45: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation] ./generics_defaults.py:107:11: the bound and default are incompatible [invalid_annotation] ./generics_defaults.py:114:11: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:143:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_annotation] -./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] -./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] -./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] -./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation] +./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type +./generics_defaults.py:156:33: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation] +./generics_defaults.py:157:12: Any[error] is not equivalent to type +./generics_defaults.py:157:12: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation] +./generics_defaults.py:157:42: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation] +./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int] +./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index 05fb5f189..93a7cafc1 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -3,16 +3,22 @@ errors_diff = """ Line 30: Expected 1 errors Line 55: Expected 1 errors Line 27: Unexpected errors ['./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool]'] -Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]]"] -Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[str]'] -Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[bool]'] -Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[error] is not equivalent to str', "./generics_defaults_specialization.py:53:12: ./generics_defaults_specialization.py.Foo has no attribute 'x' [undefined_attribute]"] +Line 42: Unexpected errors ['./generics_defaults_specialization.py:42:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation]'] +Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type", './generics_defaults_specialization.py:45:22: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] +Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to Any[error]', './generics_defaults_specialization.py:46:19: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] +Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]', './generics_defaults_specialization.py:47:25: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] +Line 50: Unexpected errors ['./generics_defaults_specialization.py:50:10: Expected 2 type arguments for ./generics_defaults_specialization.py.SubclassMe [invalid_annotation]'] +Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[generic_argument] is not equivalent to str'] """ output = """ ./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool] -./generics_defaults_specialization.py:45:12: is not equivalent to type[./generics_defaults_specialization.py.Bar[str]] -./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[str] -./generics_defaults_specialization.py:47:12: ./generics_defaults_specialization.py.Bar is not equivalent to ./generics_defaults_specialization.py.Bar[bool] -./generics_defaults_specialization.py:53:12: Any[error] is not equivalent to str -./generics_defaults_specialization.py:53:12: ./generics_defaults_specialization.py.Foo has no attribute 'x' [undefined_attribute] +./generics_defaults_specialization.py:42:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] +./generics_defaults_specialization.py:45:12: is not equivalent to type +./generics_defaults_specialization.py:45:22: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] +./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to Any[error] +./generics_defaults_specialization.py:46:19: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] +./generics_defaults_specialization.py:47:12: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] +./generics_defaults_specialization.py:47:25: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] +./generics_defaults_specialization.py:50:10: Expected 2 type arguments for ./generics_defaults_specialization.py.SubclassMe [invalid_annotation] +./generics_defaults_specialization.py:53:12: Any[generic_argument] is not equivalent to str """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index d26f4d78f..8b7d343ea 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,11 +2,11 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors -Line 83: Unexpected errors ["./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute]"] +Line 80: Unexpected errors ['./generics_self_basic.py:80:4: Generic[...] is valid only as a base class [invalid_annotation]'] Line 84: Unexpected errors ['./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T]'] """ output = """ ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] -./generics_self_basic.py:83:10: typing.Generic[~T] has no attribute 'set_value' [undefined_attribute] +./generics_self_basic.py:80:4: Generic[...] is valid only as a base class [invalid_annotation] ./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T] """ diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index 66702195e..113752fb6 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -1,7 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 17: Expected 1 errors -Line 25: Expected 1 errors Line 44: Expected 1 errors Line 60: Expected 1 errors Line 64: Expected 1 errors @@ -11,6 +10,7 @@ Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:17: Undefined """ output = """ ./generics_syntax_declarations.py:21:0: S should be covariant [invalid_annotation] +./generics_syntax_declarations.py:25:0: S should be covariant [invalid_annotation] ./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] ./generics_syntax_declarations.py:39:16: Undefined name: ForwardReference [undefined_name] ./generics_syntax_declarations.py:39:39: Undefined name: ForwardReference [undefined_name] diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index d4a2cd1fc..b00750b87 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,6 +1,7 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors +Line 47: Expected 1 errors Line 56: Expected 1 errors Line 85: Expected 1 errors Line 96: Expected 1 errors @@ -8,16 +9,15 @@ Line 112: Expected 1 errors Line 113: Expected 1 errors Line 127: Expected 1 errors Line 128: Expected 1 errors +Line 135: Expected 1 errors +Line 136: Expected 1 errors +Line 137: Expected 1 errors +Line 138: Expected 1 errors Line 146: Expected 1 errors Line 165: Expected 1 errors """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected collections.abc.Sequence[int], got collections.abc.Sequence[float | int] [incompatible_assignment] -./generics_syntax_infer_variance.py:135:0: Incompatible assignment: expected dict[float | int, str], got dict[int, str] [incompatible_assignment] -./generics_syntax_infer_variance.py:136:0: Incompatible assignment: expected dict[int, str], got dict[float | int, str] [incompatible_assignment] -./generics_syntax_infer_variance.py:137:0: Incompatible assignment: expected dict[str, float | int], got dict[str, int] [incompatible_assignment] -./generics_syntax_infer_variance.py:138:0: Incompatible assignment: expected dict[str, int], got dict[str, float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:154:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant5[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant5[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index f8bfa9279..13dc12072 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -1,6 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 75: Expected 1 errors Line 76: Expected 1 errors """ output = """ @@ -11,4 +10,5 @@ output = """ ./generics_typevartuple_args.py:58:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal[1]] [incompatible_argument] ./generics_typevartuple_args.py:59:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal['']] [incompatible_argument] ./generics_typevartuple_args.py:67:0: In call to .../tests/generics_typevartuple_args.py.func3: Missing required positional argument at position 1 [incompatible_call] +./generics_typevartuple_args.py:75:0: In call to .../tests/generics_typevartuple_args.py.func4: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 255996591..c3afc0ef3 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -1,24 +1,27 @@ conformance_automated = "Fail" errors_diff = """ -Line 43: Expected 1 errors Line 89: Expected 1 errors -Line 90: Expected 1 errors -Line 99: Expected 1 errors Line 100: Expected 1 errors -Lines 44, 45: Expected error (tag 'v6') -Line 57: Unexpected errors ['./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Any[error]], got tuple[*tuple[Shape, ...]] [incompatible_return_value]'] -Line 84: Unexpected errors ['./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int]'] +Line 36: Unexpected errors ['./generics_typevartuple_basic.py:36:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation]'] +Line 37: Unexpected errors ['./generics_typevartuple_basic.py:37:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation]'] +Line 38: Unexpected errors ['./generics_typevartuple_basic.py:38:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation]'] """ output = """ +./generics_typevartuple_basic.py:36:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] +./generics_typevartuple_basic.py:37:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] +./generics_typevartuple_basic.py:38:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] +./generics_typevartuple_basic.py:42:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] ./generics_typevartuple_basic.py:42:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument] +./generics_typevartuple_basic.py:43:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] +./generics_typevartuple_basic.py:44:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] ./generics_typevartuple_basic.py:52:21: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:53:30: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:56:27: TypeVarTuple must be unpacked [invalid_annotation] -./generics_typevartuple_basic.py:57:8: Incompatible return type: expected tuple[Any[error]], got tuple[*tuple[Shape, ...]] [incompatible_return_value] ./generics_typevartuple_basic.py:59:17: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] -./generics_typevartuple_basic.py:84:12: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[int] +./generics_typevartuple_basic.py:90:0: Cannot resolve type variables [incompatible_call] +./generics_typevartuple_basic.py:99:4: Cannot resolve type variables [incompatible_call] ./generics_typevartuple_basic.py:106:21: Only one TypeVarTuple can be used in a type parameter list [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 4c6513993..754595dab 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,6 +1,6 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 26: Expected 1 errors """ output = """ -./generics_typevartuple_callable.py:26:27: Incompatible argument type for args: expected tuple[int, str] but got Literal[('', 0)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index 0bf18b003..e6b8c3830 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,9 +1,14 @@ conformance_automated = "Fail" errors_diff = """ -Line 42: Unexpected errors ["./generics_typevartuple_concat.py:42:16: typing.Generic[Any[generic_argument]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)]"] -Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str]'] +Line 40: Unexpected errors ['./generics_typevartuple_concat.py:40:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation]'] +Line 42: Unexpected errors ['./generics_typevartuple_concat.py:42:16: ./generics_typevartuple_concat.py.Array[Any[generic_argument]] is not equivalent to Any[error]', './generics_typevartuple_concat.py:42:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation]'] +Line 44: Unexpected errors ['./generics_typevartuple_concat.py:44:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation]'] +Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], bool, str] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:42:16: typing.Generic[Any[generic_argument]] is not equivalent to ./generics_typevartuple_concat.py.Array[NewType('Height', int), NewType('Width', int)] -./generics_typevartuple_concat.py:52:12: tuple[Literal[0], *tuple[Any[generic_argument], ...]] is not equivalent to tuple[int, bool, str] +./generics_typevartuple_concat.py:40:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation] +./generics_typevartuple_concat.py:42:16: ./generics_typevartuple_concat.py.Array[Any[generic_argument]] is not equivalent to Any[error] +./generics_typevartuple_concat.py:42:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation] +./generics_typevartuple_concat.py:44:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation] +./generics_typevartuple_concat.py:52:12: tuple[Literal[0], bool, str] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 4613745e6..10a66d39b 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -8,24 +8,15 @@ Line 163: Expected 1 errors Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] Line 47: Unexpected errors ["./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]]"] Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]]'] +Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]]', './generics_typevartuple_specialization.py:52:30: Expected 1 type arguments for ./generics_typevartuple_specialization.py.Array [invalid_annotation]'] Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]]'] -Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] -Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] -Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] -Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] -Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] """ output = """ ./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] ./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]] ./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]] +./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]] +./generics_typevartuple_specialization.py:52:30: Expected 1 type arguments for ./generics_typevartuple_specialization.py.Array [invalid_annotation] ./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]] ./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] -./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] -./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] -./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] -./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index 0ad3bee37..e904e52ef 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -1,6 +1,14 @@ conformance_automated = "Fail" errors_diff = """ -Line 30: Expected 1 errors +Line 28: Unexpected errors ["./generics_typevartuple_unpack.py:28:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] [incompatible_argument]"] +Line 29: Unexpected errors ["./generics_typevartuple_unpack.py:29:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Channels', int)] [incompatible_argument]"] +Line 45: Unexpected errors ["./generics_typevartuple_unpack.py:45:26: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), Any[generic_argument]] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument]"] +Line 46: Unexpected errors ["./generics_typevartuple_unpack.py:46:25: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument]"] """ output = """ +./generics_typevartuple_unpack.py:28:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] [incompatible_argument] +./generics_typevartuple_unpack.py:29:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Channels', int)] [incompatible_argument] +./generics_typevartuple_unpack.py:30:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int)] [incompatible_argument] +./generics_typevartuple_unpack.py:45:26: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), Any[generic_argument]] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument] +./generics_typevartuple_unpack.py:46:25: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index 621056231..2bdec1325 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,5 +1,8 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 121: Unexpected errors ['./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int]'] +Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int'] +Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int'] """ output = """ ./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] @@ -14,6 +17,9 @@ output = """ ./namedtuples_define_class.py:76:4: NamedTuple field names cannot start with an underscore [invalid_annotation] ./namedtuples_define_class.py:86:4: NamedTuple fields without defaults cannot follow fields with defaults [invalid_annotation] ./namedtuples_define_class.py:106:4: Field 'x' conflicts with base NamedTuple field [incompatible_override] +./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int] +./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int +./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int ./namedtuples_define_class.py:125:18: Incompatible argument type for value: expected str but got Literal[3.1] [incompatible_argument] ./namedtuples_define_class.py:132:23: NamedTuple classes may only inherit from NamedTuple and Generic [invalid_base] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 8834f7aae..50487022b 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -19,7 +19,7 @@ output = """ ./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got ./protocols_definition.py.Concrete6_Bad2 [incompatible_assignment] ./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=AnyValue(source=))] [incompatible_assignment] diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index f4e45509c..fd00e7314 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,5 +7,5 @@ output = """ ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./protocols_merging.py.SCConcrete1', literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index dd0b0a876..48520acdb 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,7 +1,9 @@ conformance_automated = "Fail" errors_diff = """ -Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int]'] +Line 80: Unexpected errors ["./protocols_recursive.py:80:11: Incompatible argument type for x: expected ./protocols_recursive.py.ProtoA[Never, ~T] but got Annotated[./protocols_recursive.py.ImplB, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'value': SigParameter(name='value', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./protocols_recursive.py.ImplA', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_argument]"] +Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[error] is not equivalent to list[int]'] """ output = """ -./protocols_recursive.py:81:12: Any[generic_argument] is not equivalent to list[int] +./protocols_recursive.py:80:11: Incompatible argument type for x: expected ./protocols_recursive.py.ProtoA[Never, ~T] but got Annotated[./protocols_recursive.py.ImplB, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'value': SigParameter(name='value', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./protocols_recursive.py.ImplA', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_argument] +./protocols_recursive.py:81:12: Any[error] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/version.toml b/conformance/results/pycroscope/version.toml index 61502d799..e7d6bf67e 100644 --- a/conformance/results/pycroscope/version.toml +++ b/conformance/results/pycroscope/version.toml @@ -1 +1 @@ -version = "pycroscope 0.2.0" +version = "pycroscope 0.3.0" diff --git a/conformance/results/results.html b/conformance/results/results.html index 2c0956d86..74f6a6b56 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -180,7 +180,7 @@

Python Type System Conformance Test Results

pyrefly 0.54.0
-
pycroscope 0.2.0
+
pycroscope 0.3.0
@@ -267,7 +267,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_basic Pass @@ -421,7 +421,7 @@

Python Type System Conformance Test Results

Pass Unknown Pass -Pass +Unknown      generics_typevartuple_concat Pass @@ -1048,7 +1048,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown      namedtuples_define_functional Pass From f9404494e96ddc187c1af32a731218be92478560 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 3 Mar 2026 21:11:48 -0800 Subject: [PATCH 58/78] progress --- .../results/pycroscope/aliases_explicit.toml | 21 ++++----- .../results/pycroscope/aliases_implicit.toml | 12 +++-- .../results/pycroscope/aliases_recursive.toml | 27 ++++++------ .../pycroscope/aliases_type_statement.toml | 4 +- .../pycroscope/aliases_typealiastype.toml | 4 +- .../pycroscope/callables_annotation.toml | 4 +- .../pycroscope/callables_protocol.toml | 8 +--- .../pycroscope/dataclasses_inheritance.toml | 6 +-- .../dataclasses_transform_converter.toml | 44 +++---------------- .../results/pycroscope/generics_defaults.toml | 23 +++++----- .../generics_defaults_specialization.toml | 4 +- .../pycroscope/generics_self_advanced.toml | 7 ++- .../generics_syntax_declarations.toml | 26 ++++------- .../pycroscope/generics_type_erasure.toml | 12 ++--- .../generics_typevartuple_basic.toml | 14 ++---- .../generics_typevartuple_concat.toml | 7 --- .../generics_typevartuple_specialization.toml | 35 +++++++++------ .../generics_typevartuple_unpack.toml | 12 +---- .../pycroscope/literals_literalstring.toml | 4 +- .../pycroscope/protocols_class_objects.toml | 4 -- .../pycroscope/protocols_explicit.toml | 14 +++--- .../pycroscope/protocols_recursive.toml | 6 +-- .../pycroscope/qualifiers_annotated.toml | 6 +-- .../results/pycroscope/specialtypes_type.toml | 8 ++-- .../pycroscope/tuples_type_compat.toml | 16 +++---- conformance/results/results.html | 22 +++++----- 26 files changed, 139 insertions(+), 211 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index 49c089a58..bcf3bcbd3 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -1,15 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 70: Expected 1 errors -Line 71: Expected 1 errors -Line 100: Expected 1 errors -Line 60: Unexpected errors ['./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] """ output = """ -./aliases_explicit.py:60:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None -./aliases_explicit.py:67:8: Unrecognized annotation object [invalid_annotation] -./aliases_explicit.py:68:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_explicit.py:69:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_explicit.py:67:8: Expected 0 type arguments for type alias, got 1 [invalid_annotation] +./aliases_explicit.py:68:8: Expected 0 type arguments for type alias, got 1 [invalid_annotation] +./aliases_explicit.py:69:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] +./aliases_explicit.py:70:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] +./aliases_explicit.py:71:8: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation] ./aliases_explicit.py:79:20: Invalid type annotation [invalid_annotation] ./aliases_explicit.py:80:20: Unrecognized annotation [invalid_annotation] ./aliases_explicit.py:81:20: Unrecognized annotation tuple[tuple[type 'int', type 'str']] [invalid_annotation] @@ -21,9 +18,9 @@ output = """ ./aliases_explicit.py:87:20: Invalid type annotation 3 [invalid_annotation] ./aliases_explicit.py:88:21: Invalid type annotation True [invalid_annotation] ./aliases_explicit.py:89:21: Invalid type annotation 1 [invalid_annotation] -./aliases_explicit.py:90:21: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_explicit.py:90:21: Invalid type annotation [invalid_annotation] ./aliases_explicit.py:91:21: Invalid type annotation [invalid_annotation] -./aliases_explicit.py:101:5: Literal[list | set] is not callable [not_callable] -./aliases_explicit.py:102:4: Unrecognized annotation object [invalid_annotation] +./aliases_explicit.py:100:4: Expected 0 type arguments for type alias, got 1 [invalid_annotation] +./aliases_explicit.py:101:5: .ListOrSetAlias = list | set is not callable [not_callable] +./aliases_explicit.py:102:4: Expected 0 type arguments for type alias, got 1 [invalid_annotation] """ diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 0a452a836..69972c637 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -1,8 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 79: Expected 1 errors -Line 80: Expected 1 errors -Line 81: Expected 1 errors Line 106: Expected 1 errors Line 111: Expected 1 errors Line 112: Expected 1 errors @@ -10,14 +7,15 @@ Line 113: Expected 1 errors Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors -Line 72: Unexpected errors ['./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] """ output = """ -./aliases_implicit.py:72:16: (**__P: ParamSpecSig(param_spec=~P, default=None)) -> None is not equivalent to (...) -> None ./aliases_implicit.py:76:8: Unrecognized annotation object [invalid_annotation] ./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] -./aliases_implicit.py:78:8: Unrecognized annotation types.GenericAlias [invalid_annotation] +./aliases_implicit.py:78:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] +./aliases_implicit.py:79:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] +./aliases_implicit.py:80:8: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation] +./aliases_implicit.py:81:8: Type argument str is not compatible with ~TFloat: float | int [invalid_annotation] ./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] ./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] @@ -26,6 +24,6 @@ output = """ ./aliases_implicit.py:114:8: Invalid type annotation 3 [invalid_annotation] ./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] ./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] -./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] +./aliases_implicit.py:133:5: Cannot instantiate union [incompatible_call] ./aliases_implicit.py:135:4: Unrecognized annotation object [invalid_annotation] """ diff --git a/conformance/results/pycroscope/aliases_recursive.toml b/conformance/results/pycroscope/aliases_recursive.toml index a26e2d5f5..76161c460 100644 --- a/conformance/results/pycroscope/aliases_recursive.toml +++ b/conformance/results/pycroscope/aliases_recursive.toml @@ -1,19 +1,18 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 69: Expected 1 errors -Line 72: Expected 1 errors -Line 75: Expected 1 errors -Line 62: Unexpected errors ["./aliases_recursive.py:62:0: Incompatible assignment: expected list[list[~T1: (str, int)] | str], got Literal[['hi', 'bye', [''], [['hi']]]] [incompatible_assignment]"] """ output = """ -./aliases_recursive.py:19:0: Incompatible assignment: expected int | str | float | list[int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None, got Literal[{'a': 1, 'b': 3j}] [incompatible_assignment] -./aliases_recursive.py:20:0: Incompatible assignment: expected int | str | float | list[int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, int | str | float | list[.Json = int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, .Json = int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None, got Literal[[2, 3j]] [incompatible_assignment] -./aliases_recursive.py:38:0: Incompatible assignment: expected str | int | tuple[str | int | tuple[.RecursiveTuple = str | int | tuple[.RecursiveTuple, ...], ...], ...], got Literal[(1, ('1', 1), (1, (1, [2])))] [incompatible_assignment] -./aliases_recursive.py:39:0: Incompatible assignment: expected str | int | tuple[str | int | tuple[.RecursiveTuple = str | int | tuple[.RecursiveTuple, ...], ...], ...], got Literal[(1, [1])] [incompatible_assignment] +./aliases_recursive.py:19:0: Incompatible assignment: expected int | str | float | list[int | str | float | list[.Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, .Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None] | dict[str, int | str | float | list[.Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, .Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None] | None, got Literal[{'a': 1, 'b': 3j}] [incompatible_assignment] +./aliases_recursive.py:20:0: Incompatible assignment: expected int | str | float | list[int | str | float | list[.Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, .Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None] | dict[str, int | str | float | list[.Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | dict[str, .Json = int | str | float | list[int | str | float | list[.Json] | dict[str, .Json] | None] | dict[str, int | str | float | list[.Json] | dict[str, .Json] | None] | None] | None] | None, got Literal[[2, 3j]] [incompatible_assignment] +./aliases_recursive.py:38:0: Incompatible assignment: expected str | int | tuple[str | int | tuple[.RecursiveTuple = str | int | tuple[str | int | tuple[.RecursiveTuple, ...], ...], ...], ...], got Literal[(1, ('1', 1), (1, (1, [2])))] [incompatible_assignment] +./aliases_recursive.py:39:0: Incompatible assignment: expected str | int | tuple[str | int | tuple[.RecursiveTuple = str | int | tuple[str | int | tuple[.RecursiveTuple, ...], ...], ...], ...], got Literal[(1, [1])] [incompatible_assignment] ./aliases_recursive.py:39:0: t6 already declared [already_declared] -./aliases_recursive.py:50:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, None.RecursiveMapping]]], got Literal[{'1': [1]}] [incompatible_assignment] -./aliases_recursive.py:51:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, None.RecursiveMapping]]], got Literal[{'1': '1', '2': 1, '3': [1, 2]}] [incompatible_assignment] -./aliases_recursive.py:52:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, None.RecursiveMapping]]], got Literal[{'1': '1', '2': 1, '3': {'0': '0', '1': 1, '2': [1, 2, 3]}}] [incompatible_assignment] -./aliases_recursive.py:62:0: Incompatible assignment: expected list[list[~T1: (str, int)] | str], got Literal[['hi', 'bye', [''], [['hi']]]] [incompatible_assignment] -./aliases_recursive.py:63:0: Incompatible assignment: expected list[list[~T1: (str, int)] | str], got Literal[['hi', [2.4]]] [incompatible_assignment] +./aliases_recursive.py:50:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping]]]], got Literal[{'1': [1]}] [incompatible_assignment] +./aliases_recursive.py:51:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping]]]], got Literal[{'1': '1', '2': 1, '3': [1, 2]}] [incompatible_assignment] +./aliases_recursive.py:52:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping]]]], got Literal[{'1': '1', '2': 1, '3': {'0': '0', '1': 1, '2': [1, 2, 3]}}] [incompatible_assignment] +./aliases_recursive.py:63:0: Incompatible assignment: expected .../tests/aliases_recursive.py.GenericTypeAlias1[str] = list[.../tests/aliases_recursive.py.GenericTypeAlias1[~T1: (str, int)] = list[.../tests/aliases_recursive.py.GenericTypeAlias1[~T1: (str, int)] | ~T1: (str, int)] | ~T1: (str, int)], got Literal[['hi', [2.4]]] [incompatible_assignment] +./aliases_recursive.py:69:0: Incompatible assignment: expected .../tests/aliases_recursive.py.GenericTypeAlias2[str, int] = list[.../tests/aliases_recursive.py.GenericTypeAlias2[~T1: (str, int), ~T2] = list[.../tests/aliases_recursive.py.GenericTypeAlias2[~T1: (str, int), ~T2] | ~T1: (str, int) | ~T2] | ~T1: (str, int) | ~T2], got Literal[[[3, ['hi', 3, [3.4]]], 'hi']] [incompatible_assignment] +./aliases_recursive.py:72:0: Type alias RecursiveUnion has a circular definition [invalid_annotation] +./aliases_recursive.py:75:0: Type alias MutualReference1 has a circular definition [invalid_annotation] +./aliases_recursive.py:75:62: Type alias MutualReference2 has a circular definition [invalid_annotation] """ diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml index c1631e6a6..c26dbbc15 100644 --- a/conformance/results/pycroscope/aliases_type_statement.toml +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -14,9 +14,9 @@ Line 47: Expected 1 errors Line 49: Expected 1 errors """ output = """ -./aliases_type_statement.py:17:0: int has no attribute 'bit_count' [undefined_attribute] +./aliases_type_statement.py:17:0: .GoodAlias1 = int has no attribute 'bit_count' [undefined_attribute] ./aliases_type_statement.py:19:0: .GoodAlias1 = int is not callable [not_callable] -./aliases_type_statement.py:23:6: int has no attribute 'other_attrib' [undefined_attribute] +./aliases_type_statement.py:23:6: .GoodAlias1 = int has no attribute 'other_attrib' [undefined_attribute] ./aliases_type_statement.py:26:17: Type aliases cannot be used as base classes [invalid_base] ./aliases_type_statement.py:31:21: Second argument to "isinstance" cannot be a type alias [incompatible_argument] ./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index 36507a318..248596dd9 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -13,9 +13,11 @@ Line 61: Expected 1 errors Line 62: Expected 1 errors Line 63: Expected 1 errors Line 64: Expected 1 errors +Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Unrecognized annotation [invalid_annotation]"] """ output = """ -./aliases_typealiastype.py:32:6: int has no attribute 'other_attrib' [undefined_attribute] +./aliases_typealiastype.py:32:6: .GoodAlias1 = int has no attribute 'other_attrib' [undefined_attribute] +./aliases_typealiastype.py:39:4: Unrecognized annotation [invalid_annotation] ./aliases_typealiastype.py:40:4: Type argument int is not compatible with ~TStr: str [invalid_annotation] ./aliases_typealiastype.py:43:0: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] ./aliases_typealiastype.py:44:0: Type alias must declare type parameters in the type statement [invalid_annotation] diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index 722887a9b..76bfa8bf8 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -15,7 +15,7 @@ output = """ ./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] ./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 [incompatible_assignment] -./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:172:4: Incompatible assignment: expected (int, /, *tuple[Any[ellipsis_callable], ...], **dict[str, Any[ellipsis_callable]]) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] -./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] +./callables_annotation.py:189:4: Incompatible assignment: expected (str, /, *tuple[Any[ellipsis_callable], ...], **dict[str, Any[ellipsis_callable]]) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index 52b8dc483..dcfa5d07e 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -1,8 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 187: Expected 1 errors -Line 204: Unexpected errors ["./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override]"] -Line 216: Unexpected errors ['./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment]'] """ output = """ ./callables_protocol.py:35:0: Incompatible assignment: expected ./callables_protocol.py.Proto1, got (*vals: tuple[bytes, ...], max_items: int | None) -> list[bytes] [incompatible_assignment] @@ -16,9 +13,8 @@ output = """ ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:186:4: Incompatible assignment: expected int, got Literal['str'] [incompatible_assignment] +./callables_protocol.py:187:4: ./callables_protocol.py.Proto9[ParamSpecSig(param_spec=~P, default=None), +R] has no attribute 'xxx' [undefined_attribute] ./callables_protocol.py:197:6: ./callables_protocol.py.Proto9[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] -./callables_protocol.py:204:4: Value of __module__ incompatible with base class [incompatible_override] -./callables_protocol.py:216:0: Incompatible assignment: expected ./callables_protocol.py.Proto10, got () -> None [incompatible_assignment] ./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] ./callables_protocol.py:284:0: Incompatible assignment: expected ./callables_protocol.py.Proto13_Default, got (path: str) -> str [incompatible_assignment] diff --git a/conformance/results/pycroscope/dataclasses_inheritance.toml b/conformance/results/pycroscope/dataclasses_inheritance.toml index 6973d93fa..521c03ce3 100644 --- a/conformance/results/pycroscope/dataclasses_inheritance.toml +++ b/conformance/results/pycroscope/dataclasses_inheritance.toml @@ -1,7 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 62: Expected 1 errors -Line 66: Expected 1 errors """ output = """ +./dataclasses_inheritance.py:62:4: Class variable x cannot override instance variable from base class ./dataclasses_inheritance.py.DC6 [incompatible_override] +./dataclasses_inheritance.py:66:4: Instance variable y cannot override class variable from base class ./dataclasses_inheritance.py.DC6 [incompatible_override] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index 237ee1e88..c2c5f21db 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -1,46 +1,14 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 118: Expected 1 errors -Line 112: Unexpected errors ["./dataclasses_transform_converter.py:112:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument]", "./dataclasses_transform_converter.py:112:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument]", "./dataclasses_transform_converter.py:112:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument]", "./dataclasses_transform_converter.py:112:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[b'f6'] [incompatible_argument]", './dataclasses_transform_converter.py:112:35: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument]'] -Line 114: Unexpected errors ["./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment]"] -Line 115: Unexpected errors ["./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment]"] -Line 116: Unexpected errors ["./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment]"] -Line 121: Unexpected errors ["./dataclasses_transform_converter.py:121:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal['f6'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:34: Incompatible argument type for field4: expected int but got Literal['1'] [incompatible_argument]", "./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[str, str] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument]"] -Line 132: Unexpected errors ['./dataclasses_transform_converter.py:132:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment]'] """ output = """ ./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] ./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] -./dataclasses_transform_converter.py:107:7: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] -./dataclasses_transform_converter.py:107:13: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] -./dataclasses_transform_converter.py:107:19: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[b'f3'] [incompatible_argument] -./dataclasses_transform_converter.py:107:26: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument] -./dataclasses_transform_converter.py:108:4: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] -./dataclasses_transform_converter.py:108:10: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] -./dataclasses_transform_converter.py:108:16: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] -./dataclasses_transform_converter.py:108:22: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[1] [incompatible_argument] -./dataclasses_transform_converter.py:108:25: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument] -./dataclasses_transform_converter.py:109:4: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] -./dataclasses_transform_converter.py:109:10: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] -./dataclasses_transform_converter.py:109:16: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] -./dataclasses_transform_converter.py:109:22: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal['f3'] [incompatible_argument] -./dataclasses_transform_converter.py:109:28: Incompatible argument type for field4: expected int but got Literal[3j] [incompatible_argument] -./dataclasses_transform_converter.py:112:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] -./dataclasses_transform_converter.py:112:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] -./dataclasses_transform_converter.py:112:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] -./dataclasses_transform_converter.py:112:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal[b'f6'] [incompatible_argument] -./dataclasses_transform_converter.py:112:35: Incompatible argument type for field4: expected int but got Literal[[]] [incompatible_argument] -./dataclasses_transform_converter.py:114:0: Incompatible assignment: expected int, got Literal['f1'] [incompatible_assignment] -./dataclasses_transform_converter.py:115:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal['f6'] [incompatible_assignment] -./dataclasses_transform_converter.py:116:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[b'f6'] [incompatible_assignment] -./dataclasses_transform_converter.py:119:0: Incompatible assignment: expected ./dataclasses_transform_converter.py.ConverterClass, got Literal[1] [incompatible_assignment] -./dataclasses_transform_converter.py:121:10: Incompatible argument type for field0: expected int but got Literal['f0'] [incompatible_argument] -./dataclasses_transform_converter.py:121:16: Incompatible argument type for field1: expected int but got Literal['f1'] [incompatible_argument] -./dataclasses_transform_converter.py:121:22: Incompatible argument type for field2: expected int but got Literal['f2'] [incompatible_argument] -./dataclasses_transform_converter.py:121:28: Incompatible argument type for field3: expected ./dataclasses_transform_converter.py.ConverterClass but got Literal['f6'] [incompatible_argument] -./dataclasses_transform_converter.py:121:34: Incompatible argument type for field4: expected int but got Literal['1'] [incompatible_argument] -./dataclasses_transform_converter.py:121:39: Incompatible argument type for field5: expected dict[str, str] but got Literal[(('a', '1'), ('b', '2'))] [incompatible_argument] +./dataclasses_transform_converter.py:107:4: Incompatible argument type for field0: expected str but got Literal[1] [incompatible_argument] +./dataclasses_transform_converter.py:108:22: Incompatible argument type for field3: expected str | bytes but got Literal[1] [incompatible_argument] +./dataclasses_transform_converter.py:109:28: Incompatible argument type for field4: expected str | list[str] but got Literal[3j] [incompatible_argument] +./dataclasses_transform_converter.py:118:0: Incompatible assignment: expected str, got Literal[1] [incompatible_assignment] +./dataclasses_transform_converter.py:119:0: Incompatible assignment: expected str | bytes, got Literal[1] [incompatible_assignment] ./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] -./dataclasses_transform_converter.py:132:4: Dataclass default_factory return type is incompatible with field type int [incompatible_assignment] ./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index b632570df..cd4ee0171 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -15,10 +15,10 @@ Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]"] -Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error]', './generics_defaults.py:95:34: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation]'] -Line 96: Unexpected errors ['./generics_defaults.py:96:12: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation]', './generics_defaults.py:96:45: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation]'] -Line 156: Unexpected errors ["./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type", './generics_defaults.py:156:33: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation]'] -Line 157: Unexpected errors ['./generics_defaults.py:157:12: Any[error] is not equivalent to type', './generics_defaults.py:157:12: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation]', './generics_defaults.py:157:42: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation]'] +Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int]'] +Line 96: Unexpected errors ['./generics_defaults.py:96:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool]'] +Line 156: Unexpected errors ["./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] +Line 157: Unexpected errors ["./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int]'] Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int'] """ @@ -50,19 +50,16 @@ output = """ ./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] ./generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] ./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] -./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to Any[error] -./generics_defaults.py:95:34: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation] -./generics_defaults.py:96:12: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation] -./generics_defaults.py:96:45: Expected 1 type arguments for ./generics_defaults.py.Class_TypeVarTuple [invalid_annotation] +./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int] +./generics_defaults.py:96:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool] ./generics_defaults.py:107:11: the bound and default are incompatible [invalid_annotation] ./generics_defaults.py:114:11: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:143:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_annotation] -./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type -./generics_defaults.py:156:33: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation] -./generics_defaults.py:157:12: Any[error] is not equivalent to type -./generics_defaults.py:157:12: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation] -./generics_defaults.py:157:42: Expected 2 type arguments for ./generics_defaults.py.Foo6 [invalid_annotation] +./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] +./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] +./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] +./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation] ./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int] ./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index 93a7cafc1..ad7b0f80e 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -2,7 +2,7 @@ conformance_automated = "Fail" errors_diff = """ Line 30: Expected 1 errors Line 55: Expected 1 errors -Line 27: Unexpected errors ['./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool]'] +Line 26: Unexpected errors ['./generics_defaults_specialization.py:26:16: .MyAlias = ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, ~DefaultStrT] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, str]'] Line 42: Unexpected errors ['./generics_defaults_specialization.py:42:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation]'] Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type", './generics_defaults_specialization.py:45:22: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to Any[error]', './generics_defaults_specialization.py:46:19: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] @@ -11,7 +11,7 @@ Line 50: Unexpected errors ['./generics_defaults_specialization.py:50:10: Expect Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[generic_argument] is not equivalent to str'] """ output = """ -./generics_defaults_specialization.py:27:16: Any[from_another] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, bool] +./generics_defaults_specialization.py:26:16: .MyAlias = ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, ~DefaultStrT] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, str] ./generics_defaults_specialization.py:42:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] ./generics_defaults_specialization.py:45:12: is not equivalent to type ./generics_defaults_specialization.py:45:22: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index 874cd4097..fd7cb9e4a 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -2,10 +2,13 @@ conformance_automated = "Fail" errors_diff = """ Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA'] -Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT]'] +Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[error] is not equivalent to list[~SelfT]', "./generics_self_advanced.py:43:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute]"] +Line 44: Unexpected errors ["./generics_self_advanced.py:44:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute]"] """ output = """ ./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA ./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA -./generics_self_advanced.py:43:20: Any[inference] is not equivalent to list[~SelfT] +./generics_self_advanced.py:43:20: Any[error] is not equivalent to list[~SelfT] +./generics_self_advanced.py:43:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute] +./generics_self_advanced.py:44:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index 113752fb6..04ccde284 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -1,23 +1,15 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 17: Expected 1 errors -Line 44: Expected 1 errors -Line 60: Expected 1 errors -Line 64: Expected 1 errors -Line 21: Unexpected errors ['./generics_syntax_declarations.py:21:0: S should be covariant [invalid_annotation]'] -Line 39: Unexpected errors ['./generics_syntax_declarations.py:39:16: Undefined name: ForwardReference [undefined_name]', './generics_syntax_declarations.py:39:39: Undefined name: ForwardReference [undefined_name]'] -Line 56: Unexpected errors ['./generics_syntax_declarations.py:56:17: Undefined name: ForwardReference [undefined_name]', './generics_syntax_declarations.py:56:13: Undefined name: ForwardReference [undefined_name]'] """ output = """ -./generics_syntax_declarations.py:21:0: S should be covariant [invalid_annotation] -./generics_syntax_declarations.py:25:0: S should be covariant [invalid_annotation] +./generics_syntax_declarations.py:17:16: Class definition cannot specialize Generic or Protocol bases when using type parameter syntax [invalid_annotation] +./generics_syntax_declarations.py:25:19: Class definition cannot specialize Generic or Protocol bases when using type parameter syntax [invalid_annotation] ./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] -./generics_syntax_declarations.py:39:16: Undefined name: ForwardReference [undefined_name] -./generics_syntax_declarations.py:39:39: Undefined name: ForwardReference [undefined_name] -./generics_syntax_declarations.py:48:13: Invalid type annotation [, ] [invalid_annotation] -./generics_syntax_declarations.py:56:17: Undefined name: ForwardReference [undefined_name] -./generics_syntax_declarations.py:56:13: Undefined name: ForwardReference [undefined_name] -./generics_syntax_declarations.py:71:13: Invalid type annotation (, ) [invalid_annotation] -./generics_syntax_declarations.py:75:13: Invalid type annotation 3 [invalid_annotation] +./generics_syntax_declarations.py:44:20: TypeVar bound cannot be parameterized by type variables [invalid_annotation] +./generics_syntax_declarations.py:48:16: Invalid type annotation [, ] [invalid_annotation] +./generics_syntax_declarations.py:60:16: TypeVar constraints must contain at least two types [invalid_annotation] +./generics_syntax_declarations.py:64:16: TypeVar constraints must contain at least two types [invalid_annotation] +./generics_syntax_declarations.py:71:16: Invalid type annotation (, ) [invalid_annotation] +./generics_syntax_declarations.py:75:17: Invalid type annotation 3 [invalid_annotation] ./generics_syntax_declarations.py:79:22: Undefined name: S [undefined_name] """ diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index f3b9b4a55..89f18b17d 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -1,12 +1,12 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors """ output = """ ./generics_type_erasure.py:38:15: Incompatible argument type for label: expected int | None but got Literal[''] [incompatible_argument] ./generics_type_erasure.py:40:15: Incompatible argument type for label: expected str | None but got Literal[0] [incompatible_argument] +./generics_type_erasure.py:42:0: Cannot assign to instance attribute 'label' via class object [incompatible_assignment] +./generics_type_erasure.py:43:0: Any[from_another] (partial from [type 'int']) has no attribute 'label' [undefined_attribute] +./generics_type_erasure.py:44:0: Cannot assign to instance attribute 'label' via class object [incompatible_assignment] +./generics_type_erasure.py:45:0: has no attribute 'label' [undefined_attribute] +./generics_type_erasure.py:46:0: type has no attribute 'label' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index c3afc0ef3..80da78b2f 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -1,19 +1,12 @@ conformance_automated = "Fail" errors_diff = """ Line 89: Expected 1 errors -Line 100: Expected 1 errors -Line 36: Unexpected errors ['./generics_typevartuple_basic.py:36:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation]'] -Line 37: Unexpected errors ['./generics_typevartuple_basic.py:37:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation]'] -Line 38: Unexpected errors ['./generics_typevartuple_basic.py:38:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation]'] """ output = """ -./generics_typevartuple_basic.py:36:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] -./generics_typevartuple_basic.py:37:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] -./generics_typevartuple_basic.py:38:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] -./generics_typevartuple_basic.py:42:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] ./generics_typevartuple_basic.py:42:33: Incompatible argument type for shape: expected tuple[*tuple[Shape, ...]] but got NewType('Height', int) [incompatible_argument] -./generics_typevartuple_basic.py:43:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] -./generics_typevartuple_basic.py:44:4: Expected 1 type arguments for ./generics_typevartuple_basic.py.Array [invalid_annotation] +./generics_typevartuple_basic.py:42:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array[Any[error]] [incompatible_assignment] +./generics_typevartuple_basic.py:43:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array[NewType('Batch', int), NewType('Width', int)] [incompatible_assignment] +./generics_typevartuple_basic.py:44:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Time', int), NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array[NewType('Time', int), NewType('Batch', int), NewType('Width', int), NewType('Height', int)] [incompatible_assignment] ./generics_typevartuple_basic.py:52:21: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:53:30: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:56:27: TypeVarTuple must be unpacked [invalid_annotation] @@ -23,5 +16,6 @@ output = """ ./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] ./generics_typevartuple_basic.py:90:0: Cannot resolve type variables [incompatible_call] ./generics_typevartuple_basic.py:99:4: Cannot resolve type variables [incompatible_call] +./generics_typevartuple_basic.py:100:4: Cannot resolve type variables [incompatible_call] ./generics_typevartuple_basic.py:106:21: Only one TypeVarTuple can be used in a type parameter list [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_concat.toml b/conformance/results/pycroscope/generics_typevartuple_concat.toml index e6b8c3830..4afbb3846 100644 --- a/conformance/results/pycroscope/generics_typevartuple_concat.toml +++ b/conformance/results/pycroscope/generics_typevartuple_concat.toml @@ -1,14 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 40: Unexpected errors ['./generics_typevartuple_concat.py:40:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation]'] -Line 42: Unexpected errors ['./generics_typevartuple_concat.py:42:16: ./generics_typevartuple_concat.py.Array[Any[generic_argument]] is not equivalent to Any[error]', './generics_typevartuple_concat.py:42:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation]'] -Line 44: Unexpected errors ['./generics_typevartuple_concat.py:44:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation]'] Line 52: Unexpected errors ['./generics_typevartuple_concat.py:52:12: tuple[Literal[0], bool, str] is not equivalent to tuple[int, bool, str]'] """ output = """ -./generics_typevartuple_concat.py:40:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation] -./generics_typevartuple_concat.py:42:16: ./generics_typevartuple_concat.py.Array[Any[generic_argument]] is not equivalent to Any[error] -./generics_typevartuple_concat.py:42:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation] -./generics_typevartuple_concat.py:44:19: Expected 1 type arguments for ./generics_typevartuple_concat.py.Array [invalid_annotation] ./generics_typevartuple_concat.py:52:12: tuple[Literal[0], bool, str] is not equivalent to tuple[int, bool, str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 10a66d39b..f694cad07 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -1,22 +1,29 @@ conformance_automated = "Fail" errors_diff = """ -Line 109: Expected 1 errors -Line 110: Expected 1 errors Line 121: Expected 1 errors Line 122: Expected 1 errors Line 163: Expected 1 errors -Line 45: Unexpected errors ['./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 47: Unexpected errors ["./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]]"] -Line 50: Unexpected errors ['./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation]'] -Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]]', './generics_typevartuple_specialization.py:52:30: Expected 1 type arguments for ./generics_typevartuple_specialization.py.Array [invalid_annotation]'] -Line 69: Unexpected errors ['./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]]'] +Line 51: Unexpected errors ['./generics_typevartuple_specialization.py:51:16: .IntTuple = tuple[int, *tuple[Ts, ...]] is not equivalent to tuple[int]'] +Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: .NamedArray = tuple[str, ./generics_typevartuple_specialization.py.Array[Ts]] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]]'] +Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] +Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] +Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] +Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] +Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] +Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str]'] +Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str]'] """ output = """ -./generics_typevartuple_specialization.py:45:39: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:47:16: Any[error] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[NewType('Height', int)]] -./generics_typevartuple_specialization.py:50:30: Unrecognized annotation types.GenericAlias [invalid_annotation] -./generics_typevartuple_specialization.py:52:16: Any[error] is not equivalent to tuple[str, Any[error]] -./generics_typevartuple_specialization.py:52:30: Expected 1 type arguments for ./generics_typevartuple_specialization.py.Array [invalid_annotation] -./generics_typevartuple_specialization.py:69:16: Any[from_another] is not equivalent to ./generics_typevartuple_specialization.py.Array2[int, Any[explicit]] -./generics_typevartuple_specialization.py:127:4: Unrecognized annotation types.GenericAlias [invalid_annotation] +./generics_typevartuple_specialization.py:51:16: .IntTuple = tuple[int, *tuple[Ts, ...]] is not equivalent to tuple[int] +./generics_typevartuple_specialization.py:52:16: .NamedArray = tuple[str, ./generics_typevartuple_specialization.py.Array[Ts]] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]] +./generics_typevartuple_specialization.py:109:0: Unpacked TypeVarTuple cannot specialize this type alias [invalid_annotation] +./generics_typevartuple_specialization.py:110:0: Unrecognized annotation float [invalid_annotation] +./generics_typevartuple_specialization.py:127:4: Expected 3 type arguments for type alias, got 1 [invalid_annotation] +./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] +./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] +./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] +./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] +./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] +./generics_typevartuple_specialization.py:158:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str] +./generics_typevartuple_specialization.py:159:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index e904e52ef..105a70fb0 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -1,14 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 28: Unexpected errors ["./generics_typevartuple_unpack.py:28:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] [incompatible_argument]"] -Line 29: Unexpected errors ["./generics_typevartuple_unpack.py:29:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Channels', int)] [incompatible_argument]"] -Line 45: Unexpected errors ["./generics_typevartuple_unpack.py:45:26: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), Any[generic_argument]] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument]"] -Line 46: Unexpected errors ["./generics_typevartuple_unpack.py:46:25: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument]"] """ output = """ -./generics_typevartuple_unpack.py:28:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] [incompatible_argument] -./generics_typevartuple_unpack.py:29:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Channels', int)] [incompatible_argument] -./generics_typevartuple_unpack.py:30:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), tuple[Any[explicit], ...], NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int)] [incompatible_argument] -./generics_typevartuple_unpack.py:45:26: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), Any[generic_argument]] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument] -./generics_typevartuple_unpack.py:46:25: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int), NewType('Channels', int)] but got .../tests/generics_typevartuple_unpack.py.Array[tuple[Any[explicit], ...]] [incompatible_argument] +./generics_typevartuple_unpack.py:30:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[tuple[NewType('Batch', int), *tuple[Any[explicit], ...], NewType('Channels', int)]] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/literals_literalstring.toml b/conformance/results/pycroscope/literals_literalstring.toml index bfc8005ab..25663b6bd 100644 --- a/conformance/results/pycroscope/literals_literalstring.toml +++ b/conformance/results/pycroscope/literals_literalstring.toml @@ -1,12 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 63: Unexpected errors ['./literals_literalstring.py:63:16: str is not equivalent to LiteralString'] """ output = """ ./literals_literalstring.py:36:11: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got typing.LiteralString [invalid_literal] ./literals_literalstring.py:37:13: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got typing.LiteralString [invalid_literal] ./literals_literalstring.py:43:4: Incompatible assignment: expected Literal[''], got Literal['two'] [incompatible_assignment] -./literals_literalstring.py:63:16: str is not equivalent to LiteralString ./literals_literalstring.py:65:4: Incompatible assignment: expected LiteralString, got str [incompatible_assignment] ./literals_literalstring.py:73:4: Incompatible assignment: expected LiteralString, got Literal[3] [incompatible_assignment] ./literals_literalstring.py:74:4: Incompatible assignment: expected LiteralString, got Literal[b'test'] [incompatible_assignment] diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 209a38ba7..86ebdea21 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -2,12 +2,8 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors Line 34: Expected 1 errors -Line 26: Unexpected errors ['./protocols_class_objects.py:26:11: Cannot instantiate protocol class Proto [incompatible_call]'] -Line 36: Unexpected errors ['./protocols_class_objects.py:36:0: Cannot instantiate protocol class Proto [incompatible_call]'] """ output = """ -./protocols_class_objects.py:26:11: Cannot instantiate protocol class Proto [incompatible_call] -./protocols_class_objects.py:36:0: Cannot instantiate protocol class Proto [incompatible_call] ./protocols_class_objects.py:58:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA1, got [incompatible_assignment] ./protocols_class_objects.py:74:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoB1, got [incompatible_assignment] ./protocols_class_objects.py:104:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got [incompatible_assignment] diff --git a/conformance/results/pycroscope/protocols_explicit.toml b/conformance/results/pycroscope/protocols_explicit.toml index d80bfe872..5cfacdb65 100644 --- a/conformance/results/pycroscope/protocols_explicit.toml +++ b/conformance/results/pycroscope/protocols_explicit.toml @@ -1,11 +1,11 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 27: Expected 1 errors -Line 56: Expected 1 errors -Line 60: Expected 1 errors -Line 89: Expected 1 errors -Line 134: Expected 1 errors -Line 164: Expected 1 errors """ output = """ +./protocols_explicit.py:27:15: Call to abstract protocol member via super() has no default implementation [bad_super_call] +./protocols_explicit.py:56:8: Incompatible assignment: expected tuple[int, int, int], got tuple[int, int, str] [incompatible_assignment] +./protocols_explicit.py:60:4: Cannot instantiate abstract class Point [incompatible_call] +./protocols_explicit.py:89:5: Cannot instantiate abstract class Concrete1 [incompatible_call] +./protocols_explicit.py:134:5: Cannot instantiate abstract class Concrete5 [incompatible_call] +./protocols_explicit.py:164:6: Cannot instantiate abstract class Concrete7A [incompatible_call] """ diff --git a/conformance/results/pycroscope/protocols_recursive.toml b/conformance/results/pycroscope/protocols_recursive.toml index 48520acdb..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/protocols_recursive.toml +++ b/conformance/results/pycroscope/protocols_recursive.toml @@ -1,9 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 80: Unexpected errors ["./protocols_recursive.py:80:11: Incompatible argument type for x: expected ./protocols_recursive.py.ProtoA[Never, ~T] but got Annotated[./protocols_recursive.py.ImplB, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'value': SigParameter(name='value', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./protocols_recursive.py.ImplA', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_argument]"] -Line 81: Unexpected errors ['./protocols_recursive.py:81:12: Any[error] is not equivalent to list[int]'] """ output = """ -./protocols_recursive.py:80:11: Incompatible argument type for x: expected ./protocols_recursive.py.ProtoA[Never, ~T] but got Annotated[./protocols_recursive.py.ImplB, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'value': SigParameter(name='value', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./protocols_recursive.py.ImplA', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_argument] -./protocols_recursive.py:81:12: Any[error] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index beb3c33d6..0a606b362 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -16,10 +16,10 @@ output = """ ./qualifiers_annotated.py:48:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./qualifiers_annotated.py:59:7: Annotated[] requires at least two arguments [invalid_annotation] ./qualifiers_annotated.py:71:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] -./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] +./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got .SmallInt = Annotated[int, Literal['']] [incompatible_assignment] ./qualifiers_annotated.py:79:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[str, '']] [incompatible_argument] -./qualifiers_annotated.py:80:6: Incompatible argument type for x: expected type[~T] but got Literal[typing.Annotated[int, '']] [incompatible_argument] +./qualifiers_annotated.py:80:6: Incompatible argument type for x: expected type[~T] but got .SmallInt = Annotated[int, Literal['']] [incompatible_argument] ./qualifiers_annotated.py:86:0: Annotated cannot be called [invalid_annotation] ./qualifiers_annotated.py:87:0: Annotated cannot be called [invalid_annotation] -./qualifiers_annotated.py:88:0: Annotated cannot be called [invalid_annotation] +./qualifiers_annotated.py:88:0: .SmallInt = Annotated[int, Literal['']] is not callable [not_callable] """ diff --git a/conformance/results/pycroscope/specialtypes_type.toml b/conformance/results/pycroscope/specialtypes_type.toml index ec197e28b..b6e41749c 100644 --- a/conformance/results/pycroscope/specialtypes_type.toml +++ b/conformance/results/pycroscope/specialtypes_type.toml @@ -7,8 +7,8 @@ output = """ ./specialtypes_type.py:76:11: Type[] requires a single argument [invalid_annotation] ./specialtypes_type.py:117:4: type[object] has no attribute 'unknown' [undefined_attribute] ./specialtypes_type.py:120:4: type[object] has no attribute 'unknown' [undefined_attribute] -./specialtypes_type.py:143:0: Literal[typing.Type] has no attribute 'unknown' [undefined_attribute] -./specialtypes_type.py:144:0: Literal[typing.Type[typing.Any]] has no attribute 'unknown' [undefined_attribute] -./specialtypes_type.py:145:0: type 'type' has no attribute 'unknown' [undefined_attribute] -./specialtypes_type.py:146:0: Literal[type[typing.Any]] has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:143:0: .TA1 = type has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:144:0: .TA2 = type has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:145:0: .TA3 = type has no attribute 'unknown' [undefined_attribute] +./specialtypes_type.py:146:0: .TA4 = type has no attribute 'unknown' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/tuples_type_compat.toml b/conformance/results/pycroscope/tuples_type_compat.toml index 6bc206ffd..cefaf21ac 100644 --- a/conformance/results/pycroscope/tuples_type_compat.toml +++ b/conformance/results/pycroscope/tuples_type_compat.toml @@ -8,14 +8,14 @@ output = """ ./tuples_type_compat.py:33:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:43:4: Incompatible assignment: expected tuple[int], got tuple[int, ...] [incompatible_assignment] ./tuples_type_compat.py:62:4: Incompatible assignment: expected tuple[int, int], got tuple[int, ...] [incompatible_assignment] -./tuples_type_compat.py:76:20: tuple[int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:81:20: tuple[str, str] | tuple[int, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:86:20: tuple[int, str, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:102:24: tuple[int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:112:24: tuple[int, str, int] is not equivalent to tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] -./tuples_type_compat.py:126:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, str] -./tuples_type_compat.py:129:24: tuple[int | str, int | str] is not equivalent to tuple[int | str, int] +./tuples_type_compat.py:76:20: tuple[int] is not equivalent to .Func5Input = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:81:20: tuple[str, str] | tuple[int, int] is not equivalent to .Func5Input = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:86:20: tuple[int, str, int] is not equivalent to .Func5Input = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:102:24: tuple[int] is not equivalent to .Func6Input = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:107:24: tuple[str, str] | tuple[int, int] is not equivalent to .Func6Input = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:112:24: tuple[int, str, int] is not equivalent to .Func6Input = tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int] +./tuples_type_compat.py:126:24: .Func7Input = tuple[int | str, int | str] is not equivalent to tuple[int | str, str] +./tuples_type_compat.py:129:24: .Func7Input = tuple[int | str, int | str] is not equivalent to tuple[int | str, int] ./tuples_type_compat.py:157:0: Incompatible assignment: expected tuple[int, str], got Literal[(1, '', '')] [incompatible_assignment] ./tuples_type_compat.py:162:0: Incompatible assignment: expected tuple[int, *tuple[str, ...]], got Literal[(1, 1, '')] [incompatible_assignment] ./tuples_type_compat.py:163:0: Incompatible assignment: expected tuple[int, *tuple[str, ...]], got Literal[(1, '', 1)] [incompatible_assignment] diff --git a/conformance/results/results.html b/conformance/results/results.html index 74f6a6b56..ca9f06b39 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -379,7 +379,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet supported.

@@ -400,7 +400,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_typevartuple_args
Partial

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

@@ -449,7 +449,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_upper_bound
Partial

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

@@ -521,7 +521,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      aliases_implicit Pass @@ -542,7 +542,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      aliases_type_statement
Partial

Does not reject type alias defined in function scope.

@@ -580,7 +580,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      literals_parameterizations
Partial

Does not reject tuple within Literal.

@@ -618,7 +618,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      protocols_generic Pass @@ -646,7 +646,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

@@ -698,7 +698,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      callables_subtyping Pass @@ -836,7 +836,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_kwonly Pass @@ -885,7 +885,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      dataclasses_transform_field
Partial

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

From 7054e8a7d82d0eac318f828c5e677bdf6983ad24 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 4 Mar 2026 07:18:04 -0800 Subject: [PATCH 59/78] turn off must_use --- conformance/src/type_checker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 4ed2e39f7..2d5e19433 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -372,6 +372,8 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: "unused_variable", "--disable", "unused_assignment", + "--disable", + "must_use", "--enable", "invalid_literal", "--enable", From 559329001778e2be27dedebf8cb184217a17de11 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 4 Mar 2026 08:41:22 -0800 Subject: [PATCH 60/78] progress --- .../pycroscope/annotations_generators.toml | 12 ++----- .../constructors_call_metaclass.toml | 7 ++-- .../pycroscope/constructors_call_new.toml | 8 ++--- .../results/pycroscope/generics_basic.toml | 23 +++++-------- .../results/pycroscope/generics_defaults.toml | 9 +++--- .../pycroscope/generics_self_basic.toml | 4 --- .../generics_syntax_infer_variance.toml | 32 +++++++++---------- .../generics_typevartuple_specialization.toml | 14 ++------ .../results/pycroscope/protocols_generic.toml | 2 +- conformance/results/results.html | 8 ++--- 10 files changed, 42 insertions(+), 77 deletions(-) diff --git a/conformance/results/pycroscope/annotations_generators.toml b/conformance/results/pycroscope/annotations_generators.toml index bc5dd29ce..0e19de16f 100644 --- a/conformance/results/pycroscope/annotations_generators.toml +++ b/conformance/results/pycroscope/annotations_generators.toml @@ -1,12 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 51: Expected 1 errors -Line 100: Unexpected errors ['./annotations_generators.py:100:21: Generator function must return an iterable [generator_return]'] -Line 109: Unexpected errors ['./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return]'] -Line 167: Unexpected errors ['./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] -Line 174: Unexpected errors ['./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use]'] """ output = """ +./annotations_generators.py:51:0: Function may exit without returning a value [missing_return] ./annotations_generators.py:54:8: Incompatible return type: expected .../tests/annotations_generators.py.C, got Literal[False] [incompatible_return_value] ./annotations_generators.py:57:8: Cannot assign value of type Literal[3] to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] ./annotations_generators.py:66:8: Cannot assign value of type Literal[3] to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] @@ -14,11 +10,7 @@ output = """ ./annotations_generators.py:75:4: Cannot assign value of type .../tests/annotations_generators.py.B to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] ./annotations_generators.py:86:20: Generator function must return an iterable [generator_return] ./annotations_generators.py:91:26: Async generator function must return an async iterable [generator_return] -./annotations_generators.py:100:21: Generator function must return an iterable [generator_return] -./annotations_generators.py:109:27: Async generator function must return an async iterable [generator_return] ./annotations_generators.py:118:4: Cannot yield from collections.abc.Iterator[.../tests/annotations_generators.py.A] (expected .../tests/annotations_generators.py.B) [incompatible_yield] ./annotations_generators.py:119:4: Cannot yield from Literal[[1]] (expected .../tests/annotations_generators.py.B) [incompatible_yield] ./annotations_generators.py:135:4: Cannot send int to a generator (expected str) [incompatible_yield] -./annotations_generators.py:167:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] -./annotations_generators.py:174:4: Must use collections.abc.AsyncGenerator[str, None] (for example, by iterating over it) [must_use] """ diff --git a/conformance/results/pycroscope/constructors_call_metaclass.toml b/conformance/results/pycroscope/constructors_call_metaclass.toml index a442f0d1f..2ec970e16 100644 --- a/conformance/results/pycroscope/constructors_call_metaclass.toml +++ b/conformance/results/pycroscope/constructors_call_metaclass.toml @@ -1,10 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 54: Expected 1 errors -Line 39: Unexpected errors ['./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error] | int', './constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation]'] """ output = """ -./constructors_call_metaclass.py:39:12: int | ./constructors_call_metaclass.py.Meta2 is not equivalent to Any[error] | int -./constructors_call_metaclass.py:39:0: Unrecognized annotation types.UnionType [invalid_annotation] +./constructors_call_metaclass.py:54:0: Missing required argument 'x' [incompatible_call] ./constructors_call_metaclass.py:68:0: Missing required argument 'x' [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index 716b68bcb..bc6aff93c 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,17 +1,13 @@ conformance_automated = "Fail" errors_diff = """ Line 148: Expected 1 errors -Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] | Any[explicit]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]", './constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation]'] +Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to ./constructors_call_new.py.Class4 | Any[explicit]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]"] Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] -Line 89: Unexpected errors ['./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] | int', './constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation]'] """ output = """ ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] -./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to Any[error] | Any[explicit] +./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to ./constructors_call_new.py.Class4 | Any[explicit] ./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call] -./constructors_call_new.py:64:0: Unrecognized annotation types.UnionType [invalid_annotation] ./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never ./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] -./constructors_call_new.py:89:12: int | ./constructors_call_new.py.Class6 is not equivalent to Any[error] | int -./constructors_call_new.py:89:0: Unrecognized annotation types.UnionType [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index ed31e03fb..b412df47e 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -1,25 +1,18 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 55: Expected 1 errors -Line 158: Expected 1 errors -Line 162: Expected 1 errors -Line 163: Expected 1 errors -Line 171: Expected 1 errors -Line 172: Expected 1 errors -Line 208: Expected 1 errors -Line 34: Unexpected errors ['./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation]'] -Line 106: Unexpected errors ['./generics_basic.py:106:20: Any[generic_argument] is not equivalent to int'] -Line 155: Unexpected errors ['./generics_basic.py:155:16: str is not equivalent to int', "./generics_basic.py:155:19: Incompatible argument type for key: expected int but got Literal['key'] [incompatible_argument]"] """ output = """ -./generics_basic.py:34:11: Unsupported operands for addition: ~AnyStr: (str, bytes) and ~AnyStr: (str, bytes) [unsupported_operation] ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] +./generics_basic.py:55:52: TypeVar constraint cannot be parameterized by type variables [invalid_annotation] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:106:20: Any[generic_argument] is not equivalent to int ./generics_basic.py:121:20: Type parameter list cannot contain duplicate type variables [invalid_annotation] -./generics_basic.py:155:16: str is not equivalent to int -./generics_basic.py:155:19: Incompatible argument type for key: expected int but got Literal['key'] [incompatible_argument] ./generics_basic.py:157:7: Incompatible argument type for key: expected str but got Literal[0] [incompatible_argument] +./generics_basic.py:158:7: Incompatible argument type for key: expected str but got Literal[0] [incompatible_argument] +./generics_basic.py:162:19: All arguments to Generic or Protocol must be type variables [invalid_annotation] +./generics_basic.py:163:20: All arguments to Generic or Protocol must be type variables [invalid_annotation] +./generics_basic.py:171:27: All type parameters for the class must appear within Generic or Protocol [invalid_annotation] +./generics_basic.py:172:27: All type parameters for the class must appear within Generic or Protocol [invalid_annotation] +./generics_basic.py:208:36: Generic metaclasses are not supported [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index cd4ee0171..8101b18d2 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -13,10 +13,9 @@ Line 60: Unexpected errors ['./generics_defaults.py:60:4: Any[error] is not eq Line 64: Unexpected errors ["./generics_defaults.py:64:4: ./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type", './generics_defaults.py:79:34: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:80:31: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 81: Unexpected errors ['./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]"] +Line 81: Unexpected errors ['./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to Any[error]', './generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]", './generics_defaults.py:94:32: Unrecognized annotation str [invalid_annotation]'] Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int]'] -Line 96: Unexpected errors ['./generics_defaults.py:96:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool]'] Line 156: Unexpected errors ["./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] Line 157: Unexpected errors ["./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int]'] @@ -47,11 +46,11 @@ output = """ ./generics_defaults.py:79:34: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] ./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] ./generics_defaults.py:80:31: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] -./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] +./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to Any[error] ./generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] ./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] +./generics_defaults.py:94:32: Unrecognized annotation str [invalid_annotation] ./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int] -./generics_defaults.py:96:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[int, bool] ./generics_defaults.py:107:11: the bound and default are incompatible [invalid_annotation] ./generics_defaults.py:114:11: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 8b7d343ea..6b54e0007 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,11 +2,7 @@ conformance_automated = "Fail" errors_diff = """ Line 20: Expected 1 errors Line 33: Expected 1 errors -Line 80: Unexpected errors ['./generics_self_basic.py:80:4: Generic[...] is valid only as a base class [invalid_annotation]'] -Line 84: Unexpected errors ['./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T]'] """ output = """ ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] -./generics_self_basic.py:80:4: Generic[...] is valid only as a base class [invalid_annotation] -./generics_self_basic.py:84:16: Any[from_another] is not equivalent to typing.Generic[~T] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index b00750b87..ae5122610 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -1,23 +1,23 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 29: Expected 1 errors -Line 47: Expected 1 errors -Line 56: Expected 1 errors -Line 85: Expected 1 errors -Line 96: Expected 1 errors -Line 112: Expected 1 errors -Line 113: Expected 1 errors -Line 127: Expected 1 errors -Line 128: Expected 1 errors -Line 135: Expected 1 errors -Line 136: Expected 1 errors -Line 137: Expected 1 errors -Line 138: Expected 1 errors -Line 146: Expected 1 errors -Line 165: Expected 1 errors """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__iter__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./generics_syntax_infer_variance.py:56:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant3[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant3[float | int], HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ='./generics_syntax_infer_variance.py.ShouldBeCovariant2', literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./generics_syntax_infer_variance.py:85:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant5[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant5[float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:96:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant6[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant6[float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:112:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant1[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant1[int] [incompatible_assignment] +./generics_syntax_infer_variance.py:113:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant1[int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant1[float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:127:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant2[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant2[int] [incompatible_assignment] +./generics_syntax_infer_variance.py:128:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant2[int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant2[float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:135:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant3[float | int, str], got ./generics_syntax_infer_variance.py.ShouldBeInvariant3[int, str] [incompatible_assignment] +./generics_syntax_infer_variance.py:136:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant3[int, str], got ./generics_syntax_infer_variance.py.ShouldBeInvariant3[float | int, str] [incompatible_assignment] +./generics_syntax_infer_variance.py:137:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, int] [incompatible_assignment] +./generics_syntax_infer_variance.py:138:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:146:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant4[float | int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeInvariant4[int], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=KnownValue(val=1)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] ./generics_syntax_infer_variance.py:154:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant5[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant5[int] [incompatible_assignment] +./generics_syntax_infer_variance.py:165:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeContravariant1[float | int], got ./generics_syntax_infer_variance.py.ShouldBeContravariant1[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index f694cad07..130d63455 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -1,29 +1,21 @@ conformance_automated = "Fail" errors_diff = """ -Line 121: Expected 1 errors -Line 122: Expected 1 errors -Line 163: Expected 1 errors -Line 51: Unexpected errors ['./generics_typevartuple_specialization.py:51:16: .IntTuple = tuple[int, *tuple[Ts, ...]] is not equivalent to tuple[int]'] -Line 52: Unexpected errors ['./generics_typevartuple_specialization.py:52:16: .NamedArray = tuple[str, ./generics_typevartuple_specialization.py.Array[Ts]] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]]'] Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] -Line 158: Unexpected errors ['./generics_typevartuple_specialization.py:158:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str]'] -Line 159: Unexpected errors ['./generics_typevartuple_specialization.py:159:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str]'] """ output = """ -./generics_typevartuple_specialization.py:51:16: .IntTuple = tuple[int, *tuple[Ts, ...]] is not equivalent to tuple[int] -./generics_typevartuple_specialization.py:52:16: .NamedArray = tuple[str, ./generics_typevartuple_specialization.py.Array[Ts]] is not equivalent to tuple[str, ./generics_typevartuple_specialization.py.Array[]] ./generics_typevartuple_specialization.py:109:0: Unpacked TypeVarTuple cannot specialize this type alias [invalid_annotation] ./generics_typevartuple_specialization.py:110:0: Unrecognized annotation float [invalid_annotation] +./generics_typevartuple_specialization.py:121:6: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] +./generics_typevartuple_specialization.py:122:6: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] ./generics_typevartuple_specialization.py:127:4: Expected 3 type arguments for type alias, got 1 [invalid_annotation] ./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] ./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] ./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] ./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] ./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] -./generics_typevartuple_specialization.py:158:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str] -./generics_typevartuple_specialization.py:159:16: .TA9[tuple[*tuple[int, ...]], str] = tuple[*tuple[Ts, ...], ~T1] is not equivalent to tuple[*tuple[int, ...], str] +./generics_typevartuple_specialization.py:163:7: Unpacked TypeVarTuple cannot specialize this type alias [invalid_annotation] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 8bb814a9e..083053cd3 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -1,10 +1,10 @@ conformance_automated = "Fail" errors_diff = """ +Line 44: Expected 1 errors Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent'] """ output = """ ./protocols_generic.py:40:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[int, str], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment] -./protocols_generic.py:44:0: T_co should be invariant [invalid_annotation] ./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] ./protocols_generic.py:66:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[float | int], got .../tests/protocols_generic.py.Sender[int] [incompatible_assignment] ./protocols_generic.py:74:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[float | int], got .../tests/protocols_generic.py.AttrProto[int] [incompatible_assignment] diff --git a/conformance/results/results.html b/conformance/results/results.html index ca9f06b39..f10c0f7be 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -205,7 +205,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Does not detect that invalid yield is unreachable

-Unknown +Pass      annotations_methods
Pass*

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

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

Python Type System Conformance Test Results

Pass Pass
Partial

Incorrect rejects + between two AnyStr

Constrained type var resolves to subtype instead of explcitly listed constraint

-Unknown +Pass      generics_defaults Partial @@ -386,7 +386,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      generics_syntax_scoping
Partial

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

@@ -722,7 +722,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      constructors_call_new
Partial

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

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

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

From 261d9ea0e66318abc96cfc80cd57dbedc2c5e323 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 4 Mar 2026 12:35:45 -0800 Subject: [PATCH 61/78] update --- .../pycroscope/constructors_call_new.toml | 10 +- .../results/pycroscope/dataclasses_hash.toml | 6 +- .../results/pycroscope/generics_defaults.toml | 136 ++++++++++-------- .../generics_defaults_referential.toml | 6 +- .../pycroscope/generics_syntax_scoping.toml | 5 +- conformance/results/results.html | 2 +- 6 files changed, 90 insertions(+), 75 deletions(-) diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index bc6aff93c..b747f222c 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,13 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 148: Expected 1 errors -Line 64: Unexpected errors ['./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to ./constructors_call_new.py.Class4 | Any[explicit]', "./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call]"] -Line 76: Unexpected errors ['./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never', "./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call]"] """ output = """ ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] -./constructors_call_new.py:64:12: ./constructors_call_new.py.Class4 is not equivalent to ./constructors_call_new.py.Class4 | Any[explicit] -./constructors_call_new.py:64:12: Missing required argument 'x' [incompatible_call] -./constructors_call_new.py:76:16: ./constructors_call_new.py.Class5 is not equivalent to Never -./constructors_call_new.py:76:16: Missing required argument 'x' [incompatible_call] +./constructors_call_new.py:148:0: Missing required positional argument '%self' [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_hash.toml b/conformance/results/pycroscope/dataclasses_hash.toml index 010d1818e..c3a33ccae 100644 --- a/conformance/results/pycroscope/dataclasses_hash.toml +++ b/conformance/results/pycroscope/dataclasses_hash.toml @@ -2,6 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./dataclasses_hash.py:15:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got .../tests/dataclasses_hash.py.DC1 [incompatible_assignment] -./dataclasses_hash.py:32:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got .../tests/dataclasses_hash.py.DC3 [incompatible_assignment] +./dataclasses_hash.py:17:0: None is not callable [not_callable] +./dataclasses_hash.py:18:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC1, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./dataclasses_hash.py:39:0: None is not callable [not_callable] +./dataclasses_hash.py:40:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC3, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 8101b18d2..ae73a4903 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,64 +1,84 @@ conformance_automated = "Fail" errors_diff = """ -Line 30: Unexpected errors ["./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] -Line 31: Unexpected errors ['./generics_defaults.py:31:12: Any[error] is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]', './generics_defaults.py:31:12: Expected 2 type arguments for ./generics_defaults.py.NoNonDefaults [invalid_annotation]'] -Line 32: Unexpected errors ["./generics_defaults.py:32:12: ./generics_defaults.py.NoNonDefaults[str, int] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]]"] -Line 38: Unexpected errors ['./generics_defaults.py:38:12: Any[error] is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]]', './generics_defaults.py:38:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation]'] -Line 39: Unexpected errors ['./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool]', './generics_defaults.py:39:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation]'] -Line 45: Unexpected errors ["./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]]"] -Line 47: Unexpected errors ['./generics_defaults.py:47:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:47:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] -Line 53: Unexpected errors ['./generics_defaults.py:53:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:53:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] -Line 56: Unexpected errors ['./generics_defaults.py:56:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:56:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] -Line 60: Unexpected errors ['./generics_defaults.py:60:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]', './generics_defaults.py:60:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation]'] -Line 64: Unexpected errors ["./generics_defaults.py:64:4: ./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]]"] -Line 79: Unexpected errors ["./generics_defaults.py:79:12: is not equivalent to type", './generics_defaults.py:79:34: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 80: Unexpected errors ['./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error]', './generics_defaults.py:80:31: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 81: Unexpected errors ['./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to Any[error]', './generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 94: Unexpected errors ["./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]]", './generics_defaults.py:94:32: Unrecognized annotation str [invalid_annotation]'] -Line 95: Unexpected errors ['./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int]'] -Line 156: Unexpected errors ["./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation]"] -Line 157: Unexpected errors ["./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]]", "./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation]"] -Line 172: Unexpected errors ['./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int]'] -Line 173: Unexpected errors ['./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int'] +Line 66: Expected 1 errors +Line 33: Unexpected errors ['./generics_defaults.py:33:16: Any[generic_argument] is not equivalent to str'] +Line 34: Unexpected errors ['./generics_defaults.py:34:16: Any[generic_argument] is not equivalent to int'] +Line 36: Unexpected errors ['./generics_defaults.py:36:16: Any[from_another] is not equivalent to str'] +Line 37: Unexpected errors ['./generics_defaults.py:37:16: Any[from_another] is not equivalent to int'] +Line 49: Unexpected errors ['./generics_defaults.py:49:16: Any[from_another] is not equivalent to float | int'] +Line 50: Unexpected errors ['./generics_defaults.py:50:16: Any[from_another] is not equivalent to bool'] +Line 75: Unexpected errors ['./generics_defaults.py:75:16: Any[generic_argument] is not equivalent to str'] +Line 76: Unexpected errors ['./generics_defaults.py:76:16: Any[generic_argument] is not equivalent to int'] +Line 77: Unexpected errors ['./generics_defaults.py:77:16: Any[generic_argument] is not equivalent to bool'] +Line 79: Unexpected errors ['./generics_defaults.py:79:16: Any[from_another] is not equivalent to int'] +Line 80: Unexpected errors ['./generics_defaults.py:80:16: Any[from_another] is not equivalent to complex | float | int'] +Line 81: Unexpected errors ['./generics_defaults.py:81:16: Any[from_another] is not equivalent to str'] +Line 82: Unexpected errors ['./generics_defaults.py:82:16: Any[from_another] is not equivalent to int'] +Line 83: Unexpected errors ['./generics_defaults.py:83:16: Any[from_another] is not equivalent to bool'] +Line 91: Unexpected errors ['./generics_defaults.py:91:16: Any[from_another] is not equivalent to int'] +Line 92: Unexpected errors ['./generics_defaults.py:92:16: Any[from_another] is not equivalent to complex | float | int'] +Line 93: Unexpected errors ['./generics_defaults.py:93:16: Any[from_another] is not equivalent to str'] +Line 94: Unexpected errors ['./generics_defaults.py:94:16: Any[from_another] is not equivalent to int'] +Line 95: Unexpected errors ['./generics_defaults.py:95:16: Any[from_another] is not equivalent to bool'] +Line 97: Unexpected errors ['./generics_defaults.py:97:16: Any[from_another] is not equivalent to int'] +Line 98: Unexpected errors ['./generics_defaults.py:98:16: Any[from_another] is not equivalent to complex | float | int'] +Line 99: Unexpected errors ['./generics_defaults.py:99:16: Any[from_another] is not equivalent to str'] +Line 100: Unexpected errors ['./generics_defaults.py:100:16: Any[from_another] is not equivalent to int'] +Line 101: Unexpected errors ['./generics_defaults.py:101:16: Any[from_another] is not equivalent to bool'] +Line 122: Unexpected errors ['./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None'] +Line 123: Unexpected errors ["./generics_defaults.py:123:16: Annotated[./generics_defaults.py.Class_ParamSpec, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:123:35: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 124: Unexpected errors ["./generics_defaults.py:124:16: Annotated[./generics_defaults.py.Class_ParamSpec[Any[error]], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:124:49: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 139: Unexpected errors ['./generics_defaults.py:139:16: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[str, int]'] +Line 140: Unexpected errors ["./generics_defaults.py:140:16: Annotated[./generics_defaults.py.Class_TypeVarTuple, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=SequenceValue(typ=, literal_only=False, args=(AnyValue(source=),), members=((True, AnyValue(source=)),)))] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int]"] +Line 203: Unexpected errors ["./generics_defaults.py:203:36: Invalid type annotation [] [invalid_annotation]", './generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation]'] +Line 204: Unexpected errors ['./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str]'] +Line 205: Unexpected errors ['./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None'] +Line 208: Unexpected errors ['./generics_defaults.py:208:16: (...) -> None is not equivalent to (bytes, /) -> None'] +Line 223: Unexpected errors ['./generics_defaults.py:223:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int]'] +Line 224: Unexpected errors ['./generics_defaults.py:224:12: Any[generic_argument] is not equivalent to int'] """ output = """ ./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] -./generics_defaults.py:30:12: is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] -./generics_defaults.py:31:12: Any[error] is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] -./generics_defaults.py:31:12: Expected 2 type arguments for ./generics_defaults.py.NoNonDefaults [invalid_annotation] -./generics_defaults.py:32:12: ./generics_defaults.py.NoNonDefaults[str, int] (partial from [type 'str', type 'int']) is not equivalent to type[./generics_defaults.py.NoNonDefaults[str, int]] -./generics_defaults.py:38:12: Any[error] is not equivalent to type[./generics_defaults.py.OneDefault[float | int, bool]] -./generics_defaults.py:38:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation] -./generics_defaults.py:39:12: Any[from_another] is not equivalent to ./generics_defaults.py.OneDefault[float | int, bool] -./generics_defaults.py:39:12: Expected 2 type arguments for ./generics_defaults.py.OneDefault [invalid_annotation] -./generics_defaults.py:45:12: is not equivalent to type[./generics_defaults.py.AllTheDefaults[Any[explicit], Any[explicit], str, int, bool]] -./generics_defaults.py:47:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:47:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] -./generics_defaults.py:50:0: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] -./generics_defaults.py:53:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:53:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] -./generics_defaults.py:56:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:56:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] -./generics_defaults.py:60:4: Any[error] is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:60:4: Expected 5 type arguments for ./generics_defaults.py.AllTheDefaults [invalid_annotation] -./generics_defaults.py:64:4: ./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool] (partial from [type 'int', type 'complex', type 'str', type 'int', type 'bool']) is not equivalent to type[./generics_defaults.py.AllTheDefaults[int, complex | float | int, str, int, bool]] -./generics_defaults.py:79:12: is not equivalent to type -./generics_defaults.py:79:34: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] -./generics_defaults.py:80:12: ./generics_defaults.py.Class_ParamSpec is not equivalent to Any[error] -./generics_defaults.py:80:31: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] -./generics_defaults.py:81:12: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to Any[error] -./generics_defaults.py:81:45: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] -./generics_defaults.py:94:12: is not equivalent to type[./generics_defaults.py.Class_TypeVarTuple[tuple[str, int]]] -./generics_defaults.py:94:32: Unrecognized annotation str [invalid_annotation] -./generics_defaults.py:95:12: ./generics_defaults.py.Class_TypeVarTuple is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int] -./generics_defaults.py:107:11: the bound and default are incompatible [invalid_annotation] -./generics_defaults.py:114:11: TypeVar default must be one of its constraints [invalid_annotation] -./generics_defaults.py:131:12: Any[generic_argument] is not equivalent to int -./generics_defaults.py:143:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_annotation] -./generics_defaults.py:156:12: ./generics_defaults.py.Foo6[int, str] (partial from [type 'int', type 'str']) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] -./generics_defaults.py:156:0: Invalid type annotation [, ] [invalid_annotation] -./generics_defaults.py:157:12: ./generics_defaults.py.Foo6[int, str, ] (partial from [type 'int', type 'str', Literal[[]]]) is not equivalent to type[./generics_defaults.py.Foo6[int, str, Any[error]]] -./generics_defaults.py:157:0: Invalid type annotation [] [invalid_annotation] -./generics_defaults.py:172:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int] -./generics_defaults.py:173:12: Any[generic_argument] is not equivalent to int +./generics_defaults.py:33:16: Any[generic_argument] is not equivalent to str +./generics_defaults.py:34:16: Any[generic_argument] is not equivalent to int +./generics_defaults.py:36:16: Any[from_another] is not equivalent to str +./generics_defaults.py:37:16: Any[from_another] is not equivalent to int +./generics_defaults.py:49:16: Any[from_another] is not equivalent to float | int +./generics_defaults.py:50:16: Any[from_another] is not equivalent to bool +./generics_defaults.py:75:16: Any[generic_argument] is not equivalent to str +./generics_defaults.py:76:16: Any[generic_argument] is not equivalent to int +./generics_defaults.py:77:16: Any[generic_argument] is not equivalent to bool +./generics_defaults.py:79:16: Any[from_another] is not equivalent to int +./generics_defaults.py:80:16: Any[from_another] is not equivalent to complex | float | int +./generics_defaults.py:81:16: Any[from_another] is not equivalent to str +./generics_defaults.py:82:16: Any[from_another] is not equivalent to int +./generics_defaults.py:83:16: Any[from_another] is not equivalent to bool +./generics_defaults.py:91:16: Any[from_another] is not equivalent to int +./generics_defaults.py:92:16: Any[from_another] is not equivalent to complex | float | int +./generics_defaults.py:93:16: Any[from_another] is not equivalent to str +./generics_defaults.py:94:16: Any[from_another] is not equivalent to int +./generics_defaults.py:95:16: Any[from_another] is not equivalent to bool +./generics_defaults.py:97:16: Any[from_another] is not equivalent to int +./generics_defaults.py:98:16: Any[from_another] is not equivalent to complex | float | int +./generics_defaults.py:99:16: Any[from_another] is not equivalent to str +./generics_defaults.py:100:16: Any[from_another] is not equivalent to int +./generics_defaults.py:101:16: Any[from_another] is not equivalent to bool +./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None +./generics_defaults.py:123:16: Annotated[./generics_defaults.py.Class_ParamSpec, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_defaults.py:123:35: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] +./generics_defaults.py:124:16: Annotated[./generics_defaults.py.Class_ParamSpec[Any[error]], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_defaults.py:124:49: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] +./generics_defaults.py:139:16: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[str, int] +./generics_defaults.py:140:16: Annotated[./generics_defaults.py.Class_TypeVarTuple, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=SequenceValue(typ=, literal_only=False, args=(AnyValue(source=),), members=((True, AnyValue(source=)),)))] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int] +./generics_defaults.py:152:11: the bound and default are incompatible [invalid_annotation] +./generics_defaults.py:159:11: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults.py:176:12: Any[generic_argument] is not equivalent to int +./generics_defaults.py:188:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_annotation] +./generics_defaults.py:203:36: Invalid type annotation [] [invalid_annotation] +./generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation] +./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str] +./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None +./generics_defaults.py:208:16: (...) -> None is not equivalent to (bytes, /) -> None +./generics_defaults.py:223:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int] +./generics_defaults.py:224:12: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index 937a96bd0..31714d514 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -7,8 +7,7 @@ Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '. Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None]'] Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str]"] Line 77: Unexpected errors ['./generics_defaults_referential.py:77:10: TypeVar default must be one of its constraints [invalid_annotation]'] -Line 94: Unexpected errors ["./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]]"] -Line 95: Unexpected errors ['./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]]'] +Line 98: Unexpected errors ['./generics_defaults_referential.py:98:16: Any[generic_argument] is not equivalent to list[Any[explicit]]'] """ output = """ ./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]] @@ -19,6 +18,5 @@ output = """ ./generics_defaults_referential.py:74:11: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults_referential.py:77:10: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults_referential.py:78:15: TypeVar default must be one of its constraints [invalid_annotation] -./generics_defaults_referential.py:94:12: type '.../tests/generics_defaults_referential.py.Bar' is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[Any[explicit], list[Any[explicit]]]] -./generics_defaults_referential.py:95:12: Literal[.../tests/generics_defaults_referential.py.Bar[int, list[~Z1]]] is not equivalent to type[.../tests/generics_defaults_referential.py.Bar[int, list[int]]] +./generics_defaults_referential.py:98:16: Any[generic_argument] is not equivalent to list[Any[explicit]] """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index b0fc891af..88b9a6997 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -1,8 +1,6 @@ conformance_automated = "Fail" errors_diff = """ -Line 14: Expected 1 errors Line 18: Expected 1 errors -Line 35: Expected 1 errors Line 92: Expected 1 errors Line 95: Expected 1 errors Line 98: Expected 1 errors @@ -10,6 +8,9 @@ Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] """ output = """ +./generics_syntax_scoping.py:14:19: TypeVar bound cannot be parameterized by type variables [invalid_annotation] +./generics_syntax_scoping.py:35:6: Undefined name: T [undefined_name] +./generics_syntax_scoping.py:44:16: Undefined name: T [undefined_name] ./generics_syntax_scoping.py:44:1: Undefined name: decorator1 [undefined_name] ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] diff --git a/conformance/results/results.html b/conformance/results/results.html index 60c94973e..a6a450768 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -729,7 +729,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass      constructors_call_type
Partial

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

From 28b2535cd455a6f8d9f1ec332f2a864798540ea6 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 4 Mar 2026 20:34:20 -0800 Subject: [PATCH 62/78] progress --- .../results/pycroscope/aliases_recursive.toml | 4 +- .../pycroscope/annotations_generators.toml | 12 ++-- .../pycroscope/annotations_methods.toml | 2 +- .../results/pycroscope/callables_kwargs.toml | 18 +++--- .../pycroscope/callables_subtyping.toml | 60 +++++++++---------- .../pycroscope/constructors_call_type.toml | 12 ++-- .../pycroscope/directives_deprecated.toml | 10 ++-- .../pycroscope/directives_reveal_type.toml | 2 +- .../results/pycroscope/enums_expansion.toml | 2 +- .../generics_defaults_referential.toml | 12 ++-- .../generics_paramspec_components.toml | 2 +- .../pycroscope/generics_self_advanced.toml | 10 ++++ .../pycroscope/generics_self_attributes.toml | 4 +- .../pycroscope/generics_self_basic.toml | 6 +- .../pycroscope/generics_self_protocols.toml | 4 +- .../pycroscope/generics_self_usage.toml | 6 +- .../generics_typevartuple_args.toml | 8 +-- .../generics_typevartuple_unpack.toml | 2 +- .../generics_variance_inference.toml | 46 +++++++------- .../pycroscope/narrowing_typeguard.toml | 4 +- .../results/pycroscope/narrowing_typeis.toml | 10 ++-- .../results/pycroscope/protocols_generic.toml | 20 +++---- .../results/pycroscope/protocols_modules.toml | 8 +-- .../qualifiers_final_annotation.toml | 8 +-- .../pycroscope/specialtypes_never.toml | 2 +- conformance/results/results.html | 6 +- conformance/src/type_checker.py | 10 +++- 27 files changed, 155 insertions(+), 135 deletions(-) diff --git a/conformance/results/pycroscope/aliases_recursive.toml b/conformance/results/pycroscope/aliases_recursive.toml index 76161c460..9a645ad61 100644 --- a/conformance/results/pycroscope/aliases_recursive.toml +++ b/conformance/results/pycroscope/aliases_recursive.toml @@ -10,8 +10,8 @@ output = """ ./aliases_recursive.py:50:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping]]]], got Literal[{'1': [1]}] [incompatible_assignment] ./aliases_recursive.py:51:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping]]]], got Literal[{'1': '1', '2': 1, '3': [1, 2]}] [incompatible_assignment] ./aliases_recursive.py:52:0: Incompatible assignment: expected str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping = str | int | collections.abc.Mapping[str, str | int | collections.abc.Mapping[str, None.RecursiveMapping]]]], got Literal[{'1': '1', '2': 1, '3': {'0': '0', '1': 1, '2': [1, 2, 3]}}] [incompatible_assignment] -./aliases_recursive.py:63:0: Incompatible assignment: expected .../tests/aliases_recursive.py.GenericTypeAlias1[str] = list[.../tests/aliases_recursive.py.GenericTypeAlias1[~T1: (str, int)] = list[.../tests/aliases_recursive.py.GenericTypeAlias1[~T1: (str, int)] | ~T1: (str, int)] | ~T1: (str, int)], got Literal[['hi', [2.4]]] [incompatible_assignment] -./aliases_recursive.py:69:0: Incompatible assignment: expected .../tests/aliases_recursive.py.GenericTypeAlias2[str, int] = list[.../tests/aliases_recursive.py.GenericTypeAlias2[~T1: (str, int), ~T2] = list[.../tests/aliases_recursive.py.GenericTypeAlias2[~T1: (str, int), ~T2] | ~T1: (str, int) | ~T2] | ~T1: (str, int) | ~T2], got Literal[[[3, ['hi', 3, [3.4]]], 'hi']] [incompatible_assignment] +./aliases_recursive.py:63:0: Incompatible assignment: expected aliases_recursive.GenericTypeAlias1[str] = list[aliases_recursive.GenericTypeAlias1[~T1: (str, int)] = list[aliases_recursive.GenericTypeAlias1[~T1: (str, int)] | ~T1: (str, int)] | ~T1: (str, int)], got Literal[['hi', [2.4]]] [incompatible_assignment] +./aliases_recursive.py:69:0: Incompatible assignment: expected aliases_recursive.GenericTypeAlias2[str, int] = list[aliases_recursive.GenericTypeAlias2[~T1: (str, int), ~T2] = list[aliases_recursive.GenericTypeAlias2[~T1: (str, int), ~T2] | ~T1: (str, int) | ~T2] | ~T1: (str, int) | ~T2], got Literal[[[3, ['hi', 3, [3.4]]], 'hi']] [incompatible_assignment] ./aliases_recursive.py:72:0: Type alias RecursiveUnion has a circular definition [invalid_annotation] ./aliases_recursive.py:75:0: Type alias MutualReference1 has a circular definition [invalid_annotation] ./aliases_recursive.py:75:62: Type alias MutualReference2 has a circular definition [invalid_annotation] diff --git a/conformance/results/pycroscope/annotations_generators.toml b/conformance/results/pycroscope/annotations_generators.toml index 0e19de16f..44a1909d4 100644 --- a/conformance/results/pycroscope/annotations_generators.toml +++ b/conformance/results/pycroscope/annotations_generators.toml @@ -3,14 +3,14 @@ errors_diff = """ """ output = """ ./annotations_generators.py:51:0: Function may exit without returning a value [missing_return] -./annotations_generators.py:54:8: Incompatible return type: expected .../tests/annotations_generators.py.C, got Literal[False] [incompatible_return_value] -./annotations_generators.py:57:8: Cannot assign value of type Literal[3] to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] -./annotations_generators.py:66:8: Cannot assign value of type Literal[3] to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:54:8: Incompatible return type: expected annotations_generators.C, got Literal[False] [incompatible_return_value] +./annotations_generators.py:57:8: Cannot assign value of type Literal[3] to yield expression of type annotations_generators.A [incompatible_yield] +./annotations_generators.py:66:8: Cannot assign value of type Literal[3] to yield expression of type annotations_generators.A [incompatible_yield] ./annotations_generators.py:71:4: Incompatible return type: expected None, got Literal[True] [incompatible_return_value] -./annotations_generators.py:75:4: Cannot assign value of type .../tests/annotations_generators.py.B to yield expression of type .../tests/annotations_generators.py.A [incompatible_yield] +./annotations_generators.py:75:4: Cannot assign value of type annotations_generators.B to yield expression of type annotations_generators.A [incompatible_yield] ./annotations_generators.py:86:20: Generator function must return an iterable [generator_return] ./annotations_generators.py:91:26: Async generator function must return an async iterable [generator_return] -./annotations_generators.py:118:4: Cannot yield from collections.abc.Iterator[.../tests/annotations_generators.py.A] (expected .../tests/annotations_generators.py.B) [incompatible_yield] -./annotations_generators.py:119:4: Cannot yield from Literal[[1]] (expected .../tests/annotations_generators.py.B) [incompatible_yield] +./annotations_generators.py:118:4: Cannot yield from collections.abc.Iterator[annotations_generators.A] (expected annotations_generators.B) [incompatible_yield] +./annotations_generators.py:119:4: Cannot yield from Literal[[1]] (expected annotations_generators.B) [incompatible_yield] ./annotations_generators.py:135:4: Cannot send int to a generator (expected str) [incompatible_yield] """ diff --git a/conformance/results/pycroscope/annotations_methods.toml b/conformance/results/pycroscope/annotations_methods.toml index 884e56afa..abfcc72e8 100644 --- a/conformance/results/pycroscope/annotations_methods.toml +++ b/conformance/results/pycroscope/annotations_methods.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./annotations_methods.py:42:12: .../tests/annotations_methods.py.B is not equivalent to .../tests/annotations_methods.py.A +./annotations_methods.py:42:12: annotations_methods.B is not equivalent to annotations_methods.A """ diff --git a/conformance/results/pycroscope/callables_kwargs.toml b/conformance/results/pycroscope/callables_kwargs.toml index b3b3945bb..492f041f5 100644 --- a/conformance/results/pycroscope/callables_kwargs.toml +++ b/conformance/results/pycroscope/callables_kwargs.toml @@ -2,18 +2,18 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./callables_kwargs.py:46:4: In call to .../tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] -./callables_kwargs.py:51:4: In call to .../tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] -./callables_kwargs.py:52:4: In call to .../tests/callables_kwargs.py.func1: Missing required argument 'v1' [incompatible_call] +./callables_kwargs.py:46:4: In call to callables_kwargs.func1: Missing required argument 'v1' [incompatible_call] +./callables_kwargs.py:51:4: In call to callables_kwargs.func1: Got an unexpected keyword argument 'v4' [incompatible_call] +./callables_kwargs.py:52:4: In call to callables_kwargs.func1: Missing required argument 'v1' [incompatible_call] ./callables_kwargs.py:58:4: Incompatible argument type for v1: expected int but got str [incompatible_argument] -./callables_kwargs.py:61:4: In call to .../tests/callables_kwargs.py.func1: Got an unexpected keyword argument 'v4' [incompatible_call] +./callables_kwargs.py:61:4: In call to callables_kwargs.func1: Got an unexpected keyword argument 'v4' [incompatible_call] ./callables_kwargs.py:63:4: Multiple values provided for argument 'v1' [incompatible_call] -./callables_kwargs.py:64:4: In call to .../tests/callables_kwargs.py.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] +./callables_kwargs.py:64:4: In call to callables_kwargs.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] ./callables_kwargs.py:65:4: Multiple values provided for argument 'v1' [incompatible_call] -./callables_kwargs.py:101:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol3, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] -./callables_kwargs.py:102:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol4, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] -./callables_kwargs.py:103:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol5, got function '.../tests/callables_kwargs.py.func1' [incompatible_assignment] +./callables_kwargs.py:101:0: Incompatible assignment: expected callables_kwargs.TDProtocol3, got function 'callables_kwargs.func1' [incompatible_assignment] +./callables_kwargs.py:102:0: Incompatible assignment: expected callables_kwargs.TDProtocol4, got function 'callables_kwargs.func1' [incompatible_assignment] +./callables_kwargs.py:103:0: Incompatible assignment: expected callables_kwargs.TDProtocol5, got function 'callables_kwargs.func1' [incompatible_assignment] ./callables_kwargs.py:111:21: Parameter v1 overlaps with TypedDict key in **kwargs [invalid_annotation] ./callables_kwargs.py:122:12: Expected TypedDict type inside Unpack[] for **kwargs [invalid_annotation] -./callables_kwargs.py:134:0: Incompatible assignment: expected .../tests/callables_kwargs.py.TDProtocol6, got function '.../tests/callables_kwargs.py.func7' [incompatible_assignment] +./callables_kwargs.py:134:0: Incompatible assignment: expected callables_kwargs.TDProtocol6, got function 'callables_kwargs.func7' [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/callables_subtyping.toml b/conformance/results/pycroscope/callables_subtyping.toml index d664d1fdf..548cae50e 100644 --- a/conformance/results/pycroscope/callables_subtyping.toml +++ b/conformance/results/pycroscope/callables_subtyping.toml @@ -4,34 +4,34 @@ errors_diff = """ output = """ ./callables_subtyping.py:26:4: Incompatible assignment: expected (float | int, /) -> float | int, got (int, /) -> int [incompatible_assignment] ./callables_subtyping.py:29:4: Incompatible assignment: expected (int, /) -> int, got (float | int, /) -> float | int [incompatible_assignment] -./callables_subtyping.py:51:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.PosOnly2 [incompatible_assignment] -./callables_subtyping.py:52:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard2, got .../tests/callables_subtyping.py.KwOnly2 [incompatible_assignment] -./callables_subtyping.py:55:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly2, got .../tests/callables_subtyping.py.KwOnly2 [incompatible_assignment] -./callables_subtyping.py:58:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly2, got .../tests/callables_subtyping.py.PosOnly2 [incompatible_assignment] -./callables_subtyping.py:82:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs3, got .../tests/callables_subtyping.py.NoArgs3 [incompatible_assignment] -./callables_subtyping.py:85:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.NoArgs3 [incompatible_assignment] -./callables_subtyping.py:86:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArgs3, got .../tests/callables_subtyping.py.IntArgs3 [incompatible_assignment] -./callables_subtyping.py:116:4: Incompatible assignment: expected .../tests/callables_subtyping.py.PosOnly4, got .../tests/callables_subtyping.py.IntArgs4 [incompatible_assignment] -./callables_subtyping.py:119:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.StrArgs4 [incompatible_assignment] -./callables_subtyping.py:120:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrArgs4, got .../tests/callables_subtyping.py.IntArgs4 [incompatible_assignment] -./callables_subtyping.py:122:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrArgs4, got .../tests/callables_subtyping.py.IntArgs4 [incompatible_assignment] -./callables_subtyping.py:124:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntArgs4, got .../tests/callables_subtyping.py.StrArgs4 [incompatible_assignment] -./callables_subtyping.py:125:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.IntStrArgs4 [incompatible_assignment] -./callables_subtyping.py:126:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard4, got .../tests/callables_subtyping.py.StrArgs4 [incompatible_assignment] -./callables_subtyping.py:151:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 [incompatible_assignment] -./callables_subtyping.py:154:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.NoKwargs5 [incompatible_assignment] -./callables_subtyping.py:155:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatKwargs5, got .../tests/callables_subtyping.py.IntKwargs5 [incompatible_assignment] -./callables_subtyping.py:187:4: Incompatible assignment: expected .../tests/callables_subtyping.py.KwOnly6, got .../tests/callables_subtyping.py.IntKwargs6 [incompatible_assignment] -./callables_subtyping.py:190:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 [incompatible_assignment] -./callables_subtyping.py:191:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntStrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 [incompatible_assignment] -./callables_subtyping.py:193:4: Incompatible assignment: expected .../tests/callables_subtyping.py.StrKwargs6, got .../tests/callables_subtyping.py.IntKwargs6 [incompatible_assignment] -./callables_subtyping.py:195:4: Incompatible assignment: expected .../tests/callables_subtyping.py.IntKwargs6, got .../tests/callables_subtyping.py.StrKwargs6 [incompatible_assignment] -./callables_subtyping.py:196:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.IntStrKwargs6 [incompatible_assignment] -./callables_subtyping.py:197:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Standard6, got .../tests/callables_subtyping.py.StrKwargs6 [incompatible_assignment] -./callables_subtyping.py:236:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoDefaultArg8 [incompatible_assignment] -./callables_subtyping.py:237:4: Incompatible assignment: expected .../tests/callables_subtyping.py.DefaultArg8, got .../tests/callables_subtyping.py.NoX8 [incompatible_assignment] -./callables_subtyping.py:240:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoDefaultArg8, got .../tests/callables_subtyping.py.NoX8 [incompatible_assignment] -./callables_subtyping.py:243:4: Incompatible assignment: expected .../tests/callables_subtyping.py.NoX8, got .../tests/callables_subtyping.py.NoDefaultArg8 [incompatible_assignment] -./callables_subtyping.py:273:4: Incompatible assignment: expected .../tests/callables_subtyping.py.FloatArg9, got .../tests/callables_subtyping.py.Overloaded9 [incompatible_assignment] -./callables_subtyping.py:297:4: Incompatible assignment: expected .../tests/callables_subtyping.py.Overloaded10, got .../tests/callables_subtyping.py.StrArg10 [incompatible_assignment] +./callables_subtyping.py:51:4: Incompatible assignment: expected callables_subtyping.Standard2, got callables_subtyping.PosOnly2 [incompatible_assignment] +./callables_subtyping.py:52:4: Incompatible assignment: expected callables_subtyping.Standard2, got callables_subtyping.KwOnly2 [incompatible_assignment] +./callables_subtyping.py:55:4: Incompatible assignment: expected callables_subtyping.PosOnly2, got callables_subtyping.KwOnly2 [incompatible_assignment] +./callables_subtyping.py:58:4: Incompatible assignment: expected callables_subtyping.KwOnly2, got callables_subtyping.PosOnly2 [incompatible_assignment] +./callables_subtyping.py:82:4: Incompatible assignment: expected callables_subtyping.IntArgs3, got callables_subtyping.NoArgs3 [incompatible_assignment] +./callables_subtyping.py:85:4: Incompatible assignment: expected callables_subtyping.FloatArgs3, got callables_subtyping.NoArgs3 [incompatible_assignment] +./callables_subtyping.py:86:4: Incompatible assignment: expected callables_subtyping.FloatArgs3, got callables_subtyping.IntArgs3 [incompatible_assignment] +./callables_subtyping.py:116:4: Incompatible assignment: expected callables_subtyping.PosOnly4, got callables_subtyping.IntArgs4 [incompatible_assignment] +./callables_subtyping.py:119:4: Incompatible assignment: expected callables_subtyping.IntStrArgs4, got callables_subtyping.StrArgs4 [incompatible_assignment] +./callables_subtyping.py:120:4: Incompatible assignment: expected callables_subtyping.IntStrArgs4, got callables_subtyping.IntArgs4 [incompatible_assignment] +./callables_subtyping.py:122:4: Incompatible assignment: expected callables_subtyping.StrArgs4, got callables_subtyping.IntArgs4 [incompatible_assignment] +./callables_subtyping.py:124:4: Incompatible assignment: expected callables_subtyping.IntArgs4, got callables_subtyping.StrArgs4 [incompatible_assignment] +./callables_subtyping.py:125:4: Incompatible assignment: expected callables_subtyping.Standard4, got callables_subtyping.IntStrArgs4 [incompatible_assignment] +./callables_subtyping.py:126:4: Incompatible assignment: expected callables_subtyping.Standard4, got callables_subtyping.StrArgs4 [incompatible_assignment] +./callables_subtyping.py:151:4: Incompatible assignment: expected callables_subtyping.IntKwargs5, got callables_subtyping.NoKwargs5 [incompatible_assignment] +./callables_subtyping.py:154:4: Incompatible assignment: expected callables_subtyping.FloatKwargs5, got callables_subtyping.NoKwargs5 [incompatible_assignment] +./callables_subtyping.py:155:4: Incompatible assignment: expected callables_subtyping.FloatKwargs5, got callables_subtyping.IntKwargs5 [incompatible_assignment] +./callables_subtyping.py:187:4: Incompatible assignment: expected callables_subtyping.KwOnly6, got callables_subtyping.IntKwargs6 [incompatible_assignment] +./callables_subtyping.py:190:4: Incompatible assignment: expected callables_subtyping.IntStrKwargs6, got callables_subtyping.StrKwargs6 [incompatible_assignment] +./callables_subtyping.py:191:4: Incompatible assignment: expected callables_subtyping.IntStrKwargs6, got callables_subtyping.IntKwargs6 [incompatible_assignment] +./callables_subtyping.py:193:4: Incompatible assignment: expected callables_subtyping.StrKwargs6, got callables_subtyping.IntKwargs6 [incompatible_assignment] +./callables_subtyping.py:195:4: Incompatible assignment: expected callables_subtyping.IntKwargs6, got callables_subtyping.StrKwargs6 [incompatible_assignment] +./callables_subtyping.py:196:4: Incompatible assignment: expected callables_subtyping.Standard6, got callables_subtyping.IntStrKwargs6 [incompatible_assignment] +./callables_subtyping.py:197:4: Incompatible assignment: expected callables_subtyping.Standard6, got callables_subtyping.StrKwargs6 [incompatible_assignment] +./callables_subtyping.py:236:4: Incompatible assignment: expected callables_subtyping.DefaultArg8, got callables_subtyping.NoDefaultArg8 [incompatible_assignment] +./callables_subtyping.py:237:4: Incompatible assignment: expected callables_subtyping.DefaultArg8, got callables_subtyping.NoX8 [incompatible_assignment] +./callables_subtyping.py:240:4: Incompatible assignment: expected callables_subtyping.NoDefaultArg8, got callables_subtyping.NoX8 [incompatible_assignment] +./callables_subtyping.py:243:4: Incompatible assignment: expected callables_subtyping.NoX8, got callables_subtyping.NoDefaultArg8 [incompatible_assignment] +./callables_subtyping.py:273:4: Incompatible assignment: expected callables_subtyping.FloatArg9, got callables_subtyping.Overloaded9 [incompatible_assignment] +./callables_subtyping.py:297:4: Incompatible assignment: expected callables_subtyping.Overloaded10, got callables_subtyping.StrArg10 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/constructors_call_type.toml b/conformance/results/pycroscope/constructors_call_type.toml index 01406f8c9..1391f7471 100644 --- a/conformance/results/pycroscope/constructors_call_type.toml +++ b/conformance/results/pycroscope/constructors_call_type.toml @@ -2,12 +2,12 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./constructors_call_type.py:30:4: In call to .../tests/constructors_call_type.py.Meta1.__call__: Missing required argument 'x' [incompatible_call] -./constructors_call_type.py:40:4: In call to .../tests/constructors_call_type.py.Class2: Missing required argument 'x' [incompatible_call] -./constructors_call_type.py:50:4: In call to .../tests/constructors_call_type.py.Class3: Missing required argument 'x' [incompatible_call] -./constructors_call_type.py:59:4: In call to .../tests/constructors_call_type.py.Class4: Takes 0 positional arguments but 1 were given [incompatible_call] +./constructors_call_type.py:30:4: In call to constructors_call_type.Meta1.__call__: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:40:4: In call to constructors_call_type.Class2: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:50:4: In call to constructors_call_type.Class3: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:59:4: In call to constructors_call_type.Class4: Takes 0 positional arguments but 1 were given [incompatible_call] ./constructors_call_type.py:64:4: Takes 0 positional arguments but 1 were given [incompatible_call] -./constructors_call_type.py:72:4: In call to .../tests/constructors_call_type.py.Meta1.__call__: Missing required argument 'x' [incompatible_call] -./constructors_call_type.py:81:4: In call to .../tests/constructors_call_type.py.Class2: Missing required argument 'y' [incompatible_call] +./constructors_call_type.py:72:4: In call to constructors_call_type.Meta1.__call__: Missing required argument 'x' [incompatible_call] +./constructors_call_type.py:81:4: In call to constructors_call_type.Class2: Missing required argument 'y' [incompatible_call] ./constructors_call_type.py:82:11: Incompatible argument type for y: expected str but got Literal[2] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 4d5a97060..64b88f59a 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -1,9 +1,5 @@ conformance_automated = "Fail" 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 @@ -12,7 +8,13 @@ Line 48: Expected 1 errors Line 58: Expected 1 errors Line 69: Expected 1 errors Line 98: Expected 1 errors +Line 31: Unexpected errors ['./directives_deprecated.py:31:0: Use of deprecated overload (*args: Any[inference], **kwargs: Any[inference]) -> Any[unannotated]: Only str will be allowed [deprecated]'] """ output = """ +./directives_deprecated.py:18:43: type '_directives_deprecated_library.Ham' is deprecated: Use Spam instead [deprecated] +./directives_deprecated.py:24:0: function '_directives_deprecated_library.norwegian_blue' is deprecated: It is pining for the fjords [deprecated] +./directives_deprecated.py:25:4: function '_directives_deprecated_library.norwegian_blue' is deprecated: It is pining for the fjords [deprecated] +./directives_deprecated.py:30:0: Use of deprecated overload (*args: Any[inference], **kwargs: Any[inference]) -> Any[unannotated]: Only str will be allowed [deprecated] +./directives_deprecated.py:31:0: Use of deprecated overload (*args: Any[inference], **kwargs: Any[inference]) -> Any[unannotated]: Only str will be allowed [deprecated] ./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] """ diff --git a/conformance/results/pycroscope/directives_reveal_type.toml b/conformance/results/pycroscope/directives_reveal_type.toml index 419c4f6ec..4af147aab 100644 --- a/conformance/results/pycroscope/directives_reveal_type.toml +++ b/conformance/results/pycroscope/directives_reveal_type.toml @@ -5,7 +5,7 @@ output = """ ./directives_reveal_type.py:14:16: Revealed type is 'int | str' [reveal_type] ./directives_reveal_type.py:15:16: Revealed type is 'list[int]' [reveal_type] ./directives_reveal_type.py:16:16: Revealed type is 'Any[explicit]' [reveal_type] -./directives_reveal_type.py:17:16: Revealed type is '.../tests/directives_reveal_type.py.ForwardReference' [reveal_type] +./directives_reveal_type.py:17:16: Revealed type is 'directives_reveal_type.ForwardReference' [reveal_type] ./directives_reveal_type.py:19:4: In call to typing.reveal_type: Missing required positional argument 'value' [incompatible_call] ./directives_reveal_type.py:20:4: In call to typing.reveal_type: Takes 1 positional arguments but 2 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/enums_expansion.toml b/conformance/results/pycroscope/enums_expansion.toml index be7650444..e12a9c12f 100644 --- a/conformance/results/pycroscope/enums_expansion.toml +++ b/conformance/results/pycroscope/enums_expansion.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./enums_expansion.py:53:20: .../tests/enums_expansion.py.CustomFlags is not equivalent to Literal[] +./enums_expansion.py:53:20: enums_expansion.CustomFlags is not equivalent to Literal[] """ diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index 31714d514..ced292aeb 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -3,16 +3,16 @@ errors_diff = """ Line 36: Expected 1 errors Line 53: Expected 1 errors Line 60: Expected 1 errors -Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]]"] -Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None]'] -Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str]"] +Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type 'generics_defaults_referential.slice' is not equivalent to type[generics_defaults_referential.slice[int, int, int | None]]"] +Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: generics_defaults_referential.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to generics_defaults_referential.slice[int, int, int | None]'] +Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: generics_defaults_referential.Foo[Literal[1], Literal['']] is not equivalent to generics_defaults_referential.Foo[int, str]"] Line 77: Unexpected errors ['./generics_defaults_referential.py:77:10: TypeVar default must be one of its constraints [invalid_annotation]'] Line 98: Unexpected errors ['./generics_defaults_referential.py:98:16: Any[generic_argument] is not equivalent to list[Any[explicit]]'] """ output = """ -./generics_defaults_referential.py:23:12: type '.../tests/generics_defaults_referential.py.slice' is not equivalent to type[.../tests/generics_defaults_referential.py.slice[int, int, int | None]] -./generics_defaults_referential.py:24:12: .../tests/generics_defaults_referential.py.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to .../tests/generics_defaults_referential.py.slice[int, int, int | None] -./generics_defaults_referential.py:35:12: .../tests/generics_defaults_referential.py.Foo[Literal[1], Literal['']] is not equivalent to .../tests/generics_defaults_referential.py.Foo[int, str] +./generics_defaults_referential.py:23:12: type 'generics_defaults_referential.slice' is not equivalent to type[generics_defaults_referential.slice[int, int, int | None]] +./generics_defaults_referential.py:24:12: generics_defaults_referential.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to generics_defaults_referential.slice[int, int, int | None] +./generics_defaults_referential.py:35:12: generics_defaults_referential.Foo[Literal[1], Literal['']] is not equivalent to generics_defaults_referential.Foo[int, str] ./generics_defaults_referential.py:37:9: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] ./generics_defaults_referential.py:68:11: the bound and default are incompatible [invalid_annotation] ./generics_defaults_referential.py:74:11: TypeVar default must be one of its constraints [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_paramspec_components.toml b/conformance/results/pycroscope/generics_paramspec_components.toml index b1fbff4cd..0ee45d636 100644 --- a/conformance/results/pycroscope/generics_paramspec_components.toml +++ b/conformance/results/pycroscope/generics_paramspec_components.toml @@ -19,5 +19,5 @@ output = """ ./generics_paramspec_components.py:70:17: Arguments cannot follow ParamSpec.args [incompatible_call] ./generics_paramspec_components.py:72:8: Missing required positional argument at position 0 [incompatible_call] ./generics_paramspec_components.py:83:14: Arguments cannot follow ParamSpec.args [incompatible_call] -./generics_paramspec_components.py:98:0: In call to .../tests/generics_paramspec_components.py.twice: Cannot resolve type variables [incompatible_call] +./generics_paramspec_components.py:98:0: In call to generics_paramspec_components.twice: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index fd7cb9e4a..62df81dd7 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -2,12 +2,22 @@ conformance_automated = "Fail" errors_diff = """ Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA'] +Line 35: Unexpected errors ['./generics_self_advanced.py:35:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT'] +Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: list[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to list[~SelfT]'] +Line 37: Unexpected errors ['./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT'] +Line 38: Unexpected errors ['./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[Any[generic_argument]] is not equivalent to ~SelfT'] +Line 42: Unexpected errors ['./generics_self_advanced.py:42:20: type[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to type[~SelfT]'] Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[error] is not equivalent to list[~SelfT]', "./generics_self_advanced.py:43:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute]"] Line 44: Unexpected errors ["./generics_self_advanced.py:44:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute]"] """ output = """ ./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA ./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA +./generics_self_advanced.py:35:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT +./generics_self_advanced.py:36:20: list[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to list[~SelfT] +./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT +./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[Any[generic_argument]] is not equivalent to ~SelfT +./generics_self_advanced.py:42:20: type[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to type[~SelfT] ./generics_self_advanced.py:43:20: Any[error] is not equivalent to list[~SelfT] ./generics_self_advanced.py:43:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute] ./generics_self_advanced.py:44:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute] diff --git a/conformance/results/pycroscope/generics_self_attributes.toml b/conformance/results/pycroscope/generics_self_attributes.toml index 13f57d1c3..df48cbd91 100644 --- a/conformance/results/pycroscope/generics_self_attributes.toml +++ b/conformance/results/pycroscope/generics_self_attributes.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_attributes.py:26:37: Incompatible argument type for next: expected .../tests/generics_self_attributes.py.OrdinalLinkedList | None but got .../tests/generics_self_attributes.py.LinkedList[int] [incompatible_argument] -./generics_self_attributes.py:32:4: Incompatible assignment: expected .../tests/generics_self_attributes.py.OrdinalLinkedList | NoneType, got .../tests/generics_self_attributes.py.LinkedList[int] [incompatible_assignment] +./generics_self_attributes.py:26:37: Incompatible argument type for next: expected generics_self_attributes.OrdinalLinkedList | None but got generics_self_attributes.LinkedList[int] [incompatible_argument] +./generics_self_attributes.py:32:4: Incompatible assignment: expected generics_self_attributes.OrdinalLinkedList | NoneType, got generics_self_attributes.LinkedList[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 6b54e0007..aea6d34be 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -1,8 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 20: Expected 1 errors -Line 33: Expected 1 errors """ output = """ +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_protocols.toml b/conformance/results/pycroscope/generics_self_protocols.toml index 769807d08..cfcf2f650 100644 --- a/conformance/results/pycroscope/generics_self_protocols.toml +++ b/conformance/results/pycroscope/generics_self_protocols.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol but got .../tests/generics_self_protocols.py.BadReturnType [incompatible_argument] -./generics_self_protocols.py:64:18: Incompatible argument type for shape: expected .../tests/generics_self_protocols.py.ShapeProtocol but got .../tests/generics_self_protocols.py.ReturnDifferentClass [incompatible_argument] +./generics_self_protocols.py:61:18: Incompatible argument type for shape: expected generics_self_protocols.ShapeProtocol but got generics_self_protocols.BadReturnType [incompatible_argument] +./generics_self_protocols.py:64:18: Incompatible argument type for shape: expected generics_self_protocols.ShapeProtocol but got generics_self_protocols.ReturnDifferentClass [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 7e7f3f25b..70baea9eb 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -1,9 +1,7 @@ conformance_automated = "Fail" errors_diff = """ -Line 73: Expected 1 errors Line 76: Expected 1 errors Line 82: Expected 1 errors -Line 87: Expected 1 errors Line 103: Expected 1 errors Line 105: Expected 1 errors Line 108: Expected 1 errors @@ -11,6 +9,10 @@ Line 113: Expected 1 errors Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors +Line 63: Unexpected errors ['./generics_self_usage.py:63:19: Incompatible argument type for inner_self: expected ~SelfT but got ./generics_self_usage.py.HasNestedFunction [incompatible_argument]'] """ output = """ +./generics_self_usage.py:63:19: Incompatible argument type for inner_self: expected ~SelfT but got ./generics_self_usage.py.HasNestedFunction [incompatible_argument] +./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] +./generics_self_usage.py:87:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_usage.py.Foo3, HasAttrExtension(attribute_name=KnownValue(val='return_concrete_type'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_usage.py.Foo3', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_return_value] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_args.toml b/conformance/results/pycroscope/generics_typevartuple_args.toml index 13dc12072..f0b5890b9 100644 --- a/conformance/results/pycroscope/generics_typevartuple_args.toml +++ b/conformance/results/pycroscope/generics_typevartuple_args.toml @@ -3,12 +3,12 @@ errors_diff = """ Line 76: Expected 1 errors """ output = """ -./generics_typevartuple_args.py:33:4: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], .../tests/generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] -./generics_typevartuple_args.py:34:4: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], .../tests/generics_typevartuple_args.py.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:33:4: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], generics_typevartuple_args.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] +./generics_typevartuple_args.py:34:4: Incompatible argument type for args: expected tuple[*tuple[Ts, ...], generics_typevartuple_args.Env] but got tuple[Literal[0], Literal['']] [incompatible_argument] ./generics_typevartuple_args.py:48:0: Incompatible argument type for args: expected tuple[int, ...] but got tuple[Literal[1], Literal['2'], Literal[3]] [incompatible_argument] ./generics_typevartuple_args.py:57:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal[1], Literal[1], Literal['']] [incompatible_argument] ./generics_typevartuple_args.py:58:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal[1]] [incompatible_argument] ./generics_typevartuple_args.py:59:0: Incompatible argument type for args: expected tuple[int, *tuple[str, ...], str] but got tuple[Literal['']] [incompatible_argument] -./generics_typevartuple_args.py:67:0: In call to .../tests/generics_typevartuple_args.py.func3: Missing required positional argument at position 1 [incompatible_call] -./generics_typevartuple_args.py:75:0: In call to .../tests/generics_typevartuple_args.py.func4: Cannot resolve type variables [incompatible_call] +./generics_typevartuple_args.py:67:0: In call to generics_typevartuple_args.func3: Missing required positional argument at position 1 [incompatible_call] +./generics_typevartuple_args.py:75:0: In call to generics_typevartuple_args.func4: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_unpack.toml b/conformance/results/pycroscope/generics_typevartuple_unpack.toml index 105a70fb0..6d998b597 100644 --- a/conformance/results/pycroscope/generics_typevartuple_unpack.toml +++ b/conformance/results/pycroscope/generics_typevartuple_unpack.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_typevartuple_unpack.py:30:27: Incompatible argument type for x: expected .../tests/generics_typevartuple_unpack.py.Array[tuple[NewType('Batch', int), *tuple[Any[explicit], ...], NewType('Channels', int)]] but got .../tests/generics_typevartuple_unpack.py.Array[NewType('Batch', int)] [incompatible_argument] +./generics_typevartuple_unpack.py:30:27: Incompatible argument type for x: expected generics_typevartuple_unpack.Array[tuple[NewType('Batch', int), *tuple[Any[explicit], ...], NewType('Channels', int)]] but got generics_typevartuple_unpack.Array[NewType('Batch', int)] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_variance_inference.toml b/conformance/results/pycroscope/generics_variance_inference.toml index b32ac9a7f..56b1fa57b 100644 --- a/conformance/results/pycroscope/generics_variance_inference.toml +++ b/conformance/results/pycroscope/generics_variance_inference.toml @@ -2,27 +2,27 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_variance_inference.py:24:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] -./generics_variance_inference.py:25:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[float | int, float | int, int], got .../tests/generics_variance_inference.py.ClassA[float | int, int, int] [incompatible_assignment] -./generics_variance_inference.py:28:4: Incompatible assignment: expected .../tests/generics_variance_inference.py.ClassA[int, int, int], got .../tests/generics_variance_inference.py.ClassA[int, float | int, float | int] [incompatible_assignment] -./generics_variance_inference.py:41:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant1[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant1[float | int] [incompatible_assignment] -./generics_variance_inference.py:49:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant2[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant2[float | int] [incompatible_assignment] -./generics_variance_inference.py:58:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant3[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant3[float | int] [incompatible_assignment] -./generics_variance_inference.py:67:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant4[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant4[float | int] [incompatible_assignment] -./generics_variance_inference.py:80:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant5[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant5[float | int] [incompatible_assignment] -./generics_variance_inference.py:96:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant1[int] [incompatible_assignment] -./generics_variance_inference.py:97:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant1[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant1[float | int] [incompatible_assignment] -./generics_variance_inference.py:111:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant2[int] [incompatible_assignment] -./generics_variance_inference.py:112:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant2[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant2[float | int] [incompatible_assignment] -./generics_variance_inference.py:119:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[float | int, str], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[int, str] [incompatible_assignment] -./generics_variance_inference.py:120:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[int, str], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[float | int, str] [incompatible_assignment] -./generics_variance_inference.py:121:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, int] [incompatible_assignment] -./generics_variance_inference.py:122:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, int], got .../tests/generics_variance_inference.py.ShouldBeInvariant3[str, float | int] [incompatible_assignment] -./generics_variance_inference.py:130:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant4[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant4[int] [incompatible_assignment] -./generics_variance_inference.py:138:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant5[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant5[int] [incompatible_assignment] -./generics_variance_inference.py:149:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant1[float | int], got .../tests/generics_variance_inference.py.ShouldBeContravariant1[int] [incompatible_assignment] -./generics_variance_inference.py:169:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant6[int], got .../tests/generics_variance_inference.py.ShouldBeInvariant6[float | int] [incompatible_assignment] -./generics_variance_inference.py:170:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeInvariant6[float | int], got .../tests/generics_variance_inference.py.ShouldBeInvariant6[int] [incompatible_assignment] -./generics_variance_inference.py:181:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeCovariant6[int], got .../tests/generics_variance_inference.py.ShouldBeCovariant6[float | int] [incompatible_assignment] -./generics_variance_inference.py:194:0: Incompatible assignment: expected .../tests/generics_variance_inference.py.ShouldBeContravariant2[float | int], got .../tests/generics_variance_inference.py.ShouldBeContravariant2[int] [incompatible_assignment] +./generics_variance_inference.py:24:4: Incompatible assignment: expected generics_variance_inference.ClassA[int, int, int], got generics_variance_inference.ClassA[float | int, int, int] [incompatible_assignment] +./generics_variance_inference.py:25:4: Incompatible assignment: expected generics_variance_inference.ClassA[float | int, float | int, int], got generics_variance_inference.ClassA[float | int, int, int] [incompatible_assignment] +./generics_variance_inference.py:28:4: Incompatible assignment: expected generics_variance_inference.ClassA[int, int, int], got generics_variance_inference.ClassA[int, float | int, float | int] [incompatible_assignment] +./generics_variance_inference.py:41:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant1[int], got generics_variance_inference.ShouldBeCovariant1[float | int] [incompatible_assignment] +./generics_variance_inference.py:49:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant2[int], got generics_variance_inference.ShouldBeCovariant2[float | int] [incompatible_assignment] +./generics_variance_inference.py:58:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant3[int], got generics_variance_inference.ShouldBeCovariant3[float | int] [incompatible_assignment] +./generics_variance_inference.py:67:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant4[int], got generics_variance_inference.ShouldBeCovariant4[float | int] [incompatible_assignment] +./generics_variance_inference.py:80:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant5[int], got generics_variance_inference.ShouldBeCovariant5[float | int] [incompatible_assignment] +./generics_variance_inference.py:96:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant1[float | int], got generics_variance_inference.ShouldBeInvariant1[int] [incompatible_assignment] +./generics_variance_inference.py:97:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant1[int], got generics_variance_inference.ShouldBeInvariant1[float | int] [incompatible_assignment] +./generics_variance_inference.py:111:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant2[float | int], got generics_variance_inference.ShouldBeInvariant2[int] [incompatible_assignment] +./generics_variance_inference.py:112:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant2[int], got generics_variance_inference.ShouldBeInvariant2[float | int] [incompatible_assignment] +./generics_variance_inference.py:119:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant3[float | int, str], got generics_variance_inference.ShouldBeInvariant3[int, str] [incompatible_assignment] +./generics_variance_inference.py:120:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant3[int, str], got generics_variance_inference.ShouldBeInvariant3[float | int, str] [incompatible_assignment] +./generics_variance_inference.py:121:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant3[str, float | int], got generics_variance_inference.ShouldBeInvariant3[str, int] [incompatible_assignment] +./generics_variance_inference.py:122:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant3[str, int], got generics_variance_inference.ShouldBeInvariant3[str, float | int] [incompatible_assignment] +./generics_variance_inference.py:130:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant4[float | int], got generics_variance_inference.ShouldBeInvariant4[int] [incompatible_assignment] +./generics_variance_inference.py:138:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant5[float | int], got generics_variance_inference.ShouldBeInvariant5[int] [incompatible_assignment] +./generics_variance_inference.py:149:0: Incompatible assignment: expected generics_variance_inference.ShouldBeContravariant1[float | int], got generics_variance_inference.ShouldBeContravariant1[int] [incompatible_assignment] +./generics_variance_inference.py:169:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant6[int], got generics_variance_inference.ShouldBeInvariant6[float | int] [incompatible_assignment] +./generics_variance_inference.py:170:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant6[float | int], got generics_variance_inference.ShouldBeInvariant6[int] [incompatible_assignment] +./generics_variance_inference.py:181:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant6[int], got generics_variance_inference.ShouldBeCovariant6[float | int] [incompatible_assignment] +./generics_variance_inference.py:194:0: Incompatible assignment: expected generics_variance_inference.ShouldBeContravariant2[float | int], got generics_variance_inference.ShouldBeContravariant2[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/narrowing_typeguard.toml b/conformance/results/pycroscope/narrowing_typeguard.toml index 8ffb21555..9b9824070 100644 --- a/conformance/results/pycroscope/narrowing_typeguard.toml +++ b/conformance/results/pycroscope/narrowing_typeguard.toml @@ -4,6 +4,6 @@ errors_diff = """ output = """ ./narrowing_typeguard.py:102:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeguard.py:107:4: TypeGuard must be used on a function taking at least one positional parameter [invalid_typeguard] -./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] -./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected .../tests/narrowing_typeguard.py.CallableStrProto but got function '.../tests/narrowing_typeguard.py.simple_typeguard' [incompatible_argument] +./narrowing_typeguard.py:128:19: Incompatible argument type for f: expected (object, /) -> str but got function 'narrowing_typeguard.simple_typeguard' [incompatible_argument] +./narrowing_typeguard.py:148:25: Incompatible argument type for f: expected narrowing_typeguard.CallableStrProto but got function 'narrowing_typeguard.simple_typeguard' [incompatible_argument] """ diff --git a/conformance/results/pycroscope/narrowing_typeis.toml b/conformance/results/pycroscope/narrowing_typeis.toml index cc4cfc782..22643620c 100644 --- a/conformance/results/pycroscope/narrowing_typeis.toml +++ b/conformance/results/pycroscope/narrowing_typeis.toml @@ -4,11 +4,11 @@ errors_diff = """ output = """ ./narrowing_typeis.py:105:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] ./narrowing_typeis.py:110:4: TypeIs must be used on a function taking at least one positional parameter [invalid_typeguard] -./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] -./narrowing_typeis.py:152:25: Incompatible argument type for f: expected .../tests/narrowing_typeis.py.CallableStrProto but got function '.../tests/narrowing_typeis.py.simple_typeguard' [incompatible_argument] -./narrowing_typeis.py:169:16: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeGuardExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeis' [incompatible_argument] -./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.is_int_typeguard' [incompatible_argument] -./narrowing_typeis.py:191:17: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function '.../tests/narrowing_typeis.py.bool_typeis' [incompatible_argument] +./narrowing_typeis.py:132:19: Incompatible argument type for f: expected (object, /) -> str but got function 'narrowing_typeis.simple_typeguard' [incompatible_argument] +./narrowing_typeis.py:152:25: Incompatible argument type for f: expected narrowing_typeis.CallableStrProto but got function 'narrowing_typeis.simple_typeguard' [incompatible_argument] +./narrowing_typeis.py:169:16: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeGuardExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function 'narrowing_typeis.is_int_typeis' [incompatible_argument] +./narrowing_typeis.py:170:13: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function 'narrowing_typeis.is_int_typeguard' [incompatible_argument] +./narrowing_typeis.py:191:17: Incompatible argument type for f: expected (object, /) -> Annotated[bool, TypeIsExtension(guarded_type=TypedValue(typ=, literal_only=False))] but got function 'narrowing_typeis.bool_typeis' [incompatible_argument] ./narrowing_typeis.py:195:26: TypeIs narrowed type str is incompatible with parameter x [typeis_must_be_subtype] ./narrowing_typeis.py:199:44: TypeIs narrowed type list[int] is incompatible with parameter x [typeis_must_be_subtype] """ diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index 083053cd3..fb84ec180 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -1,16 +1,16 @@ conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors -Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent'] +Line 96: Unexpected errors ['./protocols_generic.py:96:12: Literal[] is not equivalent to protocols_generic.ConcreteHasParent'] """ output = """ -./protocols_generic.py:40:0: Incompatible assignment: expected .../tests/protocols_generic.py.Proto1[int, str], got .../tests/protocols_generic.py.Concrete1 [incompatible_assignment] -./protocols_generic.py:56:4: Incompatible assignment: expected .../tests/protocols_generic.py.Box[int], got .../tests/protocols_generic.py.Box[float | int] [incompatible_assignment] -./protocols_generic.py:66:4: Incompatible assignment: expected .../tests/protocols_generic.py.Sender[float | int], got .../tests/protocols_generic.py.Sender[int] [incompatible_assignment] -./protocols_generic.py:74:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[float | int], got .../tests/protocols_generic.py.AttrProto[int] [incompatible_assignment] -./protocols_generic.py:75:4: Incompatible assignment: expected .../tests/protocols_generic.py.AttrProto[int], got .../tests/protocols_generic.py.AttrProto[float | int] [incompatible_assignment] -./protocols_generic.py:96:12: Literal[<.../tests/protocols_generic.py.ConcreteHasParent object at 0x...>] is not equivalent to .../tests/protocols_generic.py.ConcreteHasParent -./protocols_generic.py:145:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty2 [incompatible_assignment] -./protocols_generic.py:146:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty3 [incompatible_assignment] -./protocols_generic.py:147:0: Incompatible assignment: expected .../tests/protocols_generic.py.HasPropertyProto, got .../tests/protocols_generic.py.ConcreteHasProperty4 [incompatible_assignment] +./protocols_generic.py:40:0: Incompatible assignment: expected protocols_generic.Proto1[int, str], got protocols_generic.Concrete1 [incompatible_assignment] +./protocols_generic.py:56:4: Incompatible assignment: expected protocols_generic.Box[int], got protocols_generic.Box[float | int] [incompatible_assignment] +./protocols_generic.py:66:4: Incompatible assignment: expected protocols_generic.Sender[float | int], got protocols_generic.Sender[int] [incompatible_assignment] +./protocols_generic.py:74:4: Incompatible assignment: expected protocols_generic.AttrProto[float | int], got protocols_generic.AttrProto[int] [incompatible_assignment] +./protocols_generic.py:75:4: Incompatible assignment: expected protocols_generic.AttrProto[int], got protocols_generic.AttrProto[float | int] [incompatible_assignment] +./protocols_generic.py:96:12: Literal[] is not equivalent to protocols_generic.ConcreteHasParent +./protocols_generic.py:145:0: Incompatible assignment: expected protocols_generic.HasPropertyProto, got protocols_generic.ConcreteHasProperty2 [incompatible_assignment] +./protocols_generic.py:146:0: Incompatible assignment: expected protocols_generic.HasPropertyProto, got protocols_generic.ConcreteHasProperty3 [incompatible_assignment] +./protocols_generic.py:147:0: Incompatible assignment: expected protocols_generic.HasPropertyProto, got protocols_generic.ConcreteHasProperty4 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_modules.toml b/conformance/results/pycroscope/protocols_modules.toml index d26457104..21a190037 100644 --- a/conformance/results/pycroscope/protocols_modules.toml +++ b/conformance/results/pycroscope/protocols_modules.toml @@ -1,8 +1,8 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 26: Expected 1 errors -Line 48: Expected 1 errors -Line 49: Expected 1 errors """ output = """ +./protocols_modules.py:26:0: Incompatible assignment: expected protocols_modules.Options2, got module '_protocols_modules1' [incompatible_assignment] +./protocols_modules.py:48:0: Incompatible assignment: expected protocols_modules.Reporter2, got module '_protocols_modules2' [incompatible_assignment] +./protocols_modules.py:49:0: Incompatible assignment: expected protocols_modules.Reporter3, got module '_protocols_modules2' [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/qualifiers_final_annotation.toml b/conformance/results/pycroscope/qualifiers_final_annotation.toml index 4d173c102..0ddfd4f5e 100644 --- a/conformance/results/pycroscope/qualifiers_final_annotation.toml +++ b/conformance/results/pycroscope/qualifiers_final_annotation.toml @@ -1,8 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 166: Expected 1 errors -Line 170: Expected 1 errors -Line 168: Unexpected errors ["./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import]"] """ output = """ ./qualifiers_final_annotation.py:16:6: Final annotation without assignment requires an explicit type [invalid_annotation] @@ -31,5 +28,6 @@ output = """ ./qualifiers_final_annotation.py:149:8: Cannot assign to final name x [incompatible_assignment] ./qualifiers_final_annotation.py:152:29: Cannot assign to final name x [incompatible_assignment] ./qualifiers_final_annotation.py:155:8: Cannot assign to final name x [incompatible_assignment] -./qualifiers_final_annotation.py:168:0: Cannot import * from unresolved module '_qualifiers_final_annotation_2' [invalid_import] +./qualifiers_final_annotation.py:166:0: Cannot assign to final name TEN [incompatible_assignment] +./qualifiers_final_annotation.py:170:0: Cannot assign to final name PI [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/specialtypes_never.toml b/conformance/results/pycroscope/specialtypes_never.toml index 93086d054..203b950e7 100644 --- a/conformance/results/pycroscope/specialtypes_never.toml +++ b/conformance/results/pycroscope/specialtypes_never.toml @@ -8,5 +8,5 @@ output = """ ./specialtypes_never.py:51:4: Incompatible return type: expected list[Never], got Literal[[]] [incompatible_return_value] ./specialtypes_never.py:84:4: Incompatible assignment: expected Never, got Any[explicit] [incompatible_assignment] ./specialtypes_never.py:85:4: Incompatible assignment: expected list[int], got list[Never] [incompatible_assignment] -./specialtypes_never.py:104:4: Incompatible return type: expected .../tests/specialtypes_never.py.ClassC[~U], got .../tests/specialtypes_never.py.ClassC[Never] [incompatible_return_value] +./specialtypes_never.py:104:4: Incompatible return type: expected specialtypes_never.ClassC[~U], got specialtypes_never.ClassC[Never] [incompatible_return_value] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index a6a450768..f46e5f036 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -351,7 +351,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Return annotation of Self allows returning the concrete instance of the current class.

-Unknown +Pass      generics_self_protocols Pass @@ -487,7 +487,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Final attributes not initialized on the class can be assigned to

-Unknown +Pass      qualifiers_final_decorator Pass @@ -639,7 +639,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Fails one subtyping example of protocol modules

-Unknown +Pass      protocols_recursive Pass diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 2d5e19433..55f4c5cdc 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -4,6 +4,7 @@ from abc import ABC, abstractmethod import json +import os from pathlib import Path import re import shutil @@ -381,7 +382,14 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: "--enable", "classvar_type_parameters", ] - proc = run(command, stdout=PIPE, stderr=PIPE, text=True, encoding="utf-8") + proc = run( + command, + stdout=PIPE, + stderr=PIPE, + text=True, + encoding="utf-8", + env={**os.environ, "PYTHONPATH": "."}, + ) lines = proc.stderr.splitlines() full_output_lines: list[str] = [] From 48e084b04004782aa9e64859b65ca3f0a698b014 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 4 Mar 2026 22:22:26 -0800 Subject: [PATCH 63/78] . --- conformance/results/pycroscope/generics_self_basic.toml | 4 ++-- .../results/pycroscope/generics_syntax_infer_variance.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index aea6d34be..ec55eecf4 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index ae5122610..ce445c1de 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -4,8 +4,8 @@ errors_diff = """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__iter__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int], HasAttrExtension(attribute_name=KnownValue(val='__iter__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int], HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] [incompatible_assignment] ./generics_syntax_infer_variance.py:56:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant3[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant3[float | int], HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ='./generics_syntax_infer_variance.py.ShouldBeCovariant2', literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./generics_syntax_infer_variance.py:85:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant5[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant5[float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:96:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant6[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant6[float | int] [incompatible_assignment] From 05fbdd80e53a5e55ffb576c282ef126ff881b98d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 7 Mar 2026 10:39:32 -0800 Subject: [PATCH 64/78] rerun --- .../mypy/generics_typevartuple_callable.toml | 4 +- .../generics_typevartuple_callable.toml | 4 +- .../generics_typevartuple_callable.toml | 4 +- conformance/results/results.html | 338 +++++------------- .../results/ty/literals_literalstring.toml | 2 +- .../zuban/generics_typevartuple_callable.toml | 4 +- 6 files changed, 90 insertions(+), 266 deletions(-) diff --git a/conformance/results/mypy/generics_typevartuple_callable.toml b/conformance/results/mypy/generics_typevartuple_callable.toml index 81efe3504..904ddc9fd 100644 --- a/conformance/results/mypy/generics_typevartuple_callable.toml +++ b/conformance/results/mypy/generics_typevartuple_callable.toml @@ -1,9 +1,7 @@ conformant = "Pass" output = """ generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type] -generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [assert-type]'] """ diff --git a/conformance/results/pyrefly/generics_typevartuple_callable.toml b/conformance/results/pyrefly/generics_typevartuple_callable.toml index 552f9eedc..4c3a32c03 100644 --- a/conformance/results/pyrefly/generics_typevartuple_callable.toml +++ b/conformance/results/pyrefly/generics_typevartuple_callable.toml @@ -1,9 +1,7 @@ conformant = "Pass" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type]'] """ output = """ ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type] -ERROR generics_typevartuple_callable.py:50:16-63: assert_type(tuple[complex, str, float], tuple[float, str, complex]) failed [assert-type] """ diff --git a/conformance/results/pyright/generics_typevartuple_callable.toml b/conformance/results/pyright/generics_typevartuple_callable.toml index bc4d7952b..fb569c88c 100644 --- a/conformance/results/pyright/generics_typevartuple_callable.toml +++ b/conformance/results/pyright/generics_typevartuple_callable.toml @@ -3,9 +3,7 @@ output = """ generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"   "Literal['']" is not assignable to "int"   "Literal[0]" is not assignable to "str" (reportArgumentType) -generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:17 - error: "assert_type" mismatch: expected "tuple[float, str, complex]" but received "tuple[complex, str, float]" (reportAssertTypeFailure)'] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index cfa5980ee..5f441ebe8 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -180,14 +180,12 @@

Python Type System Conformance Test Results

pyrefly 0.54.0
-<<<<<<< HEAD
pycroscope 0.3.0
-======= +
ty 0.0.21
->>>>>>> upstream/main - + Type annotations      annotations_coroutines @@ -196,28 +194,23 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      annotations_forward_refs
Partial

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

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

Incorrectly generates error for quoted type defined in class scope.

Pass
Partial

Incorrectly generates error for quoted type defined in class scope.

Partial

Types in quotes incorrectly refer to shadowing class member.

Does not reject some type forms that require quotes.

-<<<<<<< HEAD Unknown -=======
Partial

Does not detect runtime errors from partially stringified PEP-604 unions.

Resolves references in type annotations as referring to end-of-scope types (https://discuss.python.org/t/annotation-string-references-in-class-scope-in-conformance-tests/105439, https://github.com/python/typing/pull/2144)

->>>>>>> upstream/main      annotations_generators
Partial

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

Pass Pass
Partial

Does not detect that invalid yield is unreachable

-<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      annotations_methods
Pass*

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

@@ -225,19 +218,17 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      annotations_typeexpr Pass Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main - + Special types in annotations      specialtypes_any @@ -246,17 +237,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      specialtypes_never Pass Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      specialtypes_none Pass @@ -264,6 +253,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      specialtypes_promotions Pass @@ -271,19 +261,17 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      specialtypes_type
Partial

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

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

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Allows arbitrary attributes to be accessed on `TA` where `TA = typing.Type[typing.Any]` or `TA = type[typing.Any]`.

Treats `type` equivalently to `type[object]` rather than `type[typing.Any]`.

->>>>>>> upstream/main - + Generics      generics_base_class @@ -292,83 +280,63 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      generics_basic Pass Pass Pass
Partial

Incorrect rejects + between two AnyStr

Constrained type var resolves to subtype instead of explcitly listed constraint

-<<<<<<< HEAD Pass -=======
Partial

Incorrectly allows constrained type variables to be solved to a union of their constraints.

->>>>>>> upstream/main      generics_defaults Partial Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Does not forbid a `TypeVar` immediately following a `TypeVarTuple` in a parameter list from having a default.

Does not support `TypeVarTuple`.

Does not fully support defaults for `ParamSpec`s.

->>>>>>> upstream/main      generics_defaults_referential Partial Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      generics_defaults_specialization Partial Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Does not reject subscription of an already-specialized generic class.

->>>>>>> upstream/main      generics_paramspec_basic Pass Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not reject using a bare `ParamSpec` as a type alias value.

Does not support `Concatenate`.

->>>>>>> upstream/main      generics_paramspec_components Pass Pass Pass
Partial

Does not reject usage of args/kwargs for out-of-scope ParamSpec

-<<<<<<< HEAD Pass -=======
Partial

Incorrectly allows using `*args: P.args` and `**kwargs: P.kwargs` when `P` has not been put into scope by any other parameter annotation or enclosing scope.

Does not support `Concatenate`.

->>>>>>> upstream/main      generics_paramspec_semantics Pass
Pass*

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

Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not support `Concatenate`.

->>>>>>> upstream/main      generics_paramspec_specialization Pass @@ -376,28 +344,23 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      generics_scoping Pass Pass Pass
Partial

Does not implement several scoping checks/restrictions for generics

-<<<<<<< HEAD Unknown -=======
Partial

Does not reject `list[T]()` in the global scope, where `T` is an unbound type variable.

Does nto reject `alias: TypeAlias = list[T]` in the body scope of a class generic over a type variable `T`.

->>>>>>> upstream/main      generics_self_advanced
Partial

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

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

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

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

Pass
Partial

Doesn't allow accessing `Self` in a classmethod

Pass*

Treats attributes not initialized on the class as instance-only

-<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      generics_self_attributes Pass @@ -405,6 +368,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      generics_self_basic Pass @@ -412,6 +376,7 @@

Python Type System Conformance Test Results

Pass
Partial

Return annotation of Self allows returning the concrete instance of the current class.

Pass +Pass      generics_self_protocols Pass @@ -419,28 +384,23 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      generics_self_usage Pass Pass Pass
Partial

Does not implement some restrictions on where Self can be used

-<<<<<<< HEAD Unknown -=======
Partial

Does not reject `Self` used in a return annotation when `self` is annotated using another type variable.

Does not reject `Self` used in staticmethods or metaclasses.

->>>>>>> upstream/main      generics_syntax_compatibility Pass Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      generics_syntax_declarations Pass @@ -448,84 +408,63 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet supported.

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      generics_syntax_scoping
Partial

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

Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      generics_type_erasure
Partial

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

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

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not reject access of generic instance variable from the class object.

->>>>>>> upstream/main      generics_typevartuple_args
Partial

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

Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Supports PEP-646 unpacked tuples but not TypeVarTuple.

->>>>>>> upstream/main      generics_typevartuple_basic
Partial

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

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

Pass Pass
Partial

TypeVarTuple is pinned too early when calling generic function

-<<<<<<< HEAD Unknown -======= Unsupported ->>>>>>> upstream/main      generics_typevartuple_callable Pass Pass -Unknown Pass -<<<<<<< HEAD -Unknown -======= Pass +Unknown Unsupported ->>>>>>> upstream/main      generics_typevartuple_concat Pass Pass Pass Pass -<<<<<<< HEAD Unknown -======= Unsupported ->>>>>>> upstream/main      generics_typevartuple_overloads Pass @@ -533,28 +472,23 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      generics_typevartuple_specialization
Partial

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

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

Pass Pass
Partial

Sometimes specializes to tuple[Any, ...] instead of empty tuple

-<<<<<<< HEAD Unknown -======= Unsupported ->>>>>>> upstream/main      generics_typevartuple_unpack Pass Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      generics_upper_bound
Partial

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

@@ -562,17 +496,15 @@

Python Type System Conformance Test Results

Pass
Partial

Cannot find a common supertype of `list[int]` and `set[int]` in order to solve a type variable bound to `Sized`.

Pass +Pass      generics_variance
Partial

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

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      generics_variance_inference Pass @@ -580,8 +512,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Type qualifiers      qualifiers_annotated @@ -589,22 +522,16 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Allows Annotated in some contexts where it should not be allowed

-<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      qualifiers_final_annotation
Partial

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

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

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

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

Pass Pass
Partial

Final attributes not initialized on the class can be assigned to

-<<<<<<< HEAD Pass -=======
Partial

Does not forbid `Final`-annotated assignments to attributes on `self` in non-`__init__` methods.

Does not flag modifications of `Final`-annotated attributes via augmented assignment.

->>>>>>> upstream/main      qualifiers_final_decorator Pass @@ -612,8 +539,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Class type compatibility      classes_classvar @@ -622,6 +550,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      classes_override Pass @@ -629,8 +558,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Type aliases      aliases_explicit @@ -638,22 +568,16 @@

Python Type System Conformance Test Results

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

`Concatenate` in type aliases is currently unsupported

->>>>>>> upstream/main      aliases_implicit Pass Pass Pass
Partial

Does not reject invalid syntax in implicit type aliases.

-<<<<<<< HEAD Unknown -=======
Partial

Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.

Does not support `Concatenate` in type aliases.

->>>>>>> upstream/main      aliases_newtype
Partial

`NewType`s are incorrectly considered to be classes.

@@ -661,52 +585,41 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      aliases_recursive Pass Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      aliases_type_statement
Partial

Does not reject type alias defined in function scope.

Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Does not reject use of the `type` statement inside functions.

Does not reject circular definitions of type aliases.

Does not reject redeclarations of type aliases.

Does not support `type` statements generic over `TypeVarTuple`s.

->>>>>>> upstream/main      aliases_typealiastype
Partial

Incorrectly rejects some recursive type aliases using TypeAliasType.

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

Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Does not reject specializing a type parameter in a generic type alias with a type inconsistent with the parameter's upper bound.

Does not reject declaring a type alias with a type variable that is not in scope.

Does not reject declaring a type alias with a non-literal tuple passed to the `type_params` parameter.

Does not reject cyclically defined type aliases.

->>>>>>> upstream/main      aliases_variance Pass Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main - + Literals      literals_interactions @@ -714,11 +627,8 @@

Python Type System Conformance Test Results

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Deliberately does not allow `str` to be narrowed to literal string types through equality or containment checks due to the possibility of `str` subclasses that could have unexpected equality semantics.

->>>>>>> upstream/main      literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

@@ -726,30 +636,25 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      literals_parameterizations
Partial

Does not reject tuple within Literal.

Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      literals_semantics Pass Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main - + Protocols      protocols_class_objects @@ -757,88 +662,64 @@

Python Type System Conformance Test Results

Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Unsupported

`type[Proto]` is not yet supported.

`ClassVar` protocol members are not yet supported.

`@property` protocol members are only partially supported.

A class object `C` is only considered to inhabit a protocol type with a method member `f` if `f` exists as an attribute on the metaclass of `C`.

->>>>>>> upstream/main      protocols_definition
Partial

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

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

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not reject implicit instance attributes in `Protocol` methods.

Does not support `ClassVar` protocol members.

Incorrectly considers `ClassVar` attributes on concrete classes as satisfying non-`ClassVar` attribute members on protocols.

Only has partial support for `@property` protocol members.

->>>>>>> upstream/main      protocols_explicit
Pass*

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

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Unsupported

Allows implicitly abstract protocol methods to be called via `super()` on a protocol subclass.

Allows instantiation of abstract subclasses of protocol classes.

->>>>>>> upstream/main      protocols_generic Pass Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Only partially supports `@property` protocol members.

->>>>>>> upstream/main      protocols_merging Pass Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not reject attempted instantiation of abstract subclasses of protocols.

->>>>>>> upstream/main      protocols_modules Pass Pass Pass
Partial

Fails one subtyping example of protocol modules

-<<<<<<< HEAD Pass -=======
Partial

Never considers a module as satisfying a protocol with a method member due to the fact that the method will never exist on the class `types.ModuleType`, only on a given specific module instance.

->>>>>>> upstream/main      protocols_recursive Pass Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Fails to solve a type variable involving a recursive generic protocol.

->>>>>>> upstream/main      protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not reject `isinstance()` or `issubclass()` calls against runtime-checkable protocols where there is an unsafe overlap between the type of the first argument and the protocol.

->>>>>>> upstream/main      protocols_self Pass @@ -846,6 +727,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      protocols_subtyping Pass @@ -853,19 +735,17 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      protocols_variance Pass Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main - + Callables      callables_annotation @@ -873,22 +753,16 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Parameter names are lost when resolving ParamSpec

-<<<<<<< HEAD Pass -=======
Partial

Does not support `Concatenate`.

Infers a callback protocol as being a gradual type if the callback has signature `__call__[T](self, *args: T, **kwargs: T)` and `T` has been explicitly specialized to `Any`.

Does not infer a callback protocol as being a gradual type if the callback has signature `__call__(self, a: int, /, *args: Any, **kwargs: Any)`.

->>>>>>> upstream/main      callables_kwargs
Partial

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

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      callables_protocol Pass @@ -896,6 +770,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      callables_subtyping Pass @@ -903,8 +778,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Constructors      constructors_call_init @@ -912,55 +788,40 @@

Python Type System Conformance Test Results

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.

Does not reject class-scoped type variables used in the `self` annotation.

Does not support inferring type variables for generic classes where the `__init__` method uses method-scoped type variables.

->>>>>>> upstream/main      constructors_call_metaclass
Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

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

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      constructors_call_new
Partial

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

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

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

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      constructors_call_type
Partial

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

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not support metaclass `__call__`.

Has overly lenient handling of calls to `type[T]` if `T` is a type variable without an upper bound.

->>>>>>> upstream/main      constructors_callable
Partial

Does not generate a union type for __new__ and __init__ when converting class to callable.

Does not ignore __init__ based on __new__ return type when converting class to callable.

Does not support __new__ return type that is different from class being constructed.

Pass Pass
Partial

Converting constructor to callable does not preserve class-scoped type params.

Converting constructor to callable does not substitute Self in __new__

Converting constructor to callable uses __new__ signature instead of __init__

-<<<<<<< HEAD Pass -=======
Partial

Does not include `__init__` when `__new__` returns `Self`.

Does not respect `NoReturn` return type on metaclass `__call__`.

Does not ignore `__init__` when `__new__` returns `Any`.

Unions overload return types.

->>>>>>> upstream/main      constructors_consistency
Pass*

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

@@ -968,8 +829,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Overloads      overloads_basic @@ -977,22 +839,16 @@

Python Type System Conformance Test Results

Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      overloads_consistency Pass Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      overloads_definitions
Partial

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

@@ -1000,17 +856,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      overloads_definitions_stub
Partial

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

Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      overloads_evaluation
Partial

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

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

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

Evaluates Any in some cases where overload is not ambiguous.

@@ -1018,8 +872,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Exceptions      exceptions_context_managers @@ -1027,13 +882,10 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Some error suppressing context managers are not detected

-<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main - + Dataclasses      dataclasses_descriptors @@ -1041,11 +893,8 @@

Python Type System Conformance Test Results

Pass Pass
Partial

* Assumes descriptor behavior only when field is assigned in class body

* Doesn't allow non-data descriptors or data descriptors with differing `__get__` and `__set__` types

-<<<<<<< HEAD Pass -=======
Partial

Only infers a descriptor `__get__` method as being called when a descriptor attribute is accessed on an instance if the descriptor attribute is present in the class namespace.

->>>>>>> upstream/main      dataclasses_final
Partial

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

Doesn't support Final nested inside ClassVar.

@@ -1053,6 +902,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_frozen Pass @@ -1060,28 +910,23 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_hash
Unsupported

Does not synthesize `__hash__ = None` as a class attribute for unhashable dataclasses.

Does not report when an unhashable dataclass has `__hash__` called directly on an instance.

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

Pass
Partial

Does not synthesize a `__hash__ = None` class attribute for unhashable dataclasses.

Pass -<<<<<<< HEAD Pass -=======
Partial

Understands the `Hashable` protocol as equivalent to `object`.

->>>>>>> upstream/main      dataclasses_inheritance Pass Pass Pass Pass -<<<<<<< HEAD Pass -=======
Unsupported

Currently only enforces the Liskov Substitution Principle for methods.

->>>>>>> upstream/main      dataclasses_kwonly Pass @@ -1089,6 +934,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_match_args Pass @@ -1096,6 +942,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_order Pass @@ -1103,6 +950,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_postinit Pass @@ -1110,17 +958,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_slots
Partial

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

Pass Pass
Partial

__slots__ is generated but not checked during attribute assignment

-<<<<<<< HEAD Pass -=======
Partial

Synthesizes a `__slots__` attribute but does not validate attribute assignments against `__slots__`.

->>>>>>> upstream/main      dataclasses_transform_class Pass @@ -1128,17 +974,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_transform_converter
Unsupported

Converter parameter not yet supported.

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      dataclasses_transform_field
Partial

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

@@ -1146,6 +990,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_transform_func
Partial

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

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

@@ -1153,6 +998,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_transform_meta Pass @@ -1160,6 +1006,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      dataclasses_usage
Pass*

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

@@ -1167,8 +1014,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Typed dictionaries      typeddicts_alt_syntax @@ -1176,11 +1024,8 @@

Python Type System Conformance Test Results

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      typeddicts_class_syntax Pass @@ -1188,17 +1033,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      typeddicts_extra_items
Unsupported

Not supported.

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      typeddicts_final Pass @@ -1206,17 +1049,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      typeddicts_inheritance Pass Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not validate overrides of `TypedDict` fields in subclasses.

->>>>>>> upstream/main      typeddicts_operations Pass @@ -1224,17 +1065,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      typeddicts_readonly Pass Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Supports `ReadOnly`, but not the functional syntax for `TypedDict`s currently, leading to one assertion failing.

->>>>>>> upstream/main      typeddicts_readonly_consistency Pass @@ -1242,39 +1081,31 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      typeddicts_readonly_inheritance
Partial

Incorrectly rejects non-ReadOnly override of ReadOnly item.

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

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

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not validate overrides of `TypedDict` keys.

->>>>>>> upstream/main      typeddicts_readonly_kwargs Pass Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      typeddicts_readonly_update
Partial

Incorrectly allows update of ReadOnly item.

Incorrectly rejects update involving an item with Never type.

Pass Pass Pass -<<<<<<< HEAD Pass -======= Unsupported ->>>>>>> upstream/main      typeddicts_required Pass @@ -1282,17 +1113,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      typeddicts_type_consistency Pass Pass Pass Pass -<<<<<<< HEAD Unknown -======= Pass ->>>>>>> upstream/main      typeddicts_usage Pass @@ -1300,8 +1129,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Tuples      tuples_type_compat @@ -1310,6 +1140,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      tuples_type_form Pass @@ -1317,6 +1148,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      tuples_unpacked
Partial

"More than one unpack" error is missing in some cases.

@@ -1324,8 +1156,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Named tuples      namedtuples_define_class @@ -1333,11 +1166,8 @@

Python Type System Conformance Test Results

Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Permits subclasses of `NamedTuple` classes to override read-only attributes in the class body of the subclass.

->>>>>>> upstream/main      namedtuples_define_functional Pass @@ -1345,6 +1175,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      namedtuples_type_compat Pass @@ -1352,19 +1183,17 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      namedtuples_usage
Partial

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

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not detect runtime errors from attempting to delete namedtuple attributes.

->>>>>>> upstream/main - + Enumerations      enums_behaviors @@ -1373,6 +1202,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      enums_definition Pass @@ -1380,17 +1210,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      enums_expansion
Partial

Improperly applies narrowing to Flag subclass.

Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Does not support `enum.Flag`.

->>>>>>> upstream/main      enums_member_names
Pass*

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

@@ -1398,6 +1226,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      enums_member_values
Partial

Does not enforce declared type of `_value_`.

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

@@ -1405,6 +1234,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      enums_members
Partial

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

Does not treat callables as non-members.

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

Does not properly handle aliased enum members.

Does not support `_ignore_` mechanism (optional).

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

@@ -1412,8 +1242,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Type narrowing      narrowing_typeguard @@ -1422,19 +1253,17 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      narrowing_typeis Pass Pass Pass Pass -<<<<<<< HEAD Pass -=======
Partial

Intersects the pre-existing type with the top materialization of the bracketed type rather than the bracketed type itself.

->>>>>>> upstream/main - + Type checker directives      directives_assert_type @@ -1443,6 +1272,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      directives_cast Pass @@ -1450,17 +1280,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      directives_deprecated Pass Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Does not detect calls to deprecated overloads.

Does not detect implicit calls to deprecated dunder methods, for example via operators.

Does not detect accesses of, or attempts to set, deprecated properties.

->>>>>>> upstream/main      directives_no_type_check
Partial

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

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

@@ -1468,6 +1296,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      directives_reveal_type Pass @@ -1475,17 +1304,15 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      directives_type_checking Pass Pass Pass Pass -<<<<<<< HEAD Unknown -=======
Partial

Attempts to detect some errors even in blocks it determines to be unreachable, including in `if not TYPE_CHECKING` blocks.

->>>>>>> upstream/main      directives_type_ignore
Partial

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

@@ -1493,6 +1320,7 @@

Python Type System Conformance Test Results

Partial

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

Pass Pass +Pass      directives_type_ignore_file1 Pass @@ -1500,6 +1328,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      directives_type_ignore_file2 Pass @@ -1507,6 +1336,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass      directives_version_platform
Pass*

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

Does not understand os.name checks.

@@ -1514,8 +1344,9 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass - + Historical and deprecated features      historical_positional @@ -1524,6 +1355,7 @@

Python Type System Conformance Test Results

Pass Pass Pass +Pass diff --git a/conformance/results/ty/literals_literalstring.toml b/conformance/results/ty/literals_literalstring.toml index 052d2d4c3..e3dec3612 100644 --- a/conformance/results/ty/literals_literalstring.toml +++ b/conformance/results/ty/literals_literalstring.toml @@ -11,5 +11,5 @@ literals_literalstring.py:74:25: error[invalid-assignment] Object of type `Liter literals_literalstring.py:119:22: error[invalid-argument-type] Argument to function `literal_identity` is incorrect: Argument type `str` does not satisfy upper bound `LiteralString` of type variable `TLiteral` literals_literalstring.py:133:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `str` does not satisfy upper bound `LiteralString` of type variable `T` literals_literalstring.py:133:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `LiteralString`, found `str` -literals_literalstring.py:170:21: error[invalid-assignment] Object of type `list[LiteralString]` is not assignable to `list[str]` +literals_literalstring.py:171:21: error[invalid-assignment] Object of type `list[LiteralString]` is not assignable to `list[str]` """ diff --git a/conformance/results/zuban/generics_typevartuple_callable.toml b/conformance/results/zuban/generics_typevartuple_callable.toml index 32e917dba..d18ba3c57 100644 --- a/conformance/results/zuban/generics_typevartuple_callable.toml +++ b/conformance/results/zuban/generics_typevartuple_callable.toml @@ -1,8 +1,6 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 50: Unexpected errors ['generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc]'] """ output = """ generics_typevartuple_callable.py:26: error: Argument "args" to "Process" has incompatible type "tuple[str, int]"; expected "tuple[int, str]" [arg-type] -generics_typevartuple_callable.py:50: error: Expression is of type "tuple[complex, str, float]", not "tuple[float, str, complex]" [misc] """ From cd40f4eb08458efb08597e7cd2772fd477076e86 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 7 Mar 2026 12:30:08 -0800 Subject: [PATCH 65/78] update --- .../pycroscope/constructors_call_init.toml | 6 +- .../pycroscope/constructors_call_new.toml | 6 +- .../pycroscope/directives_deprecated.toml | 23 +++---- .../pycroscope/directives_type_checking.toml | 8 +-- .../directives_version_platform.toml | 9 ++- .../results/pycroscope/generics_defaults.toml | 64 ++----------------- .../generics_defaults_referential.toml | 26 ++++---- .../generics_defaults_specialization.toml | 23 +------ .../pycroscope/generics_self_basic.toml | 4 +- .../generics_syntax_infer_variance.toml | 4 +- .../pycroscope/generics_type_erasure.toml | 2 +- conformance/results/results.html | 10 +-- 12 files changed, 58 insertions(+), 127 deletions(-) diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 28c24c705..2bdb49870 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,10 +1,14 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 25: Unexpected errors ['./constructors_call_init.py:25:12: ./constructors_call_init.py.Class1[float] is not equivalent to ./constructors_call_init.py.Class1[float | int]'] +Line 75: Unexpected errors ['./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5[float] is not equivalent to ./constructors_call_init.py.Class5[float | int]'] """ output = """ ./constructors_call_init.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] +./constructors_call_init.py:25:12: ./constructors_call_init.py.Class1[float] is not equivalent to ./constructors_call_init.py.Class1[float | int] ./constructors_call_init.py:42:7: Incompatible argument type for x: expected ./constructors_call_init.py.Class3 | None but got ./constructors_call_init.py.Class2[Any[generic_argument]] [incompatible_argument] ./constructors_call_init.py:56:0: Missing required positional argument '%self' [incompatible_call] +./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5[float] is not equivalent to ./constructors_call_init.py.Class5[float | int] ./constructors_call_init.py:107:17: Class-scoped type variables are not allowed in __init__ self annotation [invalid_annotation] ./constructors_call_init.py:130:0: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index b747f222c..ddd1aec9b 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,7 +1,11 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 20: Unexpected errors ['./constructors_call_new.py:20:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int]'] +Line 24: Unexpected errors ['./constructors_call_new.py:24:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int]'] """ output = """ +./constructors_call_new.py:20:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int] ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] +./constructors_call_new.py:24:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int] ./constructors_call_new.py:148:0: Missing required positional argument '%self' [incompatible_call] """ diff --git a/conformance/results/pycroscope/directives_deprecated.toml b/conformance/results/pycroscope/directives_deprecated.toml index 64b88f59a..311c1f87a 100644 --- a/conformance/results/pycroscope/directives_deprecated.toml +++ b/conformance/results/pycroscope/directives_deprecated.toml @@ -1,20 +1,17 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 41: Expected 1 errors -Line 42: Expected 1 errors -Line 44: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 58: Expected 1 errors -Line 69: Expected 1 errors -Line 98: Expected 1 errors -Line 31: Unexpected errors ['./directives_deprecated.py:31:0: Use of deprecated overload (*args: Any[inference], **kwargs: Any[inference]) -> Any[unannotated]: Only str will be allowed [deprecated]'] """ output = """ ./directives_deprecated.py:18:43: type '_directives_deprecated_library.Ham' is deprecated: Use Spam instead [deprecated] ./directives_deprecated.py:24:0: function '_directives_deprecated_library.norwegian_blue' is deprecated: It is pining for the fjords [deprecated] ./directives_deprecated.py:25:4: function '_directives_deprecated_library.norwegian_blue' is deprecated: It is pining for the fjords [deprecated] -./directives_deprecated.py:30:0: Use of deprecated overload (*args: Any[inference], **kwargs: Any[inference]) -> Any[unannotated]: Only str will be allowed [deprecated] -./directives_deprecated.py:31:0: Use of deprecated overload (*args: Any[inference], **kwargs: Any[inference]) -> Any[unannotated]: Only str will be allowed [deprecated] -./directives_deprecated.py:90:4: Method does not override any base method [override_does_not_override] +./directives_deprecated.py:30:0: Use of deprecated overload (x: int) -> str: Only str will be allowed [deprecated] +./directives_deprecated.py:41:4: function '_directives_deprecated_library.Spam.__add__' with typevars {~SelfT: TypedValue(typ=, literal_only=False)} is deprecated: There is enough spam in the world [deprecated] +./directives_deprecated.py:42:0: function '_directives_deprecated_library.Spam.__add__' with typevars {~SelfT: TypedValue(typ=, literal_only=False)} is deprecated: There is enough spam in the world [deprecated] +./directives_deprecated.py:44:0: Property getter 'greasy' is deprecated: All spam will be equally greasy [deprecated] +./directives_deprecated.py:47:0: Property setter 'shape' is deprecated: Shapes are becoming immutable [deprecated] +./directives_deprecated.py:48:0: Property setter 'shape' is deprecated: Shapes are becoming immutable [deprecated] +./directives_deprecated.py:58:0: Method __call__ is deprecated: Deprecated [deprecated] +./directives_deprecated.py:69:0: () -> None is deprecated: Deprecated [deprecated] +./directives_deprecated.py:98:4: () -> None is deprecated: Deprecated [deprecated] """ diff --git a/conformance/results/pycroscope/directives_type_checking.toml b/conformance/results/pycroscope/directives_type_checking.toml index 8dcb519d8..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/directives_type_checking.toml +++ b/conformance/results/pycroscope/directives_type_checking.toml @@ -1,11 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 11: Unexpected errors ["./directives_type_checking.py:11:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment]"] -Line 16: Unexpected errors ['./directives_type_checking.py:16:4: b already declared [already_declared]'] -Line 18: Unexpected errors ['./directives_type_checking.py:18:12: list[str] is not equivalent to list[int]'] """ output = """ -./directives_type_checking.py:11:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] -./directives_type_checking.py:16:4: b already declared [already_declared] -./directives_type_checking.py:18:12: list[str] is not equivalent to list[int] """ diff --git a/conformance/results/pycroscope/directives_version_platform.toml b/conformance/results/pycroscope/directives_version_platform.toml index adfc6c86c..a6ce7215d 100644 --- a/conformance/results/pycroscope/directives_version_platform.toml +++ b/conformance/results/pycroscope/directives_version_platform.toml @@ -2,6 +2,11 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./directives_version_platform.py:40:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] -./directives_version_platform.py:45:4: Incompatible assignment: expected int, got Literal[''] [incompatible_assignment] +./directives_version_platform.py:33:18: Undefined name: val3 [undefined_name] +./directives_version_platform.py:50:18: Undefined name: val6 [undefined_name] +./directives_version_platform.py:59:18: Undefined name: val9 [undefined_name] +./directives_version_platform.py:66:18: val10 may be used uninitialized [possibly_undefined_name] +./directives_version_platform.py:67:21: val11 may be used uninitialized [possibly_undefined_name] +./directives_version_platform.py:74:21: val12 may be used uninitialized [possibly_undefined_name] +./directives_version_platform.py:75:18: val13 may be used uninitialized [possibly_undefined_name] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index ae73a4903..bc2959ce2 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,75 +1,21 @@ conformance_automated = "Fail" errors_diff = """ Line 66: Expected 1 errors -Line 33: Unexpected errors ['./generics_defaults.py:33:16: Any[generic_argument] is not equivalent to str'] -Line 34: Unexpected errors ['./generics_defaults.py:34:16: Any[generic_argument] is not equivalent to int'] -Line 36: Unexpected errors ['./generics_defaults.py:36:16: Any[from_another] is not equivalent to str'] -Line 37: Unexpected errors ['./generics_defaults.py:37:16: Any[from_another] is not equivalent to int'] -Line 49: Unexpected errors ['./generics_defaults.py:49:16: Any[from_another] is not equivalent to float | int'] -Line 50: Unexpected errors ['./generics_defaults.py:50:16: Any[from_another] is not equivalent to bool'] -Line 75: Unexpected errors ['./generics_defaults.py:75:16: Any[generic_argument] is not equivalent to str'] -Line 76: Unexpected errors ['./generics_defaults.py:76:16: Any[generic_argument] is not equivalent to int'] -Line 77: Unexpected errors ['./generics_defaults.py:77:16: Any[generic_argument] is not equivalent to bool'] -Line 79: Unexpected errors ['./generics_defaults.py:79:16: Any[from_another] is not equivalent to int'] -Line 80: Unexpected errors ['./generics_defaults.py:80:16: Any[from_another] is not equivalent to complex | float | int'] -Line 81: Unexpected errors ['./generics_defaults.py:81:16: Any[from_another] is not equivalent to str'] -Line 82: Unexpected errors ['./generics_defaults.py:82:16: Any[from_another] is not equivalent to int'] -Line 83: Unexpected errors ['./generics_defaults.py:83:16: Any[from_another] is not equivalent to bool'] -Line 91: Unexpected errors ['./generics_defaults.py:91:16: Any[from_another] is not equivalent to int'] -Line 92: Unexpected errors ['./generics_defaults.py:92:16: Any[from_another] is not equivalent to complex | float | int'] -Line 93: Unexpected errors ['./generics_defaults.py:93:16: Any[from_another] is not equivalent to str'] -Line 94: Unexpected errors ['./generics_defaults.py:94:16: Any[from_another] is not equivalent to int'] -Line 95: Unexpected errors ['./generics_defaults.py:95:16: Any[from_another] is not equivalent to bool'] -Line 97: Unexpected errors ['./generics_defaults.py:97:16: Any[from_another] is not equivalent to int'] -Line 98: Unexpected errors ['./generics_defaults.py:98:16: Any[from_another] is not equivalent to complex | float | int'] -Line 99: Unexpected errors ['./generics_defaults.py:99:16: Any[from_another] is not equivalent to str'] -Line 100: Unexpected errors ['./generics_defaults.py:100:16: Any[from_another] is not equivalent to int'] -Line 101: Unexpected errors ['./generics_defaults.py:101:16: Any[from_another] is not equivalent to bool'] Line 122: Unexpected errors ['./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None'] -Line 123: Unexpected errors ["./generics_defaults.py:123:16: Annotated[./generics_defaults.py.Class_ParamSpec, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:123:35: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 124: Unexpected errors ["./generics_defaults.py:124:16: Annotated[./generics_defaults.py.Class_ParamSpec[Any[error]], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:124:49: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 139: Unexpected errors ['./generics_defaults.py:139:16: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[str, int]'] -Line 140: Unexpected errors ["./generics_defaults.py:140:16: Annotated[./generics_defaults.py.Class_TypeVarTuple, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=SequenceValue(typ=, literal_only=False, args=(AnyValue(source=),), members=((True, AnyValue(source=)),)))] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int]"] +Line 123: Unexpected errors ["./generics_defaults.py:123:16: Annotated[./generics_defaults.py.Class_ParamSpec, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:123:35: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 124: Unexpected errors ["./generics_defaults.py:124:16: Annotated[./generics_defaults.py.Class_ParamSpec[Any[error]], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:124:49: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] Line 203: Unexpected errors ["./generics_defaults.py:203:36: Invalid type annotation [] [invalid_annotation]", './generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation]'] Line 204: Unexpected errors ['./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str]'] Line 205: Unexpected errors ['./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None'] Line 208: Unexpected errors ['./generics_defaults.py:208:16: (...) -> None is not equivalent to (bytes, /) -> None'] -Line 223: Unexpected errors ['./generics_defaults.py:223:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int]'] -Line 224: Unexpected errors ['./generics_defaults.py:224:12: Any[generic_argument] is not equivalent to int'] """ output = """ ./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] -./generics_defaults.py:33:16: Any[generic_argument] is not equivalent to str -./generics_defaults.py:34:16: Any[generic_argument] is not equivalent to int -./generics_defaults.py:36:16: Any[from_another] is not equivalent to str -./generics_defaults.py:37:16: Any[from_another] is not equivalent to int -./generics_defaults.py:49:16: Any[from_another] is not equivalent to float | int -./generics_defaults.py:50:16: Any[from_another] is not equivalent to bool -./generics_defaults.py:75:16: Any[generic_argument] is not equivalent to str -./generics_defaults.py:76:16: Any[generic_argument] is not equivalent to int -./generics_defaults.py:77:16: Any[generic_argument] is not equivalent to bool -./generics_defaults.py:79:16: Any[from_another] is not equivalent to int -./generics_defaults.py:80:16: Any[from_another] is not equivalent to complex | float | int -./generics_defaults.py:81:16: Any[from_another] is not equivalent to str -./generics_defaults.py:82:16: Any[from_another] is not equivalent to int -./generics_defaults.py:83:16: Any[from_another] is not equivalent to bool -./generics_defaults.py:91:16: Any[from_another] is not equivalent to int -./generics_defaults.py:92:16: Any[from_another] is not equivalent to complex | float | int -./generics_defaults.py:93:16: Any[from_another] is not equivalent to str -./generics_defaults.py:94:16: Any[from_another] is not equivalent to int -./generics_defaults.py:95:16: Any[from_another] is not equivalent to bool -./generics_defaults.py:97:16: Any[from_another] is not equivalent to int -./generics_defaults.py:98:16: Any[from_another] is not equivalent to complex | float | int -./generics_defaults.py:99:16: Any[from_another] is not equivalent to str -./generics_defaults.py:100:16: Any[from_another] is not equivalent to int -./generics_defaults.py:101:16: Any[from_another] is not equivalent to bool ./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None ./generics_defaults.py:123:16: Annotated[./generics_defaults.py.Class_ParamSpec, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_defaults.py:123:35: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] +./generics_defaults.py:123:35: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] ./generics_defaults.py:124:16: Annotated[./generics_defaults.py.Class_ParamSpec[Any[error]], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] -./generics_defaults.py:124:49: Expected 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] -./generics_defaults.py:139:16: tuple[*tuple[Any[generic_argument], ...]] is not equivalent to tuple[str, int] -./generics_defaults.py:140:16: Annotated[./generics_defaults.py.Class_TypeVarTuple, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=SequenceValue(typ=, literal_only=False, args=(AnyValue(source=),), members=((True, AnyValue(source=)),)))] is not equivalent to ./generics_defaults.py.Class_TypeVarTuple[str, int] +./generics_defaults.py:124:49: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] ./generics_defaults.py:152:11: the bound and default are incompatible [invalid_annotation] ./generics_defaults.py:159:11: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults.py:176:12: Any[generic_argument] is not equivalent to int @@ -79,6 +25,4 @@ output = """ ./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str] ./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None ./generics_defaults.py:208:16: (...) -> None is not equivalent to (bytes, /) -> None -./generics_defaults.py:223:12: ./generics_defaults.py.Foo7 is not equivalent to ./generics_defaults.py.Foo7[int] -./generics_defaults.py:224:12: Any[generic_argument] is not equivalent to int """ diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index ced292aeb..07c1b8ad0 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -1,22 +1,22 @@ conformance_automated = "Fail" errors_diff = """ -Line 36: Expected 1 errors -Line 53: Expected 1 errors -Line 60: Expected 1 errors +Line 37: Expected 1 errors +Line 54: Expected 1 errors +Line 61: Expected 1 errors Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type 'generics_defaults_referential.slice' is not equivalent to type[generics_defaults_referential.slice[int, int, int | None]]"] Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: generics_defaults_referential.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to generics_defaults_referential.slice[int, int, int | None]'] -Line 35: Unexpected errors ["./generics_defaults_referential.py:35:12: generics_defaults_referential.Foo[Literal[1], Literal['']] is not equivalent to generics_defaults_referential.Foo[int, str]"] -Line 77: Unexpected errors ['./generics_defaults_referential.py:77:10: TypeVar default must be one of its constraints [invalid_annotation]'] -Line 98: Unexpected errors ['./generics_defaults_referential.py:98:16: Any[generic_argument] is not equivalent to list[Any[explicit]]'] +Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: generics_defaults_referential.slice[str, Any[generic_argument], int | None] is not equivalent to generics_defaults_referential.slice[str, str, int | None]'] +Line 78: Unexpected errors ['./generics_defaults_referential.py:78:10: TypeVar default must be one of its constraints [invalid_annotation]'] +Line 104: Unexpected errors ['./generics_defaults_referential.py:104:12: generics_defaults_referential.Bar[int, list[Any[unreachable]]] is not equivalent to generics_defaults_referential.Bar[int, list[int]]'] """ output = """ ./generics_defaults_referential.py:23:12: type 'generics_defaults_referential.slice' is not equivalent to type[generics_defaults_referential.slice[int, int, int | None]] ./generics_defaults_referential.py:24:12: generics_defaults_referential.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to generics_defaults_referential.slice[int, int, int | None] -./generics_defaults_referential.py:35:12: generics_defaults_referential.Foo[Literal[1], Literal['']] is not equivalent to generics_defaults_referential.Foo[int, str] -./generics_defaults_referential.py:37:9: Incompatible argument type for a: expected int but got Literal[''] [incompatible_argument] -./generics_defaults_referential.py:68:11: the bound and default are incompatible [invalid_annotation] -./generics_defaults_referential.py:74:11: TypeVar default must be one of its constraints [invalid_annotation] -./generics_defaults_referential.py:77:10: TypeVar default must be one of its constraints [invalid_annotation] -./generics_defaults_referential.py:78:15: TypeVar default must be one of its constraints [invalid_annotation] -./generics_defaults_referential.py:98:16: Any[generic_argument] is not equivalent to list[Any[explicit]] +./generics_defaults_referential.py:25:12: generics_defaults_referential.slice[str, Any[generic_argument], int | None] is not equivalent to generics_defaults_referential.slice[str, str, int | None] +./generics_defaults_referential.py:38:13: Incompatible argument type for a: expected int but got str [incompatible_argument] +./generics_defaults_referential.py:69:11: the bound and default are incompatible [invalid_annotation] +./generics_defaults_referential.py:75:11: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults_referential.py:78:10: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults_referential.py:79:15: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults_referential.py:104:12: generics_defaults_referential.Bar[int, list[Any[unreachable]]] is not equivalent to generics_defaults_referential.Bar[int, list[int]] """ diff --git a/conformance/results/pycroscope/generics_defaults_specialization.toml b/conformance/results/pycroscope/generics_defaults_specialization.toml index ad7b0f80e..be916fdb5 100644 --- a/conformance/results/pycroscope/generics_defaults_specialization.toml +++ b/conformance/results/pycroscope/generics_defaults_specialization.toml @@ -1,24 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 30: Expected 1 errors -Line 55: Expected 1 errors -Line 26: Unexpected errors ['./generics_defaults_specialization.py:26:16: .MyAlias = ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, ~DefaultStrT] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, str]'] -Line 42: Unexpected errors ['./generics_defaults_specialization.py:42:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation]'] -Line 45: Unexpected errors ["./generics_defaults_specialization.py:45:12: is not equivalent to type", './generics_defaults_specialization.py:45:22: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] -Line 46: Unexpected errors ['./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to Any[error]', './generics_defaults_specialization.py:46:19: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] -Line 47: Unexpected errors ['./generics_defaults_specialization.py:47:12: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]', './generics_defaults_specialization.py:47:25: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation]'] -Line 50: Unexpected errors ['./generics_defaults_specialization.py:50:10: Expected 2 type arguments for ./generics_defaults_specialization.py.SubclassMe [invalid_annotation]'] -Line 53: Unexpected errors ['./generics_defaults_specialization.py:53:12: Any[generic_argument] is not equivalent to str'] """ output = """ -./generics_defaults_specialization.py:26:16: .MyAlias = ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, ~DefaultStrT] is not equivalent to ./generics_defaults_specialization.py.SomethingWithNoDefaults[int, str] -./generics_defaults_specialization.py:42:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] -./generics_defaults_specialization.py:45:12: is not equivalent to type -./generics_defaults_specialization.py:45:22: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] -./generics_defaults_specialization.py:46:12: ./generics_defaults_specialization.py.Bar is not equivalent to Any[error] -./generics_defaults_specialization.py:46:19: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] -./generics_defaults_specialization.py:47:12: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] -./generics_defaults_specialization.py:47:25: Expected 2 type arguments for ./generics_defaults_specialization.py.Bar [invalid_annotation] -./generics_defaults_specialization.py:50:10: Expected 2 type arguments for ./generics_defaults_specialization.py.SubclassMe [invalid_annotation] -./generics_defaults_specialization.py:53:12: Any[generic_argument] is not equivalent to str +./generics_defaults_specialization.py:30:0: Expected 1 type arguments for type alias, got 2 [invalid_annotation] +./generics_defaults_specialization.py:55:0: ./generics_defaults_specialization.py.Foo cannot be further subscripted [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index ec55eecf4..7411420cc 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index ce445c1de..ae5122610 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -4,8 +4,8 @@ errors_diff = """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int], HasAttrExtension(attribute_name=KnownValue(val='__iter__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int], HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))))] [incompatible_assignment] +./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__iter__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./generics_syntax_infer_variance.py:56:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant3[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant3[float | int], HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ='./generics_syntax_infer_variance.py.ShouldBeCovariant2', literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./generics_syntax_infer_variance.py:85:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant5[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant5[float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:96:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant6[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant6[float | int] [incompatible_assignment] diff --git a/conformance/results/pycroscope/generics_type_erasure.toml b/conformance/results/pycroscope/generics_type_erasure.toml index 89f18b17d..cac4af129 100644 --- a/conformance/results/pycroscope/generics_type_erasure.toml +++ b/conformance/results/pycroscope/generics_type_erasure.toml @@ -5,7 +5,7 @@ output = """ ./generics_type_erasure.py:38:15: Incompatible argument type for label: expected int | None but got Literal[''] [incompatible_argument] ./generics_type_erasure.py:40:15: Incompatible argument type for label: expected str | None but got Literal[0] [incompatible_argument] ./generics_type_erasure.py:42:0: Cannot assign to instance attribute 'label' via class object [incompatible_assignment] -./generics_type_erasure.py:43:0: Any[from_another] (partial from [type 'int']) has no attribute 'label' [undefined_attribute] +./generics_type_erasure.py:43:0: ./generics_type_erasure.py.Node[int] (partial from [type 'int']) has no attribute 'label' [undefined_attribute] ./generics_type_erasure.py:44:0: Cannot assign to instance attribute 'label' via class object [incompatible_assignment] ./generics_type_erasure.py:45:0: has no attribute 'label' [undefined_attribute] ./generics_type_erasure.py:46:0: type has no attribute 'label' [undefined_attribute] diff --git a/conformance/results/results.html b/conformance/results/results.html index 381a2a89d..891ef0c2a 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -311,7 +311,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass
Partial

Does not reject subscription of an already-specialized generic class.

     generics_paramspec_basic @@ -788,7 +788,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown
Partial

Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.

Does not reject class-scoped type variables used in the `self` annotation.

Does not support inferring type variables for generic classes where the `__init__` method uses method-scoped type variables.

     constructors_call_metaclass @@ -804,7 +804,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown Unsupported      constructors_call_type @@ -1287,7 +1287,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass
Partial

Does not detect calls to deprecated overloads.

Does not detect implicit calls to deprecated dunder methods, for example via operators.

Does not detect accesses of, or attempts to set, deprecated properties.

     directives_no_type_check @@ -1311,7 +1311,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass
Partial

Attempts to detect some errors even in blocks it determines to be unreachable, including in `if not TYPE_CHECKING` blocks.

     directives_type_ignore From 30728c79beceb54eb055f7b8aa4580bbb909b729 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 8 Mar 2026 14:40:42 -0700 Subject: [PATCH 66/78] update --- .../pycroscope/annotations_forward_refs.toml | 6 +-- .../pycroscope/constructors_call_init.toml | 4 +- .../results/pycroscope/enums_members.toml | 4 +- .../results/pycroscope/generics_defaults.toml | 8 ++-- .../generics_defaults_referential.toml | 6 +-- .../pycroscope/generics_self_advanced.toml | 21 +-------- .../pycroscope/generics_self_basic.toml | 4 +- .../pycroscope/generics_self_usage.toml | 2 - .../generics_syntax_infer_variance.toml | 8 ++-- .../generics_typevartuple_specialization.toml | 12 +---- .../pycroscope/literals_semantics.toml | 4 +- .../pycroscope/namedtuples_define_class.toml | 46 +++++++++++++++---- .../results/pycroscope/namedtuples_usage.toml | 32 ++++++++++--- .../pycroscope/protocols_definition.toml | 2 +- .../results/pycroscope/protocols_merging.toml | 2 +- .../pycroscope/typeforms_typeform.toml | 31 ++++++------- conformance/results/results.html | 10 ++-- conformance/src/type_checker.py | 12 ----- 18 files changed, 106 insertions(+), 108 deletions(-) diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 755c6688b..bca8ff294 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -7,7 +7,7 @@ Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[from_another]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] -Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ~SelfT: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] """ output = """ @@ -38,7 +38,7 @@ output = """ ./annotations_forward_refs.py:54:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] -./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] -./annotations_forward_refs.py:89:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] +./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ~SelfT: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] +./annotations_forward_refs.py:89:7: Unrecognized annotation (self: ~SelfT: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] ./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int """ diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 2bdb49870..366a303ab 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,14 +1,14 @@ conformance_automated = "Fail" errors_diff = """ Line 25: Unexpected errors ['./constructors_call_init.py:25:12: ./constructors_call_init.py.Class1[float] is not equivalent to ./constructors_call_init.py.Class1[float | int]'] -Line 75: Unexpected errors ['./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5[float] is not equivalent to ./constructors_call_init.py.Class5[float | int]'] +Line 75: Unexpected errors ['./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5 is not equivalent to ./constructors_call_init.py.Class5[float | int]'] """ output = """ ./constructors_call_init.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] ./constructors_call_init.py:25:12: ./constructors_call_init.py.Class1[float] is not equivalent to ./constructors_call_init.py.Class1[float | int] ./constructors_call_init.py:42:7: Incompatible argument type for x: expected ./constructors_call_init.py.Class3 | None but got ./constructors_call_init.py.Class2[Any[generic_argument]] [incompatible_argument] ./constructors_call_init.py:56:0: Missing required positional argument '%self' [incompatible_call] -./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5[float] is not equivalent to ./constructors_call_init.py.Class5[float | int] +./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5 is not equivalent to ./constructors_call_init.py.Class5[float | int] ./constructors_call_init.py:107:17: Class-scoped type variables are not allowed in __init__ self annotation [invalid_annotation] ./constructors_call_init.py:130:0: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 52f204835..2789d04de 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -3,10 +3,10 @@ errors_diff = """ """ output = """ ./enums_members.py:50:4: Enum members should not be explicitly annotated [invalid_annotation] -./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypeVarValue(typevar=~T1, bound=None, default=None, constraints=(), variance=, is_typevartuple=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypeVarValue(typevar=~T1, bound=None, default=None, constraints=(), variance=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:83:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:84:9: Arguments to Literal[] must be literals, not (TypedValue(typ=, literal_only=False),) [invalid_literal] -./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./enums_members.py.Pet4', literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:116:12: enum.nonmember[Literal[2]] is not equivalent to Any[unannotated] ./enums_members.py:128:20: Revealed type is 'int' [reveal_type] ./enums_members.py:129:20: int is not equivalent to Any[unannotated] diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index bc2959ce2..73fb23676 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -2,8 +2,8 @@ conformance_automated = "Fail" errors_diff = """ Line 66: Expected 1 errors Line 122: Unexpected errors ['./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None'] -Line 123: Unexpected errors ["./generics_defaults.py:123:16: Annotated[./generics_defaults.py.Class_ParamSpec, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:123:35: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] -Line 124: Unexpected errors ["./generics_defaults.py:124:16: Annotated[./generics_defaults.py.Class_ParamSpec[Any[error]], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error]", './generics_defaults.py:124:49: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 123: Unexpected errors ['./generics_defaults.py:123:16: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to Any[error]', './generics_defaults.py:123:35: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] +Line 124: Unexpected errors ['./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to Any[error]', './generics_defaults.py:124:49: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation]'] Line 203: Unexpected errors ["./generics_defaults.py:203:36: Invalid type annotation [] [invalid_annotation]", './generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation]'] Line 204: Unexpected errors ['./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str]'] Line 205: Unexpected errors ['./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None'] @@ -12,9 +12,9 @@ Line 208: Unexpected errors ['./generics_defaults.py:208:16: (...) -> None is output = """ ./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] ./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None -./generics_defaults.py:123:16: Annotated[./generics_defaults.py.Class_ParamSpec, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_defaults.py:123:16: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to Any[error] ./generics_defaults.py:123:35: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] -./generics_defaults.py:124:16: Annotated[./generics_defaults.py.Class_ParamSpec[Any[error]], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] is not equivalent to Any[error] +./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to Any[error] ./generics_defaults.py:124:49: Expected at most 1 type arguments for ./generics_defaults.py.Class_ParamSpec [invalid_annotation] ./generics_defaults.py:152:11: the bound and default are incompatible [invalid_annotation] ./generics_defaults.py:159:11: TypeVar default must be one of its constraints [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index 07c1b8ad0..078a1661b 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -2,11 +2,10 @@ conformance_automated = "Fail" errors_diff = """ Line 37: Expected 1 errors Line 54: Expected 1 errors -Line 61: Expected 1 errors +Line 75: Expected 1 errors Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type 'generics_defaults_referential.slice' is not equivalent to type[generics_defaults_referential.slice[int, int, int | None]]"] Line 24: Unexpected errors ['./generics_defaults_referential.py:24:12: generics_defaults_referential.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to generics_defaults_referential.slice[int, int, int | None]'] Line 25: Unexpected errors ['./generics_defaults_referential.py:25:12: generics_defaults_referential.slice[str, Any[generic_argument], int | None] is not equivalent to generics_defaults_referential.slice[str, str, int | None]'] -Line 78: Unexpected errors ['./generics_defaults_referential.py:78:10: TypeVar default must be one of its constraints [invalid_annotation]'] Line 104: Unexpected errors ['./generics_defaults_referential.py:104:12: generics_defaults_referential.Bar[int, list[Any[unreachable]]] is not equivalent to generics_defaults_referential.Bar[int, list[int]]'] """ output = """ @@ -14,9 +13,8 @@ output = """ ./generics_defaults_referential.py:24:12: generics_defaults_referential.slice[Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to generics_defaults_referential.slice[int, int, int | None] ./generics_defaults_referential.py:25:12: generics_defaults_referential.slice[str, Any[generic_argument], int | None] is not equivalent to generics_defaults_referential.slice[str, str, int | None] ./generics_defaults_referential.py:38:13: Incompatible argument type for a: expected int but got str [incompatible_argument] +./generics_defaults_referential.py:61:4: Type parameter defaults can reference only earlier type parameters from the same class [invalid_annotation] ./generics_defaults_referential.py:69:11: the bound and default are incompatible [invalid_annotation] -./generics_defaults_referential.py:75:11: TypeVar default must be one of its constraints [invalid_annotation] -./generics_defaults_referential.py:78:10: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults_referential.py:79:15: TypeVar default must be one of its constraints [invalid_annotation] ./generics_defaults_referential.py:104:12: generics_defaults_referential.Bar[int, list[Any[unreachable]]] is not equivalent to generics_defaults_referential.Bar[int, list[int]] """ diff --git a/conformance/results/pycroscope/generics_self_advanced.toml b/conformance/results/pycroscope/generics_self_advanced.toml index 62df81dd7..cdd4d0cd9 100644 --- a/conformance/results/pycroscope/generics_self_advanced.toml +++ b/conformance/results/pycroscope/generics_self_advanced.toml @@ -1,24 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 18: Unexpected errors ['./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA'] -Line 19: Unexpected errors ['./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA'] -Line 35: Unexpected errors ['./generics_self_advanced.py:35:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT'] -Line 36: Unexpected errors ['./generics_self_advanced.py:36:20: list[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to list[~SelfT]'] -Line 37: Unexpected errors ['./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT'] -Line 38: Unexpected errors ['./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[Any[generic_argument]] is not equivalent to ~SelfT'] -Line 42: Unexpected errors ['./generics_self_advanced.py:42:20: type[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to type[~SelfT]'] -Line 43: Unexpected errors ['./generics_self_advanced.py:43:20: Any[error] is not equivalent to list[~SelfT]', "./generics_self_advanced.py:43:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute]"] -Line 44: Unexpected errors ["./generics_self_advanced.py:44:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute]"] """ output = """ -./generics_self_advanced.py:18:12: property is not equivalent to ./generics_self_advanced.py.ParentA -./generics_self_advanced.py:19:12: property is not equivalent to ./generics_self_advanced.py.ChildA -./generics_self_advanced.py:35:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT -./generics_self_advanced.py:36:20: list[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to list[~SelfT] -./generics_self_advanced.py:37:20: ./generics_self_advanced.py.ChildB[~SelfT] is not equivalent to ~SelfT -./generics_self_advanced.py:38:20: ./generics_self_advanced.py.ChildB[Any[generic_argument]] is not equivalent to ~SelfT -./generics_self_advanced.py:42:20: type[./generics_self_advanced.py.ChildB[~SelfT]] is not equivalent to type[~SelfT] -./generics_self_advanced.py:43:20: Any[error] is not equivalent to list[~SelfT] -./generics_self_advanced.py:43:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute] -./generics_self_advanced.py:44:20: type[./generics_self_advanced.py.ChildB[~SelfT]] has no attribute 'a' [undefined_attribute] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 7411420cc..07bcc7762 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 70baea9eb..8646aca4d 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -9,10 +9,8 @@ Line 113: Expected 1 errors Line 118: Expected 1 errors Line 123: Expected 1 errors Line 127: Expected 1 errors -Line 63: Unexpected errors ['./generics_self_usage.py:63:19: Incompatible argument type for inner_self: expected ~SelfT but got ./generics_self_usage.py.HasNestedFunction [incompatible_argument]'] """ output = """ -./generics_self_usage.py:63:19: Incompatible argument type for inner_self: expected ~SelfT but got ./generics_self_usage.py.HasNestedFunction [incompatible_argument] ./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] ./generics_self_usage.py:87:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_usage.py.Foo3, HasAttrExtension(attribute_name=KnownValue(val='return_concrete_type'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_usage.py.Foo3', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_return_value] """ diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index ae5122610..db336e3af 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -4,9 +4,9 @@ errors_diff = """ output = """ ./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__iter__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int], HasAttrExtension(attribute_name=KnownValue(val='__getitem__'), attribute_type=CallableValue(typ=, literal_only=False, signature=OverloadedSignature(signatures=(Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None), Signature(parameters={'index': SigParameter(name='index', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=GenericValue(typ=, literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./generics_syntax_infer_variance.py:56:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant3[int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeCovariant3[float | int], HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ='./generics_syntax_infer_variance.py.ShouldBeCovariant2', literal_only=False, args=(AnyValue(source=),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int] [incompatible_assignment] +./generics_syntax_infer_variance.py:56:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant3[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant3[float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:85:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant5[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant5[float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:96:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant6[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant6[float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:112:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant1[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant1[int] [incompatible_assignment] @@ -17,7 +17,7 @@ output = """ ./generics_syntax_infer_variance.py:136:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant3[int, str], got ./generics_syntax_infer_variance.py.ShouldBeInvariant3[float | int, str] [incompatible_assignment] ./generics_syntax_infer_variance.py:137:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, int] [incompatible_assignment] ./generics_syntax_infer_variance.py:138:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant3[str, float | int] [incompatible_assignment] -./generics_syntax_infer_variance.py:146:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant4[float | int], got Annotated[./generics_syntax_infer_variance.py.ShouldBeInvariant4[int], HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=KnownValue(val=1)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./generics_syntax_infer_variance.py:146:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant4[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant4[int] [incompatible_assignment] ./generics_syntax_infer_variance.py:154:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeInvariant5[float | int], got ./generics_syntax_infer_variance.py.ShouldBeInvariant5[int] [incompatible_assignment] ./generics_syntax_infer_variance.py:165:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeContravariant1[float | int], got ./generics_syntax_infer_variance.py.ShouldBeContravariant1[int] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index 130d63455..ce6448d99 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -1,10 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 135: Unexpected errors ['./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool]'] -Line 136: Unexpected errors ['./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int]'] -Line 137: Unexpected errors ['./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int]'] -Line 148: Unexpected errors ['./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int]'] -Line 149: Unexpected errors ['./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int]'] """ output = """ ./generics_typevartuple_specialization.py:109:0: Unpacked TypeVarTuple cannot specialize this type alias [invalid_annotation] @@ -12,10 +7,5 @@ output = """ ./generics_typevartuple_specialization.py:121:6: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] ./generics_typevartuple_specialization.py:122:6: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] ./generics_typevartuple_specialization.py:127:4: Expected 3 type arguments for type alias, got 1 [invalid_annotation] -./generics_typevartuple_specialization.py:135:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool] -./generics_typevartuple_specialization.py:136:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str], bool, float | int] -./generics_typevartuple_specialization.py:137:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[str, bool], float | int, int] -./generics_typevartuple_specialization.py:148:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[], str, bool, float | int] -./generics_typevartuple_specialization.py:149:16: tuple[tuple[*tuple[Any[generic_argument], ...]], Any[generic_argument], Any[generic_argument], Any[generic_argument]] is not equivalent to tuple[tuple[bool], str, float | int, int] ./generics_typevartuple_specialization.py:163:7: Unpacked TypeVarTuple cannot specialize this type alias [invalid_annotation] """ diff --git a/conformance/results/pycroscope/literals_semantics.toml b/conformance/results/pycroscope/literals_semantics.toml index 74d57e35d..89d3a423c 100644 --- a/conformance/results/pycroscope/literals_semantics.toml +++ b/conformance/results/pycroscope/literals_semantics.toml @@ -1,9 +1,9 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 33: Expected 1 errors """ output = """ ./literals_semantics.py:10:0: Incompatible assignment: expected Literal[3], got Literal[4] [incompatible_assignment] ./literals_semantics.py:24:4: Incompatible assignment: expected Literal[False], got Literal[0] [incompatible_assignment] ./literals_semantics.py:25:4: Incompatible assignment: expected Literal[0], got Literal[False] [incompatible_assignment] +./literals_semantics.py:33:4: Incompatible assignment: expected Literal[3, 4, 5], got Literal[6, 7, 8] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index 2bdec1325..f50810a49 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,25 +1,51 @@ conformance_automated = "Fail" errors_diff = """ +Line 32: Expected 1 errors +Line 33: Expected 1 errors +Line 22: Unexpected errors ["./namedtuples_define_class.py:22:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] +Line 23: Unexpected errors ['./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int'] +Line 24: Unexpected errors ['./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int'] +Line 25: Unexpected errors ['./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str'] +Line 26: Unexpected errors ['./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str'] +Line 27: Unexpected errors ['./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int'] +Line 28: Unexpected errors ['./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int'] +Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int]'] +Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str]'] +Line 35: Unexpected errors ['./namedtuples_define_class.py:35:5: Takes 2 positional arguments but 3 were given [incompatible_call]'] +Line 36: Unexpected errors ["./namedtuples_define_class.py:36:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] +Line 39: Unexpected errors ["./namedtuples_define_class.py:39:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] +Line 41: Unexpected errors ["./namedtuples_define_class.py:41:5: Got an unexpected keyword argument 'units' [incompatible_call]"] +Line 42: Unexpected errors ["./namedtuples_define_class.py:42:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] Line 121: Unexpected errors ['./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int]'] Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int'] -Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int'] """ output = """ -./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] -./namedtuples_define_class.py:33:6: Tuple index out of range: Literal[-4] [incompatible_call] -./namedtuples_define_class.py:44:5: In call to ./namedtuples_define_class.py.Point: Missing required argument 'y' [incompatible_call] -./namedtuples_define_class.py:45:5: In call to ./namedtuples_define_class.py.Point: Missing required argument 'y' [incompatible_call] +./namedtuples_define_class.py:22:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str +./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str +./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int +./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int] +./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str] +./namedtuples_define_class.py:35:5: Takes 2 positional arguments but 3 were given [incompatible_call] +./namedtuples_define_class.py:36:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:39:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:41:5: Got an unexpected keyword argument 'units' [incompatible_call] +./namedtuples_define_class.py:42:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:44:5: Missing required argument 'y' [incompatible_call] +./namedtuples_define_class.py:45:5: Missing required argument 'y' [incompatible_call] ./namedtuples_define_class.py:46:14: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument] -./namedtuples_define_class.py:47:23: Incompatible argument type for units: expected str but got Literal[3] [incompatible_argument] -./namedtuples_define_class.py:48:5: In call to ./namedtuples_define_class.py.Point: Takes 3 positional arguments but 4 were given [incompatible_call] -./namedtuples_define_class.py:49:6: In call to ./namedtuples_define_class.py.Point: Got an unexpected keyword argument 'other' [incompatible_call] -./namedtuples_define_class.py:69:6: In call to ./namedtuples_define_class.py.Point2: Takes 2 positional arguments but 3 were given [incompatible_call] +./namedtuples_define_class.py:47:5: Got an unexpected keyword argument 'units' [incompatible_call] +./namedtuples_define_class.py:48:5: Takes 2 positional arguments but 4 were given [incompatible_call] +./namedtuples_define_class.py:49:6: Takes 2 positional arguments but 3 were given [incompatible_call] +./namedtuples_define_class.py:69:6: Takes 2 positional arguments but 3 were given [incompatible_call] ./namedtuples_define_class.py:76:4: NamedTuple field names cannot start with an underscore [invalid_annotation] ./namedtuples_define_class.py:86:4: NamedTuple fields without defaults cannot follow fields with defaults [invalid_annotation] ./namedtuples_define_class.py:106:4: Field 'x' conflicts with base NamedTuple field [incompatible_override] ./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int] ./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int -./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int ./namedtuples_define_class.py:125:18: Incompatible argument type for value: expected str but got Literal[3.1] [incompatible_argument] ./namedtuples_define_class.py:132:23: NamedTuple classes may only inherit from NamedTuple and Generic [invalid_base] """ diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml index 8654688b6..4f48e436e 100644 --- a/conformance/results/pycroscope/namedtuples_usage.toml +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -1,13 +1,31 @@ -conformance_automated = "Pass" +conformance_automated = "Fail" errors_diff = """ +Line 34: Expected 1 errors +Line 35: Expected 1 errors +Line 41: Expected 1 errors +Line 43: Expected 1 errors +Line 52: Expected 1 errors +Line 27: Unexpected errors ['./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int'] +Line 28: Unexpected errors ['./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int'] +Line 29: Unexpected errors ['./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str'] +Line 30: Unexpected errors ['./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str'] +Line 31: Unexpected errors ['./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int'] +Line 32: Unexpected errors ['./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int'] +Line 48: Unexpected errors ["./namedtuples_usage.py:48:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack]"] +Line 49: Unexpected errors ['./namedtuples_usage.py:49:12: Any[error] is not equivalent to int'] +Line 50: Unexpected errors ['./namedtuples_usage.py:50:12: Any[error] is not equivalent to str'] """ output = """ -./namedtuples_usage.py:34:6: Tuple index out of range: Literal[3] [incompatible_call] -./namedtuples_usage.py:35:6: Tuple index out of range: Literal[-4] [incompatible_call] +./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str +./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str +./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int ./namedtuples_usage.py:40:0: Cannot mutate NamedTuple field 'x' [incompatible_assignment] -./namedtuples_usage.py:41:0: Object of type ./namedtuples_usage.py.Point does not support '__setitem__' [unsupported_operation] ./namedtuples_usage.py:42:4: Cannot mutate NamedTuple field 'x' [incompatible_assignment] -./namedtuples_usage.py:43:4: Object of type ./namedtuples_usage.py.Point does not support '__delitem__' [unsupported_operation] -./namedtuples_usage.py:52:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] -./namedtuples_usage.py:53:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] +./namedtuples_usage.py:48:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] +./namedtuples_usage.py:49:12: Any[error] is not equivalent to int +./namedtuples_usage.py:50:12: Any[error] is not equivalent to str +./namedtuples_usage.py:53:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 50487022b..2a1f03631 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -21,6 +21,6 @@ output = """ ./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] -./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got ./protocols_definition.py.Concrete6_Bad2 [incompatible_assignment] +./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] ./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=AnyValue(source=))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index fd00e7314..6719fa096 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,5 +7,5 @@ output = """ ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/typeforms_typeform.toml b/conformance/results/pycroscope/typeforms_typeform.toml index 17a8a1d1d..e52446eb0 100644 --- a/conformance/results/pycroscope/typeforms_typeform.toml +++ b/conformance/results/pycroscope/typeforms_typeform.toml @@ -1,22 +1,21 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 59: Expected 1 errors -Line 60: Expected 1 errors """ output = """ ./typeforms_typeform.py:23:0: Incompatible assignment: expected TypeForm[str | None], got Literal[str | int] [incompatible_assignment] ./typeforms_typeform.py:24:0: Incompatible assignment: expected TypeForm[str | None], got Literal[list[str | None]] [incompatible_assignment] -./typeforms_typeform.py:55:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[()] [incompatible_assignment] -./typeforms_typeform.py:56:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[(1, 2)] [incompatible_assignment] -./typeforms_typeform.py:57:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[1] [incompatible_assignment] -./typeforms_typeform.py:58:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Self] [incompatible_assignment] -./typeforms_typeform.py:61:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.ClassVar[int]] [incompatible_assignment] -./typeforms_typeform.py:62:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Final[int]] [incompatible_assignment] -./typeforms_typeform.py:63:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Unpack[Ts]] [incompatible_assignment] -./typeforms_typeform.py:64:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Optional] [incompatible_assignment] -./typeforms_typeform.py:65:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal['int + str'] [incompatible_assignment] -./typeforms_typeform.py:76:5: Unrecognized annotation type [invalid_annotation] -./typeforms_typeform.py:78:5: Unrecognized annotation type [invalid_annotation] -./typeforms_typeform.py:88:0: Incompatible assignment: expected TypeForm[str], got TypeForm[int] [incompatible_assignment] -./typeforms_typeform.py:98:0: Incompatible assignment: expected TypeForm[str], got type[int] [incompatible_assignment] +./typeforms_typeform.py:59:6: Incompatible argument type for x: expected TypeForm[Any[explicit]] but got Literal['not a type'] [incompatible_argument] +./typeforms_typeform.py:67:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[()] [incompatible_assignment] +./typeforms_typeform.py:68:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[(1, 2)] [incompatible_assignment] +./typeforms_typeform.py:69:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[1] [incompatible_assignment] +./typeforms_typeform.py:70:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Self] [incompatible_assignment] +./typeforms_typeform.py:71:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.ClassVar[int]] [incompatible_assignment] +./typeforms_typeform.py:72:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Final[int]] [incompatible_assignment] +./typeforms_typeform.py:73:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Unpack[Ts]] [incompatible_assignment] +./typeforms_typeform.py:74:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal[typing.Optional] [incompatible_assignment] +./typeforms_typeform.py:75:0: Incompatible assignment: expected TypeForm[Any[explicit]], got Literal['int + str'] [incompatible_assignment] +./typeforms_typeform.py:86:5: Unrecognized annotation type [invalid_annotation] +./typeforms_typeform.py:88:5: Unrecognized annotation type [invalid_annotation] +./typeforms_typeform.py:98:0: Incompatible assignment: expected TypeForm[str], got TypeForm[int] [incompatible_assignment] +./typeforms_typeform.py:108:0: Incompatible assignment: expected TypeForm[str], got type[int] [incompatible_assignment] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index ba2c4577c..21979f8f5 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -236,7 +236,7 @@

Python Type System Conformance Test Results

Unknown Unknown Unknown -Unknown +Pass Unsupported @@ -370,7 +370,7 @@

Python Type System Conformance Test Results

Pass
Partial

Doesn't allow accessing `Self` in a classmethod

Pass*

Treats attributes not initialized on the class as instance-only

-Unknown +Pass Pass      generics_self_attributes @@ -490,7 +490,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Sometimes specializes to tuple[Any, ...] instead of empty tuple

-Unknown +Pass Unsupported      generics_typevartuple_unpack @@ -662,7 +662,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Pass @@ -1201,7 +1201,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass +Unknown
Partial

Does not detect runtime errors from attempting to delete namedtuple attributes.

diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 1e314c057..0afda2246 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -391,18 +391,6 @@ def install(self) -> bool: ) return False try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "pycroscope", "-y"], - check=True, - ) - - # Install editable from the local pycroscope repo. - run( - [sys.executable, "-m", "pip", "install", "-e", str(source_dir)], - check=True, - ) - # Ensure it is installed and the entrypoint is available. self.get_version() From 8e990b4dc97ca2b423aa643d230d08eea4e7b173 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 8 Mar 2026 16:19:20 -0700 Subject: [PATCH 67/78] progress --- .../pycroscope/generics_self_basic.toml | 4 +- .../pycroscope/namedtuples_define_class.toml | 38 +++---------------- .../results/pycroscope/namedtuples_usage.toml | 30 +++------------ conformance/results/results.html | 2 +- 4 files changed, 14 insertions(+), 60 deletions(-) diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 07bcc7762..68c686518 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index f50810a49..030ce2ecf 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,45 +1,17 @@ conformance_automated = "Fail" errors_diff = """ -Line 32: Expected 1 errors -Line 33: Expected 1 errors -Line 22: Unexpected errors ["./namedtuples_define_class.py:22:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] -Line 23: Unexpected errors ['./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int'] -Line 24: Unexpected errors ['./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int'] -Line 25: Unexpected errors ['./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str'] -Line 26: Unexpected errors ['./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str'] -Line 27: Unexpected errors ['./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int'] -Line 28: Unexpected errors ['./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int'] -Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int]'] -Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str]'] -Line 35: Unexpected errors ['./namedtuples_define_class.py:35:5: Takes 2 positional arguments but 3 were given [incompatible_call]'] -Line 36: Unexpected errors ["./namedtuples_define_class.py:36:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] -Line 39: Unexpected errors ["./namedtuples_define_class.py:39:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] -Line 41: Unexpected errors ["./namedtuples_define_class.py:41:5: Got an unexpected keyword argument 'units' [incompatible_call]"] -Line 42: Unexpected errors ["./namedtuples_define_class.py:42:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point"] Line 121: Unexpected errors ['./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int]'] Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int'] """ output = """ -./namedtuples_define_class.py:22:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point -./namedtuples_define_class.py:23:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:24:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:25:12: Any[from_another] is not equivalent to str -./namedtuples_define_class.py:26:12: Any[from_another] is not equivalent to str -./namedtuples_define_class.py:27:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:28:12: Any[from_another] is not equivalent to int -./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int] -./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str] -./namedtuples_define_class.py:35:5: Takes 2 positional arguments but 3 were given [incompatible_call] -./namedtuples_define_class.py:36:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point -./namedtuples_define_class.py:39:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point -./namedtuples_define_class.py:41:5: Got an unexpected keyword argument 'units' [incompatible_call] -./namedtuples_define_class.py:42:12: Annotated[./namedtuples_define_class.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] is not equivalent to ./namedtuples_define_class.py.Point +./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] +./namedtuples_define_class.py:33:6: Tuple index out of range: Literal[-4] [incompatible_call] ./namedtuples_define_class.py:44:5: Missing required argument 'y' [incompatible_call] ./namedtuples_define_class.py:45:5: Missing required argument 'y' [incompatible_call] ./namedtuples_define_class.py:46:14: Incompatible argument type for y: expected int but got Literal[''] [incompatible_argument] -./namedtuples_define_class.py:47:5: Got an unexpected keyword argument 'units' [incompatible_call] -./namedtuples_define_class.py:48:5: Takes 2 positional arguments but 4 were given [incompatible_call] -./namedtuples_define_class.py:49:6: Takes 2 positional arguments but 3 were given [incompatible_call] +./namedtuples_define_class.py:47:23: Incompatible argument type for units: expected str but got Literal[3] [incompatible_argument] +./namedtuples_define_class.py:48:5: Takes 3 positional arguments but 4 were given [incompatible_call] +./namedtuples_define_class.py:49:6: Got an unexpected keyword argument 'other' [incompatible_call] ./namedtuples_define_class.py:69:6: Takes 2 positional arguments but 3 were given [incompatible_call] ./namedtuples_define_class.py:76:4: NamedTuple field names cannot start with an underscore [invalid_annotation] ./namedtuples_define_class.py:86:4: NamedTuple fields without defaults cannot follow fields with defaults [invalid_annotation] diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml index 4f48e436e..0bc70601e 100644 --- a/conformance/results/pycroscope/namedtuples_usage.toml +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -1,31 +1,13 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 34: Expected 1 errors -Line 35: Expected 1 errors -Line 41: Expected 1 errors -Line 43: Expected 1 errors -Line 52: Expected 1 errors -Line 27: Unexpected errors ['./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int'] -Line 28: Unexpected errors ['./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int'] -Line 29: Unexpected errors ['./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str'] -Line 30: Unexpected errors ['./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str'] -Line 31: Unexpected errors ['./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int'] -Line 32: Unexpected errors ['./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int'] -Line 48: Unexpected errors ["./namedtuples_usage.py:48:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack]"] -Line 49: Unexpected errors ['./namedtuples_usage.py:49:12: Any[error] is not equivalent to int'] -Line 50: Unexpected errors ['./namedtuples_usage.py:50:12: Any[error] is not equivalent to str'] """ output = """ -./namedtuples_usage.py:27:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:28:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:29:12: Any[from_another] is not equivalent to str -./namedtuples_usage.py:30:12: Any[from_another] is not equivalent to str -./namedtuples_usage.py:31:12: Any[from_another] is not equivalent to int -./namedtuples_usage.py:32:12: Any[from_another] is not equivalent to int +./namedtuples_usage.py:34:6: Tuple index out of range: Literal[3] [incompatible_call] +./namedtuples_usage.py:35:6: Tuple index out of range: Literal[-4] [incompatible_call] ./namedtuples_usage.py:40:0: Cannot mutate NamedTuple field 'x' [incompatible_assignment] +./namedtuples_usage.py:41:0: Object of type tuple[int, int, str] does not support '__setitem__' [unsupported_operation] ./namedtuples_usage.py:42:4: Cannot mutate NamedTuple field 'x' [incompatible_assignment] -./namedtuples_usage.py:48:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] -./namedtuples_usage.py:49:12: Any[error] is not equivalent to int -./namedtuples_usage.py:50:12: Any[error] is not equivalent to str +./namedtuples_usage.py:43:4: Object of type tuple[int, int, str] does not support '__delitem__' [unsupported_operation] +./namedtuples_usage.py:52:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] ./namedtuples_usage.py:53:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 21979f8f5..6f1b7ef09 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -1201,7 +1201,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass
Partial

Does not detect runtime errors from attempting to delete namedtuple attributes.

From 063cc2c3377c80f10c56510ede2b29adccd47638 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 9 Mar 2026 20:55:49 -0700 Subject: [PATCH 68/78] progress --- .../results/pycroscope/aliases_explicit.toml | 2 +- .../results/pycroscope/aliases_implicit.toml | 2 +- .../pycroscope/aliases_type_statement.toml | 4 +-- .../pycroscope/aliases_typealiastype.toml | 28 +++++++++---------- .../results/pycroscope/aliases_variance.toml | 8 +++--- .../pycroscope/annotations_forward_refs.toml | 2 +- .../pycroscope/callables_protocol.toml | 2 +- .../pycroscope/constructors_call_init.toml | 6 +--- .../pycroscope/constructors_call_new.toml | 6 +--- .../pycroscope/constructors_callable.toml | 4 +-- .../dataclasses_transform_converter.toml | 8 +++--- .../results/pycroscope/enums_behaviors.toml | 2 +- .../results/pycroscope/enums_members.toml | 2 +- .../pycroscope/generics_base_class.toml | 4 +-- .../results/pycroscope/generics_basic.toml | 10 +++---- .../generics_paramspec_semantics.toml | 6 ++-- .../results/pycroscope/generics_scoping.toml | 20 ++++++------- .../pycroscope/generics_self_basic.toml | 4 +-- .../pycroscope/generics_self_usage.toml | 22 +++++++-------- .../generics_syntax_declarations.toml | 4 +-- .../generics_typevartuple_basic.toml | 4 +-- .../generics_typevartuple_callable.toml | 8 +++++- .../results/pycroscope/generics_variance.toml | 24 ++++++++-------- .../literals_parameterizations.toml | 1 + .../pycroscope/namedtuples_define_class.toml | 2 ++ .../pycroscope/protocols_class_objects.toml | 2 ++ .../results/pycroscope/protocols_merging.toml | 2 +- .../qualifiers_final_decorator.toml | 2 +- .../pycroscope/typeddicts_inheritance.toml | 2 +- .../typeddicts_readonly_inheritance.toml | 4 +-- conformance/results/results.html | 8 +++--- 31 files changed, 104 insertions(+), 101 deletions(-) diff --git a/conformance/results/pycroscope/aliases_explicit.toml b/conformance/results/pycroscope/aliases_explicit.toml index bcf3bcbd3..5463d36f3 100644 --- a/conformance/results/pycroscope/aliases_explicit.toml +++ b/conformance/results/pycroscope/aliases_explicit.toml @@ -13,7 +13,7 @@ output = """ ./aliases_explicit.py:82:20: Invalid type annotation [invalid_annotation] ./aliases_explicit.py:83:20: Unrecognized annotation [invalid_annotation] ./aliases_explicit.py:84:20: Invalid type annotation [invalid_annotation] -./aliases_explicit.py:85:20: Invalid type annotation 0 [invalid_annotation] +./aliases_explicit.py:85:20: Cannot resolve subscripted annotation: [invalid_annotation] ./aliases_explicit.py:86:20: Invalid type annotation [invalid_annotation] ./aliases_explicit.py:87:20: Invalid type annotation 3 [invalid_annotation] ./aliases_explicit.py:88:21: Invalid type annotation True [invalid_annotation] diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 69972c637..4098afc1e 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -15,7 +15,7 @@ output = """ ./aliases_implicit.py:78:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] ./aliases_implicit.py:79:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] ./aliases_implicit.py:80:8: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation] -./aliases_implicit.py:81:8: Type argument str is not compatible with ~TFloat: float | int [invalid_annotation] +./aliases_implicit.py:81:8: Type argument str is not compatible with TypeVarParam(typevar=~TFloat, bound=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), default=None, constraints=(), variance=) [invalid_annotation] ./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] ./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml index c26dbbc15..0d5c06b17 100644 --- a/conformance/results/pycroscope/aliases_type_statement.toml +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -24,8 +24,8 @@ output = """ ./aliases_type_statement.py:56:4: Type alias statements are not allowed inside functions [invalid_annotation] ./aliases_type_statement.py:62:0: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] ./aliases_type_statement.py:67:0: Type alias must declare type parameters in the type statement [invalid_annotation] -./aliases_type_statement.py:77:6: Type argument str is not compatible with ~S: int [invalid_annotation] -./aliases_type_statement.py:79:6: Type argument int is not compatible with ~T: str [invalid_annotation] +./aliases_type_statement.py:77:6: Type argument str is not compatible with TypeVarParam(typevar=~S, bound=TypedValue(typ=, literal_only=False), default=None, constraints=(), variance=) [invalid_annotation] +./aliases_type_statement.py:79:6: Type argument int is not compatible with TypeVarParam(typevar=~T, bound=TypedValue(typ=, literal_only=False), default=None, constraints=(), variance=) [invalid_annotation] ./aliases_type_statement.py:82:0: Type alias RecursiveTypeAlias3 has a circular definition [invalid_annotation] ./aliases_type_statement.py:84:0: Type alias RecursiveTypeAlias4 has a circular definition [invalid_annotation] ./aliases_type_statement.py:88:0: Type alias RecursiveTypeAlias6 has a circular definition [invalid_annotation] diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index 248596dd9..a57c4991b 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -1,24 +1,11 @@ conformance_automated = "Fail" errors_diff = """ -Line 52: Expected 1 errors -Line 53: Expected 1 errors -Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 56: Expected 1 errors -Line 57: Expected 1 errors -Line 58: Expected 1 errors -Line 59: Expected 1 errors -Line 60: Expected 1 errors -Line 61: Expected 1 errors -Line 62: Expected 1 errors -Line 63: Expected 1 errors -Line 64: Expected 1 errors Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Unrecognized annotation [invalid_annotation]"] """ output = """ ./aliases_typealiastype.py:32:6: .GoodAlias1 = int has no attribute 'other_attrib' [undefined_attribute] ./aliases_typealiastype.py:39:4: Unrecognized annotation [invalid_annotation] -./aliases_typealiastype.py:40:4: Type argument int is not compatible with ~TStr: str [invalid_annotation] +./aliases_typealiastype.py:40:4: Type argument int is not compatible with TypeVarParam(typevar=~TStr, bound=TypedValue(typ=, literal_only=False), default=None, constraints=(), variance=) [invalid_annotation] ./aliases_typealiastype.py:43:0: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] ./aliases_typealiastype.py:44:0: Type alias must declare type parameters in the type statement [invalid_annotation] ./aliases_typealiastype.py:45:56: type_params argument to TypeAliasType must be a literal tuple [invalid_annotation] @@ -26,5 +13,18 @@ output = """ ./aliases_typealiastype.py:47:0: Type alias BadAlias5 has a circular definition [invalid_annotation] ./aliases_typealiastype.py:48:0: Type alias BadAlias6 has a circular definition [invalid_annotation] ./aliases_typealiastype.py:49:0: Type alias BadAlias7 has a circular definition [invalid_annotation] +./aliases_typealiastype.py:52:39: Invalid type annotation [invalid_annotation] +./aliases_typealiastype.py:53:39: Unrecognized annotation [invalid_annotation] +./aliases_typealiastype.py:54:41: Unrecognized annotation tuple[tuple[type 'int', type 'str']] [invalid_annotation] +./aliases_typealiastype.py:55:41: Invalid type annotation [invalid_annotation] +./aliases_typealiastype.py:56:41: Unrecognized annotation [invalid_annotation] +./aliases_typealiastype.py:57:41: Invalid type annotation [invalid_annotation] +./aliases_typealiastype.py:58:41: Cannot resolve subscripted annotation: [invalid_annotation] +./aliases_typealiastype.py:59:41: Invalid type annotation [invalid_annotation] +./aliases_typealiastype.py:60:41: Invalid type annotation 3 [invalid_annotation] +./aliases_typealiastype.py:61:41: Invalid type annotation True [invalid_annotation] +./aliases_typealiastype.py:62:41: Invalid type annotation 1 [invalid_annotation] +./aliases_typealiastype.py:63:41: Invalid type annotation [invalid_annotation] +./aliases_typealiastype.py:64:41: Invalid type annotation [invalid_annotation] ./aliases_typealiastype.py:66:0: Type alias BadAlias21 has a circular definition [invalid_annotation] """ diff --git a/conformance/results/pycroscope/aliases_variance.toml b/conformance/results/pycroscope/aliases_variance.toml index 9098075f0..9b84c03ca 100644 --- a/conformance/results/pycroscope/aliases_variance.toml +++ b/conformance/results/pycroscope/aliases_variance.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./aliases_variance.py:24:15: T_co has incompatible variance in base class [invalid_annotation] -./aliases_variance.py:28:15: T_co has incompatible variance in base class [invalid_annotation] -./aliases_variance.py:32:15: T_co has incompatible variance in base class [invalid_annotation] -./aliases_variance.py:44:15: T_contra has incompatible variance in base class [invalid_annotation] +./aliases_variance.py:24:15: T_co has incompatible variance in base class [invalid_base] +./aliases_variance.py:28:15: T_co has incompatible variance in base class [invalid_base] +./aliases_variance.py:32:15: T_co has incompatible variance in base class [invalid_base] +./aliases_variance.py:44:15: T_contra has incompatible variance in base class [invalid_base] """ diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index bca8ff294..f62a5dd16 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -28,7 +28,7 @@ output = """ ./annotations_forward_refs.py:44:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:45:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:46:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:47:8: Invalid type annotation 0 [invalid_annotation] +./annotations_forward_refs.py:47:8: Cannot resolve subscripted annotation: [invalid_annotation] ./annotations_forward_refs.py:48:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:49:8: Invalid type annotation 1 [invalid_annotation] ./annotations_forward_refs.py:50:9: Invalid type annotation True [invalid_annotation] diff --git a/conformance/results/pycroscope/callables_protocol.toml b/conformance/results/pycroscope/callables_protocol.toml index dcfa5d07e..96de524d6 100644 --- a/conformance/results/pycroscope/callables_protocol.toml +++ b/conformance/results/pycroscope/callables_protocol.toml @@ -13,7 +13,7 @@ output = """ ./callables_protocol.py:121:0: Incompatible assignment: expected ./callables_protocol.py.NotProto6, got (*vals: tuple[bytes, ...], max_len: int | None = None) -> list[bytes] [incompatible_assignment] ./callables_protocol.py:169:0: Incompatible assignment: expected ./callables_protocol.py.Proto8, got (x: int) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:186:4: Incompatible assignment: expected int, got Literal['str'] [incompatible_assignment] -./callables_protocol.py:187:4: ./callables_protocol.py.Proto9[ParamSpecSig(param_spec=~P, default=None), +R] has no attribute 'xxx' [undefined_attribute] +./callables_protocol.py:187:4: ./callables_protocol.py.Proto9[ParamSpecParam(param_spec=~P, default=None, variance=, bound=None, constraints=()), +R] has no attribute 'xxx' [undefined_attribute] ./callables_protocol.py:197:6: ./callables_protocol.py.Proto9[(x: int) -> Any[unannotated], str] has no attribute 'other_attribute2' [undefined_attribute] ./callables_protocol.py:238:0: Incompatible assignment: expected ./callables_protocol.py.Proto11, got (x: int, y: str, /) -> Any[explicit] [incompatible_assignment] ./callables_protocol.py:260:0: Incompatible assignment: expected ./callables_protocol.py.Proto12, got (*args: tuple[Any[explicit], ...], kwarg0: Any[explicit]) -> None [incompatible_assignment] diff --git a/conformance/results/pycroscope/constructors_call_init.toml b/conformance/results/pycroscope/constructors_call_init.toml index 366a303ab..28c24c705 100644 --- a/conformance/results/pycroscope/constructors_call_init.toml +++ b/conformance/results/pycroscope/constructors_call_init.toml @@ -1,14 +1,10 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 25: Unexpected errors ['./constructors_call_init.py:25:12: ./constructors_call_init.py.Class1[float] is not equivalent to ./constructors_call_init.py.Class1[float | int]'] -Line 75: Unexpected errors ['./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5 is not equivalent to ./constructors_call_init.py.Class5[float | int]'] """ output = """ ./constructors_call_init.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] -./constructors_call_init.py:25:12: ./constructors_call_init.py.Class1[float] is not equivalent to ./constructors_call_init.py.Class1[float | int] ./constructors_call_init.py:42:7: Incompatible argument type for x: expected ./constructors_call_init.py.Class3 | None but got ./constructors_call_init.py.Class2[Any[generic_argument]] [incompatible_argument] ./constructors_call_init.py:56:0: Missing required positional argument '%self' [incompatible_call] -./constructors_call_init.py:75:12: ./constructors_call_init.py.Class5 is not equivalent to ./constructors_call_init.py.Class5[float | int] ./constructors_call_init.py:107:17: Class-scoped type variables are not allowed in __init__ self annotation [invalid_annotation] ./constructors_call_init.py:130:0: In call to object.__init__: Takes 0 positional arguments but 1 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_call_new.toml b/conformance/results/pycroscope/constructors_call_new.toml index ddd1aec9b..b747f222c 100644 --- a/conformance/results/pycroscope/constructors_call_new.toml +++ b/conformance/results/pycroscope/constructors_call_new.toml @@ -1,11 +1,7 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 20: Unexpected errors ['./constructors_call_new.py:20:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int]'] -Line 24: Unexpected errors ['./constructors_call_new.py:24:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int]'] """ output = """ -./constructors_call_new.py:20:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int] ./constructors_call_new.py:21:12: Incompatible argument type for x: expected int but got Literal[1.0] [incompatible_argument] -./constructors_call_new.py:24:12: ./constructors_call_new.py.Class1[float] is not equivalent to ./constructors_call_new.py.Class1[float | int] ./constructors_call_new.py:148:0: Missing required positional argument '%self' [incompatible_call] """ diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index c15371e03..660f59b96 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -19,9 +19,9 @@ output = """ ./constructors_callable.py:129:0: Takes 0 positional arguments but 1 were given [incompatible_call] ./constructors_callable.py:144:12: Revealed type is '() -> Any[explicit]' [reveal_type] ./constructors_callable.py:146:0: Takes 0 positional arguments but 1 were given [incompatible_call] -./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T]' [reveal_type] +./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T: (int, str)) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T: (int, str)]' [reveal_type] ./constructors_callable.py:184:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class8[~T]' [reveal_type] ./constructors_callable.py:186:0: Cannot resolve type variables [incompatible_call] -./constructors_callable.py:195:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class9' [reveal_type] +./constructors_callable.py:195:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class9[~T]' [reveal_type] ./constructors_callable.py:197:0: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_transform_converter.toml b/conformance/results/pycroscope/dataclasses_transform_converter.toml index c2c5f21db..82ea3d521 100644 --- a/conformance/results/pycroscope/dataclasses_transform_converter.toml +++ b/conformance/results/pycroscope/dataclasses_transform_converter.toml @@ -2,13 +2,13 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./dataclasses_transform_converter.py:48:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got () -> int [incompatible_argument] -./dataclasses_transform_converter.py:49:40: Incompatible argument type for converter: expected (~S, /) -> ~T but got (*, x: int) -> int [incompatible_argument] +./dataclasses_transform_converter.py:48:4: Dataclass converter must accept a positional argument [incompatible_argument] +./dataclasses_transform_converter.py:49:4: Dataclass converter must accept a positional argument [incompatible_argument] ./dataclasses_transform_converter.py:107:4: Incompatible argument type for field0: expected str but got Literal[1] [incompatible_argument] ./dataclasses_transform_converter.py:108:22: Incompatible argument type for field3: expected str | bytes but got Literal[1] [incompatible_argument] ./dataclasses_transform_converter.py:109:28: Incompatible argument type for field4: expected str | list[str] but got Literal[3j] [incompatible_argument] ./dataclasses_transform_converter.py:118:0: Incompatible assignment: expected str, got Literal[1] [incompatible_assignment] ./dataclasses_transform_converter.py:119:0: Incompatible assignment: expected str | bytes, got Literal[1] [incompatible_assignment] -./dataclasses_transform_converter.py:130:18: Cannot resolve type variables [incompatible_call] -./dataclasses_transform_converter.py:133:18: Cannot resolve type variables [incompatible_call] +./dataclasses_transform_converter.py:130:4: Dataclass default value is incompatible with field type str [incompatible_call] +./dataclasses_transform_converter.py:133:4: Dataclass default_factory return type is incompatible with field type str [incompatible_call] """ diff --git a/conformance/results/pycroscope/enums_behaviors.toml b/conformance/results/pycroscope/enums_behaviors.toml index 730e957bc..6596e96a3 100644 --- a/conformance/results/pycroscope/enums_behaviors.toml +++ b/conformance/results/pycroscope/enums_behaviors.toml @@ -4,5 +4,5 @@ errors_diff = """ output = """ ./enums_behaviors.py:28:12: ./enums_behaviors.py.Color is not equivalent to Literal[] ./enums_behaviors.py:32:12: ./enums_behaviors.py.Color is not equivalent to Literal[] -./enums_behaviors.py:44:0: Cannot inherit from final class [invalid_annotation] +./enums_behaviors.py:44:0: Cannot inherit from final class [invalid_base] """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 2789d04de..b249708a1 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -3,7 +3,7 @@ errors_diff = """ """ output = """ ./enums_members.py:50:4: Enum members should not be explicitly annotated [invalid_annotation] -./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypeVarValue(typevar=~T1, bound=None, default=None, constraints=(), variance=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypeVarValue(typevar_param=TypeVarParam(typevar=~T1, bound=None, default=None, constraints=(), variance=)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:83:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:84:9: Arguments to Literal[] must be literals, not (TypedValue(typ=, literal_only=False),) [invalid_literal] ./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] diff --git a/conformance/results/pycroscope/generics_base_class.toml b/conformance/results/pycroscope/generics_base_class.toml index 75bb4045b..bec2ffa75 100644 --- a/conformance/results/pycroscope/generics_base_class.toml +++ b/conformance/results/pycroscope/generics_base_class.toml @@ -7,6 +7,6 @@ output = """ ./generics_base_class.py:30:7: Generic[...] is valid only as a base class [invalid_annotation] ./generics_base_class.py:49:21: Expected 1 type arguments for ./generics_base_class.py.LinkedList [invalid_annotation] ./generics_base_class.py:61:17: Expected 1 type arguments for ./generics_base_class.py.MyDict [invalid_annotation] -./generics_base_class.py:68:24: Type parameter list cannot contain duplicate type variables [invalid_annotation] -./generics_base_class.py:98:31: Inconsistent type variable order in base classes [invalid_annotation] +./generics_base_class.py:68:24: Type parameter list cannot contain duplicate type variables [invalid_base] +./generics_base_class.py:98:31: Inconsistent type variable order in base classes [invalid_base] """ diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index b412df47e..5d766113e 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -7,12 +7,12 @@ output = """ ./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] ./generics_basic.py:55:52: TypeVar constraint cannot be parameterized by type variables [invalid_annotation] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:121:20: Type parameter list cannot contain duplicate type variables [invalid_annotation] +./generics_basic.py:121:20: Type parameter list cannot contain duplicate type variables [invalid_base] ./generics_basic.py:157:7: Incompatible argument type for key: expected str but got Literal[0] [incompatible_argument] ./generics_basic.py:158:7: Incompatible argument type for key: expected str but got Literal[0] [incompatible_argument] -./generics_basic.py:162:19: All arguments to Generic or Protocol must be type variables [invalid_annotation] -./generics_basic.py:163:20: All arguments to Generic or Protocol must be type variables [invalid_annotation] -./generics_basic.py:171:27: All type parameters for the class must appear within Generic or Protocol [invalid_annotation] -./generics_basic.py:172:27: All type parameters for the class must appear within Generic or Protocol [invalid_annotation] +./generics_basic.py:162:19: All arguments to Generic or Protocol must be type variables [invalid_base] +./generics_basic.py:163:20: All arguments to Generic or Protocol must be type variables [invalid_base] +./generics_basic.py:171:27: All type parameters for the class must appear within Generic or Protocol [invalid_base] +./generics_basic.py:172:27: All type parameters for the class must appear within Generic or Protocol [invalid_base] ./generics_basic.py:208:36: Generic metaclasses are not supported [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_paramspec_semantics.toml b/conformance/results/pycroscope/generics_paramspec_semantics.toml index 116a4fd27..f5405f249 100644 --- a/conformance/results/pycroscope/generics_paramspec_semantics.toml +++ b/conformance/results/pycroscope/generics_paramspec_semantics.toml @@ -9,7 +9,7 @@ output = """ ./generics_paramspec_semantics.py:98:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] ./generics_paramspec_semantics.py:108:0: Incompatible argument type for args: expected tuple[bool, ...] but got tuple[Literal[1]] [incompatible_argument] ./generics_paramspec_semantics.py:120:3: Incompatible argument type for @0: expected str but got Literal[1] [incompatible_argument] -./generics_paramspec_semantics.py:127:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (x: str) -> int [incompatible_argument] -./generics_paramspec_semantics.py:132:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (*, x: int) -> int [incompatible_argument] -./generics_paramspec_semantics.py:137:1: Incompatible argument type for x: expected (int, /, **ParamSpecSig(param_spec=~P, default=None)) -> int but got (**kwargs: dict[str, int]) -> int [incompatible_argument] +./generics_paramspec_semantics.py:127:1: Incompatible argument type for x: expected (int, /, **ParamSpecParam(param_spec=~P, default=None, variance=, bound=None, constraints=())) -> int but got (x: str) -> int [incompatible_argument] +./generics_paramspec_semantics.py:132:1: Incompatible argument type for x: expected (int, /, **ParamSpecParam(param_spec=~P, default=None, variance=, bound=None, constraints=())) -> int but got (*, x: int) -> int [incompatible_argument] +./generics_paramspec_semantics.py:137:1: Incompatible argument type for x: expected (int, /, **ParamSpecParam(param_spec=~P, default=None, variance=, bound=None, constraints=())) -> int but got (**kwargs: dict[str, int]) -> int [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_scoping.toml b/conformance/results/pycroscope/generics_scoping.toml index 800acd33c..4b369869e 100644 --- a/conformance/results/pycroscope/generics_scoping.toml +++ b/conformance/results/pycroscope/generics_scoping.toml @@ -1,14 +1,5 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 61: Expected 1 errors -Line 65: Expected 1 errors -Line 76: Expected 1 errors -Line 86: Expected 1 errors -Line 89: Expected 1 errors -Line 98: Expected 1 errors -Line 105: Expected 1 errors -Line 106: Expected 1 errors -Line 107: Expected 1 errors """ output = """ ./generics_scoping.py:15:12: Literal[1] is not equivalent to int @@ -16,4 +7,13 @@ output = """ ./generics_scoping.py:34:9: Incompatible argument type for x: expected int but got Literal['a'] [incompatible_argument] ./generics_scoping.py:49:12: Literal['abc'] is not equivalent to str ./generics_scoping.py:53:12: Literal[b'abc'] is not equivalent to bytes +./generics_scoping.py:61:12: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:65:18: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:76:28: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:86:23: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:89:16: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:98:23: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:105:13: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:106:18: Type parameter is not valid in this annotation context [invalid_annotation] +./generics_scoping.py:107:0: Type parameter is not valid in this annotation context [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 68c686518..bb49df991 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 8646aca4d..02d86aa24 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -1,16 +1,16 @@ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 76: Expected 1 errors -Line 82: Expected 1 errors -Line 103: Expected 1 errors -Line 105: Expected 1 errors -Line 108: Expected 1 errors -Line 113: Expected 1 errors -Line 118: Expected 1 errors -Line 123: Expected 1 errors -Line 127: Expected 1 errors """ output = """ -./generics_self_usage.py:73:0: Function may exit without returning a value [missing_return] +./generics_self_usage.py:73:0: Self can only be used in annotations within a class body [invalid_annotation] +./generics_self_usage.py:76:5: Self can only be used in class attribute annotations [invalid_annotation] +./generics_self_usage.py:82:4: Self methods using Self must annotate the receiver with Self or leave it unannotated [invalid_annotation] ./generics_self_usage.py:87:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_usage.py.Foo3, HasAttrExtension(attribute_name=KnownValue(val='return_concrete_type'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_usage.py.Foo3', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_return_value] +./generics_self_usage.py:103:10: Self cannot be used in base class expressions [invalid_base] +./generics_self_usage.py:105:11: Self cannot be used in base class expressions [invalid_base] +./generics_self_usage.py:108:23: Self cannot be used in type aliases [invalid_annotation] +./generics_self_usage.py:113:4: Self cannot be used in staticmethod signatures [invalid_annotation] +./generics_self_usage.py:118:4: Self cannot be used in staticmethod signatures [invalid_annotation] +./generics_self_usage.py:123:4: Self cannot be used in metaclass definitions [invalid_annotation] +./generics_self_usage.py:127:4: Self cannot be used in metaclass definitions [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_syntax_declarations.toml b/conformance/results/pycroscope/generics_syntax_declarations.toml index 04ccde284..663c7959f 100644 --- a/conformance/results/pycroscope/generics_syntax_declarations.toml +++ b/conformance/results/pycroscope/generics_syntax_declarations.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_syntax_declarations.py:17:16: Class definition cannot specialize Generic or Protocol bases when using type parameter syntax [invalid_annotation] -./generics_syntax_declarations.py:25:19: Class definition cannot specialize Generic or Protocol bases when using type parameter syntax [invalid_annotation] +./generics_syntax_declarations.py:17:16: Class definition cannot specialize Generic or Protocol bases when using type parameter syntax [invalid_base] +./generics_syntax_declarations.py:25:19: Class definition cannot specialize Generic or Protocol bases when using type parameter syntax [invalid_base] ./generics_syntax_declarations.py:32:8: str has no attribute 'is_integer' [undefined_attribute] ./generics_syntax_declarations.py:44:20: TypeVar bound cannot be parameterized by type variables [invalid_annotation] ./generics_syntax_declarations.py:48:16: Invalid type annotation [, ] [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 80da78b2f..185e26b5c 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -7,7 +7,7 @@ output = """ ./generics_typevartuple_basic.py:42:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array[Any[error]] [incompatible_assignment] ./generics_typevartuple_basic.py:43:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array[NewType('Batch', int), NewType('Width', int)] [incompatible_assignment] ./generics_typevartuple_basic.py:44:0: Incompatible assignment: expected ./generics_typevartuple_basic.py.Array[NewType('Time', int), NewType('Batch', int), NewType('Height', int), NewType('Width', int)], got ./generics_typevartuple_basic.py.Array[NewType('Time', int), NewType('Batch', int), NewType('Width', int), NewType('Height', int)] [incompatible_assignment] -./generics_typevartuple_basic.py:52:21: TypeVarTuple must be unpacked [invalid_annotation] +./generics_typevartuple_basic.py:52:21: TypeVarTuple must be unpacked [invalid_base] ./generics_typevartuple_basic.py:53:30: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:56:27: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:59:17: TypeVarTuple must be unpacked [invalid_annotation] @@ -17,5 +17,5 @@ output = """ ./generics_typevartuple_basic.py:90:0: Cannot resolve type variables [incompatible_call] ./generics_typevartuple_basic.py:99:4: Cannot resolve type variables [incompatible_call] ./generics_typevartuple_basic.py:100:4: Cannot resolve type variables [incompatible_call] -./generics_typevartuple_basic.py:106:21: Only one TypeVarTuple can be used in a type parameter list [invalid_annotation] +./generics_typevartuple_basic.py:106:21: Only one TypeVarTuple can be used in a type parameter list [invalid_base] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_callable.toml b/conformance/results/pycroscope/generics_typevartuple_callable.toml index 754595dab..d3a927323 100644 --- a/conformance/results/pycroscope/generics_typevartuple_callable.toml +++ b/conformance/results/pycroscope/generics_typevartuple_callable.toml @@ -1,6 +1,12 @@ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors +Line 25: Unexpected errors ['./generics_typevartuple_callable.py:25:15: Incompatible argument type for target: expected (*tuple[int, str]) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument]'] +Line 41: Unexpected errors ['./generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (*tuple[int, str, int, complex | float | int]) -> tuple[complex | float | int, str, int] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument]'] +Line 42: Unexpected errors ['./generics_typevartuple_callable.py:42:18: Incompatible argument type for f: expected (*tuple[int, str]) -> tuple[str] but got (a: int, d: str) -> tuple[str] [incompatible_argument]'] """ output = """ +./generics_typevartuple_callable.py:25:15: Incompatible argument type for target: expected (*tuple[int, str]) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument] +./generics_typevartuple_callable.py:26:15: Incompatible argument type for target: expected (*tuple[int | str, str | int]) -> None but got (arg1: int, arg2: str) -> None [incompatible_argument] +./generics_typevartuple_callable.py:41:18: Incompatible argument type for f: expected (*tuple[int, str, int, complex | float | int]) -> tuple[complex | float | int, str, int] but got (a: int, b: str, c: int, d: complex | float | int) -> tuple[complex | float | int, str, int] [incompatible_argument] +./generics_typevartuple_callable.py:42:18: Incompatible argument type for f: expected (*tuple[int, str]) -> tuple[str] but got (a: int, d: str) -> tuple[str] [incompatible_argument] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index 0d0c9e828..bdf03e304 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -3,16 +3,16 @@ errors_diff = """ """ output = """ ./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] -./generics_variance.py:77:13: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:81:13: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:93:16: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:105:20: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:113:20: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:126:4: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:132:4: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:142:4: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:163:25: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:167:29: T_co has incompatible variance in base class [invalid_annotation] -./generics_variance.py:191:32: T_contra has incompatible variance in base class [invalid_annotation] -./generics_variance.py:196:4: T_co has incompatible variance in base class [invalid_annotation] +./generics_variance.py:77:13: T_co has incompatible variance in base class [invalid_base] +./generics_variance.py:81:13: T_contra has incompatible variance in base class [invalid_base] +./generics_variance.py:93:16: T_contra has incompatible variance in base class [invalid_base] +./generics_variance.py:105:20: T_co has incompatible variance in base class [invalid_base] +./generics_variance.py:113:20: T_co has incompatible variance in base class [invalid_base] +./generics_variance.py:126:4: T_co has incompatible variance in base class [invalid_base] +./generics_variance.py:132:4: T_contra has incompatible variance in base class [invalid_base] +./generics_variance.py:142:4: T_co has incompatible variance in base class [invalid_base] +./generics_variance.py:163:25: T_contra has incompatible variance in base class [invalid_base] +./generics_variance.py:167:29: T_co has incompatible variance in base class [invalid_base] +./generics_variance.py:191:32: T_contra has incompatible variance in base class [invalid_base] +./generics_variance.py:196:4: T_co has incompatible variance in base class [invalid_base] """ diff --git a/conformance/results/pycroscope/literals_parameterizations.toml b/conformance/results/pycroscope/literals_parameterizations.toml index a269611d2..3e30c3c6e 100644 --- a/conformance/results/pycroscope/literals_parameterizations.toml +++ b/conformance/results/pycroscope/literals_parameterizations.toml @@ -13,6 +13,7 @@ output = """ ./literals_parameterizations.py:47:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got {'a': 'b', 'c': 'd'} [invalid_literal] ./literals_parameterizations.py:48:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got [invalid_literal] ./literals_parameterizations.py:50:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got ~T [invalid_literal] +./literals_parameterizations.py:50:15: Type parameter is not valid in this annotation context [invalid_annotation] ./literals_parameterizations.py:51:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got 3.14 [invalid_literal] ./literals_parameterizations.py:52:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got typing.Any [invalid_literal] ./literals_parameterizations.py:53:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got Ellipsis [invalid_literal] diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index 030ce2ecf..f6eaef12b 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -2,6 +2,7 @@ conformance_automated = "Fail" errors_diff = """ Line 121: Unexpected errors ['./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int]'] Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int'] +Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int'] """ output = """ ./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] @@ -18,6 +19,7 @@ output = """ ./namedtuples_define_class.py:106:4: Field 'x' conflicts with base NamedTuple field [incompatible_override] ./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int] ./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int +./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int ./namedtuples_define_class.py:125:18: Incompatible argument type for value: expected str but got Literal[3.1] [incompatible_argument] ./namedtuples_define_class.py:132:23: NamedTuple classes may only inherit from NamedTuple and Generic [invalid_base] """ diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 86ebdea21..e46805964 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -2,8 +2,10 @@ conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors Line 34: Expected 1 errors +Line 35: Unexpected errors ["./protocols_class_objects.py:35:0: Incompatible assignment: expected .var = ./protocols_class_objects.py.Proto, got [incompatible_assignment]"] """ output = """ +./protocols_class_objects.py:35:0: Incompatible assignment: expected .var = ./protocols_class_objects.py.Proto, got [incompatible_assignment] ./protocols_class_objects.py:58:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoA1, got [incompatible_assignment] ./protocols_class_objects.py:74:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoB1, got [incompatible_assignment] ./protocols_class_objects.py:104:0: Incompatible assignment: expected ./protocols_class_objects.py.ProtoC1, got [incompatible_assignment] diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index 6719fa096..fd00e7314 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -7,5 +7,5 @@ output = """ ./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/qualifiers_final_decorator.toml b/conformance/results/pycroscope/qualifiers_final_decorator.toml index 1b21e63be..d2ddb22dc 100644 --- a/conformance/results/pycroscope/qualifiers_final_decorator.toml +++ b/conformance/results/pycroscope/qualifiers_final_decorator.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./qualifiers_final_decorator.py:21:0: Cannot inherit from final class [invalid_annotation] +./qualifiers_final_decorator.py:21:0: Cannot inherit from final class [invalid_base] ./qualifiers_final_decorator.py:56:4: Cannot override final attribute method1 [invalid_annotation] ./qualifiers_final_decorator.py:60:4: Cannot override final attribute method2 [invalid_annotation] ./qualifiers_final_decorator.py:64:4: Cannot override final attribute method3 [invalid_annotation] diff --git a/conformance/results/pycroscope/typeddicts_inheritance.toml b/conformance/results/pycroscope/typeddicts_inheritance.toml index 463002af0..3a9fe977b 100644 --- a/conformance/results/pycroscope/typeddicts_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_inheritance.toml @@ -4,5 +4,5 @@ errors_diff = """ output = """ ./typeddicts_inheritance.py:44:30: TypedDict classes may only inherit from TypedDict types and Generic [invalid_base] ./typeddicts_inheritance.py:55:3: Incompatible TypedDict override for key 'x' [invalid_annotation] -./typeddicts_inheritance.py:65:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] +./typeddicts_inheritance.py:65:0: TypedDict base classes define key 'x' with incompatible types [invalid_base] """ diff --git a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml index ac9269546..91af5b5d3 100644 --- a/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pycroscope/typeddicts_readonly_inheritance.toml @@ -11,6 +11,6 @@ output = """ ./typeddicts_readonly_inheritance.py:94:4: Incompatible TypedDict override for key 'a' [invalid_annotation] ./typeddicts_readonly_inheritance.py:98:4: Incompatible TypedDict override for key 'a' [invalid_annotation] ./typeddicts_readonly_inheritance.py:106:4: Incompatible TypedDict override for key 'c' [invalid_annotation] -./typeddicts_readonly_inheritance.py:119:0: TypedDict base classes define key 'x' with incompatible types [invalid_annotation] -./typeddicts_readonly_inheritance.py:132:0: TypedDict base classes define key 'x' with incompatible requiredness [invalid_annotation] +./typeddicts_readonly_inheritance.py:119:0: TypedDict base classes define key 'x' with incompatible types [invalid_base] +./typeddicts_readonly_inheritance.py:132:0: TypedDict base classes define key 'x' with incompatible requiredness [invalid_base] """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 6f1b7ef09..57772c123 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -362,7 +362,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Does not implement several scoping checks/restrictions for generics

-Unknown +Pass
Partial

Does not reject `list[T]()` in the global scope, where `T` is an unbound type variable.

Does nto reject `alias: TypeAlias = list[T]` in the body scope of a class generic over a type variable `T`.

     generics_self_advanced @@ -402,7 +402,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Does not implement some restrictions on where Self can be used

-Unknown +Pass
Partial

Does not reject `Self` used in a return annotation when `self` is annotated using another type variable.

Does not reject `Self` used in staticmethods or metaclasses.

     generics_syntax_compatibility @@ -799,7 +799,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass
Partial

Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.

Does not reject class-scoped type variables used in the `self` annotation.

Does not support inferring type variables for generic classes where the `__init__` method uses method-scoped type variables.

     constructors_call_metaclass @@ -815,7 +815,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Pass Unsupported      constructors_call_type From 2cec5f20d40798b8a08f59b069bb557d80c2dbcb Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 15 Mar 2026 15:38:55 -0700 Subject: [PATCH 69/78] update --- .../results/pycroscope/aliases_implicit.toml | 2 ++ .../pycroscope/annotations_forward_refs.toml | 17 ++++++++--------- .../results/pycroscope/dataclasses_hash.toml | 4 ++-- .../results/pycroscope/dataclasses_kwonly.toml | 6 +++--- .../results/pycroscope/enums_members.toml | 6 +++--- .../results/pycroscope/generics_basic.toml | 2 +- .../results/pycroscope/generics_defaults.toml | 8 ++------ .../generics_defaults_referential.toml | 8 ++++---- .../results/pycroscope/generics_self_basic.toml | 4 ++-- .../results/pycroscope/generics_self_usage.toml | 2 +- .../generics_syntax_infer_variance.toml | 4 ++-- .../generics_typevartuple_specialization.toml | 2 +- .../pycroscope/generics_upper_bound.toml | 2 +- .../results/pycroscope/generics_variance.toml | 2 +- .../pycroscope/namedtuples_define_class.toml | 4 ++++ .../results/pycroscope/namedtuples_usage.toml | 4 ++-- .../pycroscope/protocols_definition.toml | 14 +++++++------- .../results/pycroscope/protocols_merging.toml | 8 ++++---- 18 files changed, 50 insertions(+), 49 deletions(-) diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 69972c637..b6e30eb4d 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -7,9 +7,11 @@ Line 113: Expected 1 errors Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors +Line 70: Unexpected errors ['./aliases_implicit.py:70:16: Any[unannotated] is not equivalent to int | str | list[list[int]] | None'] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] """ output = """ +./aliases_implicit.py:70:16: Any[unannotated] is not equivalent to int | str | list[list[int]] | None ./aliases_implicit.py:76:8: Unrecognized annotation object [invalid_annotation] ./aliases_implicit.py:77:8: Unrecognized annotation types.GenericAlias [invalid_annotation] ./aliases_implicit.py:78:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 1d5846819..a34b9aa3d 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -3,10 +3,10 @@ errors_diff = """ Line 24: Expected 1 errors Line 25: Expected 1 errors Line 14: Unexpected errors ['./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name]'] -Line 16: Unexpected errors ['./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name]'] -Line 17: Unexpected errors ['./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name]'] -Line 18: Unexpected errors ['./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name]'] -Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[from_another]]', './annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name]'] +Line 16: Unexpected errors ['./annotations_forward_refs.py:16:16: Any[error] is not equivalent to ./annotations_forward_refs.py.ClassA'] +Line 17: Unexpected errors ['./annotations_forward_refs.py:17:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA]'] +Line 18: Unexpected errors ['./annotations_forward_refs.py:18:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA]'] +Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA | int]'] Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] """ @@ -15,11 +15,10 @@ output = """ ./annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:16:20: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:17:25: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:18:25: Undefined name: ClassA [undefined_name] -./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[Any[from_another]] -./annotations_forward_refs.py:19:25: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:16:16: Any[error] is not equivalent to ./annotations_forward_refs.py.ClassA +./annotations_forward_refs.py:17:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA] +./annotations_forward_refs.py:18:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA] +./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA | int] ./annotations_forward_refs.py:22:6: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:23:11: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:41:0: Invalid type annotation [invalid_annotation] diff --git a/conformance/results/pycroscope/dataclasses_hash.toml b/conformance/results/pycroscope/dataclasses_hash.toml index c3a33ccae..919a32c90 100644 --- a/conformance/results/pycroscope/dataclasses_hash.toml +++ b/conformance/results/pycroscope/dataclasses_hash.toml @@ -3,7 +3,7 @@ errors_diff = """ """ output = """ ./dataclasses_hash.py:17:0: None is not callable [not_callable] -./dataclasses_hash.py:18:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC1, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./dataclasses_hash.py:18:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC1, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__dataclass_fields__'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=)))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__match_args__'), attribute_type=KnownValue(val=('a',))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] ./dataclasses_hash.py:39:0: None is not callable [not_callable] -./dataclasses_hash.py:40:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC3, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./dataclasses_hash.py:40:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC3, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__dataclass_fields__'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=)))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__match_args__'), attribute_type=KnownValue(val=('a',))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/dataclasses_kwonly.toml b/conformance/results/pycroscope/dataclasses_kwonly.toml index a6aec5375..55ead395f 100644 --- a/conformance/results/pycroscope/dataclasses_kwonly.toml +++ b/conformance/results/pycroscope/dataclasses_kwonly.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./dataclasses_kwonly.py:23:0: In call to None.DC1.__init__: Takes 1 positional arguments but 2 were given [incompatible_call] -./dataclasses_kwonly.py:38:0: In call to None.DC2.__init__: Takes 1 positional arguments but 2 were given [incompatible_call] -./dataclasses_kwonly.py:53:0: In call to None.DC3.__init__: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_kwonly.py:23:0: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_kwonly.py:38:0: Takes 1 positional arguments but 2 were given [incompatible_call] +./dataclasses_kwonly.py:53:0: Takes 1 positional arguments but 2 were given [incompatible_call] """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 25e333898..0e6989645 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -3,10 +3,10 @@ errors_diff = """ """ output = """ ./enums_members.py:50:4: Enum members should not be explicitly annotated [invalid_annotation] -./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=InferenceVarValue(typevar_param=TypeVarParam(typevar=~T1, bound=None, default=None, constraints=(), variance=)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] -./enums_members.py:83:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=InferenceVarValue(typevar_param=TypeVarParam(typevar=~T1, bound=None, default=None, constraints=(), variance=)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:83:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:84:9: Arguments to Literal[] must be literals, not (TypedValue(typ=, literal_only=False),) [invalid_literal] -./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./enums_members.py.Pet4', literal_only=False, args=(TypeVarValue(typevar_param=TypeVarParam(typevar=~T1, bound=None, default=None, constraints=(), variance=)),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./enums_members.py.Pet4', literal_only=False, args=(TypeVarValue(typevar_param=TypeVarParam(typevar=~T1, bound=None, default=None, constraints=(), variance=)),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:116:12: enum.nonmember[int] is not equivalent to Any[unannotated] ./enums_members.py:128:20: Revealed type is 'int' [reveal_type] ./enums_members.py:129:20: int is not equivalent to Any[unannotated] diff --git a/conformance/results/pycroscope/generics_basic.toml b/conformance/results/pycroscope/generics_basic.toml index 5d766113e..0a1f77a76 100644 --- a/conformance/results/pycroscope/generics_basic.toml +++ b/conformance/results/pycroscope/generics_basic.toml @@ -4,7 +4,7 @@ errors_diff = """ output = """ ./generics_basic.py:40:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:41:4: Cannot resolve type variables [incompatible_call] -./generics_basic.py:49:17: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: A single constraint is not allowed [incompatible_call] +./generics_basic.py:49:17: Error calling (name: str, /, *constraints: tuple[TypeForm[object], ...], bound: TypeForm[object] = Literal[Sentinel(name='no argument given')], covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False], default: TypeForm[object] = Literal[Sentinel(name='no argument given')]) -> typing.TypeVar (with impl): A single constraint is not allowed [incompatible_call] ./generics_basic.py:55:52: TypeVar constraint cannot be parameterized by type variables [invalid_annotation] ./generics_basic.py:69:4: Cannot resolve type variables [incompatible_call] ./generics_basic.py:121:20: Type parameter list cannot contain duplicate type variables [invalid_base] diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index bcd0df049..5fbe88274 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,8 +1,6 @@ conformance_automated = "Fail" errors_diff = """ Line 66: Expected 1 errors -Line 122: Unexpected errors ['./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None'] -Line 123: Unexpected errors ['./generics_defaults.py:123:16: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[str, int]]'] Line 124: Unexpected errors ['./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]]'] Line 203: Unexpected errors ["./generics_defaults.py:203:36: Invalid type annotation [] [invalid_annotation]", './generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation]'] Line 204: Unexpected errors ['./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str]'] @@ -11,11 +9,9 @@ Line 208: Unexpected errors ['./generics_defaults.py:208:16: (...) -> None is """ output = """ ./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] -./generics_defaults.py:122:16: (...) -> None is not equivalent to (str, int, /) -> None -./generics_defaults.py:123:16: ./generics_defaults.py.Class_ParamSpec[Any[error]] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[str, int]] ./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]] -./generics_defaults.py:152:11: the bound and default are incompatible [invalid_annotation] -./generics_defaults.py:159:11: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults.py:152:50: TypeVar default must be assignable to its bound [incompatible_call] +./generics_defaults.py:159:51: TypeVar default must be one of its constraints [incompatible_call] ./generics_defaults.py:176:12: Any[generic_argument] is not equivalent to int ./generics_defaults.py:188:0: TypeVars with defaults cannot follow TypeVarTuples [invalid_annotation] ./generics_defaults.py:203:36: Invalid type annotation [] [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index a4050e79e..2986b4515 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -1,7 +1,5 @@ conformance_automated = "Fail" errors_diff = """ -Line 54: Expected 1 errors -Line 75: Expected 1 errors Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type 'generics_defaults_referential.slice' is not equivalent to type[generics_defaults_referential.slice[int, int, int | None]]"] Line 36: Unexpected errors ['./generics_defaults_referential.py:36:16: generics_defaults_referential.Foo[str, str] is not equivalent to generics_defaults_referential.Foo[int, str]', './generics_defaults_referential.py:36:20: Incompatible argument type for a: expected str but got int [incompatible_argument]'] """ @@ -11,7 +9,9 @@ output = """ ./generics_defaults_referential.py:36:20: Incompatible argument type for a: expected str but got int [incompatible_argument] ./generics_defaults_referential.py:37:16: Incompatible argument type for b: expected int but got str [incompatible_argument] ./generics_defaults_referential.py:38:13: Incompatible argument type for a: expected int but got str [incompatible_argument] +./generics_defaults_referential.py:54:0: Type parameter defaults can reference only earlier type parameters from the same class [invalid_annotation] ./generics_defaults_referential.py:61:4: Type parameter defaults can reference only earlier type parameters from the same class [invalid_annotation] -./generics_defaults_referential.py:69:11: the bound and default are incompatible [invalid_annotation] -./generics_defaults_referential.py:79:15: TypeVar default must be one of its constraints [invalid_annotation] +./generics_defaults_referential.py:69:39: TypeVar default must be assignable to its bound [incompatible_call] +./generics_defaults_referential.py:75:51: TypeVar default must be one of its constraints [incompatible_call] +./generics_defaults_referential.py:79:62: TypeVar default must be one of its constraints [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index fd26b2dab..5923bf4a7 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT: ./generics_self_basic.py.Shape, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=AnyValue(source=)), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT: ./generics_self_basic.py.Shape, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 71b415915..66371d6b3 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -5,7 +5,7 @@ output = """ ./generics_self_usage.py:73:0: Self can only be used in annotations within a class body [invalid_annotation] ./generics_self_usage.py:76:5: Self can only be used in class attribute annotations [invalid_annotation] ./generics_self_usage.py:82:4: Self methods using Self must annotate the receiver with Self or leave it unannotated [invalid_annotation] -./generics_self_usage.py:87:8: Incompatible return type: expected ~SelfT: ./generics_self_usage.py.Foo3, got Annotated[./generics_self_usage.py.Foo3, HasAttrExtension(attribute_name=KnownValue(val='return_concrete_type'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_usage.py.Foo3', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_return_value] +./generics_self_usage.py:87:8: Incompatible return type: expected ~SelfT: ./generics_self_usage.py.Foo3, got Annotated[./generics_self_usage.py.Foo3, HasAttrExtension(attribute_name=KnownValue(val='return_concrete_type'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_usage.py.Foo3', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_return_value] ./generics_self_usage.py:103:10: Self cannot be used in base class expressions [invalid_base] ./generics_self_usage.py:105:11: Self cannot be used in base class expressions [invalid_base] ./generics_self_usage.py:108:23: Self cannot be used in type aliases [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_syntax_infer_variance.toml b/conformance/results/pycroscope/generics_syntax_infer_variance.toml index db336e3af..93fe4740a 100644 --- a/conformance/results/pycroscope/generics_syntax_infer_variance.toml +++ b/conformance/results/pycroscope/generics_syntax_infer_variance.toml @@ -2,8 +2,8 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_syntax_infer_variance.py:15:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] -./generics_syntax_infer_variance.py:17:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:15:5: Error calling (name: str, /, *constraints: tuple[TypeForm[object], ...], bound: TypeForm[object] = Literal[Sentinel(name='no argument given')], covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False], default: TypeForm[object] = Literal[Sentinel(name='no argument given')]) -> typing.TypeVar (with impl): Variance cannot be specified with infer_variance. [incompatible_call] +./generics_syntax_infer_variance.py:17:5: Error calling (name: str, /, *constraints: tuple[TypeForm[object], ...], bound: TypeForm[object] = Literal[Sentinel(name='no argument given')], covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False], default: TypeForm[object] = Literal[Sentinel(name='no argument given')]) -> typing.TypeVar (with impl): Variance cannot be specified with infer_variance. [incompatible_call] ./generics_syntax_infer_variance.py:29:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant1[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant1[float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:47:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant2[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant2[float | int] [incompatible_assignment] ./generics_syntax_infer_variance.py:56:0: Incompatible assignment: expected ./generics_syntax_infer_variance.py.ShouldBeCovariant3[int], got ./generics_syntax_infer_variance.py.ShouldBeCovariant3[float | int] [incompatible_assignment] diff --git a/conformance/results/pycroscope/generics_typevartuple_specialization.toml b/conformance/results/pycroscope/generics_typevartuple_specialization.toml index ce6448d99..2dec6fcc3 100644 --- a/conformance/results/pycroscope/generics_typevartuple_specialization.toml +++ b/conformance/results/pycroscope/generics_typevartuple_specialization.toml @@ -3,7 +3,7 @@ errors_diff = """ """ output = """ ./generics_typevartuple_specialization.py:109:0: Unpacked TypeVarTuple cannot specialize this type alias [invalid_annotation] -./generics_typevartuple_specialization.py:110:0: Unrecognized annotation float [invalid_annotation] +./generics_typevartuple_specialization.py:110:0: Unpacked TypeVarTuple cannot specialize this type alias [invalid_annotation] ./generics_typevartuple_specialization.py:121:6: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] ./generics_typevartuple_specialization.py:122:6: Only one unbounded tuple can be used inside a tuple type [invalid_annotation] ./generics_typevartuple_specialization.py:127:4: Expected 3 type arguments for type alias, got 1 [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_upper_bound.toml b/conformance/results/pycroscope/generics_upper_bound.toml index 9224421f7..625b61779 100644 --- a/conformance/results/pycroscope/generics_upper_bound.toml +++ b/conformance/results/pycroscope/generics_upper_bound.toml @@ -5,5 +5,5 @@ output = """ ./generics_upper_bound.py:24:37: TypeVar bound cannot be parameterized by type variables [invalid_annotation] ./generics_upper_bound.py:44:16: list[int] | set[int] is not equivalent to collections.abc.Collection[int] ./generics_upper_bound.py:52:7: Incompatible argument type for x: expected ~ST: collections.abc.Sized but got Literal[3] [incompatible_argument] -./generics_upper_bound.py:57:9: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Constraints cannot be combined with bound=... [incompatible_call] +./generics_upper_bound.py:57:9: TypeVar cannot have both bound and constraints [incompatible_call] """ diff --git a/conformance/results/pycroscope/generics_variance.toml b/conformance/results/pycroscope/generics_variance.toml index bdf03e304..6e48cfce8 100644 --- a/conformance/results/pycroscope/generics_variance.toml +++ b/conformance/results/pycroscope/generics_variance.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_variance.py:14:5: Error calling (name: str, *constraints: tuple[Any[explicit], ...], bound: Any[explicit] | None = None, covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVar: Bivariant types are not supported. [incompatible_call] +./generics_variance.py:14:5: Error calling (name: str, /, *constraints: tuple[TypeForm[object], ...], bound: TypeForm[object] = Literal[Sentinel(name='no argument given')], covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False], default: TypeForm[object] = Literal[Sentinel(name='no argument given')]) -> typing.TypeVar (with impl): Bivariant types are not supported. [incompatible_call] ./generics_variance.py:77:13: T_co has incompatible variance in base class [invalid_base] ./generics_variance.py:81:13: T_contra has incompatible variance in base class [invalid_base] ./generics_variance.py:93:16: T_contra has incompatible variance in base class [invalid_base] diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index f6eaef12b..dbeeeb35b 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,10 +1,14 @@ conformance_automated = "Fail" errors_diff = """ +Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int]'] +Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str]'] Line 121: Unexpected errors ['./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int]'] Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int'] Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int'] """ output = """ +./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int] +./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str] ./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] ./namedtuples_define_class.py:33:6: Tuple index out of range: Literal[-4] [incompatible_call] ./namedtuples_define_class.py:44:5: Missing required argument 'y' [incompatible_call] diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml index 0bc70601e..a30394e71 100644 --- a/conformance/results/pycroscope/namedtuples_usage.toml +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -4,9 +4,9 @@ errors_diff = """ output = """ ./namedtuples_usage.py:34:6: Tuple index out of range: Literal[3] [incompatible_call] ./namedtuples_usage.py:35:6: Tuple index out of range: Literal[-4] [incompatible_call] -./namedtuples_usage.py:40:0: Cannot mutate NamedTuple field 'x' [incompatible_assignment] +./namedtuples_usage.py:40:0: Cannot assign to readonly attribute 'x' [incompatible_assignment] ./namedtuples_usage.py:41:0: Object of type tuple[int, int, str] does not support '__setitem__' [unsupported_operation] -./namedtuples_usage.py:42:4: Cannot mutate NamedTuple field 'x' [incompatible_assignment] +./namedtuples_usage.py:42:4: Cannot delete readonly attribute 'x' [incompatible_assignment] ./namedtuples_usage.py:43:4: Object of type tuple[int, int, str] does not support '__delitem__' [unsupported_operation] ./namedtuples_usage.py:52:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] ./namedtuples_usage.py:53:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 2a1f03631..06e2cb876 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -13,14 +13,14 @@ output = """ ./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] ./protocols_definition.py:160:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got Annotated[./protocols_definition.py.Concrete4_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got Annotated[./protocols_definition.py.Concrete4_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] -./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad1, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=AnyValue(source=)), 'c': SigParameter(name='c', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad1, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=AnyValue(source=)), 'c': SigParameter(name='c', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] ./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=AnyValue(source=))] [incompatible_assignment] +./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__dataclass_fields__'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=)))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'val1': SigParameter(name='val1', kind=, default=KnownValue(val=Ellipsis), annotation=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__match_args__'), attribute_type=KnownValue(val=('val1',))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index fd00e7314..80bf67af7 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:53:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:53:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] """ From 2bc4bbf607cde663e46e4f8484712639805b6c43 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Mar 2026 12:16:21 -0700 Subject: [PATCH 70/78] update --- .../results/pycroscope/aliases_implicit.toml | 2 ++ .../pycroscope/aliases_type_statement.toml | 4 +-- .../pycroscope/aliases_typealiastype.toml | 4 +-- .../pycroscope/constructors_callable.toml | 2 +- .../results/pycroscope/dataclasses_hash.toml | 4 +-- .../results/pycroscope/enums_members.toml | 4 +-- .../results/pycroscope/generics_defaults.toml | 2 ++ .../pycroscope/generics_self_basic.toml | 4 +-- .../pycroscope/generics_self_usage.toml | 2 +- .../generics_syntax_compatibility.toml | 4 +-- .../pycroscope/generics_syntax_scoping.toml | 3 +- .../pycroscope/namedtuples_define_class.toml | 8 ++--- .../results/pycroscope/namedtuples_usage.toml | 4 +-- .../pycroscope/protocols_definition.toml | 32 +++++++++---------- .../results/pycroscope/protocols_merging.toml | 8 ++--- .../pycroscope/qualifiers_annotated.toml | 2 ++ 16 files changed, 48 insertions(+), 41 deletions(-) diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index b6e30eb4d..c10d6b2f6 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -8,6 +8,7 @@ Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors Line 70: Unexpected errors ['./aliases_implicit.py:70:16: Any[unannotated] is not equivalent to int | str | list[list[int]] | None'] +Line 95: Unexpected errors ["./aliases_implicit.py:95:16: Cannot resolve subscripted annotation: [invalid_annotation]"] Line 100: Unexpected errors ["./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true]"] """ output = """ @@ -18,6 +19,7 @@ output = """ ./aliases_implicit.py:79:8: Expected 1 type arguments for type alias, got 2 [invalid_annotation] ./aliases_implicit.py:80:8: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation] ./aliases_implicit.py:81:8: Type argument str is not compatible with ~TFloat: float | int [invalid_annotation] +./aliases_implicit.py:95:16: Cannot resolve subscripted annotation: [invalid_annotation] ./aliases_implicit.py:100:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_implicit.py:107:8: Invalid type annotation [, ] [invalid_annotation] ./aliases_implicit.py:108:8: Invalid type annotation ((, ),) [invalid_annotation] diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml index c26dbbc15..b846e65a4 100644 --- a/conformance/results/pycroscope/aliases_type_statement.toml +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -22,8 +22,8 @@ output = """ ./aliases_type_statement.py:48:22: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] ./aliases_type_statement.py:52:0: Type alias BadTypeAlias14 is already defined [invalid_annotation] ./aliases_type_statement.py:56:4: Type alias statements are not allowed inside functions [invalid_annotation] -./aliases_type_statement.py:62:0: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] -./aliases_type_statement.py:67:0: Type alias must declare type parameters in the type statement [invalid_annotation] +./aliases_type_statement.py:62:22: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] +./aliases_type_statement.py:67:16: Type alias must declare type parameters in the type statement [invalid_annotation] ./aliases_type_statement.py:77:6: Type argument str is not compatible with ~S: int [invalid_annotation] ./aliases_type_statement.py:79:6: Type argument int is not compatible with ~T: str [invalid_annotation] ./aliases_type_statement.py:82:0: Type alias RecursiveTypeAlias3 has a circular definition [invalid_annotation] diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index a90ecf330..b14490ec5 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -6,8 +6,8 @@ output = """ ./aliases_typealiastype.py:32:6: .GoodAlias1 = int has no attribute 'other_attrib' [undefined_attribute] ./aliases_typealiastype.py:39:4: Unrecognized annotation [invalid_annotation] ./aliases_typealiastype.py:40:4: Type argument int is not compatible with ~TStr: str [invalid_annotation] -./aliases_typealiastype.py:43:0: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] -./aliases_typealiastype.py:44:0: Type alias must declare type parameters in the type statement [invalid_annotation] +./aliases_typealiastype.py:43:39: Type alias cannot combine old-style TypeVar declarations with type statement parameters [invalid_annotation] +./aliases_typealiastype.py:44:39: Type alias must declare type parameters in the type statement [invalid_annotation] ./aliases_typealiastype.py:45:56: type_params argument to TypeAliasType must be a literal tuple [invalid_annotation] ./aliases_typealiastype.py:46:0: Type alias BadAlias4 has a circular definition [invalid_annotation] ./aliases_typealiastype.py:47:0: Type alias BadAlias5 has a circular definition [invalid_annotation] diff --git a/conformance/results/pycroscope/constructors_callable.toml b/conformance/results/pycroscope/constructors_callable.toml index 660f59b96..2ab4459ca 100644 --- a/conformance/results/pycroscope/constructors_callable.toml +++ b/conformance/results/pycroscope/constructors_callable.toml @@ -22,6 +22,6 @@ output = """ ./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T: (int, str)) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T: (int, str)]' [reveal_type] ./constructors_callable.py:184:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class8[~T]' [reveal_type] ./constructors_callable.py:186:0: Cannot resolve type variables [incompatible_call] -./constructors_callable.py:195:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class9[~T]' [reveal_type] +./constructors_callable.py:195:12: Revealed type is '(x: list[~T], y: list[~T]) -> ./constructors_callable.py.Class9' [reveal_type] ./constructors_callable.py:197:0: Cannot resolve type variables [incompatible_call] """ diff --git a/conformance/results/pycroscope/dataclasses_hash.toml b/conformance/results/pycroscope/dataclasses_hash.toml index 919a32c90..ebe2bbf79 100644 --- a/conformance/results/pycroscope/dataclasses_hash.toml +++ b/conformance/results/pycroscope/dataclasses_hash.toml @@ -3,7 +3,7 @@ errors_diff = """ """ output = """ ./dataclasses_hash.py:17:0: None is not callable [not_callable] -./dataclasses_hash.py:18:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC1, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__dataclass_fields__'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=)))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__match_args__'), attribute_type=KnownValue(val=('a',))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./dataclasses_hash.py:18:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got ./dataclasses_hash.py.DC1 [incompatible_assignment] ./dataclasses_hash.py:39:0: None is not callable [not_callable] -./dataclasses_hash.py:40:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got Annotated[./dataclasses_hash.py.DC3, HasAttrExtension(attribute_name=KnownValue(val='a'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='__dataclass_fields__'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=)))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__match_args__'), attribute_type=KnownValue(val=('a',))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=KnownValue(val=None))] [incompatible_assignment] +./dataclasses_hash.py:40:0: Incompatible assignment: expected pycroscope.relations.HashableProto, got ./dataclasses_hash.py.DC3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/enums_members.toml b/conformance/results/pycroscope/enums_members.toml index 0e6989645..8d28bbdc2 100644 --- a/conformance/results/pycroscope/enums_members.toml +++ b/conformance/results/pycroscope/enums_members.toml @@ -6,8 +6,8 @@ output = """ ./enums_members.py:82:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=InferenceVarValue(typevar_param=TypeVarParam(typevar=~T1, bound=None, default=None, constraints=(), variance=)))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:83:11: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'x': SigParameter(name='x', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)),) [invalid_literal] ./enums_members.py:84:9: Arguments to Literal[] must be literals, not (TypedValue(typ=, literal_only=False),) [invalid_literal] -./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=GenericValue(typ='./enums_members.py.Pet4', literal_only=False, args=(TypeVarValue(typevar_param=TypeVarParam(typevar=~T1, bound=None, default=None, constraints=(), variance=)),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)),) [invalid_literal] -./enums_members.py:116:12: enum.nonmember[int] is not equivalent to Any[unannotated] +./enums_members.py:85:7: Arguments to Literal[] must be literals, not (CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=TypedValue(typ='./enums_members.py.Pet4', literal_only=False))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)),) [invalid_literal] +./enums_members.py:116:12: int is not equivalent to Any[unannotated] ./enums_members.py:128:20: Revealed type is 'int' [reveal_type] ./enums_members.py:129:20: int is not equivalent to Any[unannotated] """ diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index 5fbe88274..5862bca24 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -2,6 +2,7 @@ conformance_automated = "Fail" errors_diff = """ Line 66: Expected 1 errors Line 124: Unexpected errors ['./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]]'] +Line 139: Unexpected errors ['./generics_defaults.py:139:16: tuple[] is not equivalent to tuple[str, int]'] Line 203: Unexpected errors ["./generics_defaults.py:203:36: Invalid type annotation [] [invalid_annotation]", './generics_defaults.py:203:17: ParamSpec specialization must use list form, Concatenate[..., P], P, or ... [invalid_annotation]'] Line 204: Unexpected errors ['./generics_defaults.py:204:16: tuple[int] is not equivalent to tuple[int, str]'] Line 205: Unexpected errors ['./generics_defaults.py:205:16: (...) -> None is not equivalent to (float | int, bool, /) -> None'] @@ -10,6 +11,7 @@ Line 208: Unexpected errors ['./generics_defaults.py:208:16: (...) -> None is output = """ ./generics_defaults.py:24:0: non-default TypeVars cannot follow ones with defaults [invalid_annotation] ./generics_defaults.py:124:16: ./generics_defaults.py.Class_ParamSpec[AnySig()] is not equivalent to ./generics_defaults.py.Class_ParamSpec[tuple[bool, bool]] +./generics_defaults.py:139:16: tuple[] is not equivalent to tuple[str, int] ./generics_defaults.py:152:50: TypeVar default must be assignable to its bound [incompatible_call] ./generics_defaults.py:159:51: TypeVar default must be one of its constraints [incompatible_call] ./generics_defaults.py:176:12: Any[generic_argument] is not equivalent to int diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index 5923bf4a7..fdab7c8f7 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT: ./generics_self_basic.py.Shape, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got Annotated[./generics_self_basic.py.Shape, HasAttrExtension(attribute_name=KnownValue(val='set_scale'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'scale': SigParameter(name='scale', kind=, default=None, annotation=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='from_config'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'config': SigParameter(name='config', kind=, default=None, annotation=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))))}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method2'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_basic.py.Shape', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='cls_method3'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='difference'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='apply'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='scale'), attribute_type=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))))] [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT: ./generics_self_basic.py.Shape, got ./generics_self_basic.py.Shape [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT, got ./generics_self_basic.py.Shape [incompatible_return_value] ./generics_self_basic.py:68:25: Unrecognized subscripted annotation: typing.Self [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_self_usage.toml b/conformance/results/pycroscope/generics_self_usage.toml index 66371d6b3..c8a299614 100644 --- a/conformance/results/pycroscope/generics_self_usage.toml +++ b/conformance/results/pycroscope/generics_self_usage.toml @@ -5,7 +5,7 @@ output = """ ./generics_self_usage.py:73:0: Self can only be used in annotations within a class body [invalid_annotation] ./generics_self_usage.py:76:5: Self can only be used in class attribute annotations [invalid_annotation] ./generics_self_usage.py:82:4: Self methods using Self must annotate the receiver with Self or leave it unannotated [invalid_annotation] -./generics_self_usage.py:87:8: Incompatible return type: expected ~SelfT: ./generics_self_usage.py.Foo3, got Annotated[./generics_self_usage.py.Foo3, HasAttrExtension(attribute_name=KnownValue(val='return_concrete_type'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ='./generics_self_usage.py.Foo3', literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_return_value] +./generics_self_usage.py:87:8: Incompatible return type: expected ~SelfT: ./generics_self_usage.py.Foo3, got ./generics_self_usage.py.Foo3 [incompatible_return_value] ./generics_self_usage.py:103:10: Self cannot be used in base class expressions [invalid_base] ./generics_self_usage.py:105:11: Self cannot be used in base class expressions [invalid_base] ./generics_self_usage.py:108:23: Self cannot be used in type aliases [invalid_annotation] diff --git a/conformance/results/pycroscope/generics_syntax_compatibility.toml b/conformance/results/pycroscope/generics_syntax_compatibility.toml index b142b21a8..d4f3d5172 100644 --- a/conformance/results/pycroscope/generics_syntax_compatibility.toml +++ b/conformance/results/pycroscope/generics_syntax_compatibility.toml @@ -2,6 +2,6 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_syntax_compatibility.py:14:0: Class definition cannot combine old-style TypeVar declarations with type parameter syntax [invalid_annotation] -./generics_syntax_compatibility.py:26:4: Function definition cannot combine old-style TypeVar declarations with type parameter syntax [invalid_annotation] +./generics_syntax_compatibility.py:14:21: Class definition cannot combine old-style TypeVar declarations with type parameter syntax [invalid_annotation] +./generics_syntax_compatibility.py:26:34: Function definition cannot combine old-style TypeVar declarations with type parameter syntax [invalid_annotation] """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index 2d83febc0..b20bca810 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -6,7 +6,7 @@ Line 95: Expected 1 errors Line 98: Expected 1 errors Line 74: Unexpected errors ['./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name]'] Line 88: Unexpected errors ['./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name]'] -Line 117: Unexpected errors ['./generics_syntax_scoping.py:117:28: ~T is not equivalent to typing.TypeVar'] +Line 117: Unexpected errors ['./generics_syntax_scoping.py:117:28: ~T is not equivalent to typing.TypeVar', './generics_syntax_scoping.py:117:28: Type parameter is not valid in this annotation context [invalid_annotation]'] """ output = """ ./generics_syntax_scoping.py:14:19: TypeVar bound cannot be parameterized by type variables [invalid_annotation] @@ -16,4 +16,5 @@ output = """ ./generics_syntax_scoping.py:74:19: Undefined name: Private [undefined_name] ./generics_syntax_scoping.py:88:1: Undefined name: decorator2 [undefined_name] ./generics_syntax_scoping.py:117:28: ~T is not equivalent to typing.TypeVar +./generics_syntax_scoping.py:117:28: Type parameter is not valid in this annotation context [invalid_annotation] """ diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index dbeeeb35b..0e7c5f319 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,14 +1,14 @@ conformance_automated = "Fail" errors_diff = """ -Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int]'] -Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str]'] +Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: types.GenericAlias (partial from ./namedtuples_define_class.py.Point[Literal[slice(0, 2, None)]]) is not equivalent to tuple[int, int]'] +Line 30: Unexpected errors ['./namedtuples_define_class.py:30:12: types.GenericAlias (partial from ./namedtuples_define_class.py.Point[Literal[slice(0, None, None)]]) is not equivalent to tuple[int, int, str]'] Line 121: Unexpected errors ['./namedtuples_define_class.py:121:12: ./namedtuples_define_class.py.Property[Literal[3.4]] is not equivalent to ./namedtuples_define_class.py.Property[float | int]'] Line 122: Unexpected errors ['./namedtuples_define_class.py:122:12: Literal[3.4] is not equivalent to float | int'] Line 123: Unexpected errors ['./namedtuples_define_class.py:123:12: Literal[3.4] is not equivalent to float | int'] """ output = """ -./namedtuples_define_class.py:29:12: Any[from_another] is not equivalent to tuple[int, int] -./namedtuples_define_class.py:30:12: Any[from_another] is not equivalent to tuple[int, int, str] +./namedtuples_define_class.py:29:12: types.GenericAlias (partial from ./namedtuples_define_class.py.Point[Literal[slice(0, 2, None)]]) is not equivalent to tuple[int, int] +./namedtuples_define_class.py:30:12: types.GenericAlias (partial from ./namedtuples_define_class.py.Point[Literal[slice(0, None, None)]]) is not equivalent to tuple[int, int, str] ./namedtuples_define_class.py:32:6: Tuple index out of range: Literal[3] [incompatible_call] ./namedtuples_define_class.py:33:6: Tuple index out of range: Literal[-4] [incompatible_call] ./namedtuples_define_class.py:44:5: Missing required argument 'y' [incompatible_call] diff --git a/conformance/results/pycroscope/namedtuples_usage.toml b/conformance/results/pycroscope/namedtuples_usage.toml index a30394e71..5d6671e31 100644 --- a/conformance/results/pycroscope/namedtuples_usage.toml +++ b/conformance/results/pycroscope/namedtuples_usage.toml @@ -8,6 +8,6 @@ output = """ ./namedtuples_usage.py:41:0: Object of type tuple[int, int, str] does not support '__setitem__' [unsupported_operation] ./namedtuples_usage.py:42:4: Cannot delete readonly attribute 'x' [incompatible_assignment] ./namedtuples_usage.py:43:4: Object of type tuple[int, int, str] does not support '__delitem__' [unsupported_operation] -./namedtuples_usage.py:52:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] -./namedtuples_usage.py:53:0: Cannot unpack Annotated[./namedtuples_usage.py.Point, HasAttrExtension(attribute_name=KnownValue(val='x'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='y'), attribute_type=TypedValue(typ=, literal_only=False)), HasAttrExtension(attribute_name=KnownValue(val='units'), attribute_type=TypedValue(typ=, literal_only=False))] [bad_unpack] +./namedtuples_usage.py:52:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] +./namedtuples_usage.py:53:0: Cannot unpack ./namedtuples_usage.py.Point [bad_unpack] """ diff --git a/conformance/results/pycroscope/protocols_definition.toml b/conformance/results/pycroscope/protocols_definition.toml index 06e2cb876..99b5e3e67 100644 --- a/conformance/results/pycroscope/protocols_definition.toml +++ b/conformance/results/pycroscope/protocols_definition.toml @@ -5,22 +5,22 @@ output = """ ./protocols_definition.py:30:10: Incompatible argument type for things: expected collections.abc.Iterable[./protocols_definition.py.SupportsClose] but got Literal[[1]] [incompatible_argument] ./protocols_definition.py:67:8: Protocol members cannot be defined via assignment to self [invalid_annotation] ./protocols_definition.py:114:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got ./protocols_definition.py.Concrete2_Bad1 [incompatible_assignment] -./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got Annotated[./protocols_definition.py.Concrete2_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:116:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got Annotated[./protocols_definition.py.Concrete2_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:117:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got Annotated[./protocols_definition.py.Concrete2_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] +./protocols_definition.py:115:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got ./protocols_definition.py.Concrete2_Bad2 [incompatible_assignment] +./protocols_definition.py:116:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got ./protocols_definition.py.Concrete2_Bad3 [incompatible_assignment] +./protocols_definition.py:117:0: Incompatible assignment: expected ./protocols_definition.py.Template2, got ./protocols_definition.py.Concrete2_Bad4 [incompatible_assignment] ./protocols_definition.py:156:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got ./protocols_definition.py.Concrete3_Bad1 [incompatible_assignment] -./protocols_definition.py:157:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] -./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad4, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:160:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got Annotated[./protocols_definition.py.Concrete3_Bad5, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)))] [incompatible_assignment] -./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got Annotated[./protocols_definition.py.Concrete4_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False),)), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:157:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got ./protocols_definition.py.Concrete3_Bad2 [incompatible_assignment] +./protocols_definition.py:158:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got ./protocols_definition.py.Concrete3_Bad3 [incompatible_assignment] +./protocols_definition.py:159:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got ./protocols_definition.py.Concrete3_Bad4 [incompatible_assignment] +./protocols_definition.py:160:0: Incompatible assignment: expected ./protocols_definition.py.Template3, got ./protocols_definition.py.Concrete3_Bad5 [incompatible_assignment] +./protocols_definition.py:218:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got ./protocols_definition.py.Concrete4_Bad1 [incompatible_assignment] ./protocols_definition.py:219:0: Incompatible assignment: expected ./protocols_definition.py.Template4, got ./protocols_definition.py.Concrete4_Bad2 [incompatible_assignment] -./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad1, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=AnyValue(source=)), 'c': SigParameter(name='c', kind=, default=None, annotation=AnyValue(source=))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad2, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'c': SigParameter(name='c', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad3, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad4, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got Annotated[./protocols_definition.py.Concrete5_Bad5, HasAttrExtension(attribute_name=KnownValue(val='method1'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'self': SigParameter(name='self', kind=, default=None, annotation=AnyValue(source=)), 'a': SigParameter(name='a', kind=, default=None, annotation=TypedValue(typ=, literal_only=False)), 'b': SigParameter(name='b', kind=, default=None, annotation=TypedValue(typ=, literal_only=False))}, return_value=MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))), impl=None, callable=None, is_asynq=False, has_return_annotation=False, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad1, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=TypedValue(typ=, literal_only=False))] [incompatible_assignment] -./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad2, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))] [incompatible_assignment] -./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got Annotated[./protocols_definition.py.Concrete6_Bad3, HasAttrExtension(attribute_name=KnownValue(val='val1'), attribute_type=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),))), HasAttrExtension(attribute_name=KnownValue(val='__dataclass_fields__'), attribute_type=GenericValue(typ=, literal_only=False, args=(TypedValue(typ=, literal_only=False), AnyValue(source=)))), HasAttrExtension(attribute_name=KnownValue(val='__init__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'val1': SigParameter(name='val1', kind=, default=KnownValue(val=Ellipsis), annotation=GenericValue(typ=, literal_only=False, args=(MultiValuedValue(vals=(TypedValue(typ=, literal_only=False), TypedValue(typ=, literal_only=False))),)))}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='__match_args__'), attribute_type=KnownValue(val=('val1',))), HasAttrExtension(attribute_name=KnownValue(val='__hash__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={'...': SigParameter(name='...', kind=, default=None, annotation=AnyValue(source=))}, return_value=AnyValue(source=), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_definition.py:285:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got ./protocols_definition.py.Concrete5_Bad1 [incompatible_assignment] +./protocols_definition.py:286:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got ./protocols_definition.py.Concrete5_Bad2 [incompatible_assignment] +./protocols_definition.py:287:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got ./protocols_definition.py.Concrete5_Bad3 [incompatible_assignment] +./protocols_definition.py:288:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got ./protocols_definition.py.Concrete5_Bad4 [incompatible_assignment] +./protocols_definition.py:289:0: Incompatible assignment: expected ./protocols_definition.py.Template5, got ./protocols_definition.py.Concrete5_Bad5 [incompatible_assignment] +./protocols_definition.py:339:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got ./protocols_definition.py.Concrete6_Bad1 [incompatible_assignment] +./protocols_definition.py:340:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got ./protocols_definition.py.Concrete6_Bad2 [incompatible_assignment] +./protocols_definition.py:341:0: Incompatible assignment: expected ./protocols_definition.py.Template6, got ./protocols_definition.py.Concrete6_Bad3 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/protocols_merging.toml b/conformance/results/pycroscope/protocols_merging.toml index 80bf67af7..78edb0b62 100644 --- a/conformance/results/pycroscope/protocols_merging.toml +++ b/conformance/results/pycroscope/protocols_merging.toml @@ -2,10 +2,10 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:53:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] -./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got Annotated[./protocols_merging.py.SCConcrete2, HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:52:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable1, got ./protocols_merging.py.SCConcrete2 [incompatible_assignment] +./protocols_merging.py:53:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable2, got ./protocols_merging.py.SCConcrete2 [incompatible_assignment] +./protocols_merging.py:54:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable3, got ./protocols_merging.py.SCConcrete2 [incompatible_assignment] ./protocols_merging.py:67:15: Protocols can only inherit from protocol bases [invalid_base] ./protocols_merging.py:82:4: Cannot instantiate abstract class SizedAndClosable4 [incompatible_call] -./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got Annotated[./protocols_merging.py.SCConcrete1, HasAttrExtension(attribute_name=KnownValue(val='__len__'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=TypedValue(typ=, literal_only=False), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None))), HasAttrExtension(attribute_name=KnownValue(val='close'), attribute_type=CallableValue(typ=, literal_only=False, signature=Signature(parameters={}, return_value=KnownValue(val=None), impl=None, callable=None, is_asynq=False, has_return_annotation=True, allow_call=False, allow_partial_call=False, evaluator=None, deprecated=None)))] [incompatible_assignment] +./protocols_merging.py:83:0: Incompatible assignment: expected ./protocols_merging.py.SizedAndClosable4, got ./protocols_merging.py.SCConcrete1 [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 0a606b362..4357eb1a2 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -4,6 +4,7 @@ Line 42: Expected 1 errors Line 43: Expected 1 errors Line 44: Expected 1 errors Line 49: Expected 1 errors +Line 55: Unexpected errors ['./qualifiers_annotated.py:55:46: Type parameter is not valid in this annotation context [invalid_annotation]'] """ output = """ ./qualifiers_annotated.py:38:6: Invalid type annotation [, ] [invalid_annotation] @@ -14,6 +15,7 @@ output = """ ./qualifiers_annotated.py:46:6: Invalid type annotation True [invalid_annotation] ./qualifiers_annotated.py:47:7: Invalid type annotation 1 [invalid_annotation] ./qualifiers_annotated.py:48:17: Annotated[type 'list', (<+list is_truthy None> == NullConstraint())] is always True because it does not provide __bool__ [type_always_true] +./qualifiers_annotated.py:55:46: Type parameter is not valid in this annotation context [invalid_annotation] ./qualifiers_annotated.py:59:7: Annotated[] requires at least two arguments [invalid_annotation] ./qualifiers_annotated.py:71:0: Incompatible assignment: expected type, got Literal[typing.Annotated[int, '']] [incompatible_assignment] ./qualifiers_annotated.py:72:0: Incompatible assignment: expected type, got .SmallInt = Annotated[int, Literal['']] [incompatible_assignment] From fc6fe730230f035f6b3d39bdb7c1273cf1cf9748 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 06:32:33 -0700 Subject: [PATCH 71/78] fixup --- conformance/results/pyrefly/typeforms_typeform.toml | 5 +++++ conformance/results/pyright/typeforms_typeform.toml | 1 + 2 files changed, 6 insertions(+) diff --git a/conformance/results/pyrefly/typeforms_typeform.toml b/conformance/results/pyrefly/typeforms_typeform.toml index 32a15e0df..0b882d7fa 100644 --- a/conformance/results/pyrefly/typeforms_typeform.toml +++ b/conformance/results/pyrefly/typeforms_typeform.toml @@ -1,3 +1,8 @@ +conformant = "Partial" +notes = """ +Does not allow assigning a TypeForm to types.GenericAlias. +Does not allow passing a forward reference to a function accepting a TypeForm. +""" conformance_automated = "Fail" errors_diff = """ Line 49: Unexpected errors ['`type[list[int]]` is not assignable to `GenericAlias` [bad-assignment]', 'Expected `v2_actual` to be a type alias, got `GenericAlias` [invalid-type-alias]'] diff --git a/conformance/results/pyright/typeforms_typeform.toml b/conformance/results/pyright/typeforms_typeform.toml index 4a9a5a413..4b75ffd63 100644 --- a/conformance/results/pyright/typeforms_typeform.toml +++ b/conformance/results/pyright/typeforms_typeform.toml @@ -1,3 +1,4 @@ +conformant = "Unsupported" conformance_automated = "Fail" errors_diff = """ Line 70: Expected 1 errors From 4a12f534a523971d2243ff8fbcd34f16e5e2f9d6 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 06:32:58 -0700 Subject: [PATCH 72/78] . --- conformance/results/results.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance/results/results.html b/conformance/results/results.html index 400004b92..9a6e76047 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -233,9 +233,9 @@

Python Type System Conformance Test Results

     typeforms_typeform
Partial

Does not support assigning Union and GenericAlias objects to their runtime types.

-Unknown +Unsupported Pass -Unknown +
Partial

Does not allow assigning a TypeForm to types.GenericAlias.

Does not allow passing a forward reference to a function accepting a TypeForm.

Unknown Unsupported From aeb00fc38b32a54e922b4ca4cceeaf5649dece91 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 07:01:03 -0700 Subject: [PATCH 73/78] score pycroscope --- .../results/pycroscope/aliases_implicit.toml | 5 +++ .../pycroscope/aliases_type_statement.toml | 4 ++ .../pycroscope/aliases_typealiastype.toml | 4 ++ .../pycroscope/annotations_forward_refs.toml | 5 +++ .../pycroscope/annotations_typeexpr.toml | 4 ++ .../pycroscope/dataclasses_descriptors.toml | 4 ++ .../pycroscope/directives_disjoint_base.toml | 4 ++ .../results/pycroscope/generics_defaults.toml | 4 ++ .../generics_defaults_referential.toml | 4 ++ .../pycroscope/generics_syntax_scoping.toml | 1 + .../literals_parameterizations.toml | 4 ++ .../pycroscope/namedtuples_define_class.toml | 4 ++ .../results/pycroscope/overloads_basic.toml | 4 ++ .../overloads_definitions_stub.toml | 4 ++ .../pycroscope/protocols_class_objects.toml | 4 ++ .../results/pycroscope/protocols_generic.toml | 5 +++ .../pycroscope/qualifiers_annotated.toml | 5 +++ .../pycroscope/specialtypes_never.toml | 5 +++ .../typeddicts_type_consistency.toml | 4 ++ .../pycroscope/typeforms_typeform.toml | 4 ++ conformance/results/results.html | 40 +++++++++---------- 21 files changed, 102 insertions(+), 20 deletions(-) diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index 0cc2ec6d3..eb828b7d4 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -1,3 +1,8 @@ +conformant = "Partial" +notes = """ +Fails to handle various weird annotations. +Various bugs with resolving generic aliases. +""" conformance_automated = "Fail" errors_diff = """ Line 76: Expected 1 errors diff --git a/conformance/results/pycroscope/aliases_type_statement.toml b/conformance/results/pycroscope/aliases_type_statement.toml index 9feb9fec6..9961849bc 100644 --- a/conformance/results/pycroscope/aliases_type_statement.toml +++ b/conformance/results/pycroscope/aliases_type_statement.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Fails to reject various weird annotations. +""" conformance_automated = "Fail" errors_diff = """ Line 37: Expected 1 errors diff --git a/conformance/results/pycroscope/aliases_typealiastype.toml b/conformance/results/pycroscope/aliases_typealiastype.toml index ac7d44cc3..2708a2ee4 100644 --- a/conformance/results/pycroscope/aliases_typealiastype.toml +++ b/conformance/results/pycroscope/aliases_typealiastype.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Rejects valid ParamSpec specialization. +""" conformance_automated = "Fail" errors_diff = """ Line 39: Unexpected errors ["./aliases_typealiastype.py:39:4: Unrecognized annotation [invalid_annotation]"] diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index 30f1a429b..b923d6790 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -1,3 +1,8 @@ +conformant = "Partial" +notes = """ +Fails to reject "x" | int annotations that fail at runtime +Does not correctly pick up forward refs in unimportable module +""" conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors diff --git a/conformance/results/pycroscope/annotations_typeexpr.toml b/conformance/results/pycroscope/annotations_typeexpr.toml index b207f1610..d0ec09deb 100644 --- a/conformance/results/pycroscope/annotations_typeexpr.toml +++ b/conformance/results/pycroscope/annotations_typeexpr.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Fails to reject various weird annotations +""" conformance_automated = "Fail" errors_diff = """ Line 88: Expected 1 errors diff --git a/conformance/results/pycroscope/dataclasses_descriptors.toml b/conformance/results/pycroscope/dataclasses_descriptors.toml index 1ee3c89a3..e5410991c 100644 --- a/conformance/results/pycroscope/dataclasses_descriptors.toml +++ b/conformance/results/pycroscope/dataclasses_descriptors.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Conformance suite is questionable; see https://github.com/python/typing/issues/2259 +""" conformance_automated = "Fail" errors_diff = """ Line 61: Unexpected errors ['./dataclasses_descriptors.py:61:12: Any[error] is not equivalent to list[int]', "./dataclasses_descriptors.py:61:12: has no attribute 'x' [undefined_attribute]"] diff --git a/conformance/results/pycroscope/directives_disjoint_base.toml b/conformance/results/pycroscope/directives_disjoint_base.toml index 8d95e291b..96a30b849 100644 --- a/conformance/results/pycroscope/directives_disjoint_base.toml +++ b/conformance/results/pycroscope/directives_disjoint_base.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Does not reject invalid class definitions due to disjoint bases, but uses disjoint base information in type narrowing. +""" conformance_automated = "Fail" errors_diff = """ Line 69: Expected 1 errors diff --git a/conformance/results/pycroscope/generics_defaults.toml b/conformance/results/pycroscope/generics_defaults.toml index d894c0d3d..93d9e5fb4 100644 --- a/conformance/results/pycroscope/generics_defaults.toml +++ b/conformance/results/pycroscope/generics_defaults.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Numerous issues; does not support TypeVarTuple and ParamSpec defaults. +""" conformance_automated = "Fail" errors_diff = """ Line 33: Unexpected errors ['./generics_defaults.py:33:16: ~DefaultStrT@./generics_defaults.py.NoNonDefaults is not equivalent to str'] diff --git a/conformance/results/pycroscope/generics_defaults_referential.toml b/conformance/results/pycroscope/generics_defaults_referential.toml index 5a9602add..bd7f61cec 100644 --- a/conformance/results/pycroscope/generics_defaults_referential.toml +++ b/conformance/results/pycroscope/generics_defaults_referential.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Fails to apply default specializations in some cases. +""" conformance_automated = "Fail" errors_diff = """ Line 23: Unexpected errors ["./generics_defaults_referential.py:23:12: type 'generics_defaults_referential.slice' is not equivalent to type[generics_defaults_referential.slice[int, int, int | None]]"] diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index 3c2d4e3e0..2b84b12a8 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -1,3 +1,4 @@ +conformant = "Unsupported" conformance_automated = "Fail" errors_diff = """ Line 18: Expected 1 errors diff --git a/conformance/results/pycroscope/literals_parameterizations.toml b/conformance/results/pycroscope/literals_parameterizations.toml index 504c20357..127b2a711 100644 --- a/conformance/results/pycroscope/literals_parameterizations.toml +++ b/conformance/results/pycroscope/literals_parameterizations.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Fails to reject various invalid literal parameterizations. +""" conformance_automated = "Fail" errors_diff = """ Line 41: Expected 1 errors diff --git a/conformance/results/pycroscope/namedtuples_define_class.toml b/conformance/results/pycroscope/namedtuples_define_class.toml index c6a83c661..9300c2269 100644 --- a/conformance/results/pycroscope/namedtuples_define_class.toml +++ b/conformance/results/pycroscope/namedtuples_define_class.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Does not support precise type inference for slices over namedtuples. +""" conformance_automated = "Fail" errors_diff = """ Line 29: Unexpected errors ['./namedtuples_define_class.py:29:12: tuple is not equivalent to tuple[int, int]'] diff --git a/conformance/results/pycroscope/overloads_basic.toml b/conformance/results/pycroscope/overloads_basic.toml index d5285d577..beb836472 100644 --- a/conformance/results/pycroscope/overloads_basic.toml +++ b/conformance/results/pycroscope/overloads_basic.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Does less literal promotion than the test asks for. +""" conformance_automated = "Fail" errors_diff = """ Line 37: Unexpected errors ['./overloads_basic.py:37:12: Literal[0] is not equivalent to int'] diff --git a/conformance/results/pycroscope/overloads_definitions_stub.toml b/conformance/results/pycroscope/overloads_definitions_stub.toml index 54c4dede7..5e2d111cb 100644 --- a/conformance/results/pycroscope/overloads_definitions_stub.toml +++ b/conformance/results/pycroscope/overloads_definitions_stub.toml @@ -1,3 +1,7 @@ +conformant = "Unsupported" +notes = """ +Does not support checking stubs. +""" conformance_automated = "Fail" errors_diff = """ Lines 13, 14: Expected error (tag 'func1') diff --git a/conformance/results/pycroscope/protocols_class_objects.toml b/conformance/results/pycroscope/protocols_class_objects.toml index 89145d8a9..e40edf15f 100644 --- a/conformance/results/pycroscope/protocols_class_objects.toml +++ b/conformance/results/pycroscope/protocols_class_objects.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Abstract type[Proto] still allows protocol class objects in some paths. +""" conformance_automated = "Fail" errors_diff = """ Line 29: Expected 1 errors diff --git a/conformance/results/pycroscope/protocols_generic.toml b/conformance/results/pycroscope/protocols_generic.toml index fb84ec180..9882a5578 100644 --- a/conformance/results/pycroscope/protocols_generic.toml +++ b/conformance/results/pycroscope/protocols_generic.toml @@ -1,3 +1,8 @@ +conformant = "Partial" +notes = """ +Fails to reject duplicate generic/protocol bases. +Treats global object as a literal. +""" conformance_automated = "Fail" errors_diff = """ Line 44: Expected 1 errors diff --git a/conformance/results/pycroscope/qualifiers_annotated.toml b/conformance/results/pycroscope/qualifiers_annotated.toml index 0bb7a9226..97000ee40 100644 --- a/conformance/results/pycroscope/qualifiers_annotated.toml +++ b/conformance/results/pycroscope/qualifiers_annotated.toml @@ -1,3 +1,8 @@ +conformant = "Partial" +notes = """ +Fails to reject various weird annotations. +False positive on lambda in Annotated. +""" conformance_automated = "Fail" errors_diff = """ Line 42: Expected 1 errors diff --git a/conformance/results/pycroscope/specialtypes_never.toml b/conformance/results/pycroscope/specialtypes_never.toml index 35f8a7da3..e6f61291a 100644 --- a/conformance/results/pycroscope/specialtypes_never.toml +++ b/conformance/results/pycroscope/specialtypes_never.toml @@ -1,3 +1,8 @@ +conformant = "Partial" +notes = """ +Does not enforce invariance in some contexts +Does not allow Any to be assigned to Never +""" conformance_automated = "Fail" errors_diff = """ Line 104: Expected 1 errors diff --git a/conformance/results/pycroscope/typeddicts_type_consistency.toml b/conformance/results/pycroscope/typeddicts_type_consistency.toml index ffaf50ae2..62d6661c8 100644 --- a/conformance/results/pycroscope/typeddicts_type_consistency.toml +++ b/conformance/results/pycroscope/typeddicts_type_consistency.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Considers TypedDicts to be assignable to plain dict types. +""" conformance_automated = "Fail" errors_diff = """ Line 76: Expected 1 errors diff --git a/conformance/results/pycroscope/typeforms_typeform.toml b/conformance/results/pycroscope/typeforms_typeform.toml index 834a80d10..01e46a0a1 100644 --- a/conformance/results/pycroscope/typeforms_typeform.toml +++ b/conformance/results/pycroscope/typeforms_typeform.toml @@ -1,3 +1,7 @@ +conformant = "Partial" +notes = """ +Fails to reject various weird annotations +""" conformance_automated = "Fail" errors_diff = """ Line 88: Expected 1 errors diff --git a/conformance/results/results.html b/conformance/results/results.html index 9a6e76047..0f9400490 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -201,7 +201,7 @@

Python Type System Conformance Test Results

Pass
Partial

Incorrectly generates error for quoted type defined in class scope.

Partial

Types in quotes incorrectly refer to shadowing class member.

Does not reject some type forms that require quotes.

-Unknown +
Partial

Fails to reject "x" | int annotations that fail at runtime

Does not correctly pick up forward refs in unimportable module

Partial

Resolves references in type annotations as referring to end-of-scope types (https://discuss.python.org/t/annotation-string-references-in-class-scope-in-conformance-tests/105439, https://github.com/python/typing/pull/2144)

     annotations_generators @@ -225,7 +225,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Fails to reject various weird annotations

Pass @@ -236,7 +236,7 @@

Python Type System Conformance Test Results

Unsupported Pass
Partial

Does not allow assigning a TypeForm to types.GenericAlias.

Does not allow passing a forward reference to a function accepting a TypeForm.

-Unknown +
Partial

Fails to reject various weird annotations

Unsupported @@ -255,7 +255,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Does not enforce invariance in some contexts

Does not allow Any to be assigned to Never

Pass      specialtypes_none @@ -306,7 +306,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Numerous issues; does not support TypeVarTuple and ParamSpec defaults.

Partial

Does not forbid a `TypeVar` immediately following a `TypeVarTuple` in a parameter list from having a default.

Does not support `TypeVarTuple`.

Does not fully support defaults for `ParamSpec`s.

     generics_defaults_referential @@ -314,7 +314,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Fails to apply default specializations in some cases.

Pass      generics_defaults_specialization @@ -434,7 +434,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +Unsupported Pass      generics_type_erasure @@ -533,7 +533,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Fails to reject various weird annotations.

False positive on lambda in Annotated.

Pass      qualifiers_final_annotation @@ -587,7 +587,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

Does not reject invalid syntax in implicit type aliases.

-Unknown +
Partial

Fails to handle various weird annotations.

Various bugs with resolving generic aliases.

Partial

Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.

Falls short on full syntactic validation of type aliases.

     aliases_newtype @@ -611,7 +611,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Fails to reject various weird annotations.

Partial

Does not reject circular definitions of type aliases.

Does not support `type` statements generic over `TypeVarTuple`s.

     aliases_typealiastype @@ -619,7 +619,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Rejects valid ParamSpec specialization.

Partial

Does not reject specializing a type parameter in a generic type alias with a type inconsistent with the parameter's upper bound.

Does not reject declaring a type alias with a type variable that is not in scope.

Does not reject declaring a type alias with a non-literal tuple passed to the `type_params` parameter.

Does not reject cyclically defined type aliases.

     aliases_variance @@ -654,7 +654,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Fails to reject various invalid literal parameterizations.

Pass      literals_semantics @@ -673,7 +673,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Abstract type[Proto] still allows protocol class objects in some paths.

Unsupported

`type[Proto]` is not yet supported.

`ClassVar` protocol members are not yet supported.

`@property` protocol members are only partially supported.

A class object `C` is only considered to inhabit a protocol type with a method member `f` if `f` exists as an attribute on the metaclass of `C`.

     protocols_definition @@ -697,7 +697,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Fails to reject duplicate generic/protocol bases.

Treats global object as a literal.

Partial

Only partially supports `@property` protocol members.

     protocols_merging @@ -850,7 +850,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Does less literal promotion than the test asks for.

Pass      overloads_consistency @@ -874,7 +874,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Unsupported

Does not support checking stubs.

Pass      overloads_evaluation @@ -904,7 +904,7 @@

Python Type System Conformance Test Results

Pass Pass
Partial

* Assumes descriptor behavior only when field is assigned in class body

* Doesn't allow non-data descriptors or data descriptors with differing `__get__` and `__set__` types

-Unknown +
Partial

Conformance suite is questionable; see https://github.com/python/typing/issues/2259

Partial

Only infers a descriptor `__get__` method as being called when a descriptor attribute is accessed on an instance if the descriptor attribute is present in the class namespace.

     dataclasses_final @@ -1131,7 +1131,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Considers TypedDicts to be assignable to plain dict types.

Pass      typeddicts_usage @@ -1177,7 +1177,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unknown +
Partial

Does not support precise type inference for slices over namedtuples.

Pass      namedtuples_define_functional @@ -1306,7 +1306,7 @@

Python Type System Conformance Test Results

Unsupported

Does not support PEP 800 disjoint-base semantics.

Unsupported

Does not support PEP 800 disjoint-base semantics.

Unsupported

Does not support PEP 800 disjoint-base semantics.

-Unknown +
Partial

Does not reject invalid class definitions due to disjoint bases, but uses disjoint base information in type narrowing.

Pass      directives_no_type_check From d0c986fd89354565189719980982408a50ca0a25 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 07:09:33 -0700 Subject: [PATCH 74/78] fix --- conformance/pyproject.toml | 1 + .../results/pycroscope/aliases_implicit.toml | 2 +- .../pycroscope/annotations_forward_refs.toml | 25 +++++++++++-- .../pycroscope/annotations_typeexpr.toml | 2 +- .../pycroscope/callables_annotation.toml | 10 ++--- .../pycroscope/generics_self_basic.toml | 4 +- .../generics_typevartuple_basic.toml | 5 +-- .../literals_parameterizations.toml | 2 +- conformance/results/pycroscope/version.toml | 2 +- conformance/results/results.html | 2 +- conformance/src/type_checker.py | 25 +++++++------ conformance/uv.lock | 37 +++++++++++++++++++ 12 files changed, 86 insertions(+), 31 deletions(-) diff --git a/conformance/pyproject.toml b/conformance/pyproject.toml index 7483444be..e0700225d 100644 --- a/conformance/pyproject.toml +++ b/conformance/pyproject.toml @@ -4,6 +4,7 @@ version = "0.1.0" requires-python = "==3.12.*" dependencies = [ "mypy", + "pycroscope==0.4.0", "pyrefly", "pyright", "tomli", diff --git a/conformance/results/pycroscope/aliases_implicit.toml b/conformance/results/pycroscope/aliases_implicit.toml index eb828b7d4..51e2e303d 100644 --- a/conformance/results/pycroscope/aliases_implicit.toml +++ b/conformance/results/pycroscope/aliases_implicit.toml @@ -13,7 +13,6 @@ Line 113: Expected 1 errors Line 117: Expected 1 errors Line 118: Expected 1 errors Line 119: Expected 1 errors -Line 135: Expected 1 errors Line 68: Unexpected errors ['./aliases_implicit.py:68:16: .GoodTypeAlias9[, None] = (int, /, ****P) -> ~R is not equivalent to (int, str, str, /) -> None'] Line 70: Unexpected errors ['./aliases_implicit.py:70:16: Any[from_another] is not equivalent to int | str | list[list[int]] | None'] Line 72: Unexpected errors ['./aliases_implicit.py:72:16: .GoodTypeAlias13 = (**__P: **P) -> None is not equivalent to (...) -> None'] @@ -39,4 +38,5 @@ output = """ ./aliases_implicit.py:115:9: Invalid type annotation True [invalid_annotation] ./aliases_implicit.py:116:9: Invalid type annotation 1 [invalid_annotation] ./aliases_implicit.py:133:5: Literal[list | set] is not callable [not_callable] +./aliases_implicit.py:135:4: Unrecognized annotation object [invalid_annotation] """ diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index b923d6790..adbc53422 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -7,9 +7,25 @@ conformance_automated = "Fail" errors_diff = """ Line 24: Expected 1 errors Line 25: Expected 1 errors -Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation]'] +Line 14: Unexpected errors ['./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name]', './annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name]'] +Line 16: Unexpected errors ['./annotations_forward_refs.py:16:16: Any[error] is not equivalent to ./annotations_forward_refs.py.ClassA'] +Line 17: Unexpected errors ['./annotations_forward_refs.py:17:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA]'] +Line 18: Unexpected errors ['./annotations_forward_refs.py:18:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA]'] +Line 19: Unexpected errors ['./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA | int]'] +Line 87: Unexpected errors ['./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation]'] +Line 96: Unexpected errors ['./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int'] """ output = """ +./annotations_forward_refs.py:14:8: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:22: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:42: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:14:62: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:16:16: Any[error] is not equivalent to ./annotations_forward_refs.py.ClassA +./annotations_forward_refs.py:17:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA] +./annotations_forward_refs.py:18:16: list[Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA] +./annotations_forward_refs.py:19:16: list[int | Any[error]] is not equivalent to list[./annotations_forward_refs.py.ClassA | int] +./annotations_forward_refs.py:22:6: Undefined name: ClassA [undefined_name] +./annotations_forward_refs.py:23:11: Undefined name: ClassA [undefined_name] ./annotations_forward_refs.py:41:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:42:8: Unrecognized annotation [invalid_annotation] ./annotations_forward_refs.py:43:8: Unrecognized annotation tuple[type 'int', type 'str'] [invalid_annotation] @@ -24,8 +40,9 @@ output = """ ./annotations_forward_refs.py:52:9: Invalid type annotation -1 [invalid_annotation] ./annotations_forward_refs.py:53:0: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:54:0: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:55:9: Invalid type annotation [invalid_annotation] ./annotations_forward_refs.py:80:12: Undefined name: ClassF [undefined_name] -./annotations_forward_refs.py:87:7: Invalid type annotation [invalid_annotation] -./annotations_forward_refs.py:89:7: Invalid type annotation [invalid_annotation] +./annotations_forward_refs.py:87:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] +./annotations_forward_refs.py:89:7: Unrecognized annotation (self: ./annotations_forward_refs.py.ClassD) -> None [invalid_annotation] +./annotations_forward_refs.py:96:12: Any[error] is not equivalent to int """ diff --git a/conformance/results/pycroscope/annotations_typeexpr.toml b/conformance/results/pycroscope/annotations_typeexpr.toml index d0ec09deb..d323d5697 100644 --- a/conformance/results/pycroscope/annotations_typeexpr.toml +++ b/conformance/results/pycroscope/annotations_typeexpr.toml @@ -20,5 +20,5 @@ output = """ ./annotations_typeexpr.py:97:9: Invalid type annotation True [invalid_annotation] ./annotations_typeexpr.py:98:9: Invalid type annotation 1 [invalid_annotation] ./annotations_typeexpr.py:99:9: Invalid type annotation -1 [invalid_annotation] -./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] +./annotations_typeexpr.py:102:9: Invalid type annotation [invalid_annotation] """ diff --git a/conformance/results/pycroscope/callables_annotation.toml b/conformance/results/pycroscope/callables_annotation.toml index c0ee4af78..2de3e2782 100644 --- a/conformance/results/pycroscope/callables_annotation.toml +++ b/conformance/results/pycroscope/callables_annotation.toml @@ -12,10 +12,10 @@ output = """ ./callables_annotation.py:57:4: Invalid type annotation [] [invalid_annotation] ./callables_annotation.py:58:4: Callable[] requires exactly two arguments [invalid_annotation] ./callables_annotation.py:59:4: Ellipsis must be used directly in Callable[..., T], not in Callable[[...], T] [invalid_annotation] -./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function 'callables_annotation.test_cb2' [incompatible_assignment] -./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got function 'callables_annotation.test_cb4' [incompatible_assignment] -./callables_annotation.py:159:4: Incompatible assignment: expected callables_annotation.Proto5[Any[explicit]], got callables_annotation.Proto8 [incompatible_assignment] -./callables_annotation.py:172:4: Incompatible assignment: expected callables_annotation.Callback2[Any[ellipsis_callable]] = (int, /, ****P) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:91:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got () -> str [incompatible_assignment] +./callables_annotation.py:93:0: Incompatible assignment: expected (int, /, **Any[explicit]) -> str, got (*, a: int) -> str [incompatible_assignment] +./callables_annotation.py:159:4: Incompatible assignment: expected ./callables_annotation.py.Proto5[Any[explicit]], got ./callables_annotation.py.Proto8 [incompatible_assignment] +./callables_annotation.py:172:4: Incompatible assignment: expected .Callback2[Any[ellipsis_callable]] = (int, /, ****P) -> str, got () -> str [incompatible_assignment] ./callables_annotation.py:187:4: Incompatible assignment: expected (str, /, **Any[explicit]) -> str, got (int, str, /) -> str [incompatible_assignment] -./callables_annotation.py:189:4: Incompatible assignment: expected callables_annotation.CallbackWithStr[Any[ellipsis_callable]] = (str, /, ****P) -> str, got (int, str, /) -> str [incompatible_assignment] +./callables_annotation.py:189:4: Incompatible assignment: expected .CallbackWithStr[Any[ellipsis_callable]] = (str, /, ****P) -> str, got (int, str, /) -> str [incompatible_assignment] """ diff --git a/conformance/results/pycroscope/generics_self_basic.toml b/conformance/results/pycroscope/generics_self_basic.toml index a21253041..d93d9f37a 100644 --- a/conformance/results/pycroscope/generics_self_basic.toml +++ b/conformance/results/pycroscope/generics_self_basic.toml @@ -2,7 +2,7 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT@generics_self_basic.Shape, got generics_self_basic.Shape [incompatible_return_value] -./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT@generics_self_basic.Shape, got generics_self_basic.Shape [incompatible_return_value] +./generics_self_basic.py:20:8: Incompatible return type: expected ~SelfT@./generics_self_basic.py.Shape, got ./generics_self_basic.py.Shape [incompatible_return_value] +./generics_self_basic.py:33:8: Incompatible return type: expected ~SelfT@./generics_self_basic.py.Shape, got ./generics_self_basic.py.Shape [incompatible_return_value] ./generics_self_basic.py:68:25: Self cannot be further subscripted [invalid_specialization] """ diff --git a/conformance/results/pycroscope/generics_typevartuple_basic.toml b/conformance/results/pycroscope/generics_typevartuple_basic.toml index 1f5ec7cc2..842c7ca46 100644 --- a/conformance/results/pycroscope/generics_typevartuple_basic.toml +++ b/conformance/results/pycroscope/generics_typevartuple_basic.toml @@ -9,10 +9,9 @@ output = """ ./generics_typevartuple_basic.py:53:30: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:56:27: TypeVarTuple must be unpacked [invalid_annotation] ./generics_typevartuple_basic.py:59:17: TypeVarTuple must be unpacked [invalid_annotation] -./generics_typevartuple_basic.py:65:6: Error calling (name: str, /, *, default: TypeForm[object] = , bound: TypeForm[object] = , covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVarTuple (with impl): typevartuple() got an unexpected keyword argument 'covariant' [incompatible_call] +./generics_typevartuple_basic.py:65:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'covariant' [incompatible_call] ./generics_typevartuple_basic.py:66:6: In call to typing.TypeVarTuple: Takes 1 positional arguments but 3 were given [incompatible_call] -./generics_typevartuple_basic.py:67:6: Error calling (name: str, /, *, default: TypeForm[object] = , bound: TypeForm[object] = , covariant: bool = Literal[False], contravariant: bool = Literal[False], infer_variance: bool = Literal[False]) -> typing.TypeVarTuple (with impl): typevartuple() got an unexpected keyword argument 'bound' [incompatible_call] -./generics_typevartuple_basic.py:67:32: TypeVarTuple bounds are not supported [incompatible_call] +./generics_typevartuple_basic.py:67:6: In call to typing.TypeVarTuple: Got an unexpected keyword argument 'bound' [incompatible_call] ./generics_typevartuple_basic.py:91:0: Cannot resolve type variables [incompatible_call] ./generics_typevartuple_basic.py:100:4: Cannot resolve type variables [incompatible_call] ./generics_typevartuple_basic.py:101:4: Cannot resolve type variables [incompatible_call] diff --git a/conformance/results/pycroscope/literals_parameterizations.toml b/conformance/results/pycroscope/literals_parameterizations.toml index 127b2a711..80a88342d 100644 --- a/conformance/results/pycroscope/literals_parameterizations.toml +++ b/conformance/results/pycroscope/literals_parameterizations.toml @@ -16,7 +16,7 @@ output = """ ./literals_parameterizations.py:43:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got (4+3j) [invalid_literal] ./literals_parameterizations.py:47:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got {'a': 'b', 'c': 'd'} [invalid_literal] ./literals_parameterizations.py:48:6: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got [invalid_literal] -./literals_parameterizations.py:50:7: Arguments to Literal[] must be literals, not (PartialCallValue(callee=KnownValue(val=), arguments={'name': KnownValue(val='T'), 'constraints': SequenceValue(typ=, literal_only=False, args=(MultiValuedValue(vals=()),), weak=True, members=()), 'bound': KnownValue(val=), 'covariant': KnownValue(val=False), 'contravariant': KnownValue(val=False), 'infer_variance': KnownValue(val=False), 'default': KnownValue(val=)}, runtime_value=TypedValue(typ=, literal_only=False), node=Call(func=Name(id='TypeVar', ctx=Load()), args=[Constant(value='T', kind=None)], keywords=[])),) [invalid_literal] +./literals_parameterizations.py:50:7: Arguments to Literal[] must be literals, not (PartialCallValue(callee=KnownValue(val=), arguments={'name': KnownValue(val='T'), 'constraints': SequenceValue(typ=, literal_only=False, args=(MultiValuedValue(vals=()),), weak=True, members=()), 'bound': KnownValue(val=), 'covariant': KnownValue(val=False), 'contravariant': KnownValue(val=False), 'infer_variance': KnownValue(val=False), 'default': KnownValue(val=)}, runtime_value=TypedValue(typ=, literal_only=False), node=),) [invalid_literal] ./literals_parameterizations.py:50:15: Type parameter is not valid in this annotation context [invalid_annotation] ./literals_parameterizations.py:51:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got 3.14 [invalid_literal] ./literals_parameterizations.py:52:7: Arguments to Literal[] must be None, bool, int, str, bytes, or enum members; got typing.Any [invalid_literal] diff --git a/conformance/results/pycroscope/version.toml b/conformance/results/pycroscope/version.toml index e7d6bf67e..8060c0669 100644 --- a/conformance/results/pycroscope/version.toml +++ b/conformance/results/pycroscope/version.toml @@ -1 +1 @@ -version = "pycroscope 0.3.0" +version = "pycroscope 0.4.0" diff --git a/conformance/results/results.html b/conformance/results/results.html index 0f9400490..a176cfc91 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -180,7 +180,7 @@

Python Type System Conformance Test Results

pyrefly 0.62.0
-
pycroscope 0.3.0
+
pycroscope 0.4.0
ty 0.0.33
diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 8aa5fef9c..067b3b725 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -393,35 +393,36 @@ def name(self) -> str: return "pycroscope" def install(self) -> bool: - source_dir = Path.home() / "py" / "pycroscope" - if not source_dir.is_dir(): - print( - f"Unable to install pycroscope: source directory not found at {source_dir}" - ) - return False try: - # Ensure it is installed and the entrypoint is available. self.get_version() - return True - except CalledProcessError: - print("Unable to install pycroscope") + except (CalledProcessError, FileNotFoundError): + print( + "Unable to run pycroscope. Install conformance dependencies with " + "'uv sync --frozen' from the conformance directory." + ) return False def get_version(self) -> str: - proc = run(["pycroscope", "--version"], stdout=PIPE, text=True) + proc = run([*self._command(), "--version"], stdout=PIPE, text=True) return proc.stdout.strip() + @staticmethod + def _command() -> list[str]: + executable = "pycroscope.exe" if sys.platform == "win32" else "pycroscope" + return [sys.executable, "-m", "pycroscope"] + @staticmethod def _normalize_output_line(line: str) -> str: line = line.replace(str(CONFORMANCE_ROOT), "...") + line = re.sub(r"", r"", line) # Pycroscope can include object reprs with process-specific addresses # (e.g. "... at 0x10abc1234>"). Normalize these for stable snapshots. return re.sub(r"0x[0-9a-fA-F]+", "0x...", line) def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: command = [ - "pycroscope", + *self._command(), ".", "--output-format", "concise", diff --git a/conformance/uv.lock b/conformance/uv.lock index 31ea01e21..ba84de113 100644 --- a/conformance/uv.lock +++ b/conformance/uv.lock @@ -2,6 +2,15 @@ version = 1 revision = 3 requires-python = "==3.12.*" +[[package]] +name = "importlib-resources" +version = "7.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/06/b56dfa750b44e86157093bc8fca0ab81dccbf5260510de4eaf1cb69b5b99/importlib_resources-7.1.0.tar.gz", hash = "sha256:0722d4c6212489c530f2a145a34c0a7a3b4721bc96a15fada5930e2a0b760708", size = 44985, upload-time = "2026-04-12T16:36:09.232Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/db/55a262f3606bebcae07cc14095338471ad7c0bbcaa37707e6f0ee49725b7/importlib_resources-7.1.0-py3-none-any.whl", hash = "sha256:1bd7b48b4088eddb2cd16382150bb515af0bd2c70128194392725f82ad2c96a1", size = 37232, upload-time = "2026-04-12T16:36:08.219Z" }, +] + [[package]] name = "librt" version = "0.8.1" @@ -72,6 +81,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, ] +[[package]] +name = "pycroscope" +version = "0.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typeshed-client" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7c/8e/284fdc4027bf9a7c92f8256ff07006a50456ccd2ce5506d040e6ed2f2f1b/pycroscope-0.4.0.tar.gz", hash = "sha256:14b40e36f6186dd2eff712c8da91d02eb89a263a257472b49f4c59153ff380fb", size = 662901, upload-time = "2026-05-02T14:00:43.775Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/50/5f/c172c08b69e29d4094e1466b63260d8daf61a3ed3c689de7936f952f1663/pycroscope-0.4.0-py3-none-any.whl", hash = "sha256:cb7440b44ed16ed927995c33867cab22503f4bff7efe504964b81fb967183223", size = 714256, upload-time = "2026-05-02T14:00:41.891Z" }, +] + [[package]] name = "pyrefly" version = "0.62.0" @@ -153,12 +175,26 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ab/62/7fb948aace38d2f6329261bb33c035a8484549c74f1db28649c7a4c6fed9/ty-0.0.33-py3-none-win_arm64.whl", hash = "sha256:0d44f99ba1b441e55e2aa301b2ac0a21112784931b46a5f66f4ea9efe5620d97", size = 10742673, upload-time = "2026-04-28T10:45:35.555Z" }, ] +[[package]] +name = "typeshed-client" +version = "2.11.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "importlib-resources" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/85/7d/62fbae352d5fb7ce5ef4d9ca73bf7a9b02b790d2524ab6ef1e0e799a5d1b/typeshed_client-2.11.0.tar.gz", hash = "sha256:0b8f2ab88f611f5e97b70d2a8123942d3d7d5c74cee8ae694db83422f32f9481", size = 522774, upload-time = "2026-05-01T14:51:52.38Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/22/fa16b462157bd869dfad528f5637506b9430ca63d48fb536ecf4cc78481a/typeshed_client-2.11.0-py3-none-any.whl", hash = "sha256:5745e0990b80b29a286b22d68f81779c5c7adf1cac8969eeafba44b73b486c36", size = 787609, upload-time = "2026-05-01T14:51:51.005Z" }, +] + [[package]] name = "typing-conformance" version = "0.1.0" source = { virtual = "." } dependencies = [ { name = "mypy" }, + { name = "pycroscope" }, { name = "pyrefly" }, { name = "pyright" }, { name = "tomli" }, @@ -170,6 +206,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "mypy" }, + { name = "pycroscope", specifier = "==0.4.0" }, { name = "pyrefly" }, { name = "pyright" }, { name = "tomli" }, From 2d9a1517e39511ccdf4f260136a6f1dec44b26ad Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 08:08:41 -0700 Subject: [PATCH 75/78] tweaks --- .../results/pycroscope/annotations_forward_refs.toml | 4 ++-- .../results/pycroscope/generics_syntax_scoping.toml | 5 ++++- conformance/src/type_checker.py | 10 +++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/conformance/results/pycroscope/annotations_forward_refs.toml b/conformance/results/pycroscope/annotations_forward_refs.toml index adbc53422..11cedda9e 100644 --- a/conformance/results/pycroscope/annotations_forward_refs.toml +++ b/conformance/results/pycroscope/annotations_forward_refs.toml @@ -1,7 +1,7 @@ conformant = "Partial" notes = """ -Fails to reject "x" | int annotations that fail at runtime -Does not correctly pick up forward refs in unimportable module +Fails to reject "x" | int annotations that fail at runtime. +Rejects some valid quoted annotations. """ conformance_automated = "Fail" errors_diff = """ diff --git a/conformance/results/pycroscope/generics_syntax_scoping.toml b/conformance/results/pycroscope/generics_syntax_scoping.toml index 2b84b12a8..3bff89f05 100644 --- a/conformance/results/pycroscope/generics_syntax_scoping.toml +++ b/conformance/results/pycroscope/generics_syntax_scoping.toml @@ -1,4 +1,7 @@ -conformant = "Unsupported" +conformant = "Partial" +notes = """ +Misses some details of scoping rules. +""" conformance_automated = "Fail" errors_diff = """ Line 18: Expected 1 errors diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 067b3b725..c7f28b5c7 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -8,8 +8,8 @@ import re import shutil import sys +import sysconfig from abc import ABC, abstractmethod -from pathlib import Path from subprocess import PIPE, CalledProcessError, run from typing import Sequence @@ -404,13 +404,13 @@ def install(self) -> bool: return False def get_version(self) -> str: - proc = run([*self._command(), "--version"], stdout=PIPE, text=True) + proc = run([self._command(), "--version"], stdout=PIPE, text=True, check=True) return proc.stdout.strip() @staticmethod - def _command() -> list[str]: + def _command() -> str: executable = "pycroscope.exe" if sys.platform == "win32" else "pycroscope" - return [sys.executable, "-m", "pycroscope"] + return str(Path(sysconfig.get_path("scripts")) / executable) @staticmethod def _normalize_output_line(line: str) -> str: @@ -422,7 +422,7 @@ def _normalize_output_line(line: str) -> str: def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: command = [ - *self._command(), + self._command(), ".", "--output-format", "concise", From dded4da3751236a85a61fa65b1de95fa5e438b67 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 08:09:16 -0700 Subject: [PATCH 76/78] . --- conformance/results/results.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance/results/results.html b/conformance/results/results.html index a176cfc91..1daae9306 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -201,7 +201,7 @@

Python Type System Conformance Test Results

Pass
Partial

Incorrectly generates error for quoted type defined in class scope.

Partial

Types in quotes incorrectly refer to shadowing class member.

Does not reject some type forms that require quotes.

-
Partial

Fails to reject "x" | int annotations that fail at runtime

Does not correctly pick up forward refs in unimportable module

+
Partial

Fails to reject "x" | int annotations that fail at runtime.

Rejects some valid quoted annotations.

Partial

Resolves references in type annotations as referring to end-of-scope types (https://discuss.python.org/t/annotation-string-references-in-class-scope-in-conformance-tests/105439, https://github.com/python/typing/pull/2144)

     annotations_generators @@ -434,7 +434,7 @@

Python Type System Conformance Test Results

Pass Pass Pass -Unsupported +
Partial

Misses some details of scoping rules.

Pass      generics_type_erasure From 4abaf0a51c215413b57970db419f591ae6a63e21 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 08:50:27 -0700 Subject: [PATCH 77/78] adjust --- conformance/pyproject.toml | 2 +- conformance/scripts/bump_type_checkers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance/pyproject.toml b/conformance/pyproject.toml index e0700225d..e44dadf64 100644 --- a/conformance/pyproject.toml +++ b/conformance/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" requires-python = "==3.12.*" dependencies = [ "mypy", - "pycroscope==0.4.0", + "pycroscope", "pyrefly", "pyright", "tomli", diff --git a/conformance/scripts/bump_type_checkers.py b/conformance/scripts/bump_type_checkers.py index fdf859b7a..195b19663 100755 --- a/conformance/scripts/bump_type_checkers.py +++ b/conformance/scripts/bump_type_checkers.py @@ -7,7 +7,7 @@ from subprocess import CalledProcessError, run -TYPE_CHECKERS = ("mypy", "pyright", "zuban", "pyrefly", "ty") +TYPE_CHECKERS = ("mypy", "pyright", "zuban", "pyrefly", "ty", "pycroscope") def main() -> int: From 4ca44b9fffc80a1280a657c5be30940faa04166c Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 2 May 2026 09:32:24 -0700 Subject: [PATCH 78/78] lock --- conformance/uv.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conformance/uv.lock b/conformance/uv.lock index 7ab3b7faa..8b926b991 100644 --- a/conformance/uv.lock +++ b/conformance/uv.lock @@ -206,7 +206,7 @@ dependencies = [ [package.metadata] requires-dist = [ { name = "mypy" }, - { name = "pycroscope", specifier = "==0.4.0" }, + { name = "pycroscope" }, { name = "pyrefly" }, { name = "pyright" }, { name = "tomli" },