Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated conformance test results for mypy 1.10 and pyright 1.1.360. M… (
#1726) Updated conformance test results for mypy 1.10 and pyright 1.1.360. Mypy added partial support for TypeAliasType and TypeIs. Pyright fixed a couple of bugs in constructor call evaluation.
- Loading branch information
Showing
16 changed files
with
79 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,47 @@ | ||
conformant = "Unsupported" | ||
conformant = "Partial" | ||
notes = """ | ||
Support for TypeAliasType is not implemented. | ||
Incorrectly rejects some recursive type aliases using TypeAliasType. | ||
Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition. | ||
Generates error when accessing `__value__` attribute of TypeAliasType. | ||
""" | ||
output = """ | ||
aliases_typealiastype.py:17: error: Type variable "aliases_typealiastype.T" is unbound [valid-type] | ||
aliases_typealiastype.py:17: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) | ||
aliases_typealiastype.py:17: note: (Hint: Use "T" in function signature to bind "T" inside a function) | ||
aliases_typealiastype.py:17: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type] | ||
aliases_typealiastype.py:18: error: Type variable "aliases_typealiastype.T" is unbound [valid-type] | ||
aliases_typealiastype.py:18: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) | ||
aliases_typealiastype.py:18: note: (Hint: Use "T" in function signature to bind "T" inside a function) | ||
aliases_typealiastype.py:18: error: Type variable "aliases_typealiastype.S" is unbound [valid-type] | ||
aliases_typealiastype.py:18: note: (Hint: Use "Generic[S]" or "Protocol[S]" base class to bind "S" inside a class) | ||
aliases_typealiastype.py:18: note: (Hint: Use "S" in function signature to bind "S" inside a function) | ||
aliases_typealiastype.py:18: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type] | ||
aliases_typealiastype.py:19: error: Cannot resolve name "GoodAlias4" (possible cyclic definition) [misc] | ||
aliases_typealiastype.py:19: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type] | ||
aliases_typealiastype.py:22: error: Type variable "aliases_typealiastype.S" is unbound [valid-type] | ||
aliases_typealiastype.py:22: note: (Hint: Use "Generic[S]" or "Protocol[S]" base class to bind "S" inside a class) | ||
aliases_typealiastype.py:22: note: (Hint: Use "S" in function signature to bind "S" inside a function) | ||
aliases_typealiastype.py:20: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc] | ||
aliases_typealiastype.py:22: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc] | ||
aliases_typealiastype.py:22: error: TypeVarTuple "Ts" is unbound [valid-type] | ||
aliases_typealiastype.py:23: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object, object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type] | ||
aliases_typealiastype.py:32: error: "TypeAliasType" has no attribute "other_attrib" [attr-defined] | ||
aliases_typealiastype.py:35: error: Variable "aliases_typealiastype.GoodAlias4" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:35: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases | ||
aliases_typealiastype.py:36: error: Variable "aliases_typealiastype.GoodAlias4" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:36: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases | ||
aliases_typealiastype.py:37: error: Unexpected "..." [misc] | ||
aliases_typealiastype.py:37: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:37: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases | ||
aliases_typealiastype.py:38: error: Unexpected "..." [misc] | ||
aliases_typealiastype.py:38: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:38: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases | ||
aliases_typealiastype.py:39: error: Bracketed expression "[...]" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:39: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:39: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases | ||
aliases_typealiastype.py:39: error: Unpack is only valid in a variadic position [valid-type] | ||
aliases_typealiastype.py:40: error: Unexpected "..." [misc] | ||
aliases_typealiastype.py:40: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:40: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases | ||
aliases_typealiastype.py:43: error: Type variable "aliases_typealiastype.S" is unbound [valid-type] | ||
aliases_typealiastype.py:43: note: (Hint: Use "Generic[S]" or "Protocol[S]" base class to bind "S" inside a class) | ||
aliases_typealiastype.py:43: note: (Hint: Use "S" in function signature to bind "S" inside a function) | ||
aliases_typealiastype.py:43: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type] | ||
aliases_typealiastype.py:44: error: Type variable "aliases_typealiastype.S" is unbound [valid-type] | ||
aliases_typealiastype.py:44: note: (Hint: Use "Generic[S]" or "Protocol[S]" base class to bind "S" inside a class) | ||
aliases_typealiastype.py:44: note: (Hint: Use "S" in function signature to bind "S" inside a function) | ||
aliases_typealiastype.py:45: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type] | ||
aliases_typealiastype.py:46: error: Cannot determine type of "BadAlias4" [has-type] | ||
aliases_typealiastype.py:47: error: Cannot determine type of "BadAlias5" [has-type] | ||
aliases_typealiastype.py:47: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type] | ||
aliases_typealiastype.py:48: error: Cannot determine type of "BadAlias7" [has-type] | ||
aliases_typealiastype.py:27: error: Type variable "T" is not included in type_params [valid-type] | ||
aliases_typealiastype.py:30: error: "type[int]" has no attribute "__value__" [attr-defined] | ||
aliases_typealiastype.py:32: error: "type[int]" has no attribute "other_attrib" [attr-defined] | ||
aliases_typealiastype.py:40: error: Type argument "int" of "GoodAlias5" must be a subtype of "str" [type-var] | ||
aliases_typealiastype.py:43: error: Type variable "S" is not included in type_params [valid-type] | ||
aliases_typealiastype.py:44: error: Type variable "S" is not included in type_params [valid-type] | ||
aliases_typealiastype.py:45: error: Tuple literal expected as the type_params argument to TypeAliasType [misc] | ||
aliases_typealiastype.py:46: error: Cannot resolve name "BadAlias4" (possible cyclic definition) [misc] | ||
aliases_typealiastype.py:47: error: Invalid recursive alias: a union item of itself [misc] | ||
aliases_typealiastype.py:48: error: Cannot resolve name "BadAlias6" (possible cyclic definition) [misc] | ||
aliases_typealiastype.py:48: error: Cannot resolve name "BadAlias7" (possible cyclic definition) [misc] | ||
aliases_typealiastype.py:48: error: Name "BadAlias7" is used before definition [used-before-def] | ||
aliases_typealiastype.py:49: error: Cannot resolve name "BadAlias7" (possible cyclic definition) [misc] | ||
aliases_typealiastype.py:52: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:53: error: Bracketed expression "[...]" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:54: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:55: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:56: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:57: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:58: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:59: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:60: error: Variable "aliases_typealiastype.var1" is not valid as a type [valid-type] | ||
aliases_typealiastype.py:60: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases | ||
aliases_typealiastype.py:61: error: Invalid type: try using Literal[True] instead? [valid-type] | ||
aliases_typealiastype.py:62: error: Invalid type: try using Literal[1] instead? [valid-type] | ||
aliases_typealiastype.py:63: error: Invalid type alias: expression is not a valid type [valid-type] | ||
aliases_typealiastype.py:63: error: Function "list" could always be true in boolean context [truthy-function] | ||
aliases_typealiastype.py:64: error: Invalid type alias: expression is not a valid type [valid-type] | ||
""" | ||
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 64: Expected 1 errors | ||
Line 17: Unexpected errors ['aliases_typealiastype.py:17: error: Type variable "aliases_typealiastype.T" is unbound [valid-type]', 'aliases_typealiastype.py:17: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] | ||
Line 18: Unexpected errors ['aliases_typealiastype.py:18: error: Type variable "aliases_typealiastype.T" is unbound [valid-type]', 'aliases_typealiastype.py:18: error: Type variable "aliases_typealiastype.S" is unbound [valid-type]', 'aliases_typealiastype.py:18: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] | ||
Line 19: Unexpected errors ['aliases_typealiastype.py:19: error: Cannot resolve name "GoodAlias4" (possible cyclic definition) [misc]', 'aliases_typealiastype.py:19: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] | ||
Line 22: Unexpected errors ['aliases_typealiastype.py:22: error: Type variable "aliases_typealiastype.S" is unbound [valid-type]', 'aliases_typealiastype.py:22: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]', 'aliases_typealiastype.py:22: error: TypeVarTuple "Ts" is unbound [valid-type]'] | ||
Line 23: Unexpected errors ['aliases_typealiastype.py:23: error: Argument "type_params" to "TypeAliasType" has incompatible type "tuple[object, object, object, object]"; expected "tuple[TypeVar | ParamSpec | TypeVarTuple, ...]" [arg-type]'] | ||
Line 35: Unexpected errors ['aliases_typealiastype.py:35: error: Variable "aliases_typealiastype.GoodAlias4" is not valid as a type [valid-type]'] | ||
Line 36: Unexpected errors ['aliases_typealiastype.py:36: error: Variable "aliases_typealiastype.GoodAlias4" is not valid as a type [valid-type]'] | ||
Line 37: Unexpected errors ['aliases_typealiastype.py:37: error: Unexpected "..." [misc]', 'aliases_typealiastype.py:37: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type]'] | ||
Line 38: Unexpected errors ['aliases_typealiastype.py:38: error: Unexpected "..." [misc]', 'aliases_typealiastype.py:38: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type]'] | ||
Line 39: Unexpected errors ['aliases_typealiastype.py:39: error: Bracketed expression "[...]" is not valid as a type [valid-type]', 'aliases_typealiastype.py:39: error: Variable "aliases_typealiastype.GoodAlias5" is not valid as a type [valid-type]', 'aliases_typealiastype.py:39: error: Unpack is only valid in a variadic position [valid-type]'] | ||
Line 19: Unexpected errors ['aliases_typealiastype.py:19: error: Cannot resolve name "GoodAlias4" (possible cyclic definition) [misc]'] | ||
Line 20: Unexpected errors ['aliases_typealiastype.py:20: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]'] | ||
Line 22: Unexpected errors ['aliases_typealiastype.py:22: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]'] | ||
Line 27: Unexpected errors ['aliases_typealiastype.py:27: error: Type variable "T" is not included in type_params [valid-type]'] | ||
Line 30: Unexpected errors ['aliases_typealiastype.py:30: error: "type[int]" has no attribute "__value__" [attr-defined]'] | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.