diff --git a/conformance/results/mypy/aliases_explicit.toml b/conformance/results/mypy/aliases_explicit.toml index bcf03a09..ee057629 100644 --- a/conformance/results/mypy/aliases_explicit.toml +++ b/conformance/results/mypy/aliases_explicit.toml @@ -12,7 +12,8 @@ aliases_explicit.py:79: error: Invalid type alias: expression is not a valid typ aliases_explicit.py:80: error: Bracketed expression "[...]" is not valid as a type [valid-type] aliases_explicit.py:81: error: Invalid type alias: expression is not a valid type [valid-type] aliases_explicit.py:82: error: Invalid type alias: expression is not a valid type [valid-type] -aliases_explicit.py:83: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_explicit.py:83: error: Inline TypedDict is experimental, must be enabled with --enable-incomplete-feature=InlineTypedDict [misc] +aliases_explicit.py:83: error: Name "b" is not defined [name-defined] aliases_explicit.py:84: error: Invalid type alias: expression is not a valid type [valid-type] aliases_explicit.py:85: error: Invalid type alias: expression is not a valid type [valid-type] aliases_explicit.py:86: error: Invalid type alias: expression is not a valid type [valid-type] diff --git a/conformance/results/mypy/aliases_type_statement.toml b/conformance/results/mypy/aliases_type_statement.toml index 536ef0ce..d33d0275 100644 --- a/conformance/results/mypy/aliases_type_statement.toml +++ b/conformance/results/mypy/aliases_type_statement.toml @@ -1,21 +1,20 @@ conformant = "Partial" notes = """ -Does not reject use of TypeAliasType as base class. -Does not reject redefinition of type alias defined with type statement. Does not reject type alias defined in function scope. -Does not reject type alias with circular definition. """ output = """ aliases_type_statement.py:17: error: "TypeAliasType" has no attribute "bit_count" [attr-defined] aliases_type_statement.py:19: error: "TypeAliasType" not callable [operator] aliases_type_statement.py:23: error: "TypeAliasType" has no attribute "other_attrib" [attr-defined] +aliases_type_statement.py:26: error: Type alias defined using "type" statement not valid as base class [misc] aliases_type_statement.py:31: error: Parameterized generics cannot be used with class or instance checks [misc] aliases_type_statement.py:31: error: Argument 2 to "isinstance" has incompatible type "TypeAliasType"; expected "_ClassInfo" [arg-type] aliases_type_statement.py:37: error: Invalid type alias: expression is not a valid type [valid-type] aliases_type_statement.py:38: error: Bracketed expression "[...]" is not valid as a type [valid-type] aliases_type_statement.py:39: error: Invalid type alias: expression is not a valid type [valid-type] aliases_type_statement.py:40: error: Invalid type alias: expression is not a valid type [valid-type] -aliases_type_statement.py:41: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_type_statement.py:41: error: Inline TypedDict is experimental, must be enabled with --enable-incomplete-feature=InlineTypedDict [misc] +aliases_type_statement.py:41: error: Name "b" is not defined [name-defined] aliases_type_statement.py:42: error: Invalid type alias: expression is not a valid type [valid-type] aliases_type_statement.py:43: error: Invalid type alias: expression is not a valid type [valid-type] aliases_type_statement.py:44: error: Invalid type alias: expression is not a valid type [valid-type] @@ -25,22 +24,18 @@ aliases_type_statement.py:46: error: Invalid type: try using Literal[True] inste aliases_type_statement.py:47: error: Invalid type: try using Literal[1] instead? [valid-type] aliases_type_statement.py:48: error: Invalid type alias: expression is not a valid type [valid-type] aliases_type_statement.py:49: error: Invalid type alias: expression is not a valid type [valid-type] -aliases_type_statement.py:54: error: Name "BadTypeAlias14" already defined on line 52 [no-redef] -aliases_type_statement.py:64: error: All type parameters should be declared ("V" not declared) [valid-type] -aliases_type_statement.py:69: error: All type parameters should be declared ("T1" not declared) [valid-type] -aliases_type_statement.py:79: error: Type argument "str" of "RecursiveTypeAlias2" must be a subtype of "int" [type-var] -aliases_type_statement.py:81: error: Type argument "int" of "RecursiveTypeAlias2" must be a subtype of "str" [type-var] -aliases_type_statement.py:84: error: Cannot resolve name "RecursiveTypeAlias3" (possible cyclic definition) [misc] -aliases_type_statement.py:86: error: Invalid recursive alias: a union item of itself [misc] -aliases_type_statement.py:90: error: Cannot resolve name "RecursiveTypeAlias6" (possible cyclic definition) [misc] -aliases_type_statement.py:90: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] -aliases_type_statement.py:91: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] +aliases_type_statement.py:52: error: Name "BadTypeAlias14" already defined on line 51 [no-redef] +aliases_type_statement.py:62: error: All type parameters should be declared ("V" not declared) [valid-type] +aliases_type_statement.py:67: error: All type parameters should be declared ("T1" not declared) [valid-type] +aliases_type_statement.py:77: error: Type argument "str" of "RecursiveTypeAlias2" must be a subtype of "int" [type-var] +aliases_type_statement.py:79: error: Type argument "int" of "RecursiveTypeAlias2" must be a subtype of "str" [type-var] +aliases_type_statement.py:82: error: Cannot resolve name "RecursiveTypeAlias3" (possible cyclic definition) [misc] +aliases_type_statement.py:84: error: Invalid recursive alias: a union item of itself [misc] +aliases_type_statement.py:88: error: Cannot resolve name "RecursiveTypeAlias6" (possible cyclic definition) [misc] +aliases_type_statement.py:88: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] +aliases_type_statement.py:89: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc] """ conformance_automated = "Fail" errors_diff = """ -Line 26: Expected 1 errors -Line 52: Expected 1 errors -Line 58: Expected 1 errors -Line 54: Unexpected errors ['aliases_type_statement.py:54: error: Name "BadTypeAlias14" already defined on line 52 [no-redef]'] -Line 91: Unexpected errors ['aliases_type_statement.py:91: error: Cannot resolve name "RecursiveTypeAlias7" (possible cyclic definition) [misc]'] +Line 56: Expected 1 errors """ diff --git a/conformance/results/mypy/aliases_typealiastype.toml b/conformance/results/mypy/aliases_typealiastype.toml index fe6dd997..078f9961 100644 --- a/conformance/results/mypy/aliases_typealiastype.toml +++ b/conformance/results/mypy/aliases_typealiastype.toml @@ -23,7 +23,8 @@ aliases_typealiastype.py:52: error: Invalid type alias: expression is not a vali aliases_typealiastype.py:53: error: Bracketed expression "[...]" is not valid as a type [valid-type] aliases_typealiastype.py:54: error: Invalid type alias: expression is not a valid type [valid-type] aliases_typealiastype.py:55: error: Invalid type alias: expression is not a valid type [valid-type] -aliases_typealiastype.py:56: error: Invalid type alias: expression is not a valid type [valid-type] +aliases_typealiastype.py:56: error: Inline TypedDict is experimental, must be enabled with --enable-incomplete-feature=InlineTypedDict [misc] +aliases_typealiastype.py:56: error: Name "b" is not defined [name-defined] aliases_typealiastype.py:57: error: Invalid type alias: expression is not a valid type [valid-type] aliases_typealiastype.py:58: error: Invalid type alias: expression is not a valid type [valid-type] aliases_typealiastype.py:59: error: Invalid type alias: expression is not a valid type [valid-type] diff --git a/conformance/results/mypy/generics_defaults.toml b/conformance/results/mypy/generics_defaults.toml index 19633b6f..b8fb5b0f 100644 --- a/conformance/results/mypy/generics_defaults.toml +++ b/conformance/results/mypy/generics_defaults.toml @@ -1,11 +1,42 @@ conformant = "Unsupported" output = """ +generics_defaults.py:24: error: "T" cannot appear after "DefaultStrT" in type parameter list because it has no default type [misc] +generics_defaults.py:30: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type] +generics_defaults.py:31: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type] +generics_defaults.py:38: error: Expression is of type "type[OneDefault[Any, Any]]", not "type[OneDefault[float, bool]]" [assert-type] +generics_defaults.py:45: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[Any, Any, str, int, bool]]" [assert-type] +generics_defaults.py:46: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type] +generics_defaults.py:50: error: Type application has too few types (expected between 2 and 5) [misc] +generics_defaults.py:52: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type] +generics_defaults.py:55: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type] +generics_defaults.py:59: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type] +generics_defaults.py:79: error: Expression is of type "type[Class_ParamSpec[Any]]", not "type[Class_ParamSpec[[str, int]]]" [assert-type] +generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*tuple[Any, ...]]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type] +generics_defaults.py:151: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type] +generics_defaults.py:151: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc] +generics_defaults.py:152: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type] +generics_defaults.py:152: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc] +generics_defaults.py:166: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type] +generics_defaults.py:167: error: Expression is of type "Any", not "int" [assert-type] +generics_defaults.py:167: error: Access to generic instance variables via class is ambiguous [misc] """ conformance_automated = "Fail" errors_diff = """ -Line 24: Expected 1 errors -Line 50: Expected 1 errors Line 104: Expected 1 errors Line 111: Expected 1 errors Line 138: Expected 1 errors +Line 30: Unexpected errors ['generics_defaults.py:30: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type]'] +Line 31: Unexpected errors ['generics_defaults.py:31: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type]'] +Line 38: Unexpected errors ['generics_defaults.py:38: error: Expression is of type "type[OneDefault[Any, Any]]", not "type[OneDefault[float, bool]]" [assert-type]'] +Line 45: Unexpected errors ['generics_defaults.py:45: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[Any, Any, str, int, bool]]" [assert-type]'] +Line 46: Unexpected errors ['generics_defaults.py:46: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]'] +Line 52: Unexpected errors ['generics_defaults.py:52: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]'] +Line 55: Unexpected errors ['generics_defaults.py:55: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]'] +Line 59: Unexpected errors ['generics_defaults.py:59: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]'] +Line 79: Unexpected errors ['generics_defaults.py:79: error: Expression is of type "type[Class_ParamSpec[Any]]", not "type[Class_ParamSpec[[str, int]]]" [assert-type]'] +Line 94: Unexpected errors ['generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*tuple[Any, ...]]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type]'] +Line 151: Unexpected errors ['generics_defaults.py:151: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type]', 'generics_defaults.py:151: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]'] +Line 152: Unexpected errors ['generics_defaults.py:152: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type]', 'generics_defaults.py:152: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]'] +Line 166: Unexpected errors ['generics_defaults.py:166: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type]'] +Line 167: Unexpected errors ['generics_defaults.py:167: error: Expression is of type "Any", not "int" [assert-type]', 'generics_defaults.py:167: error: Access to generic instance variables via class is ambiguous [misc]'] """ diff --git a/conformance/results/mypy/generics_paramspec_components.toml b/conformance/results/mypy/generics_paramspec_components.toml index 0cfb13a9..66a386ad 100644 --- a/conformance/results/mypy/generics_paramspec_components.toml +++ b/conformance/results/mypy/generics_paramspec_components.toml @@ -4,7 +4,6 @@ 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. """ output = """ generics_paramspec_components.py:17: error: Use "P.args" for variadic "*" parameter [valid-type] @@ -15,6 +14,7 @@ generics_paramspec_components.py:49: error: Argument 2 has incompatible type "** generics_paramspec_components.py:51: error: Argument 1 has incompatible type "int"; expected "P.args" [arg-type] generics_paramspec_components.py:70: error: Argument 1 has incompatible type "*P.args"; expected "int" [arg-type] generics_paramspec_components.py:70: error: Argument 2 has incompatible type "int"; expected "P.args" [arg-type] +generics_paramspec_components.py:72: error: Argument 1 has incompatible type "*P.args"; expected "int" [arg-type] generics_paramspec_components.py:83: error: "foo" gets multiple values for keyword argument "x" [misc] generics_paramspec_components.py:83: error: Argument 1 to "foo" has incompatible type "*P.args"; expected "int" [arg-type] generics_paramspec_components.py:83: error: Argument 3 to "foo" has incompatible type "**P.kwargs"; expected "int" [arg-type] @@ -31,5 +31,4 @@ Line 36: Expected 1 errors Line 38: Expected 1 errors Line 41: Expected 1 errors Line 60: Expected 1 errors -Line 72: Expected 1 errors """ diff --git a/conformance/results/mypy/generics_syntax_declarations.toml b/conformance/results/mypy/generics_syntax_declarations.toml index 91b06d4a..66d51c93 100644 --- a/conformance/results/mypy/generics_syntax_declarations.toml +++ b/conformance/results/mypy/generics_syntax_declarations.toml @@ -1,19 +1,17 @@ -conformant = "Partial" -notes = """ -Does not detect many illegal usages of type parameter syntax. -""" +conformant = "Pass" output = """ +generics_syntax_declarations.py:17: error: Generic[...] base class is redundant [misc] +generics_syntax_declarations.py:25: error: No arguments expected for "Protocol" base class [misc] +generics_syntax_declarations.py:32: error: "T" has no attribute "is_integer" [attr-defined] +generics_syntax_declarations.py:44: error: Name "V" is not defined [name-defined] +generics_syntax_declarations.py:48: error: Bracketed expression "[...]" is not valid as a type [valid-type] +generics_syntax_declarations.py:60: error: Type variable must have at least two constrained types [misc] +generics_syntax_declarations.py:64: error: Type variable must have at least two constrained types [misc] +generics_syntax_declarations.py:71: error: Variable "generics_syntax_declarations.t1" is not valid as a type [valid-type] +generics_syntax_declarations.py:71: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases +generics_syntax_declarations.py:75: error: Invalid type: try using Literal[3] instead? [valid-type] +generics_syntax_declarations.py:79: error: Name "S" is not defined [name-defined] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 19: Expected 1 errors -Line 27: Expected 1 errors -Line 34: Expected 1 errors -Line 46: Expected 1 errors -Line 50: Expected 1 errors -Line 62: Expected 1 errors -Line 66: Expected 1 errors -Line 73: Expected 1 errors -Line 77: Expected 1 errors -Line 81: Expected 1 errors """ diff --git a/conformance/results/mypy/generics_variance_inference.toml b/conformance/results/mypy/generics_variance_inference.toml index 57189510..b1158c7e 100644 --- a/conformance/results/mypy/generics_variance_inference.toml +++ b/conformance/results/mypy/generics_variance_inference.toml @@ -1,20 +1,12 @@ -conformant = "Partial" -notes = """ -Computes incorrect variance in some cases. -""" +conformant = "Pass" output = """ generics_variance_inference.py:24: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[int, int, int]") [assignment] generics_variance_inference.py:25: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[float, float, int]") [assignment] generics_variance_inference.py:28: error: Incompatible types in assignment (expression has type "ClassA[int, float, float]", variable has type "ClassA[int, int, int]") [assignment] -generics_variance_inference.py:29: error: Incompatible types in assignment (expression has type "ClassA[int, float, float]", variable has type "ClassA[int, int, float]") [assignment] generics_variance_inference.py:41: error: Incompatible types in assignment (expression has type "ShouldBeCovariant1[float]", variable has type "ShouldBeCovariant1[int]") [assignment] -generics_variance_inference.py:48: error: Cannot instantiate abstract class "ShouldBeCovariant2" with abstract attributes "__getitem__" and "__len__" [abstract] -generics_variance_inference.py:49: error: Cannot instantiate abstract class "ShouldBeCovariant2" with abstract attributes "__getitem__" and "__len__" [abstract] generics_variance_inference.py:49: error: Incompatible types in assignment (expression has type "ShouldBeCovariant2[float]", variable has type "ShouldBeCovariant2[int]") [assignment] generics_variance_inference.py:58: error: Incompatible types in assignment (expression has type "ShouldBeCovariant3[float]", variable has type "ShouldBeCovariant3[int]") [assignment] -generics_variance_inference.py:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [assignment] generics_variance_inference.py:67: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[float]", variable has type "ShouldBeCovariant4[int]") [assignment] -generics_variance_inference.py:79: error: Incompatible types in assignment (expression has type "ShouldBeCovariant5[int]", variable has type "ShouldBeCovariant5[float]") [assignment] generics_variance_inference.py:80: error: Incompatible types in assignment (expression has type "ShouldBeCovariant5[float]", variable has type "ShouldBeCovariant5[int]") [assignment] generics_variance_inference.py:96: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[int]", variable has type "ShouldBeInvariant1[float]") [assignment] generics_variance_inference.py:97: error: Incompatible types in assignment (expression has type "ShouldBeInvariant1[float]", variable has type "ShouldBeInvariant1[int]") [assignment] @@ -28,16 +20,10 @@ generics_variance_inference.py:130: error: Incompatible types in assignment (exp generics_variance_inference.py:138: error: Incompatible types in assignment (expression has type "ShouldBeInvariant5[int]", variable has type "ShouldBeInvariant5[float]") [assignment] generics_variance_inference.py:149: error: Incompatible types in assignment (expression has type "ShouldBeContravariant1[int]", variable has type "ShouldBeContravariant1[float]") [assignment] generics_variance_inference.py:169: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[float]", variable has type "ShouldBeInvariant6[int]") [assignment] +generics_variance_inference.py:170: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[int]", variable has type "ShouldBeInvariant6[float]") [assignment] generics_variance_inference.py:181: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[float]", variable has type "ShouldBeCovariant6[int]") [assignment] -generics_variance_inference.py:193: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[float]", variable has type "ShouldBeContravariant2[int]") [assignment] +generics_variance_inference.py:194: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[int]", variable has type "ShouldBeContravariant2[float]") [assignment] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 170: Expected 1 errors -Line 194: Expected 1 errors -Line 29: Unexpected errors ['generics_variance_inference.py:29: error: Incompatible types in assignment (expression has type "ClassA[int, float, float]", variable has type "ClassA[int, int, float]") [assignment]'] -Line 48: Unexpected errors ['generics_variance_inference.py:48: error: Cannot instantiate abstract class "ShouldBeCovariant2" with abstract attributes "__getitem__" and "__len__" [abstract]'] -Line 66: Unexpected errors ['generics_variance_inference.py:66: error: Incompatible types in assignment (expression has type "ShouldBeCovariant4[int]", variable has type "ShouldBeCovariant4[float]") [assignment]'] -Line 79: Unexpected errors ['generics_variance_inference.py:79: error: Incompatible types in assignment (expression has type "ShouldBeCovariant5[int]", variable has type "ShouldBeCovariant5[float]") [assignment]'] -Line 193: Unexpected errors ['generics_variance_inference.py:193: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[float]", variable has type "ShouldBeContravariant2[int]") [assignment]'] """ diff --git a/conformance/results/mypy/literals_literalstring.toml b/conformance/results/mypy/literals_literalstring.toml index b6554e3f..5258d254 100644 --- a/conformance/results/mypy/literals_literalstring.toml +++ b/conformance/results/mypy/literals_literalstring.toml @@ -8,7 +8,7 @@ literals_literalstring.py:37: error: Parameter 1 of Literal[...] is invalid [va literals_literalstring.py:43: error: Incompatible types in assignment (expression has type "Literal['two']", variable has type "Literal['']") [assignment] literals_literalstring.py:74: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] literals_literalstring.py:75: error: Incompatible types in assignment (expression has type "bytes", variable has type "str") [assignment] -literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [misc] +literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [overload-cannot-match] literals_literalstring.py:167: error: Expression is of type "B", not "A" [assert-type] """ conformance_automated = "Fail" @@ -17,6 +17,6 @@ Line 66: Expected 1 errors Line 120: Expected 1 errors Line 134: Expected 1 errors Line 171: Expected 1 errors -Line 157: Unexpected errors ["literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [misc]"] +Line 157: Unexpected errors ["literals_literalstring.py:157: error: Overloaded function signature 3 will never be matched: signature 2's parameter type(s) are the same or broader [overload-cannot-match]"] Line 167: Unexpected errors ['literals_literalstring.py:167: error: Expression is of type "B", not "A" [assert-type]'] """ diff --git a/conformance/results/mypy/literals_parameterizations.toml b/conformance/results/mypy/literals_parameterizations.toml index b5a99264..730d531d 100644 --- a/conformance/results/mypy/literals_parameterizations.toml +++ b/conformance/results/mypy/literals_parameterizations.toml @@ -8,7 +8,7 @@ literals_parameterizations.py:42: error: Invalid type: Literal[...] cannot conta literals_parameterizations.py:43: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] literals_parameterizations.py:44: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] literals_parameterizations.py:45: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] -literals_parameterizations.py:47: error: Invalid type: Literal[...] cannot contain arbitrary expressions [valid-type] +literals_parameterizations.py:47: error: Parameter 1 of Literal[...] is invalid [valid-type] literals_parameterizations.py:48: error: Parameter 1 of Literal[...] is invalid [valid-type] literals_parameterizations.py:49: error: Parameter 1 of Literal[...] is invalid [valid-type] literals_parameterizations.py:50: error: Parameter 1 of Literal[...] is invalid [valid-type] diff --git a/conformance/results/mypy/qualifiers_annotated.toml b/conformance/results/mypy/qualifiers_annotated.toml index 289e9d8b..f2a37363 100644 --- a/conformance/results/mypy/qualifiers_annotated.toml +++ b/conformance/results/mypy/qualifiers_annotated.toml @@ -11,7 +11,8 @@ qualifiers_annotated.py:43: error: Bracketed expression "[...]" is not valid as qualifiers_annotated.py:44: error: Syntax error in type annotation [syntax] qualifiers_annotated.py:44: note: Suggestion: Is there a spurious trailing comma? qualifiers_annotated.py:45: error: Invalid type comment or annotation [valid-type] -qualifiers_annotated.py:46: error: Invalid type comment or annotation [valid-type] +qualifiers_annotated.py:46: error: Inline TypedDict is experimental, must be enabled with --enable-incomplete-feature=InlineTypedDict [misc] +qualifiers_annotated.py:46: error: Name "b" is not defined [name-defined] qualifiers_annotated.py:47: error: Invalid type comment or annotation [valid-type] qualifiers_annotated.py:48: error: Invalid type comment or annotation [valid-type] qualifiers_annotated.py:49: error: Invalid type comment or annotation [valid-type] diff --git a/conformance/results/mypy/qualifiers_final_annotation.toml b/conformance/results/mypy/qualifiers_final_annotation.toml index eecb8fd0..d0898be4 100644 --- a/conformance/results/mypy/qualifiers_final_annotation.toml +++ b/conformance/results/mypy/qualifiers_final_annotation.toml @@ -33,7 +33,7 @@ qualifiers_final_annotation.py:135: error: Unexpected keyword argument "y" for " qualifiers_final_annotation.py:141: error: Cannot assign to final name "ID1" [misc] qualifiers_final_annotation.py:145: error: Cannot assign to final name "x" [misc] qualifiers_final_annotation.py:147: error: Cannot assign to final name "x" [misc] -qualifiers_final_annotation.py:152: error: Incompatible types in assignment (expression has type "TextIOWrapper", variable has type "int") [assignment] +qualifiers_final_annotation.py:152: error: Incompatible types in assignment (expression has type "TextIOWrapper[_WrappedBuffer]", variable has type "int") [assignment] qualifiers_final_annotation.py:155: error: Cannot assign to final name "x" [misc] """ conformance_automated = "Fail" diff --git a/conformance/results/mypy/tuples_type_compat.toml b/conformance/results/mypy/tuples_type_compat.toml index 55d7bf4d..3882ed3f 100644 --- a/conformance/results/mypy/tuples_type_compat.toml +++ b/conformance/results/mypy/tuples_type_compat.toml @@ -1,7 +1,6 @@ conformant = "Partial" notes = """ Does not support tuple narrowing based on `len()` type guard (optional). -Incorrectly narrows tuple based on sequence patterns. """ output = """ tuples_type_compat.py:15: error: Incompatible types in assignment (expression has type "tuple[float, complex]", variable has type "tuple[int, int]") [assignment] @@ -13,7 +12,6 @@ tuples_type_compat.py:62: error: Incompatible types in assignment (expression ha tuples_type_compat.py:95: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int]" [assert-type] tuples_type_compat.py:99: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[str, str] | tuple[int, int]" [assert-type] tuples_type_compat.py:103: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int, str, int]" [assert-type] -tuples_type_compat.py:117: error: Expression is of type "tuple[Never, int]", not "tuple[int | str, int]" [assert-type] tuples_type_compat.py:136: error: Expression is of type "Sequence[object]", not "Sequence[complex | list[int]]" [assert-type] tuples_type_compat.py:139: error: Expression is of type "Sequence[object]", not "Sequence[int | str]" [assert-type] tuples_type_compat.py:144: error: Incompatible types in assignment (expression has type "tuple[int, str, str]", variable has type "tuple[int, str]") [assignment] @@ -32,7 +30,6 @@ errors_diff = """ Line 95: Unexpected errors ['tuples_type_compat.py:95: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int]" [assert-type]'] Line 99: Unexpected errors ['tuples_type_compat.py:99: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[str, str] | tuple[int, int]" [assert-type]'] Line 103: Unexpected errors ['tuples_type_compat.py:103: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int, str, int]" [assert-type]'] -Line 117: Unexpected errors ['tuples_type_compat.py:117: error: Expression is of type "tuple[Never, int]", not "tuple[int | str, int]" [assert-type]'] Line 136: Unexpected errors ['tuples_type_compat.py:136: error: Expression is of type "Sequence[object]", not "Sequence[complex | list[int]]" [assert-type]'] Line 139: Unexpected errors ['tuples_type_compat.py:139: error: Expression is of type "Sequence[object]", not "Sequence[int | str]" [assert-type]'] """ diff --git a/conformance/results/mypy/typeddicts_readonly.toml b/conformance/results/mypy/typeddicts_readonly.toml index 8af1a3a9..6dc58bb6 100644 --- a/conformance/results/mypy/typeddicts_readonly.toml +++ b/conformance/results/mypy/typeddicts_readonly.toml @@ -1,35 +1,17 @@ -conformant = "Unsupported" +conformant = "Partial" +notes = """ +Incorrectly rejects NotRequired directive when used in an Annotated annotation. +""" output = """ -typeddicts_readonly.py:18: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly.py:18: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly.py:25: error: "ReadOnly?[builtins.list[builtins.str]]" has no attribute "append" [attr-defined] -typeddicts_readonly.py:31: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly.py:31: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly.py:37: error: "ReadOnly?[builtins.list[builtins.str]]" has no attribute "append" [attr-defined] -typeddicts_readonly.py:45: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly.py:45: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly.py:45: error: Required[] can be only used in a TypedDict definition [valid-type] -typeddicts_readonly.py:46: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly.py:46: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly.py:46: error: NotRequired[] can be only used in a TypedDict definition [valid-type] -typeddicts_readonly.py:55: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly.py:55: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases +typeddicts_readonly.py:24: error: ReadOnly TypedDict key "members" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:36: error: ReadOnly TypedDict key "members" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:50: error: ReadOnly TypedDict key "title" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly.py:51: error: ReadOnly TypedDict key "year" TypedDict is mutated [typeddict-readonly-mutated] typeddicts_readonly.py:56: error: NotRequired[] can be only used in a TypedDict definition [valid-type] +typeddicts_readonly.py:60: error: ReadOnly TypedDict key "title" TypedDict is mutated [typeddict-readonly-mutated] """ conformance_automated = "Fail" errors_diff = """ -Line 24: Expected 1 errors -Line 36: Expected 1 errors -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 60: Expected 1 errors Line 61: Expected 1 errors -Line 18: Unexpected errors ['typeddicts_readonly.py:18: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 25: Unexpected errors ['typeddicts_readonly.py:25: error: "ReadOnly?[builtins.list[builtins.str]]" has no attribute "append" [attr-defined]'] -Line 31: Unexpected errors ['typeddicts_readonly.py:31: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 37: Unexpected errors ['typeddicts_readonly.py:37: error: "ReadOnly?[builtins.list[builtins.str]]" has no attribute "append" [attr-defined]'] -Line 45: Unexpected errors ['typeddicts_readonly.py:45: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly.py:45: error: Required[] can be only used in a TypedDict definition [valid-type]'] -Line 46: Unexpected errors ['typeddicts_readonly.py:46: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly.py:46: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] -Line 55: Unexpected errors ['typeddicts_readonly.py:55: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] Line 56: Unexpected errors ['typeddicts_readonly.py:56: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] """ diff --git a/conformance/results/mypy/typeddicts_readonly_consistency.toml b/conformance/results/mypy/typeddicts_readonly_consistency.toml index 9228d163..ea01b2dc 100644 --- a/conformance/results/mypy/typeddicts_readonly_consistency.toml +++ b/conformance/results/mypy/typeddicts_readonly_consistency.toml @@ -1,24 +1,18 @@ -conformant = "Unsupported" +conformant = "Partial" +notes = """ +Incorrectly rejects assignment of required item to not-required read-only item. +""" output = """ -typeddicts_readonly_consistency.py:30: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_consistency.py:30: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_consistency.py:30: error: NotRequired[] can be only used in a TypedDict definition [valid-type] typeddicts_readonly_consistency.py:37: error: Incompatible types in assignment (expression has type "A1", variable has type "B1") [assignment] typeddicts_readonly_consistency.py:38: error: Incompatible types in assignment (expression has type "C1", variable has type "B1") [assignment] typeddicts_readonly_consistency.py:40: error: Incompatible types in assignment (expression has type "A1", variable has type "C1") [assignment] -typeddicts_readonly_consistency.py:41: error: Incompatible types in assignment (expression has type "B1", variable has type "C1") [assignment] -typeddicts_readonly_consistency.py:66: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_consistency.py:66: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases typeddicts_readonly_consistency.py:79: error: Incompatible types in assignment (expression has type "C2", variable has type "A2") [assignment] +typeddicts_readonly_consistency.py:81: error: Incompatible types in assignment (expression has type "A2", variable has type "B2") [assignment] typeddicts_readonly_consistency.py:82: error: Incompatible types in assignment (expression has type "C2", variable has type "B2") [assignment] typeddicts_readonly_consistency.py:84: error: Incompatible types in assignment (expression has type "A2", variable has type "C2") [assignment] typeddicts_readonly_consistency.py:85: error: Incompatible types in assignment (expression has type "B2", variable has type "C2") [assignment] """ conformance_automated = "Fail" errors_diff = """ -Line 81: Expected 1 errors -Line 30: Unexpected errors ['typeddicts_readonly_consistency.py:30: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_consistency.py:30: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] -Line 41: Unexpected errors ['typeddicts_readonly_consistency.py:41: error: Incompatible types in assignment (expression has type "B1", variable has type "C1") [assignment]'] -Line 66: Unexpected errors ['typeddicts_readonly_consistency.py:66: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] Line 79: Unexpected errors ['typeddicts_readonly_consistency.py:79: error: Incompatible types in assignment (expression has type "C2", variable has type "A2") [assignment]'] """ diff --git a/conformance/results/mypy/typeddicts_readonly_inheritance.toml b/conformance/results/mypy/typeddicts_readonly_inheritance.toml index 609c0abf..46bc4ce0 100644 --- a/conformance/results/mypy/typeddicts_readonly_inheritance.toml +++ b/conformance/results/mypy/typeddicts_readonly_inheritance.toml @@ -1,91 +1,39 @@ -conformant = "Unsupported" +conformant = "Partial" +notes = """ +Incorrectly rejects non-ReadOnly override of ReadOnly item. +Incorrectly rejects override of ReadOnly item with another ReadOnly item with narrower type. +Incorrectly rejects override of NotRequired ReadOnly item with a Required ReadOnly item. +""" output = """ -typeddicts_readonly_inheritance.py:15: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:15: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases typeddicts_readonly_inheritance.py:19: error: Overwriting TypedDict field "name" while extending [misc] -typeddicts_readonly_inheritance.py:43: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:43: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:44: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:44: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases +typeddicts_readonly_inheritance.py:25: error: ReadOnly TypedDict key "name" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly_inheritance.py:36: error: ReadOnly TypedDict key "name" TypedDict is mutated [typeddict-readonly-mutated] typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending [misc] -typeddicts_readonly_inheritance.py:49: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:49: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases typeddicts_readonly_inheritance.py:50: error: Overwriting TypedDict field "alt" while extending [misc] -typeddicts_readonly_inheritance.py:50: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:50: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:58: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:58: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:58: error: NotRequired[] can be only used in a TypedDict definition [valid-type] typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending [misc] -typeddicts_readonly_inheritance.py:62: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:62: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:62: error: Required[] can be only used in a TypedDict definition [valid-type] typeddicts_readonly_inheritance.py:65: error: Missing key "name" for TypedDict "RequiredName" [typeddict-item] -typeddicts_readonly_inheritance.py:72: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:72: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:72: error: NotRequired[] can be only used in a TypedDict definition [valid-type] typeddicts_readonly_inheritance.py:76: error: Overwriting TypedDict field "ident" while extending [misc] +typeddicts_readonly_inheritance.py:81: error: ReadOnly TypedDict key "ident" TypedDict is mutated [typeddict-readonly-mutated] +typeddicts_readonly_inheritance.py:82: error: ReadOnly TypedDict key "ident" TypedDict is mutated [typeddict-readonly-mutated] typeddicts_readonly_inheritance.py:82: error: Value of "ident" has incompatible type "int"; expected "str" [typeddict-item] typeddicts_readonly_inheritance.py:83: error: Incompatible types (expression has type "int", TypedDict item "ident" has type "str") [typeddict-item] typeddicts_readonly_inheritance.py:84: error: Missing key "ident" for TypedDict "User" [typeddict-item] -typeddicts_readonly_inheritance.py:89: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:89: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:89: error: NotRequired[] can be only used in a TypedDict definition [valid-type] -typeddicts_readonly_inheritance.py:90: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:90: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:90: error: Required[] can be only used in a TypedDict definition [valid-type] typeddicts_readonly_inheritance.py:94: error: Overwriting TypedDict field "a" while extending [misc] -typeddicts_readonly_inheritance.py:94: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:94: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases typeddicts_readonly_inheritance.py:98: error: Overwriting TypedDict field "a" while extending [misc] typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending [misc] -typeddicts_readonly_inheritance.py:102: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:102: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:102: error: Required[] can be only used in a TypedDict definition [valid-type] typeddicts_readonly_inheritance.py:106: error: Overwriting TypedDict field "c" while extending [misc] -typeddicts_readonly_inheritance.py:106: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:106: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:106: error: NotRequired[] can be only used in a TypedDict definition [valid-type] -typeddicts_readonly_inheritance.py:111: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:111: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:116: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:116: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases typeddicts_readonly_inheritance.py:119: error: Overwriting TypedDict field "x" while merging [misc] typeddicts_readonly_inheritance.py:119: error: Overwriting TypedDict field "y" while merging [misc] -typeddicts_readonly_inheritance.py:123: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:123: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:123: error: NotRequired[] can be only used in a TypedDict definition [valid-type] -typeddicts_readonly_inheritance.py:124: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:124: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:124: error: Required[] can be only used in a TypedDict definition [valid-type] -typeddicts_readonly_inheritance.py:128: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:128: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:128: error: Required[] can be only used in a TypedDict definition [valid-type] -typeddicts_readonly_inheritance.py:129: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_inheritance.py:129: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_inheritance.py:129: error: NotRequired[] can be only used in a TypedDict definition [valid-type] typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "x" while merging [misc] typeddicts_readonly_inheritance.py:132: error: Overwriting TypedDict field "y" while merging [misc] """ conformance_automated = "Fail" errors_diff = """ -Line 36: Expected 1 errors -Line 15: Unexpected errors ['typeddicts_readonly_inheritance.py:15: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] Line 19: Unexpected errors ['typeddicts_readonly_inheritance.py:19: error: Overwriting TypedDict field "name" while extending [misc]'] -Line 43: Unexpected errors ['typeddicts_readonly_inheritance.py:43: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 44: Unexpected errors ['typeddicts_readonly_inheritance.py:44: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 49: Unexpected errors ['typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending [misc]', 'typeddicts_readonly_inheritance.py:49: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 58: Unexpected errors ['typeddicts_readonly_inheritance.py:58: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:58: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] -Line 62: Unexpected errors ['typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending [misc]', 'typeddicts_readonly_inheritance.py:62: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:62: error: Required[] can be only used in a TypedDict definition [valid-type]'] -Line 72: Unexpected errors ['typeddicts_readonly_inheritance.py:72: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:72: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 25: Unexpected errors ['typeddicts_readonly_inheritance.py:25: error: ReadOnly TypedDict key "name" TypedDict is mutated [typeddict-readonly-mutated]'] +Line 49: Unexpected errors ['typeddicts_readonly_inheritance.py:49: error: Overwriting TypedDict field "albums" while extending [misc]'] +Line 62: Unexpected errors ['typeddicts_readonly_inheritance.py:62: error: Overwriting TypedDict field "name" while extending [misc]'] Line 76: Unexpected errors ['typeddicts_readonly_inheritance.py:76: error: Overwriting TypedDict field "ident" while extending [misc]'] -Line 89: Unexpected errors ['typeddicts_readonly_inheritance.py:89: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:89: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] -Line 90: Unexpected errors ['typeddicts_readonly_inheritance.py:90: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:90: error: Required[] can be only used in a TypedDict definition [valid-type]'] -Line 102: Unexpected errors ['typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending [misc]', 'typeddicts_readonly_inheritance.py:102: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:102: error: Required[] can be only used in a TypedDict definition [valid-type]'] -Line 111: Unexpected errors ['typeddicts_readonly_inheritance.py:111: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 116: Unexpected errors ['typeddicts_readonly_inheritance.py:116: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 123: Unexpected errors ['typeddicts_readonly_inheritance.py:123: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:123: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] -Line 124: Unexpected errors ['typeddicts_readonly_inheritance.py:124: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:124: error: Required[] can be only used in a TypedDict definition [valid-type]'] -Line 128: Unexpected errors ['typeddicts_readonly_inheritance.py:128: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:128: error: Required[] can be only used in a TypedDict definition [valid-type]'] -Line 129: Unexpected errors ['typeddicts_readonly_inheritance.py:129: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]', 'typeddicts_readonly_inheritance.py:129: error: NotRequired[] can be only used in a TypedDict definition [valid-type]'] +Line 81: Unexpected errors ['typeddicts_readonly_inheritance.py:81: error: ReadOnly TypedDict key "ident" TypedDict is mutated [typeddict-readonly-mutated]'] +Line 102: Unexpected errors ['typeddicts_readonly_inheritance.py:102: error: Overwriting TypedDict field "b" while extending [misc]'] """ diff --git a/conformance/results/mypy/typeddicts_readonly_kwargs.toml b/conformance/results/mypy/typeddicts_readonly_kwargs.toml index cc8dcd74..a90e015f 100644 --- a/conformance/results/mypy/typeddicts_readonly_kwargs.toml +++ b/conformance/results/mypy/typeddicts_readonly_kwargs.toml @@ -1,13 +1,7 @@ -conformant = "Unsupported" +conformant = "Pass" output = """ -typeddicts_readonly_kwargs.py:24: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_kwargs.py:24: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_kwargs.py:25: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_kwargs.py:25: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases +typeddicts_readonly_kwargs.py:33: error: ReadOnly TypedDict key "key1" TypedDict is mutated [typeddict-readonly-mutated] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 33: Expected 1 errors -Line 24: Unexpected errors ['typeddicts_readonly_kwargs.py:24: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 25: Unexpected errors ['typeddicts_readonly_kwargs.py:25: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] """ diff --git a/conformance/results/mypy/typeddicts_readonly_update.toml b/conformance/results/mypy/typeddicts_readonly_update.toml index dfb56389..c53706fc 100644 --- a/conformance/results/mypy/typeddicts_readonly_update.toml +++ b/conformance/results/mypy/typeddicts_readonly_update.toml @@ -1,13 +1,13 @@ -conformant = "Unsupported" +conformant = "Partial" +notes = """ +Incorrectly allows update of ReadOnly item. +Incorrectly rejects update involving an item with Never type. +""" output = """ -typeddicts_readonly_update.py:17: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_update.py:17: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases -typeddicts_readonly_update.py:30: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type] -typeddicts_readonly_update.py:30: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases +typeddicts_readonly_update.py:34: error: Argument 1 to "update" of "TypedDict" has incompatible type "B"; expected "TypedDict({'x'?=: int, 'y': int})" [typeddict-item] """ conformance_automated = "Fail" errors_diff = """ Line 23: Expected 1 errors -Line 17: Unexpected errors ['typeddicts_readonly_update.py:17: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] -Line 30: Unexpected errors ['typeddicts_readonly_update.py:30: error: Variable "typing_extensions.ReadOnly" is not valid as a type [valid-type]'] +Line 34: Unexpected errors ['typeddicts_readonly_update.py:34: error: Argument 1 to "update" of "TypedDict" has incompatible type "B"; expected "TypedDict({\\'x\\'?=: int, \\'y\\': int})" [typeddict-item]'] """ diff --git a/conformance/results/mypy/typeddicts_required.toml b/conformance/results/mypy/typeddicts_required.toml index 885bf857..7cf6994d 100644 --- a/conformance/results/mypy/typeddicts_required.toml +++ b/conformance/results/mypy/typeddicts_required.toml @@ -5,8 +5,8 @@ Does not support nesting of `Annotated` and `Required` or `NotRequired`. output = """ typeddicts_required.py:12: error: Required[] can be only used in a TypedDict definition [valid-type] typeddicts_required.py:19: error: NotRequired[] can be only used in a TypedDict definition [valid-type] -typeddicts_required.py:62: error: Required[] can be only used in a TypedDict definition [valid-type] -typeddicts_required.py:63: error: NotRequired[] can be only used in a TypedDict definition [valid-type] +typeddicts_required.py:62: error: "Required[]" type cannot be nested [valid-type] +typeddicts_required.py:63: error: "NotRequired[]" type cannot be nested [valid-type] typeddicts_required.py:68: error: Required[] can be only used in a TypedDict definition [valid-type] typeddicts_required.py:70: error: Required[] can be only used in a TypedDict definition [valid-type] """ diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index f2673d1c..cdbafd59 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ -version = "mypy 1.11.2" -test_duration = 1.6 +version = "mypy 1.12.0" +test_duration = 1.7 diff --git a/conformance/results/pyre/aliases_type_statement.toml b/conformance/results/pyre/aliases_type_statement.toml index 02d923e1..31559fcb 100644 --- a/conformance/results/pyre/aliases_type_statement.toml +++ b/conformance/results/pyre/aliases_type_statement.toml @@ -25,14 +25,14 @@ Line 46: Expected 1 errors Line 47: Expected 1 errors Line 48: Expected 1 errors Line 49: Expected 1 errors -Line 52: Expected 1 errors -Line 58: Expected 1 errors -Line 64: Expected 1 errors -Line 69: Expected 1 errors +Line 56: Expected 1 errors +Line 62: Expected 1 errors +Line 67: Expected 1 errors +Line 77: Expected 1 errors Line 79: Expected 1 errors -Line 81: Expected 1 errors +Line 82: Expected 1 errors Line 84: Expected 1 errors -Line 86: Expected 1 errors -Line 90: Expected 1 errors +Lines 51, 52: Expected error (tag 'TA14') +Lines 88, 89: Expected error (tag 'RTA6') Line 8: Unexpected errors ['aliases_type_statement.py:8:6 Parsing failure [404]: invalid syntax'] """ diff --git a/conformance/results/pyre/generics_syntax_declarations.toml b/conformance/results/pyre/generics_syntax_declarations.toml index 59b938d5..41081106 100644 --- a/conformance/results/pyre/generics_syntax_declarations.toml +++ b/conformance/results/pyre/generics_syntax_declarations.toml @@ -7,15 +7,15 @@ generics_syntax_declarations.py:13:17 Parsing failure [404]: invalid syntax """ conformance_automated = "Fail" errors_diff = """ -Line 19: Expected 1 errors -Line 27: Expected 1 errors -Line 34: Expected 1 errors -Line 46: Expected 1 errors -Line 50: Expected 1 errors -Line 62: Expected 1 errors -Line 66: Expected 1 errors -Line 73: Expected 1 errors -Line 77: Expected 1 errors -Line 81: Expected 1 errors +Line 17: Expected 1 errors +Line 25: Expected 1 errors +Line 32: Expected 1 errors +Line 44: Expected 1 errors +Line 48: Expected 1 errors +Line 60: Expected 1 errors +Line 64: Expected 1 errors +Line 71: Expected 1 errors +Line 75: Expected 1 errors +Line 79: Expected 1 errors Line 13: Unexpected errors ['generics_syntax_declarations.py:13:17 Parsing failure [404]: invalid syntax'] """ diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index f4f08845..4c6e1161 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.22" -test_duration = 4.5 +test_duration = 4.6 diff --git a/conformance/results/pyright/aliases_type_statement.toml b/conformance/results/pyright/aliases_type_statement.toml index ee9f8f7c..4556366e 100644 --- a/conformance/results/pyright/aliases_type_statement.toml +++ b/conformance/results/pyright/aliases_type_statement.toml @@ -36,19 +36,19 @@ aliases_type_statement.py:46:23 - error: Expected class but received "Literal[Tr aliases_type_statement.py:47:23 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) aliases_type_statement.py:48:23 - error: Binary operator not allowed in type expression (reportInvalidTypeForm) aliases_type_statement.py:49:23 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues) -aliases_type_statement.py:52:10 - error: Type alias declaration "BadTypeAlias14" is obscured by a declaration of the same name (reportRedeclaration) -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]" +aliases_type_statement.py:51:6 - error: Type alias declaration "BadTypeAlias14" is obscured by a declaration of the same name (reportRedeclaration) +aliases_type_statement.py:56:10 - error: A type statement can be used only within a module or class scope (reportGeneralTypeIssues) +aliases_type_statement.py:62:23 - error: Type parameter "V" is not included in the type parameter list for "TA1" (reportGeneralTypeIssues) +aliases_type_statement.py:67:17 - error: Type parameter "T1" is not included in the type parameter list for "TA2" (reportGeneralTypeIssues) +aliases_type_statement.py:77:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" Type "str" is not assignable to type "int" "str" is not assignable to "int" (reportInvalidTypeForm) -aliases_type_statement.py:81:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" +aliases_type_statement.py:79:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" Type "int" is not assignable to type "str" "int" is not assignable to "str" (reportInvalidTypeForm) -aliases_type_statement.py:84:28 - error: Type alias "RecursiveTypeAlias3" cannot use itself in its definition (reportGeneralTypeIssues) -aliases_type_statement.py:86:31 - error: Type alias "RecursiveTypeAlias4" cannot use itself in its definition (reportGeneralTypeIssues) -aliases_type_statement.py:90:28 - error: Type alias "RecursiveTypeAlias6" cannot use itself in its definition (reportGeneralTypeIssues) +aliases_type_statement.py:82:28 - error: Type alias "RecursiveTypeAlias3" cannot use itself in its definition (reportGeneralTypeIssues) +aliases_type_statement.py:84:31 - error: Type alias "RecursiveTypeAlias4" cannot use itself in its definition (reportGeneralTypeIssues) +aliases_type_statement.py:88:28 - error: Type alias "RecursiveTypeAlias6" cannot use itself in its definition (reportGeneralTypeIssues) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/generics_syntax_declarations.toml b/conformance/results/pyright/generics_syntax_declarations.toml index 4321bdb3..25db9152 100644 --- a/conformance/results/pyright/generics_syntax_declarations.toml +++ b/conformance/results/pyright/generics_syntax_declarations.toml @@ -1,18 +1,18 @@ conformant = "Pass" output = """ -generics_syntax_declarations.py:19:17 - error: "Generic" base class cannot be used with type parameter syntax (reportGeneralTypeIssues) -generics_syntax_declarations.py:27:20 - error: Type arguments are not allowed with Protocol class when using type parameter syntax (reportGeneralTypeIssues) -generics_syntax_declarations.py:34:11 - error: Cannot access attribute "is_integer" for class "str*" +generics_syntax_declarations.py:17:17 - error: "Generic" base class cannot be used with type parameter syntax (reportGeneralTypeIssues) +generics_syntax_declarations.py:25:20 - error: Type arguments are not allowed with Protocol class when using type parameter syntax (reportGeneralTypeIssues) +generics_syntax_declarations.py:32:11 - error: Cannot access attribute "is_integer" for class "str*" Attribute "is_integer" is unknown (reportAttributeAccessIssue) -generics_syntax_declarations.py:46:21 - error: TypeVar constraint type cannot be generic (reportGeneralTypeIssues) -generics_syntax_declarations.py:50:17 - error: List expression not allowed in type expression +generics_syntax_declarations.py:44:21 - error: TypeVar constraint type cannot be generic (reportGeneralTypeIssues) +generics_syntax_declarations.py:48:17 - error: List expression not allowed in type expression Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -generics_syntax_declarations.py:50:17 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) -generics_syntax_declarations.py:62:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues) -generics_syntax_declarations.py:66:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues) -generics_syntax_declarations.py:73:17 - error: Variable not allowed in type expression (reportInvalidTypeForm) -generics_syntax_declarations.py:77:18 - error: Expected class but received "Literal[3]" (reportGeneralTypeIssues) -generics_syntax_declarations.py:81:23 - error: "S" is not defined (reportUndefinedVariable) +generics_syntax_declarations.py:48:17 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) +generics_syntax_declarations.py:60:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues) +generics_syntax_declarations.py:64:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues) +generics_syntax_declarations.py:71:17 - error: Variable not allowed in type expression (reportInvalidTypeForm) +generics_syntax_declarations.py:75:18 - error: Expected class but received "Literal[3]" (reportGeneralTypeIssues) +generics_syntax_declarations.py:79:23 - error: "S" is not defined (reportUndefinedVariable) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 17fcd913..a90f554c 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ version = "pyright 1.1.384" -test_duration = 1.2 +test_duration = 1.3 diff --git a/conformance/results/pytype/aliases_type_statement.toml b/conformance/results/pytype/aliases_type_statement.toml index cd7ae295..84f4bc31 100644 --- a/conformance/results/pytype/aliases_type_statement.toml +++ b/conformance/results/pytype/aliases_type_statement.toml @@ -25,13 +25,13 @@ Line 46: Expected 1 errors Line 47: Expected 1 errors Line 48: Expected 1 errors Line 49: Expected 1 errors -Line 52: Expected 1 errors -Line 58: Expected 1 errors -Line 64: Expected 1 errors -Line 69: Expected 1 errors +Line 56: Expected 1 errors +Line 62: Expected 1 errors +Line 67: Expected 1 errors +Line 77: Expected 1 errors Line 79: Expected 1 errors -Line 81: Expected 1 errors +Line 82: Expected 1 errors Line 84: Expected 1 errors -Line 86: Expected 1 errors -Line 90: Expected 1 errors +Lines 51, 52: Expected error (tag 'TA14') +Lines 88, 89: Expected error (tag 'RTA6') """ diff --git a/conformance/results/pytype/generics_syntax_declarations.toml b/conformance/results/pytype/generics_syntax_declarations.toml index 3eeb5652..3960f34b 100644 --- a/conformance/results/pytype/generics_syntax_declarations.toml +++ b/conformance/results/pytype/generics_syntax_declarations.toml @@ -7,14 +7,14 @@ SyntaxError: Type parameter lists are only supported in Python 3.12 and greater """ conformance_automated = "Fail" errors_diff = """ -Line 19: Expected 1 errors -Line 27: Expected 1 errors -Line 34: Expected 1 errors -Line 46: Expected 1 errors -Line 50: Expected 1 errors -Line 62: Expected 1 errors -Line 66: Expected 1 errors -Line 73: Expected 1 errors -Line 77: Expected 1 errors -Line 81: Expected 1 errors +Line 17: Expected 1 errors +Line 25: Expected 1 errors +Line 32: Expected 1 errors +Line 44: Expected 1 errors +Line 48: Expected 1 errors +Line 60: Expected 1 errors +Line 64: Expected 1 errors +Line 71: Expected 1 errors +Line 75: Expected 1 errors +Line 79: Expected 1 errors """ diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml index 79ea0346..a314c2a0 100644 --- a/conformance/results/pytype/version.toml +++ b/conformance/results/pytype/version.toml @@ -1,2 +1,2 @@ version = "pytype 2024.10.11" -test_duration = 31.9 +test_duration = 33.1 diff --git a/conformance/results/results.html b/conformance/results/results.html index ec61d4b0..eb55cda3 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -158,17 +158,17 @@
- | mypy 1.11.2
-1.6sec
+ | mypy 1.12.0
+1.7sec
|
pyright 1.1.384
-1.2sec
+1.3sec
|
pyre 0.9.22
-4.5sec
+4.6sec
|
pytype 2024.10.11
-31.9sec
+33.1sec
|
|
---|---|---|---|---|---|---|
@@ -277,7 +277,7 @@ Python Type System Conformance Test Results | 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. |
+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. |
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. |
@@ -337,7 +337,7 @@ Unsupported Type parameter syntax not yet support. |
generics_syntax_declarations | -Partial Does not detect many illegal usages of type parameter syntax. |
+Pass | Pass | Unsupported Type parameter syntax not yet support. |
Unsupported Type parameter syntax not yet support. |
@@ -415,7 +415,7 @@ Unsupported Does not support covariant or contravariant TypeVars. |
generics_variance_inference | -Partial Computes incorrect variance in some cases. |
+Pass | Pass | Unsupported Type parameter syntax not yet support. |
Unsupported Type parameter syntax not yet support. |
@@ -484,7 +484,7 @@ 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 | -Partial Does not reject use of TypeAliasType as base class. Does not reject redefinition of type alias defined with type statement. Does not reject type alias defined in function scope. Does not reject type alias with circular definition. |
+Partial Does not reject type alias defined in function scope. |
Pass | Unsupported Does not support `type` statement. |
Unsupported Does not support `type` statement. |
@@ -808,31 +808,31 @@ 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_readonly | -Unsupported | +Partial Incorrectly rejects NotRequired directive when used in an Annotated annotation. |
Pass | Unsupported | Unsupported | |
typeddicts_readonly_consistency | -Unsupported | +Partial Incorrectly rejects assignment of required item to not-required read-only item. |
Pass | Unsupported | Unsupported | |
typeddicts_readonly_inheritance | -Unsupported | +Partial Incorrectly rejects non-ReadOnly override of ReadOnly item. Incorrectly rejects override of ReadOnly item with another ReadOnly item with narrower type. Incorrectly rejects override of NotRequired ReadOnly item with a Required ReadOnly item. |
Pass | Unsupported | Unsupported | |
typeddicts_readonly_kwargs | -Unsupported | +Pass | Pass | Unsupported | Unsupported | |
typeddicts_readonly_update | -Unsupported | +Partial Incorrectly allows update of ReadOnly item. Incorrectly rejects update involving an item with Never type. |
Pass | Unsupported | Unsupported | @@ -859,7 +859,7 @@|
tuples_type_compat | -Partial Does not support tuple narrowing based on `len()` type guard (optional). Incorrectly narrows tuple based on sequence patterns. |
+Partial Does not support tuple narrowing based on `len()` type guard (optional). |
Pass | Partial Does not support some unpacked tuple forms. Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`. Does not support tuple narrowing based on `len()` type guard (optional). Does not correctly evaluate `Sequence[Never]` for `tuple[()]`. |
Partial Does not support unpacked tuple forms. Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`. Does not support tuple narrowing based on `len()` type guard (optional). |
diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py
index c8955c0f..185a3a0c 100644
--- a/conformance/src/type_checker.py
+++ b/conformance/src/type_checker.py
@@ -109,16 +109,6 @@ def run_tests(self, test_files: Sequence[str]) -> dict[str, str]:
"-m",
"mypy",
".",
- # Enable experimental support for PEP 695 syntax.
- # This can be removed once it's no longer experimental.
- "--enable-incomplete-feature=NewGenericSyntax",
- # Mypy currently crashes when run on a couple of test cases,
- # so we need to exclude them for now. Remove this once mypy adds
- # support for this functionality.
- "--exclude",
- r"generics_defaults\.py",
- "--exclude",
- r"generics_syntax_declarations\.py",
"--disable-error-code",
"empty-body",
]
diff --git a/conformance/tests/aliases_type_statement.py b/conformance/tests/aliases_type_statement.py
index 23fe137c..024b4098 100644
--- a/conformance/tests/aliases_type_statement.py
+++ b/conformance/tests/aliases_type_statement.py
@@ -48,10 +48,8 @@ def func2(x: object):
type BadTypeAlias12 = list or set # E
type BadTypeAlias13 = f"{'int'}" # E
-if 1 < 2:
- type BadTypeAlias14 = int # E: redeclared
-else:
- type BadTypeAlias14 = int
+type BadTypeAlias14 = int # E[TA14]: redeclared
+type BadTypeAlias14 = int # E[TA14]: redeclared
def func3():
@@ -87,5 +85,5 @@ def func3():
type RecursiveTypeAlias5[T] = T | list[RecursiveTypeAlias5[T]]
-type RecursiveTypeAlias6 = RecursiveTypeAlias7 # E: circular definition
-type RecursiveTypeAlias7 = RecursiveTypeAlias6
+type RecursiveTypeAlias6 = RecursiveTypeAlias7 # E[RTA6]: circular definition
+type RecursiveTypeAlias7 = RecursiveTypeAlias6 # E[RTA6]: circular definition
diff --git a/conformance/tests/generics_syntax_declarations.py b/conformance/tests/generics_syntax_declarations.py
index 21ab84cb..62d2d101 100644
--- a/conformance/tests/generics_syntax_declarations.py
+++ b/conformance/tests/generics_syntax_declarations.py
@@ -7,13 +7,11 @@
# This generic class is parameterized by a TypeVar T, a
# TypeVarTuple Ts, and a ParamSpec P.
-from typing import Generic, ParamSpec, Protocol, TypeVar, TypeVarTuple, assert_type
+from typing import Generic, Protocol
class ChildClass[T, *Ts, **P]:
- assert_type(T, TypeVar)
- assert_type(Ts, TypeVarTuple)
- assert_type(P, ParamSpec)
+ pass
class ClassA[T](Generic[T]): # E: Runtime error
diff --git a/conformance/tests/generics_variance_inference.py b/conformance/tests/generics_variance_inference.py
index c2de9376..c7e09760 100644
--- a/conformance/tests/generics_variance_inference.py
+++ b/conformance/tests/generics_variance_inference.py
@@ -41,7 +41,7 @@ def __iter__(self) -> Iterator[T]:
vco1_2: ShouldBeCovariant1[int] = ShouldBeCovariant1[float]() # E
-class ShouldBeCovariant2[T](Sequence[T]):
+class ShouldBeCovariant2[T](ShouldBeCovariant1[T]):
pass
@@ -85,7 +85,7 @@ def __init__(self, value: T) -> None:
self._value = value
@property
- def value(self):
+ def value(self) -> T:
return self._value
@value.setter