diff --git a/conformance/results/mypy/directives_no_type_check.toml b/conformance/results/mypy/directives_no_type_check.toml index 4a5499ce6..ca52f1382 100644 --- a/conformance/results/mypy/directives_no_type_check.toml +++ b/conformance/results/mypy/directives_no_type_check.toml @@ -1,6 +1,7 @@ conformant = "Partial" notes = """ Does not honor `@no_type_check` class decorator. +Does not reject invalid call of `@no_type_check` function. """ output = """ directives_no_type_check.py:16: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] diff --git a/conformance/results/mypy/generics_typevartuple_args.toml b/conformance/results/mypy/generics_typevartuple_args.toml index 304cbe608..61b53af76 100644 --- a/conformance/results/mypy/generics_typevartuple_args.toml +++ b/conformance/results/mypy/generics_typevartuple_args.toml @@ -1,6 +1,6 @@ conformant = "Partial" notes = """ -Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?). +Does not enforce that tuples captured by TypeVarTuple are same type. """ output = """ generics_typevartuple_args.py:33: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type] diff --git a/conformance/results/mypy/generics_typevartuple_basic.toml b/conformance/results/mypy/generics_typevartuple_basic.toml index 87a14954c..34dd3c61a 100644 --- a/conformance/results/mypy/generics_typevartuple_basic.toml +++ b/conformance/results/mypy/generics_typevartuple_basic.toml @@ -1,7 +1,7 @@ conformant = "Partial" notes = """ Does not enforce that tuples captured by TypeVarTuple are same length. -Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?). +Does not enforce that tuples captured by TypeVarTuple are same type. Does not enforce that tuples captured by TypeVarTuple are invariant in non-tuple class. """ output = """ diff --git a/conformance/results/mypy/protocols_explicit.toml b/conformance/results/mypy/protocols_explicit.toml index ddcbc1f98..bc10278ed 100644 --- a/conformance/results/mypy/protocols_explicit.toml +++ b/conformance/results/mypy/protocols_explicit.toml @@ -5,9 +5,9 @@ Does not report unimplemented attributes for class that explicitly derives from output = """ protocols_explicit.py:27: error: Call to abstract method "draw" of "PColor" with trivial body via super() is unsafe [safe-super] protocols_explicit.py:56: error: Incompatible types in assignment (expression has type "tuple[int, int, str]", base class "RGB" defined the type as "tuple[int, int, int]") [assignment] -protocols_explicit.py:63: error: Cannot instantiate abstract class "Point" with abstract attributes "intensity", "other" and "transparency" [abstract] -protocols_explicit.py:90: error: Cannot instantiate abstract class "Concrete1" with abstract attributes "cm1" and "im1" [abstract] -protocols_explicit.py:108: error: Cannot instantiate abstract class "Concrete3" with abstract attributes "cm10", "cm11" and "im1" [abstract] -protocols_explicit.py:133: error: Cannot instantiate abstract class "Concrete5" with abstract attribute "method1" [abstract] -protocols_explicit.py:163: error: Cannot instantiate abstract class "Concrete7A" with abstract attribute "method1" [abstract] +protocols_explicit.py:59: error: Cannot instantiate abstract class "Point" with abstract attributes "intensity", "other" and "transparency" [abstract] +protocols_explicit.py:86: error: Cannot instantiate abstract class "Concrete1" with abstract attributes "cm1" and "im1" [abstract] +protocols_explicit.py:104: error: Cannot instantiate abstract class "Concrete3" with abstract attributes "cm10", "cm11" and "im1" [abstract] +protocols_explicit.py:129: error: Cannot instantiate abstract class "Concrete5" with abstract attribute "method1" [abstract] +protocols_explicit.py:159: error: Cannot instantiate abstract class "Concrete7A" with abstract attribute "method1" [abstract] """ diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index de222af8b..8b34ca661 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ version = "mypy 1.8.0" -test_duration = 1.3177800178527832 +test_duration = 1.3906440734863281 diff --git a/conformance/results/pyre/protocols_explicit.toml b/conformance/results/pyre/protocols_explicit.toml index 6c058cf51..a1645f2b2 100644 --- a/conformance/results/pyre/protocols_explicit.toml +++ b/conformance/results/pyre/protocols_explicit.toml @@ -5,11 +5,11 @@ Does not report error when method is not implemented in derived class. """ output = """ protocols_explicit.py:54:0 Uninitialized attribute [13]: Attribute `other` inherited from protocol `RGB` in class `Point` to have type `int` but is never initialized. -protocols_explicit.py:63:4 Invalid class instantiation [45]: Cannot instantiate abstract class `Point` with abstract method `intensity`. -protocols_explicit.py:86:0 Uninitialized attribute [13]: Attribute `cm1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized. -protocols_explicit.py:86:0 Uninitialized attribute [13]: Attribute `im1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized. -protocols_explicit.py:101:0 Uninitialized attribute [13]: Attribute `cm10` inherited from protocol `Proto2` in class `Concrete3` to have type `int` but is never initialized. -protocols_explicit.py:101:0 Uninitialized attribute [13]: Attribute `cm11` inherited from protocol `Proto3` in class `Concrete3` to have type `int` but is never initialized. -protocols_explicit.py:101:0 Uninitialized attribute [13]: Attribute `im1` inherited from protocol `Proto1` in class `Concrete3` to have type `int` but is never initialized. -protocols_explicit.py:163:6 Invalid class instantiation [45]: Cannot instantiate abstract class `Concrete7A` with abstract method `method1`. +protocols_explicit.py:59:4 Invalid class instantiation [45]: Cannot instantiate abstract class `Point` with abstract method `intensity`. +protocols_explicit.py:82:0 Uninitialized attribute [13]: Attribute `cm1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized. +protocols_explicit.py:82:0 Uninitialized attribute [13]: Attribute `im1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized. +protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `cm10` inherited from protocol `Proto2` in class `Concrete3` to have type `int` but is never initialized. +protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `cm11` inherited from protocol `Proto3` in class `Concrete3` to have type `int` but is never initialized. +protocols_explicit.py:97:0 Uninitialized attribute [13]: Attribute `im1` inherited from protocol `Proto1` in class `Concrete3` to have type `int` but is never initialized. +protocols_explicit.py:159:6 Invalid class instantiation [45]: Cannot instantiate abstract class `Concrete7A` with abstract method `method1`. """ diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index b7b3f9770..1495b959a 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.19" -test_duration = 2.2062928676605225 +test_duration = 2.216038227081299 diff --git a/conformance/results/pyright/aliases_explicit.toml b/conformance/results/pyright/aliases_explicit.toml index a90f7e995..7d185bbcc 100644 --- a/conformance/results/pyright/aliases_explicit.toml +++ b/conformance/results/pyright/aliases_explicit.toml @@ -30,13 +30,13 @@ aliases_explicit.py:85:21 - error: List expression not allowed in type annotatio   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) aliases_explicit.py:85:21 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) aliases_explicit.py:86:21 - error: Invalid expression form for type alias definition (reportGeneralTypeIssues) -aliases_explicit.py:86:21 - error: Ternary expression not allowed in type annotation +aliases_explicit.py:86:21 - error: Ternary expression not allowed in type annotation (reportGeneralTypeIssues) aliases_explicit.py:87:21 - error: Variable not allowed in type expression (reportGeneralTypeIssues) aliases_explicit.py:88:22 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) aliases_explicit.py:89:22 - error: Invalid expression form for type alias definition (reportGeneralTypeIssues) aliases_explicit.py:89:22 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) aliases_explicit.py:90:22 - error: Invalid expression form for type alias definition (reportGeneralTypeIssues) -aliases_explicit.py:90:22 - error: Binary operator not allowed in type annotation +aliases_explicit.py:90:22 - error: Binary operator not allowed in type annotation (reportGeneralTypeIssues) aliases_explicit.py:91:22 - error: Expected expression aliases_explicit.py:91:22 - error: Tuple expression not allowed in type annotation   Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/aliases_newtype.toml b/conformance/results/pyright/aliases_newtype.toml index 38026101f..7ea7f4a97 100644 --- a/conformance/results/pyright/aliases_newtype.toml +++ b/conformance/results/pyright/aliases_newtype.toml @@ -1,7 +1,4 @@ -conformant = "Partial" -notes = """ -Rejects use of NewType created with another NewType. -""" +conformant = "Pass" output = """ aliases_newtype.py:11:8 - error: Argument of type "Literal['user']" cannot be assigned to parameter "_x" of type "int" in function "__init__"   "Literal['user']" is incompatible with "int" (reportGeneralTypeIssues) @@ -11,13 +8,12 @@ aliases_newtype.py:20:16 - error: Second argument to "isinstance" must be a clas   Class created with NewType cannot be used with instance and class checks (reportGeneralTypeIssues) aliases_newtype.py:23:21 - error: Base class "UserId" is marked final and cannot be subclassed aliases_newtype.py:32:1 - error: NewType must be assigned to a variable with the same name (reportGeneralTypeIssues) -aliases_newtype.py:36:40 - error: NewType cannot be used with a class created with NewType aliases_newtype.py:38:19 - error: Expected no type arguments for class "GoodNewType1" (reportGeneralTypeIssues) -aliases_newtype.py:44:38 - error: Expected class as second argument to NewType +aliases_newtype.py:44:38 - error: Expected class as second argument to NewType (reportGeneralTypeIssues) aliases_newtype.py:47:43 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues) -aliases_newtype.py:49:38 - error: NewType cannot be used with structural type (a protocol or TypedDict class) -aliases_newtype.py:51:38 - error: NewType cannot be used with Literal type -aliases_newtype.py:58:38 - error: NewType cannot be used with structural type (a protocol or TypedDict class) +aliases_newtype.py:49:38 - error: NewType cannot be used with structural type (a protocol or TypedDict class) (reportGeneralTypeIssues) +aliases_newtype.py:51:38 - error: NewType cannot be used with Literal type (reportGeneralTypeIssues) +aliases_newtype.py:58:38 - error: NewType cannot be used with structural type (a protocol or TypedDict class) (reportGeneralTypeIssues) aliases_newtype.py:60:15 - error: NewType requires two positional arguments (reportGeneralTypeIssues) aliases_newtype.py:62:38 - error: The second argument to NewType must be a known class, not Any or Unknown (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/aliases_type_statement.toml b/conformance/results/pyright/aliases_type_statement.toml index d4c64611c..3a1e7a599 100644 --- a/conformance/results/pyright/aliases_type_statement.toml +++ b/conformance/results/pyright/aliases_type_statement.toml @@ -1,16 +1,13 @@ conformant = "Pass" output = """ -aliases_type_statement.py:17:12 - error: Cannot access member "bit_count" for type "TypeAliasType" +aliases_type_statement.py:17:12 - error: Cannot access member "bit_count" for type "type[TypeAliasType]"   Member "bit_count" is unknown (reportGeneralTypeIssues) -aliases_type_statement.py:19:1 - error: Object of type "TypeAliasType" is not callable (reportGeneralTypeIssues) -aliases_type_statement.py:23:18 - error: Cannot access member "other_attrib" for type "TypeAliasType" +aliases_type_statement.py:19:1 - error: Object of type "type[int]" is not callable (reportGeneralTypeIssues) +aliases_type_statement.py:23:18 - error: Cannot access member "other_attrib" for type "type[TypeAliasType]"   Member "other_attrib" is unknown (reportGeneralTypeIssues) -aliases_type_statement.py:26:18 - error: Expected type expression but received "TypeAliasType" (reportGeneralTypeIssues) -aliases_type_statement.py:31:22 - error: Argument of type "TypeAliasType" cannot be assigned to parameter "__class_or_tuple" of type "_ClassInfo" in function "isinstance" -  Type "TypeAliasType" cannot be assigned to type "_ClassInfo" -    "TypeAliasType" is incompatible with "type" -    "TypeAliasType" is incompatible with "UnionType" -    "TypeAliasType" is incompatible with "tuple[_ClassInfo, ...]" (reportGeneralTypeIssues) +aliases_type_statement.py:26:18 - error: A type alias defined in a "type" statement cannot be used as a base class +aliases_type_statement.py:31:22 - error: Second argument to "isinstance" must be a class or tuple of classes +  Type alias created with "type" statement cannot be used with instance and class checks (reportGeneralTypeIssues) aliases_type_statement.py:37:22 - error: Call expression not allowed in type expression (reportGeneralTypeIssues) aliases_type_statement.py:38:22 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) @@ -27,16 +24,16 @@ aliases_type_statement.py:42:22 - error: Call expression not allowed in type exp aliases_type_statement.py:43:22 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) aliases_type_statement.py:43:22 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) -aliases_type_statement.py:44:22 - error: Ternary expression not allowed in type annotation +aliases_type_statement.py:44:22 - error: Ternary expression not allowed in type annotation (reportGeneralTypeIssues) aliases_type_statement.py:45:22 - error: Variable not allowed in type expression (reportGeneralTypeIssues) aliases_type_statement.py:46:23 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) aliases_type_statement.py:47:23 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) -aliases_type_statement.py:48:23 - error: Binary operator not allowed in type annotation +aliases_type_statement.py:48:23 - error: Binary operator not allowed in type annotation (reportGeneralTypeIssues) aliases_type_statement.py:49:23 - error: Expected expression aliases_type_statement.py:49:23 - error: Tuple expression not allowed in type annotation   Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) aliases_type_statement.py:52:10 - error: Type alias declaration "BadTypeAlias14" is obscured by a declaration of the same name (reportGeneralTypeIssues) -aliases_type_statement.py:58:10 - error: A type statement can be used only within a module or class scope +aliases_type_statement.py:58:10 - error: A type statement can be used only within a module or class scope (reportGeneralTypeIssues) aliases_type_statement.py:64:23 - error: Type parameter "V" is not included in the type parameter list for "TA1" (reportGeneralTypeIssues) aliases_type_statement.py:69:17 - error: Type parameter "T1" is not included in the type parameter list for "TA2" (reportGeneralTypeIssues) aliases_type_statement.py:79:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" diff --git a/conformance/results/pyright/aliases_typealiastype.toml b/conformance/results/pyright/aliases_typealiastype.toml index a71693625..0713483a6 100644 --- a/conformance/results/pyright/aliases_typealiastype.toml +++ b/conformance/results/pyright/aliases_typealiastype.toml @@ -1,6 +1,6 @@ conformant = "Pass" output = """ -aliases_typealiastype.py:32:18 - error: Cannot access member "other_attrib" for type "TypeAliasType" +aliases_typealiastype.py:32:18 - error: Cannot access member "other_attrib" for type "type[TypeAliasType]"   Member "other_attrib" is unknown (reportGeneralTypeIssues) aliases_typealiastype.py:40:5 - error: Could not specialize type "GoodAlias5[S@GoodAlias5, TStr@GoodAlias5, P@GoodAlias5, Ts@GoodAlias5]"   Type "int" cannot be assigned to type "str" @@ -20,11 +20,11 @@ aliases_typealiastype.py:63:42 - error: Call expression not allowed in type expr aliases_typealiastype.py:64:42 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) aliases_typealiastype.py:64:42 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) -aliases_typealiastype.py:65:42 - error: Ternary expression not allowed in type annotation +aliases_typealiastype.py:65:42 - error: Ternary expression not allowed in type annotation (reportGeneralTypeIssues) aliases_typealiastype.py:66:42 - error: Variable not allowed in type expression (reportGeneralTypeIssues) aliases_typealiastype.py:67:42 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) aliases_typealiastype.py:68:42 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) -aliases_typealiastype.py:69:42 - error: Binary operator not allowed in type annotation +aliases_typealiastype.py:69:42 - error: Binary operator not allowed in type annotation (reportGeneralTypeIssues) aliases_typealiastype.py:70:42 - error: Expected expression aliases_typealiastype.py:70:42 - error: Tuple expression not allowed in type annotation   Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/annotations_forward_refs.toml b/conformance/results/pyright/annotations_forward_refs.toml index 1ace3b6bc..e2a7b869a 100644 --- a/conformance/results/pyright/annotations_forward_refs.toml +++ b/conformance/results/pyright/annotations_forward_refs.toml @@ -20,12 +20,12 @@ annotations_forward_refs.py:46:10 - error: Call expression not allowed in type e annotations_forward_refs.py:47:10 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) annotations_forward_refs.py:47:10 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) -annotations_forward_refs.py:48:10 - error: Ternary expression not allowed in type annotation +annotations_forward_refs.py:48:10 - error: Ternary expression not allowed in type annotation (reportGeneralTypeIssues) annotations_forward_refs.py:49:10 - error: Variable not allowed in type expression (reportGeneralTypeIssues) annotations_forward_refs.py:50:11 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) annotations_forward_refs.py:51:11 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) -annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type annotation -annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type annotation +annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type annotation (reportGeneralTypeIssues) +annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type annotation (reportGeneralTypeIssues) annotations_forward_refs.py:54:11 - error: Expected expression annotations_forward_refs.py:54:11 - error: Tuple expression not allowed in type annotation   Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/annotations_typeexpr.toml b/conformance/results/pyright/annotations_typeexpr.toml index bf313b95f..25f3d4f1a 100644 --- a/conformance/results/pyright/annotations_typeexpr.toml +++ b/conformance/results/pyright/annotations_typeexpr.toml @@ -16,12 +16,12 @@ annotations_typeexpr.py:93:9 - error: Call expression not allowed in type expres annotations_typeexpr.py:94:9 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) annotations_typeexpr.py:94:9 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) -annotations_typeexpr.py:95:9 - error: Ternary expression not allowed in type annotation +annotations_typeexpr.py:95:9 - error: Ternary expression not allowed in type annotation (reportGeneralTypeIssues) annotations_typeexpr.py:96:9 - error: Variable not allowed in type expression (reportGeneralTypeIssues) annotations_typeexpr.py:97:10 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) annotations_typeexpr.py:98:10 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) -annotations_typeexpr.py:99:10 - error: Unary operator not allowed in type annotation -annotations_typeexpr.py:100:10 - error: Binary operator not allowed in type annotation +annotations_typeexpr.py:99:10 - error: Unary operator not allowed in type annotation (reportGeneralTypeIssues) +annotations_typeexpr.py:100:10 - error: Binary operator not allowed in type annotation (reportGeneralTypeIssues) annotations_typeexpr.py:101:10 - error: Expected expression annotations_typeexpr.py:101:10 - error: Tuple expression not allowed in type annotation   Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/classes_classvar.toml b/conformance/results/pyright/classes_classvar.toml index b22f8b0de..ed65b1b19 100644 --- a/conformance/results/pyright/classes_classvar.toml +++ b/conformance/results/pyright/classes_classvar.toml @@ -20,7 +20,6 @@ classes_classvar.py:100:14 - error: Cannot assign member "stats" for type "Stars     Member "__set__" is unknown (reportGeneralTypeIssues) classes_classvar.py:129:13 - error: Expression of type "ProtoAImpl" cannot be assigned to declared type "ProtoA"   "ProtoAImpl" is incompatible with protocol "ProtoA" -    "y" is not a class variable -      "x" is defined as a ClassVar in protocol -      "y" is defined as a ClassVar in protocol (reportGeneralTypeIssues) +    "x" is defined as a ClassVar in protocol +    "y" is defined as a ClassVar in protocol (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/directives_no_type_check.toml b/conformance/results/pyright/directives_no_type_check.toml index 0d6c17e0b..a317ab8dd 100644 --- a/conformance/results/pyright/directives_no_type_check.toml +++ b/conformance/results/pyright/directives_no_type_check.toml @@ -1,16 +1,9 @@ -conformant = "Unsupported" +conformant = "Partial" notes = """ -Intentionally does not honor @no_type_check decorator. +Does not honor `@no_type_check` class decorator. """ output = """ directives_no_type_check.py:16:14 - error: Expression of type "Literal['']" cannot be assigned to declared type "int"   "Literal['']" is incompatible with "int" (reportGeneralTypeIssues) -directives_no_type_check.py:21:9 - error: Operator "+" not supported for types "int" and "str" (reportGeneralTypeIssues) -directives_no_type_check.py:22:12 - error: Expression of type "Literal[1]" cannot be assigned to return type "None" -  "Literal[1]" is incompatible with "None" (reportGeneralTypeIssues) -directives_no_type_check.py:25:7 - error: Argument of type "Literal[b"invalid"]" cannot be assigned to parameter "a" of type "int" in function "func1" -  "Literal[b"invalid"]" is incompatible with "int" (reportGeneralTypeIssues) -directives_no_type_check.py:25:19 - error: Argument of type "Literal[b"arguments"]" cannot be assigned to parameter "b" of type "str" in function "func1" -  "Literal[b"arguments"]" is incompatible with "str" (reportGeneralTypeIssues) directives_no_type_check.py:26:1 - error: Arguments missing for parameters "a", "b" (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/generics_paramspec_components.toml b/conformance/results/pyright/generics_paramspec_components.toml index 5bf4e87b5..afdff7b74 100644 --- a/conformance/results/pyright/generics_paramspec_components.toml +++ b/conformance/results/pyright/generics_paramspec_components.toml @@ -3,15 +3,15 @@ output = """ generics_paramspec_components.py:17:25 - error: "kwargs" member of ParamSpec is valid only when used with **kwargs parameter generics_paramspec_components.py:17:45 - error: "args" member of ParamSpec is valid only when used with *args parameter generics_paramspec_components.py:20:23 - error: "args" member of ParamSpec is valid only when used with *args parameter -generics_paramspec_components.py:23:28 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature +generics_paramspec_components.py:23:28 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues) generics_paramspec_components.py:23:46 - error: "args" member of ParamSpec is valid only when used with *args parameter -generics_paramspec_components.py:26:28 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature +generics_paramspec_components.py:26:28 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues) generics_paramspec_components.py:30:25 - error: ParamSpec "P" has no meaning in this context (reportGeneralTypeIssues) generics_paramspec_components.py:30:43 - error: ParamSpec "P" has no meaning in this context (reportGeneralTypeIssues) generics_paramspec_components.py:35:18 - error: "args" member of ParamSpec is valid only when used with *args parameter generics_paramspec_components.py:36:20 - error: "kwargs" member of ParamSpec is valid only when used with **kwargs parameter -generics_paramspec_components.py:38:26 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature -generics_paramspec_components.py:41:31 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature +generics_paramspec_components.py:38:26 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues) +generics_paramspec_components.py:41:31 - error: "args" and "kwargs" members of ParamSpec must both appear within a function signature (reportGeneralTypeIssues) generics_paramspec_components.py:49:9 - error: Arguments for ParamSpec "P@decorator" are missing (reportGeneralTypeIssues) generics_paramspec_components.py:51:11 - error: Expected 0 positional arguments (reportGeneralTypeIssues) generics_paramspec_components.py:60:28 - error: Keyword parameter "s" cannot appear in signature after ParamSpec args parameter (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/generics_typevartuple_args.toml b/conformance/results/pyright/generics_typevartuple_args.toml index a138ad422..271c2ad2b 100644 --- a/conformance/results/pyright/generics_typevartuple_args.toml +++ b/conformance/results/pyright/generics_typevartuple_args.toml @@ -1,6 +1,6 @@ conformant = "Partial" notes = """ -Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?). +Does not enforce that tuples captured by TypeVarTuple are same type. """ output = """ generics_typevartuple_args.py:33:16 - error: Argument of type "Literal['']" cannot be assigned to parameter of type "Env" in function "exec_le" diff --git a/conformance/results/pyright/generics_typevartuple_basic.toml b/conformance/results/pyright/generics_typevartuple_basic.toml index e48282ce7..8881e5db2 100644 --- a/conformance/results/pyright/generics_typevartuple_basic.toml +++ b/conformance/results/pyright/generics_typevartuple_basic.toml @@ -1,6 +1,6 @@ conformant = "Partial" notes = """ -Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?). +Does not enforce that tuples captured by TypeVarTuple are same type. """ output = """ generics_typevartuple_basic.py:42:34 - error: Argument of type "Height" cannot be assigned to parameter "shape" of type "tuple[*Shape@Array]" in function "__init__" diff --git a/conformance/results/pyright/generics_typevartuple_specialization.toml b/conformance/results/pyright/generics_typevartuple_specialization.toml index 05e0aca27..47e23b8b8 100644 --- a/conformance/results/pyright/generics_typevartuple_specialization.toml +++ b/conformance/results/pyright/generics_typevartuple_specialization.toml @@ -1,10 +1,11 @@ conformant = "Partial" notes = """ Incorrectly evaluates generic alias with TypeVarTuple if no type arguments are supplied. -Incorrectly evaluates tuple split across a TypeVarTuple and a TypeVar. """ output = """ -generics_typevartuple_specialization.py:95:17 - error: "assert_type" mismatch: expected "tuple[Any, *tuple[Any, ...]]" but received "tuple[Unknown, Unknown]" (reportGeneralTypeIssues) +generics_typevartuple_specialization.py:85:43 - error: Argument of type "FloatArray[Unknown]" cannot be assigned to parameter "y" of type "FloatArray[Height, Width]" in function "takes_float_array_with_specific_shape" +  "FloatArray[Unknown]" is incompatible with "FloatArray[Height, Width]" +    Type parameter "Shape@Array2" is invariant, but "*tuple[Unknown, ...]" is not the same as "*tuple[Height, Width]" (reportGeneralTypeIssues) generics_typevartuple_specialization.py:109:18 - error: Type variable "Ts" has no meaning in this context (reportGeneralTypeIssues) generics_typevartuple_specialization.py:109:18 - error: Could not specialize type "IntTupleGeneric[T@IntTupleGeneric]"   Unpacked arguments cannot be used in type argument lists @@ -13,9 +14,6 @@ generics_typevartuple_specialization.py:110:18 - error: Could not specialize typ generics_typevartuple_specialization.py:121:27 - error: Type argument list can have at most one unpacked TypeVarTuple or Tuple generics_typevartuple_specialization.py:122:27 - error: Type argument list can have at most one unpacked TypeVarTuple or Tuple generics_typevartuple_specialization.py:127:9 - error: Too few type arguments provided for "TA7[*Ts@TA7, T1@TA7, T2@TA7]"; expected 3 but received 2 -generics_typevartuple_specialization.py:153:13 - error: Could not specialize type "TA9[*Ts@TA9, T1@TA9]" -  Unpacked arguments cannot be used in type argument lists -generics_typevartuple_specialization.py:157:17 - error: "assert_type" mismatch: expected "tuple[*tuple[int, ...], int]" but received "tuple[Unknown]" (reportGeneralTypeIssues) generics_typevartuple_specialization.py:163:14 - error: Could not specialize type "TA11[T@TA11, *Ts1@TA11]"   Unpacked arguments cannot be used in type argument lists """ diff --git a/conformance/results/pyright/literals_parameterizations.toml b/conformance/results/pyright/literals_parameterizations.toml index d07cde4d5..c9332cb28 100644 --- a/conformance/results/pyright/literals_parameterizations.toml +++ b/conformance/results/pyright/literals_parameterizations.toml @@ -1,9 +1,5 @@ -conformant = "Partial" -notes = """ -Rejects integer Literal with unary `+` operator. -""" +conformant = "Pass" output = """ -literals_parameterizations.py:20:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:41:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:42:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:43:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value diff --git a/conformance/results/pyright/protocols_class_objects.toml b/conformance/results/pyright/protocols_class_objects.toml index b759d2dfd..dd48df05e 100644 --- a/conformance/results/pyright/protocols_class_objects.toml +++ b/conformance/results/pyright/protocols_class_objects.toml @@ -1,8 +1,4 @@ -conformant = "Partial" -notes = """ -Incorrectly reports some class objects as incompatible with a protocol. -Fails to report some class objects as incompatible with a protocol. -""" +conformant = "Pass" output = """ protocols_class_objects.py:29:5 - error: Argument of type "type[Proto]" cannot be assigned to parameter "cls" of type "type[Proto]" in function "fun"   "Proto" is not a concrete class type and cannot be assigned to type "type[Proto]" (reportGeneralTypeIssues) @@ -19,10 +15,12 @@ protocols_class_objects.py:58:16 - error: Expression of type "type[ConcreteA]" c protocols_class_objects.py:74:16 - error: Expression of type "type[ConcreteB]" cannot be assigned to declared type "ProtoB1"   "prop1" is an incompatible type     "property" is incompatible with "int" (reportGeneralTypeIssues) -protocols_class_objects.py:102:16 - error: Expression of type "type[ConcreteC1]" cannot be assigned to declared type "ProtoC2" -  "attr1" is not defined as a ClassVar in protocol (reportGeneralTypeIssues) +protocols_class_objects.py:101:16 - error: Expression of type "type[ConcreteC1]" cannot be assigned to declared type "ProtoC1" +  "attr1" is defined as a ClassVar in protocol (reportGeneralTypeIssues) protocols_class_objects.py:103:16 - error: Expression of type "type[ConcreteC2]" cannot be assigned to declared type "ProtoC1"   "attr1" is defined as a ClassVar in protocol (reportGeneralTypeIssues) +protocols_class_objects.py:104:16 - error: Expression of type "type[ConcreteC2]" cannot be assigned to declared type "ProtoC2" +  "attr1" must be defined as a ClassVar to be compatible with protocol (reportGeneralTypeIssues) protocols_class_objects.py:105:16 - error: Expression of type "type[ConcreteC3]" cannot be assigned to declared type "ProtoC1"   "attr1" is defined as a ClassVar in protocol (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/protocols_explicit.toml b/conformance/results/pyright/protocols_explicit.toml index 5cd0f61a7..5ca0fc382 100644 --- a/conformance/results/pyright/protocols_explicit.toml +++ b/conformance/results/pyright/protocols_explicit.toml @@ -1,27 +1,21 @@ -conformant = "Partial" -notes = """ -Reports protocol incompatibility at time of class declaration rather than treating class as abstract. -""" +conformant = "Pass" output = """ protocols_explicit.py:27:16 - error: Method "draw" cannot be called because it is abstract and unimplemented (reportGeneralTypeIssues) -protocols_explicit.py:54:7 - error: Class derives from one or more protocol classes but does not implement all required members -  Member "other" is declared in protocol class "RGB" -  Member "transparency" is declared in protocol class "RGB" (reportGeneralTypeIssues) protocols_explicit.py:56:32 - error: Cannot assign member "rgb" for type "Point*"   "str" is incompatible with "int" (reportGeneralTypeIssues) -protocols_explicit.py:63:5 - error: Cannot instantiate abstract class "Point" -  "RGB.intensity" is abstract (reportGeneralTypeIssues) -protocols_explicit.py:86:7 - error: Class derives from one or more protocol classes but does not implement all required members -  Member "cm1" is declared in protocol class "Proto1" -  Member "im1" is declared in protocol class "Proto1" (reportGeneralTypeIssues) -protocols_explicit.py:101:7 - error: Class derives from one or more protocol classes but does not implement all required members -  Member "im1" is declared in protocol class "Proto1" -  Member "cm10" is declared in protocol class "Proto2" -  Member "cm11" is declared in protocol class "Proto3" (reportGeneralTypeIssues) -protocols_explicit.py:129:7 - error: Class derives from one or more protocol classes but does not implement all required members -  Member "method1" is declared in protocol class "Proto5" (reportGeneralTypeIssues) -protocols_explicit.py:159:7 - error: Class derives from one or more protocol classes but does not implement all required members -  Member "method1" is declared in protocol class "Proto7" (reportGeneralTypeIssues) -protocols_explicit.py:163:7 - error: Cannot instantiate abstract class "Concrete7A" -  "Proto7.method1" is abstract (reportGeneralTypeIssues) +protocols_explicit.py:59:5 - error: Cannot instantiate abstract class "Point" +  "RGB.other" is not implemented +  "RGB.intensity" is not implemented +  and 1 more... (reportGeneralTypeIssues) +protocols_explicit.py:86:6 - error: Cannot instantiate abstract class "Concrete1" +  "Proto1.cm1" is not implemented +  "Proto1.im1" is not implemented (reportGeneralTypeIssues) +protocols_explicit.py:104:6 - error: Cannot instantiate abstract class "Concrete3" +  "Proto2.cm10" is not implemented +  "Proto3.cm11" is not implemented +  and 1 more... (reportGeneralTypeIssues) +protocols_explicit.py:129:6 - error: Cannot instantiate abstract class "Concrete5" +  "Proto5.method1" is not implemented (reportGeneralTypeIssues) +protocols_explicit.py:159:7 - error: Cannot instantiate abstract class "Concrete7A" +  "Proto7.method1" is not implemented (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/protocols_merging.toml b/conformance/results/pyright/protocols_merging.toml index dc01ab41e..339e5bc53 100644 --- a/conformance/results/pyright/protocols_merging.toml +++ b/conformance/results/pyright/protocols_merging.toml @@ -8,9 +8,9 @@ protocols_merging.py:53:25 - error: Expression of type "SCConcrete2" cannot be a     "__len__" is not present (reportGeneralTypeIssues) protocols_merging.py:54:25 - error: Expression of type "SCConcrete2" cannot be assigned to declared type "SizedAndClosable3"   "SCConcrete2" is incompatible with "SizedAndClosable3" (reportGeneralTypeIssues) -protocols_merging.py:68:16 - error: Protocol class "BadProto" cannot derive from non-protocol class "SizedAndClosable3" +protocols_merging.py:68:16 - error: Protocol class "BadProto" cannot derive from non-protocol class "SizedAndClosable3" (reportGeneralTypeIssues) protocols_merging.py:83:5 - error: Cannot instantiate abstract class "SizedAndClosable4" -  "SizedAndClosable4.close" is abstract (reportGeneralTypeIssues) +  "SizedAndClosable4.close" is not implemented (reportGeneralTypeIssues) protocols_merging.py:84:24 - error: Expression of type "SCConcrete1" cannot be assigned to declared type "SizedAndClosable4"   "SCConcrete1" is incompatible with "SizedAndClosable4" (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/protocols_runtime_checkable.toml b/conformance/results/pyright/protocols_runtime_checkable.toml index c0dcd70f7..1ae7af6a8 100644 --- a/conformance/results/pyright/protocols_runtime_checkable.toml +++ b/conformance/results/pyright/protocols_runtime_checkable.toml @@ -1,11 +1,9 @@ -conformant = "Partial" -notes = """ -Does not reject issubclass call for data protocol if included in tuple. -""" +conformant = "Pass" output = """ protocols_runtime_checkable.py:23:22 - error: Second argument to "isinstance" must be a class or tuple of classes   Protocol class must be @runtime_checkable to be used with instance and class checks (reportGeneralTypeIssues) protocols_runtime_checkable.py:55:22 - error: Data protocols (which include non-method attributes) are not allowed in issubclass calls (reportGeneralTypeIssues) +protocols_runtime_checkable.py:61:22 - error: Data protocols (which include non-method attributes) are not allowed in issubclass calls (reportGeneralTypeIssues) protocols_runtime_checkable.py:88:19 - error: Class overlaps "Proto3" unsafely and could produce a match at runtime   Attributes of "Concrete3A" have the same names as the protocol (reportGeneralTypeIssues) protocols_runtime_checkable.py:92:9 - error: Class overlaps "Proto3" unsafely and could produce a match at runtime diff --git a/conformance/results/pyright/protocols_variance.toml b/conformance/results/pyright/protocols_variance.toml index 3ca70b876..5033905d4 100644 --- a/conformance/results/pyright/protocols_variance.toml +++ b/conformance/results/pyright/protocols_variance.toml @@ -1,7 +1,4 @@ -conformant = "Partial" -notes = """ -Calculates incorrect variance when `self` or `cls` have explicit annotation. -""" +conformant = "Pass" output = """ protocols_variance.py:21:7 - warning: Type variable "T1" used in generic protocol "AnotherBox" should be covariant (reportInvalidTypeVarUse) protocols_variance.py:40:7 - warning: Type variable "T3" used in generic protocol "Protocol2" should be contravariant (reportInvalidTypeVarUse) @@ -12,5 +9,4 @@ protocols_variance.py:66:7 - warning: Type variable "T1" used in generic protoco protocols_variance.py:71:7 - warning: Type variable "T1_contra" used in generic protocol "Protocol7" should be covariant (reportInvalidTypeVarUse) protocols_variance.py:72:21 - error: Contravariant type variable cannot be used in return type (reportGeneralTypeIssues) protocols_variance.py:104:7 - warning: Type variable "T1" used in generic protocol "Protocol12" should be covariant (reportInvalidTypeVarUse) -protocols_variance.py:110:7 - warning: Type variable "T1_contra" used in generic protocol "Protocol13" should be invariant (reportInvalidTypeVarUse) """ diff --git a/conformance/results/pyright/qualifiers_annotated.toml b/conformance/results/pyright/qualifiers_annotated.toml index dd52a4a2e..1c65aeb6e 100644 --- a/conformance/results/pyright/qualifiers_annotated.toml +++ b/conformance/results/pyright/qualifiers_annotated.toml @@ -10,11 +10,11 @@ qualifiers_annotated.py:45:17 - error: Call expression not allowed in type expre qualifiers_annotated.py:46:17 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) qualifiers_annotated.py:46:17 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) -qualifiers_annotated.py:47:17 - error: Ternary expression not allowed in type annotation +qualifiers_annotated.py:47:17 - error: Ternary expression not allowed in type annotation (reportGeneralTypeIssues) qualifiers_annotated.py:48:17 - error: "var1" is not defined (reportUndefinedVariable) qualifiers_annotated.py:49:17 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) qualifiers_annotated.py:50:18 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) -qualifiers_annotated.py:51:18 - error: Binary operator not allowed in type annotation +qualifiers_annotated.py:51:18 - error: Binary operator not allowed in type annotation (reportGeneralTypeIssues) qualifiers_annotated.py:52:18 - error: Expected expression qualifiers_annotated.py:52:18 - error: Tuple expression not allowed in type annotation   Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/qualifiers_final_annotation.toml b/conformance/results/pyright/qualifiers_final_annotation.toml index 4adbf594b..91de379b6 100644 --- a/conformance/results/pyright/qualifiers_final_annotation.toml +++ b/conformance/results/pyright/qualifiers_final_annotation.toml @@ -1,9 +1,9 @@ conformant = "Pass" output = """ -qualifiers_final_annotation.py:16:1 - error: "BAD1" is declared Final, but value is not assigned +qualifiers_final_annotation.py:16:1 - error: "BAD1" is declared Final, but value is not assigned (reportGeneralTypeIssues) qualifiers_final_annotation.py:18:7 - error: Expected a single type argument after "Final" -qualifiers_final_annotation.py:34:5 - error: "ID2" is declared Final, but value is not assigned -qualifiers_final_annotation.py:38:5 - error: "ID3" is declared Final, but value is not assigned +qualifiers_final_annotation.py:34:5 - error: "ID2" is declared Final, but value is not assigned (reportGeneralTypeIssues) +qualifiers_final_annotation.py:38:5 - error: "ID3" is declared Final, but value is not assigned (reportGeneralTypeIssues) qualifiers_final_annotation.py:54:14 - error: Cannot assign member "ID5" for type "ClassA*"   Member "ID5" cannot be assigned through a class instance because it is a ClassVar     Member "__set__" is unknown (reportGeneralTypeIssues) @@ -17,11 +17,11 @@ qualifiers_final_annotation.py:67:14 - error: Cannot assign member "ID7" for typ   Member "ID7" cannot be assigned through a class instance because it is a ClassVar   "ID7" is declared as Final and cannot be reassigned     Member "__set__" is unknown (reportGeneralTypeIssues) -qualifiers_final_annotation.py:71:1 - error: "RATE" is declared as Final and cannot be reassigned +qualifiers_final_annotation.py:71:1 - error: "RATE" is declared as Final and cannot be reassigned (reportGeneralTypeIssues) qualifiers_final_annotation.py:81:8 - error: Cannot assign member "DEFAULT_ID" for type "type[ClassB]"   "DEFAULT_ID" is declared as Final and cannot be reassigned     Member "__set__" is unknown (reportGeneralTypeIssues) -qualifiers_final_annotation.py:94:5 - error: "BORDER_WIDTH" cannot be redeclared because parent class "ClassC" declares it as Final +qualifiers_final_annotation.py:94:5 - error: "BORDER_WIDTH" cannot be redeclared because parent class "ClassC" declares it as Final (reportGeneralTypeIssues) qualifiers_final_annotation.py:107:22 - error: "Final" is not allowed in this context qualifiers_final_annotation.py:108:19 - error: "ClassVar" is not allowed in this context qualifiers_final_annotation.py:118:9 - error: "Final" is not allowed in this context @@ -32,7 +32,7 @@ qualifiers_final_annotation.py:135:5 - error: Argument of type "Literal['']" can   "Literal['']" is incompatible with "int" (reportGeneralTypeIssues) qualifiers_final_annotation.py:135:11 - error: Argument of type "Literal['']" cannot be assigned to parameter "y" of type "int" in function "__new__"   "Literal['']" is incompatible with "int" (reportGeneralTypeIssues) -qualifiers_final_annotation.py:141:5 - error: "ID1" is declared as Final and cannot be reassigned +qualifiers_final_annotation.py:141:5 - error: "ID1" is declared as Final and cannot be reassigned (reportGeneralTypeIssues) qualifiers_final_annotation.py:145:5 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues) qualifiers_final_annotation.py:147:10 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues) qualifiers_final_annotation.py:149:9 - error: "x" is declared as Final and cannot be reassigned (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/qualifiers_final_decorator.toml b/conformance/results/pyright/qualifiers_final_decorator.toml index 903bf2a5c..e3562c23c 100644 --- a/conformance/results/pyright/qualifiers_final_decorator.toml +++ b/conformance/results/pyright/qualifiers_final_decorator.toml @@ -2,14 +2,14 @@ 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 -qualifiers_final_decorator.py:56:9 - error: Method "method1" cannot override final method defined in class "Base2" -qualifiers_final_decorator.py:60:9 - error: Method "method2" cannot override final method defined in class "Base2" -qualifiers_final_decorator.py:64:9 - error: Method "method3" cannot override final method defined in class "Base2" -qualifiers_final_decorator.py:75:9 - error: Method "method4" cannot override final method defined in class "Base2" +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) +qualifiers_final_decorator.py:64:9 - error: Method "method3" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride) +qualifiers_final_decorator.py:75:9 - error: Method "method4" cannot override final method defined in class "Base2" (reportIncompatibleMethodOverride) qualifiers_final_decorator.py:86:9 - error: Overload for "method" is marked @final but implementation is not (reportGeneralTypeIssues) -qualifiers_final_decorator.py:89:9 - error: Method "method" cannot override final method defined in class "Base3" -qualifiers_final_decorator.py:102:9 - error: Method "method" cannot override final method defined in class "Base4" -qualifiers_final_decorator.py:118:9 - error: Method "method" cannot override final method defined in class "Base5_2" +qualifiers_final_decorator.py:89:9 - error: Method "method" cannot override final method defined in class "Base3" (reportIncompatibleMethodOverride) +qualifiers_final_decorator.py:102:9 - error: Method "method" cannot override final method defined in class "Base4" (reportIncompatibleMethodOverride) +qualifiers_final_decorator.py:118:9 - error: Method "method" cannot override final method defined in class "Base5_2" (reportIncompatibleMethodOverride) qualifiers_final_decorator.py:118:9 - error: Method "method" overrides class "Base5_2" in an incompatible manner   Positional parameter count mismatch; base method has 2, but override has 1 (reportIncompatibleMethodOverride) qualifiers_final_decorator.py:126:5 - error: Function "func1" cannot be marked @final because it is not a method (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/specialtypes_type.toml b/conformance/results/pyright/specialtypes_type.toml index 985cf8dc3..d69e292e9 100644 --- a/conformance/results/pyright/specialtypes_type.toml +++ b/conformance/results/pyright/specialtypes_type.toml @@ -1,7 +1,4 @@ -conformant = "Partial" -notes = """ -Does not reject Callable when passed to type[T]. -""" +conformant = "Pass" output = """ specialtypes_type.py:56:7 - error: Argument of type "type[TeamUser]" cannot be assigned to parameter "user_class" of type "type[BasicUser] | type[ProUser]" in function "func4"   Type "type[TeamUser]" cannot be assigned to type "type[BasicUser] | type[ProUser]" @@ -9,6 +6,7 @@ specialtypes_type.py:56:7 - error: Argument of type "type[TeamUser]" cannot be a     Type "type[TeamUser]" cannot be assigned to type "type[BasicUser]"     "type[TeamUser]" is incompatible with "type[ProUser]"     Type "type[TeamUser]" cannot be assigned to type "type[ProUser]" (reportGeneralTypeIssues) +specialtypes_type.py:70:7 - error: Argument of type "type[Callable]" cannot be assigned to parameter "x" of type "type[T@func5]" in function "func5" (reportGeneralTypeIssues) specialtypes_type.py:76:22 - error: Too many type arguments provided for "type"; expected 1 but received 2 specialtypes_type.py:117:7 - error: Cannot access member "unknown" for type "type[object]"   Member "unknown" is unknown (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/typeddicts_alt_syntax.toml b/conformance/results/pyright/typeddicts_alt_syntax.toml index 12142faae..67f507863 100644 --- a/conformance/results/pyright/typeddicts_alt_syntax.toml +++ b/conformance/results/pyright/typeddicts_alt_syntax.toml @@ -1,9 +1,9 @@ conformant = "Pass" output = """ -typeddicts_alt_syntax.py:23:17 - error: Expected dict or keyword parameter as second parameter -typeddicts_alt_syntax.py:27:45 - error: Expected string literal for dictionary entry name -typeddicts_alt_syntax.py:31:1 - error: TypedDict must be assigned to a variable named "WrongName" -typeddicts_alt_syntax.py:35:78 - error: Extra TypedDict arguments not supported +typeddicts_alt_syntax.py:23:17 - error: Expected dict or keyword parameter as second parameter (reportGeneralTypeIssues) +typeddicts_alt_syntax.py:27:45 - error: Expected string literal for dictionary entry name (reportGeneralTypeIssues) +typeddicts_alt_syntax.py:31:1 - error: TypedDict must be assigned to a variable named "WrongName" (reportGeneralTypeIssues) +typeddicts_alt_syntax.py:35:78 - error: Extra TypedDict arguments not supported (reportGeneralTypeIssues) typeddicts_alt_syntax.py:45:43 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "Movie2"   "Literal['']" is incompatible with "int" (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/typeddicts_class_syntax.toml b/conformance/results/pyright/typeddicts_class_syntax.toml index 96b9e5518..530af0877 100644 --- a/conformance/results/pyright/typeddicts_class_syntax.toml +++ b/conformance/results/pyright/typeddicts_class_syntax.toml @@ -1,8 +1,8 @@ conformant = "Pass" output = """ -typeddicts_class_syntax.py:29:5 - error: TypedDict classes can contain only type annotations -typeddicts_class_syntax.py:33:5 - error: TypedDict classes can contain only type annotations -typeddicts_class_syntax.py:38:5 - error: TypedDict classes can contain only type annotations +typeddicts_class_syntax.py:29:5 - error: TypedDict classes can contain only type annotations (reportGeneralTypeIssues) +typeddicts_class_syntax.py:33:5 - error: TypedDict classes can contain only type annotations (reportGeneralTypeIssues) +typeddicts_class_syntax.py:38:5 - error: TypedDict classes can contain only type annotations (reportGeneralTypeIssues) typeddicts_class_syntax.py:44:32 - error: TypedDict does not support __init_subclass__ parameter "metaclass" typeddicts_class_syntax.py:49:32 - error: TypedDict does not support __init_subclass__ parameter "other" """ diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 948fac0b2..54e72a12a 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ -version = "pyright 1.1.345" -test_duration = 1.3236510753631592 +version = "pyright 1.1.347" +test_duration = 1.3326058387756348 diff --git a/conformance/results/pytype/protocols_explicit.toml b/conformance/results/pytype/protocols_explicit.toml index 983fd1710..f2a732e62 100644 --- a/conformance/results/pytype/protocols_explicit.toml +++ b/conformance/results/pytype/protocols_explicit.toml @@ -12,6 +12,6 @@ File "protocols_explicit.py", line 14, in draw: bad return type [bad-return-type Actually returned: None Called from (traceback): line 27, in draw -File "protocols_explicit.py", line 63, in : Can't instantiate Point with abstract methods intensity [not-instantiable] -File "protocols_explicit.py", line 163, in : Can't instantiate Concrete7A with abstract methods method1 [not-instantiable] +File "protocols_explicit.py", line 59, in : Can't instantiate Point with abstract methods intensity [not-instantiable] +File "protocols_explicit.py", line 159, in : Can't instantiate Concrete7A with abstract methods method1 [not-instantiable] """ diff --git a/conformance/results/pytype/protocols_recursive.toml b/conformance/results/pytype/protocols_recursive.toml index 72190d322..a857a756c 100644 --- a/conformance/results/pytype/protocols_recursive.toml +++ b/conformance/results/pytype/protocols_recursive.toml @@ -3,8 +3,9 @@ notes = """ Incorrectly reports type error for some recursive protocols. """ output = """ -File "protocols_recursive.py", line 11, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] -File "protocols_recursive.py", line 80, in : Any [assert-type] +File "protocols_recursive.py", line 11, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] +File "protocols_recursive.py", line 12, in : argument "contravariant" to TypeVar not supported yet [not-supported-yet] +File "protocols_recursive.py", line 81, in : Any [assert-type] Expected: List[int] Actual: Any """ diff --git a/conformance/results/pytype/protocols_self.toml b/conformance/results/pytype/protocols_self.toml index 42c875453..d46259543 100644 --- a/conformance/results/pytype/protocols_self.toml +++ b/conformance/results/pytype/protocols_self.toml @@ -3,6 +3,7 @@ notes = """ Does not properly handle Self type within a protocol. """ output = """ +File "protocols_self.py", line 36, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] File "protocols_self.py", line 37, in : argument "covariant" to TypeVar not supported yet [not-supported-yet] File "protocols_self.py", line 72, in : Type annotation for a2 does not match type of assignment [annotation-type-mismatch] Annotation: P2Parent[str] @@ -11,7 +12,7 @@ File "protocols_self.py", line 72, in : Type annotation for a2 does not Method f0 of protocol P2Parent[str] has the wrong signature in C2[str]: >> P2Parent[str] expects: - def f0(self, right: Self, /) -> P2Parent[T1]: ... + def f0(self, right: Self, /) -> P2Parent[T1_co]: ... >> C2[str] defines: def f0(self, other: Self) -> C2[T2_co]: ... @@ -22,7 +23,7 @@ File "protocols_self.py", line 73, in : Type annotation for b2 does not Method f0 of protocol P2Child[str] has the wrong signature in C2[str]: >> P2Child[str] expects: - def f0(self, right: Self, /) -> P2Parent[T1]: ... + def f0(self, right: Self, /) -> P2Parent[T1_co]: ... >> C2[str] defines: def f0(self, other: Self) -> C2[T2_co]: ... diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml index acf97698a..1586af8aa 100644 --- a/conformance/results/pytype/version.toml +++ b/conformance/results/pytype/version.toml @@ -1,2 +1,2 @@ version = "pytype 2023.12.18" -test_duration = 26.059975147247314 +test_duration = 27.246526956558228 diff --git a/conformance/results/results.html b/conformance/results/results.html index 070390592..d1e996048 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -156,7 +156,7 @@

Python Type System Conformance Test Results

-
 
mypy 1.8.0
1.33sec
pyright 1.1.345
1.39sec
pyre 0.9.19
2.45sec
pytype 2023.12.18
27.11sec
Type annotations
     annotations_coroutinesPassPass
Partial

Does not evaluate correct type for async function.

Partial

Does not evaluate correct type for async function.

     annotations_forward_refs
Partial

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

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

Incorrectly generates error for quoted type defined in class scope.

Pass
Partial

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

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

Does not reject f-string in quoted type annotation.

Incorrectly generates error for quoted type defined in class scope.

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

Partial

Does not reject some illegal type expression forms when quoted.

Incorrectly generates error for quoted type defined in class scope.

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

     annotations_generators
Partial

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

Pass
Partial

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

Incorrectly evaluates type of call to async generator.

Partial

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

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

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

     annotations_methods
Pass*

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

Pass*

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

Pass*

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

Pass*

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

     annotations_typeexprPassPassPass
Partial

Does not reject call expressions in type annotation.

Does not reject call lambda expression in type annotation.

Does not reject list expression in type annotation.

Does not reject ternary expression in type annotation.

Does not reject f-string in type annotation.

Does not reject module in type annotation.

Special types in annotations
     specialtypes_anyPassPass
Partial

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

Does not support Any as a base class.

Pass
     specialtypes_neverPassPass
Partial

Does not treat Never as compatible with all other types.

Unsupported

Does not understand NoReturn or Never.

     specialtypes_nonePassPass
Partial

Does not correctly handle type annotation type[None].

Partial

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

Does not detect type incompatibility between None and incompatible protocol.

     specialtypes_promotionsPassPass
Partial

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

Pass
     specialtypes_tuplePassPass
Partial

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

Partial

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

     specialtypes_tuple_unpackPassPass
Unsupported

Does not support unpacked tuple in type expression.

Unsupported

Does not support unpacked tuple in type expression.

     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]`.

Partial

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

Partial

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

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

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

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

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

Partial

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

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

Generics
     generics_paramspec_basic
Partial

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

Pass
Partial

Does not enforce name consistency for ParamSpec assigned to identifier.

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

Does not reject ParamSpec when used in various invalid locations.

Unsupported

Does not support ParamSpec.

     generics_paramspec_components
Partial

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

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

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

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

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

Pass
Partial

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

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

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

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

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

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

Unsupported

Does not support ParamSpec.

     generics_paramspec_semanticsPass
Pass*

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

Partial

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

Reports error for legitimate Callable type annotation that uses Concatenate.

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

Unsupported

Does not support ParamSpec.

     generics_paramspec_specializationPassPass
Partial

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

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

Unsupported

Does not support ParamSpec.

     generics_self_advanced
Partial

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

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

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

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

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_attributesPassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_basic
Partial

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

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_protocolsPassPass
Partial

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

Partial

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

     generics_self_usagePassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_syntax_compatibility
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_declarations
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_scoping
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_typevartuple_args
Partial

Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?).

Partial

Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?).

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_basic
Partial

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

Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?).

Does not enforce that tuples captured by TypeVarTuple are invariant in non-tuple class.

Partial

Does not enforce that tuples captured by TypeVarTuple are same type (spec bug?).

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_callablePassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_concatPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_overloadsPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_specialization
Partial

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

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

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

Partial

Incorrectly evaluates generic alias with TypeVarTuple if no type arguments are supplied.

Incorrectly evaluates tuple split across a TypeVarTuple and a TypeVar.

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_unpack
Partial

Does not reject multiple unpack operators in a tuple.

Partial

Does not treat `tuple[Any, ...]` as having an arbitrary length.

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_variance
Partial

Does not reject a function-scoped TypeVar that is marked as covariant or contravariant.

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

Partial

Does not reject a function-scoped TypeVar that is marked as covariant or contravariant.

Partial

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

Does not reject a function-scoped TypeVar that is marked as covariant or contravariant.

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

Unsupported

Does not support covariant or contravariant TypeVars.

     generics_variance_inference
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

Type qualifiers
     qualifiers_annotated
Partial

Does not allow ClassVar to be nested within Annotated.

Does not allow Final to be nested within Annotated.

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

Pass
Partial

Does not reject Annotated with a single parameter.

Partial

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

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

     qualifiers_final_annotation
Partial

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

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

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

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

Pass
Partial

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

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

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

Partial

Does not report Final variable with missing initialization.

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

Does not reject modification of global variable declared Final.

Does not reject modification of local variable declared Final.

     qualifiers_final_decoratorPassPass
Partial

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

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

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

Partial

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

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

Class type compatibility
     classes_classvar
Partial

Internal error if TypeVarTuple is used in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Rejects ClassVar nested in Annotated.

Does not reject use of ClassVar in TypeAlias definition.

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

Pass
Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Rejects initialization of ClassVar if no type argument is provided.

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Does not reject assignment of ClassVar through instance of class.

     classes_override
Partial

Does not handle case where parent class derives from Any.

Pass
Unsupported

Does not yet support the @override decorator.

Unsupported

Does not yet support the @override decorator.

Type aliases
     aliases_explicit
Partial

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

Pass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_implicitPassPass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_newtypePass
Partial

Rejects use of NewType created with another NewType.

Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

     aliases_recursivePassPass
Partial

Does not properly handle some recursive type aliases.

Does not properly handle specialization of generic recursive type aliases.

Partial

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

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

Does not detect cyclical references in recursive type alias definition.

     aliases_type_statement
Unsupported

Does not support `type` statement.

Pass
Unsupported

Does not support `type` statement.

Unsupported

Does not support `type` statement.

     aliases_typealiastype
Unsupported

Support for TypeAliasType is not implemented.

Pass
Unsupported

Support for TypeAliasType is not implemented.

Unsupported

Support for TypeAliasType is not implemented.

     aliases_variancePassPassPass
Unsupported

Does not detect variance incompatibility.

Literals
     literals_interactions
Partial

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

Pass
Partial

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

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

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

Partial

Incorrectly rejects some legal Literal annotations.

Does not reject some illegal Literal annotations.

Does not use Literal to distinguish overloads.

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

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

     literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

PassPass
Unsupported

Does not understand `LiteralString` special form.

     literals_parameterizations
Partial

Rejects integer Literal with unary `+` operator.

Does not reject tuple within Literal.

Partial

Rejects integer Literal with unary `+` operator.

Partial

Does not support type aliases in Literal type expression.

Does not support nested Literal type expression.

Does not reject unary + operator in Literal type expression.

Does not reject tuple in Literal type expression.

Does not reject "bare" Literal in type expression.

Unsupported

Does not understand `Literal` type annotation.

     literals_semanticsPassPass
Partial

Does not reject augmented operation that modifies literal value.

Unsupported

Does not understand `Literal` type annotation.

Protocols
     protocols_class_objectsPass
Partial

Incorrectly reports some class objects as incompatible with a protocol.

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

Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

     protocols_definition
Partial

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

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

Pass
Partial

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

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

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

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

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

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

Partial

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

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

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

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

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

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

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

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

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

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

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

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

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

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

     protocols_explicit
Pass*

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

Partial

Reports protocol incompatibility at time of class declaration rather than treating class as abstract.

Partial

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

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

Partial

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

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

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

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

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

     protocols_generic
Partial

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

Pass
Partial

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

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

Partial

Does not correctly enforce contravariance in protocol type compatibility tests.

Does not correctly enforce invariance in protocol type compatibility tests.

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

     protocols_mergingPassPass
Partial

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

Partial

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

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

     protocols_modulesPassPass
Unsupported

Does not perform protocol checks for modules.

Partial

Does not report incompatibilities for protocol methods.

     protocols_recursivePassPassPass
Partial

Incorrectly reports type error for some recursive protocols.

     protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Partial

Does not reject issubclass call for data protocol if included in tuple.

Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

     protocols_selfPassPassPass
Partial

Does not properly handle Self type within a protocol.

     protocols_subtypingPassPassPass
Partial

Does not reject attempt to instantiate protocol class.

Does not report some protocol type compatibility violations involving contravariance.

     protocols_variancePass
Partial

Calculates incorrect variance when `self` or `cls` have explicit annotation.

Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Callables
     callables_annotationPassPass
Partial

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

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

Pass
     callables_kwargsPassPass
Unsupported

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

Unsupported

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

     callables_protocolPassPass
Partial

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

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

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

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

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

Unsupported

Does not properly handle type compatibility checks with callback protocols.

Overloads
     overloads_basicPassPass
Partial

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

Partial

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

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

Dataclasses
     dataclasses_descriptors
Partial

Does not correctly evaluate type of descriptor access.

Pass
Partial

Incorrectly generates error when calling constructor of dataclass with descriptor.

Unsupported

Does not understand descriptor objects in dataclass.

     dataclasses_frozenPassPass
Partial

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

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

Unsupported

Does not report assignment to field within frozen dataclass instance.

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

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

     dataclasses_hash
Partial

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

Pass
Partial

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

Partial

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

     dataclasses_inheritancePassPass
Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

     dataclasses_kwonly
Partial

Incorrectly rejects kw_only field with default before positional field.

PassPass
Partial

Incorrectly reports error when kw_only field has default value.

Incorrectly rejects kw_only field with default before positional field.

     dataclasses_orderPassPass
Partial

Does not report type incompatibility with comparison operator.

Partial

Does not report type incompatibility with comparison operator.

     dataclasses_postinitPassPass
Unsupported

Does not perform validation of `__post_init__` method.

Does not reject access of `InitVar` from object.

Partial

Does not validate `__post_init__` method.

Reports incorrect error for incompatible `__post_init__` method override.

     dataclasses_slots
Partial

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

Pass
Partial

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

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

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

Partial

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

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

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

     dataclasses_transform_classPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_field
Partial

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_func
Partial

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

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_metaPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_usagePassPass
Partial

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

Incorrectly reports error with InitVar that has default value.

Pass
Typed dictionaries
     typeddicts_alt_syntax
Pass*

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

Pass
Partial

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

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

Partial

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

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

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

     typeddicts_class_syntaxPassPass
Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

Does not support generic TypedDict class.

Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

     typeddicts_finalPassPass
Partial

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

Pass
     typeddicts_inheritancePassPass
Partial

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

Pass
     typeddicts_operationsPassPassPass
Partial

Does not report type violation with TypedDict value assignment.

Does not report reference to unknown key in TypedDict.

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

Does not reject delete operation for required key in TypedDict.

     typeddicts_required
Partial

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

Pass
Partial

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

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

Does not support recursive TypedDict definitions.

Partial

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

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

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

     typeddicts_type_consistencyPassPass
Partial

Does not reject assignment of TypedDict with missing key.

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

Does not properly handle nested TypedDicts.

Partial

Does not report some type violations for TypedDict type compatibility.

Incorrectly reports type violation in cases where there is none.

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

     typeddicts_usagePassPass
Partial

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

Does not reject use of TypedDict as TypeVar bound.

Partial

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

Does not reject use of TypedDict as TypeVar bound.

Type narrowing
     narrowing_typeguardPassPass
Partial

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

Does not reject TypeGuard method with too few parameters.

Partial

Does not reject TypeGuard method with too few parameters.

Type checker directives
     directives_assert_typePassPass
Unsupported

Does not understand "assert_type".

Pass
     directives_castPassPassPass
Partial

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

     directives_no_type_check
Partial

Does not honor `@no_type_check` class decorator.

Unsupported

Intentionally does not honor @no_type_check decorator.

Unsupported

Does not honor @no_type_check decorator.

Unsupported

Does not honor @no_type_check decorator.

     directives_reveal_typePassPass
Unsupported

Does not understand reveal_type call.

Partial

Does not reject call to reveal_type with zero arguments.

Does not reject call to reveal_type with too many arguments.

     directives_type_checkingPassPassPassPass
     directives_type_ignore
Partial

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

PassPass
Partial

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

     directives_type_ignore_file1PassPass
Unsupported

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

Pass
     directives_type_ignore_file2PassPassPass
Partial

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

     directives_version_platform
Pass*

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

Does not understand os.name checks.

Pass
Partial

Does not support sys.platform checks.

Does not support os.name checks.

Pass*

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

Does not understand os.name checks.

+
 
mypy 1.8.0
1.39sec
pyright 1.1.347
1.33sec
pyre 0.9.19
2.22sec
pytype 2023.12.18
27.25sec
Type annotations
     annotations_coroutinesPassPass
Partial

Does not evaluate correct type for async function.

Partial

Does not evaluate correct type for async function.

     annotations_forward_refs
Partial

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

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

Incorrectly generates error for quoted type defined in class scope.

Pass
Partial

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

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

Does not reject f-string in quoted type annotation.

Incorrectly generates error for quoted type defined in class scope.

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

Partial

Does not reject some illegal type expression forms when quoted.

Incorrectly generates error for quoted type defined in class scope.

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

     annotations_generators
Partial

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

Pass
Partial

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

Incorrectly evaluates type of call to async generator.

Partial

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

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

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

     annotations_methods
Pass*

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

Pass*

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

Pass*

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

Pass*

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

     annotations_typeexprPassPassPass
Partial

Does not reject call expressions in type annotation.

Does not reject call lambda expression in type annotation.

Does not reject list expression in type annotation.

Does not reject ternary expression in type annotation.

Does not reject f-string in type annotation.

Does not reject module in type annotation.

Special types in annotations
     specialtypes_anyPassPass
Partial

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

Does not support Any as a base class.

Pass
     specialtypes_neverPassPass
Partial

Does not treat Never as compatible with all other types.

Unsupported

Does not understand NoReturn or Never.

     specialtypes_nonePassPass
Partial

Does not correctly handle type annotation type[None].

Partial

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

Does not detect type incompatibility between None and incompatible protocol.

     specialtypes_promotionsPassPass
Partial

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

Pass
     specialtypes_tuplePassPass
Partial

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

Partial

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

     specialtypes_tuple_unpackPassPass
Unsupported

Does not support unpacked tuple in type expression.

Unsupported

Does not support unpacked tuple in type expression.

     specialtypes_type
Partial

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

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

Pass
Partial

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

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

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

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

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

Partial

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

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

Generics
     generics_paramspec_basic
Partial

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

Pass
Partial

Does not enforce name consistency for ParamSpec assigned to identifier.

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

Does not reject ParamSpec when used in various invalid locations.

Unsupported

Does not support ParamSpec.

     generics_paramspec_components
Partial

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

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

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

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

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

Pass
Partial

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

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

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

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

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

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

Unsupported

Does not support ParamSpec.

     generics_paramspec_semanticsPass
Pass*

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

Partial

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

Reports error for legitimate Callable type annotation that uses Concatenate.

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

Unsupported

Does not support ParamSpec.

     generics_paramspec_specializationPassPass
Partial

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

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

Unsupported

Does not support ParamSpec.

     generics_self_advanced
Partial

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

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

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

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

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_attributesPassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_basic
Partial

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

Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_self_protocolsPassPass
Partial

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

Partial

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

     generics_self_usagePassPass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_syntax_compatibility
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_declarations
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_syntax_scoping
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     generics_typevartuple_args
Partial

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

Partial

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

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_basic
Partial

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

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

Does not enforce that tuples captured by TypeVarTuple are invariant in non-tuple class.

Partial

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

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_callablePassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_concatPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_overloadsPassPass
Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_specialization
Partial

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

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

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

Partial

Incorrectly evaluates generic alias with TypeVarTuple if no type arguments are supplied.

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_typevartuple_unpack
Partial

Does not reject multiple unpack operators in a tuple.

Partial

Does not treat `tuple[Any, ...]` as having an arbitrary length.

Unsupported

Does not support TypeVarTuple.

Unsupported

Does not support TypeVarTuple.

     generics_variance
Partial

Does not reject a function-scoped TypeVar that is marked as covariant or contravariant.

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

Partial

Does not reject a function-scoped TypeVar that is marked as covariant or contravariant.

Partial

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

Does not reject a function-scoped TypeVar that is marked as covariant or contravariant.

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

Unsupported

Does not support covariant or contravariant TypeVars.

     generics_variance_inference
Unsupported

Type parameter syntax not yet support.

Pass
Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

Type qualifiers
     qualifiers_annotated
Partial

Does not allow ClassVar to be nested within Annotated.

Does not allow Final to be nested within Annotated.

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

Pass
Partial

Does not reject Annotated with a single parameter.

Partial

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

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

     qualifiers_final_annotation
Partial

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

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

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

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

Pass
Partial

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

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

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

Partial

Does not report Final variable with missing initialization.

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

Does not reject modification of global variable declared Final.

Does not reject modification of local variable declared Final.

     qualifiers_final_decoratorPassPass
Partial

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

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

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

Partial

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

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

Class type compatibility
     classes_classvar
Partial

Internal error if TypeVarTuple is used in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Rejects ClassVar nested in Annotated.

Does not reject use of ClassVar in TypeAlias definition.

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

Pass
Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

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

Rejects initialization of ClassVar if no type argument is provided.

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Does not reject assignment of ClassVar through instance of class.

     classes_override
Partial

Does not handle case where parent class derives from Any.

Pass
Unsupported

Does not yet support the @override decorator.

Unsupported

Does not yet support the @override decorator.

Type aliases
     aliases_explicit
Partial

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

Pass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_implicitPassPass
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

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

Does not report invalid specialization of generic type aliases.

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

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

Partial

Incorrectly reports error for type alias defined with ParamSpec.

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

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

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

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

     aliases_newtypePassPass
Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

Partial

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

Does not reject use of NewType in class definition statement.

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

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

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

     aliases_recursivePassPass
Partial

Does not properly handle some recursive type aliases.

Does not properly handle specialization of generic recursive type aliases.

Partial

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

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

Does not detect cyclical references in recursive type alias definition.

     aliases_type_statement
Unsupported

Does not support `type` statement.

Pass
Unsupported

Does not support `type` statement.

Unsupported

Does not support `type` statement.

     aliases_typealiastype
Unsupported

Support for TypeAliasType is not implemented.

Pass
Unsupported

Support for TypeAliasType is not implemented.

Unsupported

Support for TypeAliasType is not implemented.

     aliases_variancePassPassPass
Unsupported

Does not detect variance incompatibility.

Literals
     literals_interactions
Partial

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

Pass
Partial

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

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

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

Partial

Incorrectly rejects some legal Literal annotations.

Does not reject some illegal Literal annotations.

Does not use Literal to distinguish overloads.

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

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

     literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

PassPass
Unsupported

Does not understand `LiteralString` special form.

     literals_parameterizations
Partial

Rejects integer Literal with unary `+` operator.

Does not reject tuple within Literal.

Pass
Partial

Does not support type aliases in Literal type expression.

Does not support nested Literal type expression.

Does not reject unary + operator in Literal type expression.

Does not reject tuple in Literal type expression.

Does not reject "bare" Literal in type expression.

Unsupported

Does not understand `Literal` type annotation.

     literals_semanticsPassPass
Partial

Does not reject augmented operation that modifies literal value.

Unsupported

Does not understand `Literal` type annotation.

Protocols
     protocols_class_objectsPassPass
Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

Partial

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

Incorrectly reports some class objects as incompatible with a protocol.

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

     protocols_definition
Partial

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

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

Pass
Partial

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

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

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

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

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

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

Partial

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

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

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

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

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

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

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

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

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

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

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

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

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

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

     protocols_explicit
Pass*

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

Pass
Partial

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

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

Partial

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

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

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

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

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

     protocols_generic
Partial

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

Pass
Partial

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

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

Partial

Does not correctly enforce contravariance in protocol type compatibility tests.

Does not correctly enforce invariance in protocol type compatibility tests.

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

     protocols_mergingPassPass
Partial

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

Partial

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

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

     protocols_modulesPassPass
Unsupported

Does not perform protocol checks for modules.

Partial

Does not report incompatibilities for protocol methods.

     protocols_recursivePassPassPass
Partial

Incorrectly reports type error for some recursive protocols.

     protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Pass
Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

Unsupported

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

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

     protocols_selfPassPassPass
Partial

Does not properly handle Self type within a protocol.

     protocols_subtypingPassPassPass
Partial

Does not reject attempt to instantiate protocol class.

Does not report some protocol type compatibility violations involving contravariance.

     protocols_variancePassPass
Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Callables
     callables_annotationPassPass
Partial

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

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

Pass
     callables_kwargsPassPass
Unsupported

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

Unsupported

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

     callables_protocolPassPass
Partial

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

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

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

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

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

Unsupported

Does not properly handle type compatibility checks with callback protocols.

Overloads
     overloads_basicPassPass
Partial

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

Partial

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

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

Dataclasses
     dataclasses_descriptors
Partial

Does not correctly evaluate type of descriptor access.

Pass
Partial

Incorrectly generates error when calling constructor of dataclass with descriptor.

Unsupported

Does not understand descriptor objects in dataclass.

     dataclasses_frozenPassPass
Partial

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

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

Unsupported

Does not report assignment to field within frozen dataclass instance.

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

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

     dataclasses_hash
Partial

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

Pass
Partial

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

Partial

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

     dataclasses_inheritancePassPass
Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

     dataclasses_kwonly
Partial

Incorrectly rejects kw_only field with default before positional field.

PassPass
Partial

Incorrectly reports error when kw_only field has default value.

Incorrectly rejects kw_only field with default before positional field.

     dataclasses_orderPassPass
Partial

Does not report type incompatibility with comparison operator.

Partial

Does not report type incompatibility with comparison operator.

     dataclasses_postinitPassPass
Unsupported

Does not perform validation of `__post_init__` method.

Does not reject access of `InitVar` from object.

Partial

Does not validate `__post_init__` method.

Reports incorrect error for incompatible `__post_init__` method override.

     dataclasses_slots
Partial

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

Pass
Partial

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

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

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

Partial

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

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

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

     dataclasses_transform_classPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_field
Partial

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_func
Partial

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

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

Pass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_transform_metaPassPass
Unsupported

Does not understand @dataclass_transform.

Unsupported

Does not understand @dataclass_transform.

     dataclasses_usagePassPass
Partial

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

Incorrectly reports error with InitVar that has default value.

Pass
Typed dictionaries
     typeddicts_alt_syntax
Pass*

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

Pass
Partial

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

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

Partial

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

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

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

     typeddicts_class_syntaxPassPass
Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

Does not support generic TypedDict class.

Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

     typeddicts_finalPassPass
Partial

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

Pass
     typeddicts_inheritancePassPass
Partial

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

Pass
     typeddicts_operationsPassPassPass
Partial

Does not report type violation with TypedDict value assignment.

Does not report reference to unknown key in TypedDict.

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

Does not reject delete operation for required key in TypedDict.

     typeddicts_required
Partial

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

Pass
Partial

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

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

Does not support recursive TypedDict definitions.

Partial

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

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

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

     typeddicts_type_consistencyPassPass
Partial

Does not reject assignment of TypedDict with missing key.

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

Does not properly handle nested TypedDicts.

Partial

Does not report some type violations for TypedDict type compatibility.

Incorrectly reports type violation in cases where there is none.

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

     typeddicts_usagePassPass
Partial

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

Does not reject use of TypedDict as TypeVar bound.

Partial

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

Does not reject use of TypedDict as TypeVar bound.

Type narrowing
     narrowing_typeguardPassPass
Partial

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

Does not reject TypeGuard method with too few parameters.

Partial

Does not reject TypeGuard method with too few parameters.

Type checker directives
     directives_assert_typePassPass
Unsupported

Does not understand "assert_type".

Pass
     directives_castPassPassPass
Partial

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

     directives_no_type_check
Partial

Does not honor `@no_type_check` class decorator.

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

Partial

Does not honor `@no_type_check` class decorator.

Unsupported

Does not honor @no_type_check decorator.

Unsupported

Does not honor @no_type_check decorator.

     directives_reveal_typePassPass
Unsupported

Does not understand reveal_type call.

Partial

Does not reject call to reveal_type with zero arguments.

Does not reject call to reveal_type with too many arguments.

     directives_type_checkingPassPassPassPass
     directives_type_ignore
Partial

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

PassPass
Partial

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

     directives_type_ignore_file1PassPass
Unsupported

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

Pass
     directives_type_ignore_file2PassPassPass
Partial

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

     directives_version_platform
Pass*

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

Does not understand os.name checks.

Pass
Partial

Does not support sys.platform checks.

Does not support os.name checks.

Pass*

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

Does not understand os.name checks.