diff --git a/conformance/results/mypy/dataclasses_usage.toml b/conformance/results/mypy/dataclasses_usage.toml index dc4a82db4..72bf10a7c 100644 --- a/conformance/results/mypy/dataclasses_usage.toml +++ b/conformance/results/mypy/dataclasses_usage.toml @@ -3,18 +3,18 @@ notes = """ Does not detect unannotated usage of `dataclasses.field()`. """ output = """ -dataclasses_usage.py:36: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass [misc] -dataclasses_usage.py:51: error: Missing positional argument "unit_price" in call to "InventoryItem" [call-arg] -dataclasses_usage.py:52: error: Argument 2 to "InventoryItem" has incompatible type "str"; expected "float" [arg-type] -dataclasses_usage.py:53: error: Too many arguments for "InventoryItem" [call-arg] -dataclasses_usage.py:62: error: Attributes without a default cannot follow attributes with one [misc] -dataclasses_usage.py:68: error: Attributes without a default cannot follow attributes with one [misc] -dataclasses_usage.py:74: error: Attributes without a default cannot follow attributes with one [misc] -dataclasses_usage.py:84: error: Too many arguments for "DC4" [call-arg] -dataclasses_usage.py:89: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] -dataclasses_usage.py:127: error: Too many arguments for "DC7" [call-arg] -dataclasses_usage.py:130: error: Missing positional argument "y" in call to "DC8" [call-arg] -dataclasses_usage.py:179: error: Too many arguments for "DC13" [call-arg] +dataclasses_usage.py:35: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass [misc] +dataclasses_usage.py:50: error: Missing positional argument "unit_price" in call to "InventoryItem" [call-arg] +dataclasses_usage.py:51: error: Argument 2 to "InventoryItem" has incompatible type "str"; expected "float" [arg-type] +dataclasses_usage.py:52: error: Too many arguments for "InventoryItem" [call-arg] +dataclasses_usage.py:61: error: Attributes without a default cannot follow attributes with one [misc] +dataclasses_usage.py:67: error: Attributes without a default cannot follow attributes with one [misc] +dataclasses_usage.py:73: error: Attributes without a default cannot follow attributes with one [misc] +dataclasses_usage.py:83: error: Too many arguments for "DC4" [call-arg] +dataclasses_usage.py:88: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +dataclasses_usage.py:126: error: Too many arguments for "DC7" [call-arg] +dataclasses_usage.py:129: error: Missing positional argument "y" in call to "DC8" [call-arg] +dataclasses_usage.py:178: error: Too many arguments for "DC13" [call-arg] """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/mypy/generics_self_basic.toml b/conformance/results/mypy/generics_self_basic.toml index b3f22eae6..1c3ea6402 100644 --- a/conformance/results/mypy/generics_self_basic.toml +++ b/conformance/results/mypy/generics_self_basic.toml @@ -1,14 +1,9 @@ -conformant = "Partial" -notes = """ -Does not properly handle constructor call through `cls` parameter. -""" +conformant = "Pass" output = """ -generics_self_basic.py:19: error: Incompatible return value type (got "Shape", expected "Self") [return-value] -generics_self_basic.py:27: error: Too many arguments for "Shape" [call-arg] -generics_self_basic.py:32: error: Incompatible return value type (got "Shape", expected "Self") [return-value] +generics_self_basic.py:20: error: Incompatible return value type (got "Shape", expected "Self") [return-value] +generics_self_basic.py:33: error: Incompatible return value type (got "Shape", expected "Self") [return-value] generics_self_basic.py:64: error: Self type cannot have type arguments [misc] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 27: Unexpected errors ['generics_self_basic.py:27: error: Too many arguments for "Shape" [call-arg]'] """ diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index 7171ccab4..4f076d3cf 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ version = "mypy 1.9.0" -test_duration = 2.3 +test_duration = 1.6 diff --git a/conformance/results/pyre/dataclasses_usage.toml b/conformance/results/pyre/dataclasses_usage.toml index b8814ad43..88ef2af99 100644 --- a/conformance/results/pyre/dataclasses_usage.toml +++ b/conformance/results/pyre/dataclasses_usage.toml @@ -4,27 +4,27 @@ Does not report error when field with no default follows field with default. Incorrectly reports error with InitVar that has default value. """ output = """ -dataclasses_usage.py:51:5 Missing argument [20]: Call `InventoryItem.__init__` expects argument `unit_price`. -dataclasses_usage.py:52:27 Incompatible parameter type [6]: In call `InventoryItem.__init__`, for 2nd positional argument, expected `float` but got `str`. -dataclasses_usage.py:53:5 Too many arguments [19]: Call `InventoryItem.__init__` expects 3 positional arguments, 4 were provided. -dataclasses_usage.py:73:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC3` has type `InitVar[int]` but is used as type `int`. -dataclasses_usage.py:84:5 Too many arguments [19]: Call `DC4.__init__` expects 1 positional argument, 2 were provided. -dataclasses_usage.py:89:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC5` has type `int` but is used as type `str`. -dataclasses_usage.py:116:0 Uninitialized attribute [13]: Attribute `y` is declared in class `DC8` to have type `int` but is never initialized. -dataclasses_usage.py:127:0 Too many arguments [19]: Call `DC7.__init__` expects 1 positional argument, 2 were provided. -dataclasses_usage.py:130:0 Missing argument [20]: Call `DC8.__init__` expects argument `y`. -dataclasses_usage.py:172:0 Uninitialized attribute [13]: Attribute `x` is declared in class `DC13` to have type `int` but is never initialized. -dataclasses_usage.py:172:0 Uninitialized attribute [13]: Attribute `x_squared` is declared in class `DC13` to have type `int` but is never initialized. -dataclasses_usage.py:179:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. -dataclasses_usage.py:205:0 Incompatible variable type [9]: v7 is declared to have type `DataclassProto` but is used as type `DC15`. +dataclasses_usage.py:50:5 Missing argument [20]: Call `InventoryItem.__init__` expects argument `unit_price`. +dataclasses_usage.py:51:27 Incompatible parameter type [6]: In call `InventoryItem.__init__`, for 2nd positional argument, expected `float` but got `str`. +dataclasses_usage.py:52:5 Too many arguments [19]: Call `InventoryItem.__init__` expects 3 positional arguments, 4 were provided. +dataclasses_usage.py:72:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC3` has type `InitVar[int]` but is used as type `int`. +dataclasses_usage.py:83:5 Too many arguments [19]: Call `DC4.__init__` expects 1 positional argument, 2 were provided. +dataclasses_usage.py:88:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC5` has type `int` but is used as type `str`. +dataclasses_usage.py:115:0 Uninitialized attribute [13]: Attribute `y` is declared in class `DC8` to have type `int` but is never initialized. +dataclasses_usage.py:126:0 Too many arguments [19]: Call `DC7.__init__` expects 1 positional argument, 2 were provided. +dataclasses_usage.py:129:0 Missing argument [20]: Call `DC8.__init__` expects argument `y`. +dataclasses_usage.py:171:0 Uninitialized attribute [13]: Attribute `x` is declared in class `DC13` to have type `int` but is never initialized. +dataclasses_usage.py:171:0 Uninitialized attribute [13]: Attribute `x_squared` is declared in class `DC13` to have type `int` but is never initialized. +dataclasses_usage.py:178:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. +dataclasses_usage.py:204:0 Incompatible variable type [9]: v7 is declared to have type `DataclassProto` but is used as type `DC15`. """ conformance_automated = "Fail" errors_diff = """ -Lines 59, 62: Expected error (tag 'DC1') -Lines 65, 68: Expected error (tag 'DC2') -Lines 71, 74: Expected error (tag 'DC3') -Line 73: Unexpected errors ['dataclasses_usage.py:73:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC3` has type `InitVar[int]` but is used as type `int`.'] -Line 116: Unexpected errors ['dataclasses_usage.py:116:0 Uninitialized attribute [13]: Attribute `y` is declared in class `DC8` to have type `int` but is never initialized.'] -Line 172: Unexpected errors ['dataclasses_usage.py:172:0 Uninitialized attribute [13]: Attribute `x` is declared in class `DC13` to have type `int` but is never initialized.', 'dataclasses_usage.py:172:0 Uninitialized attribute [13]: Attribute `x_squared` is declared in class `DC13` to have type `int` but is never initialized.'] -Line 205: Unexpected errors ['dataclasses_usage.py:205:0 Incompatible variable type [9]: v7 is declared to have type `DataclassProto` but is used as type `DC15`.'] +Lines 58, 61: Expected error (tag 'DC1') +Lines 64, 67: Expected error (tag 'DC2') +Lines 70, 73: Expected error (tag 'DC3') +Line 72: Unexpected errors ['dataclasses_usage.py:72:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC3` has type `InitVar[int]` but is used as type `int`.'] +Line 115: Unexpected errors ['dataclasses_usage.py:115:0 Uninitialized attribute [13]: Attribute `y` is declared in class `DC8` to have type `int` but is never initialized.'] +Line 171: Unexpected errors ['dataclasses_usage.py:171:0 Uninitialized attribute [13]: Attribute `x` is declared in class `DC13` to have type `int` but is never initialized.', 'dataclasses_usage.py:171:0 Uninitialized attribute [13]: Attribute `x_squared` is declared in class `DC13` to have type `int` but is never initialized.'] +Line 204: Unexpected errors ['dataclasses_usage.py:204:0 Incompatible variable type [9]: v7 is declared to have type `DataclassProto` but is used as type `DC15`.'] """ diff --git a/conformance/results/pyre/generics_self_basic.toml b/conformance/results/pyre/generics_self_basic.toml index 00b751ac8..c937a575e 100644 --- a/conformance/results/pyre/generics_self_basic.toml +++ b/conformance/results/pyre/generics_self_basic.toml @@ -3,22 +3,20 @@ notes = """ Does not understand `Self` type. """ output = """ -generics_self_basic.py:13:26 Undefined attribute [16]: Module `typing` has no attribute `Self`. -generics_self_basic.py:19:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`. -generics_self_basic.py:26:30 Undefined attribute [16]: Module `typing` has no attribute `Self`. -generics_self_basic.py:27:15 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. -generics_self_basic.py:32:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`. -generics_self_basic.py:39:27 Undefined attribute [16]: Module `typing` has no attribute `Self`. -generics_self_basic.py:57:0 Uninitialized attribute [13]: Attribute `value` is declared in class `Container` to have type `Variable[T]` but is never initialized. +generics_self_basic.py:14:26 Undefined attribute [16]: Module `typing` has no attribute `Self`. +generics_self_basic.py:20:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`. +generics_self_basic.py:27:30 Undefined attribute [16]: Module `typing` has no attribute `Self`. +generics_self_basic.py:33:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`. +generics_self_basic.py:40:27 Undefined attribute [16]: Module `typing` has no attribute `Self`. +generics_self_basic.py:58:0 Uninitialized attribute [13]: Attribute `value` is declared in class `Container` to have type `Variable[T]` but is never initialized. generics_self_basic.py:64:25 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. generics_self_basic.py:80:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeVar`. """ conformance_automated = "Fail" errors_diff = """ -Line 13: Unexpected errors ['generics_self_basic.py:13:26 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] -Line 26: Unexpected errors ['generics_self_basic.py:26:30 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] -Line 27: Unexpected errors ['generics_self_basic.py:27:15 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided.'] -Line 39: Unexpected errors ['generics_self_basic.py:39:27 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] -Line 57: Unexpected errors ['generics_self_basic.py:57:0 Uninitialized attribute [13]: Attribute `value` is declared in class `Container` to have type `Variable[T]` but is never initialized.'] +Line 14: Unexpected errors ['generics_self_basic.py:14:26 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 27: Unexpected errors ['generics_self_basic.py:27:30 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 40: Unexpected errors ['generics_self_basic.py:40:27 Undefined attribute [16]: Module `typing` has no attribute `Self`.'] +Line 58: Unexpected errors ['generics_self_basic.py:58:0 Uninitialized attribute [13]: Attribute `value` is declared in class `Container` to have type `Variable[T]` but is never initialized.'] Line 80: Unexpected errors ['generics_self_basic.py:80:31 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeVar`.'] """ diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index 3c523460d..ac8158f0e 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.19" -test_duration = 3.2 +test_duration = 4.0 diff --git a/conformance/results/pyright/aliases_implicit.toml b/conformance/results/pyright/aliases_implicit.toml index 465482701..bc3199966 100644 --- a/conformance/results/pyright/aliases_implicit.toml +++ b/conformance/results/pyright/aliases_implicit.toml @@ -7,7 +7,7 @@ aliases_implicit.py:78:29 - error: Too many type arguments provided for "GoodTyp aliases_implicit.py:79:29 - error: Too many type arguments provided for "GoodTypeAlias8[T@GoodTypeAlias8]"; expected 1 but received 2 aliases_implicit.py:80:24 - error: Expected ParamSpec, ellipsis, or list of types aliases_implicit.py:81:9 - error: Could not specialize type "GoodTypeAlias12[TFloat@GoodTypeAlias12]" -  Type "str" cannot be assigned to type "float" +  Type "str" is incompatible with type "float"     "str" is incompatible with "float" aliases_implicit.py:106:9 - error: Variable not allowed in type expression (reportInvalidTypeForm) aliases_implicit.py:107:9 - error: Variable not allowed in type expression (reportInvalidTypeForm) diff --git a/conformance/results/pyright/aliases_newtype.toml b/conformance/results/pyright/aliases_newtype.toml index 75451f9f2..e95cb8ad3 100644 --- a/conformance/results/pyright/aliases_newtype.toml +++ b/conformance/results/pyright/aliases_newtype.toml @@ -2,7 +2,7 @@ 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" (reportArgumentType) -aliases_newtype.py:12:14 - error: Expression of type "Literal[42]" cannot be assigned to declared type "UserId" +aliases_newtype.py:12:14 - error: Expression of type "Literal[42]" is incompatible with declared type "UserId"   "Literal[42]" is incompatible with "UserId" (reportAssignmentType) aliases_newtype.py:20:16 - error: Second argument to "isinstance" must be a class or tuple of classes   Class created with NewType cannot be used with instance and class checks (reportArgumentType) diff --git a/conformance/results/pyright/aliases_recursive.toml b/conformance/results/pyright/aliases_recursive.toml index 41ce6b4f8..4fc869623 100644 --- a/conformance/results/pyright/aliases_recursive.toml +++ b/conformance/results/pyright/aliases_recursive.toml @@ -1,7 +1,7 @@ conformant = "Pass" output = """ -aliases_recursive.py:19:12 - error: Expression of type "dict[str, int | complex]" cannot be assigned to declared type "Json" -  Type "dict[str, int | complex]" cannot be assigned to type "Json" +aliases_recursive.py:19:12 - error: Expression of type "dict[str, int | complex]" is incompatible with declared type "Json" +  Type "dict[str, int | complex]" is incompatible with type "Json"     "dict[str, int | complex]" is incompatible with "None"     "dict[str, int | complex]" is incompatible with "int"     "dict[str, int | complex]" is incompatible with "str" @@ -10,54 +10,54 @@ aliases_recursive.py:19:12 - error: Expression of type "dict[str, int | complex]     "dict[str, int | complex]" is incompatible with "dict[str, Json]"       Type parameter "_VT@dict" is invariant, but "int | complex" is not the same as "Json" ... (reportAssignmentType) -aliases_recursive.py:20:16 - error: Expression of type "list[int | complex]" cannot be assigned to declared type "Json" -  Type "complex" cannot be assigned to type "Json" +aliases_recursive.py:20:16 - error: Expression of type "list[int | complex]" is incompatible with declared type "Json" +  Type "complex" is incompatible with type "Json"     "complex" is incompatible with "None"     "complex" is incompatible with "int"     "complex" is incompatible with "str"     "complex" is incompatible with "float"     "complex" is incompatible with "list[Json]"     "complex" is incompatible with "dict[str, Json]" (reportAssignmentType) -aliases_recursive.py:38:22 - error: Expression of type "tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" cannot be assigned to declared type "RecursiveTuple" -  Type "tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" cannot be assigned to type "RecursiveTuple" +aliases_recursive.py:38:22 - error: Expression of type "tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" is incompatible with declared type "RecursiveTuple" +  Type "tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" is incompatible with type "RecursiveTuple"     "tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" is incompatible with "str"     "tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" is incompatible with "int"     "tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]" is incompatible with "tuple[RecursiveTuple, ...]"       Tuple entry 1 is incorrect type (reportAssignmentType) -aliases_recursive.py:39:22 - error: Expression of type "tuple[Literal[1], list[int]]" cannot be assigned to declared type "RecursiveTuple" -  Type "tuple[Literal[1], list[int]]" cannot be assigned to type "RecursiveTuple" +aliases_recursive.py:39:22 - error: Expression of type "tuple[Literal[1], list[int]]" is incompatible with declared type "RecursiveTuple" +  Type "tuple[Literal[1], list[int]]" is incompatible with type "RecursiveTuple"     "tuple[Literal[1], list[int]]" is incompatible with "str"     "tuple[Literal[1], list[int]]" is incompatible with "int"     "tuple[Literal[1], list[int]]" is incompatible with "tuple[RecursiveTuple, ...]"       Tuple entry 1 is incorrect type (reportAssignmentType) -aliases_recursive.py:50:24 - error: Expression of type "dict[str, list[int]]" cannot be assigned to declared type "RecursiveMapping" -  Type "dict[str, list[int]]" cannot be assigned to type "RecursiveMapping" +aliases_recursive.py:50:24 - error: Expression of type "dict[str, list[int]]" is incompatible with declared type "RecursiveMapping" +  Type "dict[str, list[int]]" is incompatible with type "RecursiveMapping"     "dict[str, list[int]]" is incompatible with "str"     "dict[str, list[int]]" is incompatible with "int"     "dict[str, list[int]]" is incompatible with "Mapping[str, RecursiveMapping]"       Type parameter "_VT_co@Mapping" is covariant, but "list[int]" is not a subtype of "RecursiveMapping" -        Type "list[int]" cannot be assigned to type "RecursiveMapping" +        Type "list[int]" is incompatible with type "RecursiveMapping"           "list[int]" is incompatible with "str"           "list[int]" is incompatible with "int" ... (reportAssignmentType) -aliases_recursive.py:51:24 - error: Expression of type "dict[str, str | int | list[int]]" cannot be assigned to declared type "RecursiveMapping" -  Type "dict[str, str | int | list[int]]" cannot be assigned to type "RecursiveMapping" +aliases_recursive.py:51:24 - error: Expression of type "dict[str, str | int | list[int]]" is incompatible with declared type "RecursiveMapping" +  Type "dict[str, str | int | list[int]]" is incompatible with type "RecursiveMapping"     "dict[str, str | int | list[int]]" is incompatible with "str"     "dict[str, str | int | list[int]]" is incompatible with "int"     "dict[str, str | int | list[int]]" is incompatible with "Mapping[str, RecursiveMapping]"       Type parameter "_VT_co@Mapping" is covariant, but "str | int | list[int]" is not a subtype of "RecursiveMapping" (reportAssignmentType) -aliases_recursive.py:52:24 - error: Expression of type "dict[str, str | int | dict[str, str | int | list[int]]]" cannot be assigned to declared type "RecursiveMapping" -  Type "dict[str, str | int | dict[str, str | int | list[int]]]" cannot be assigned to type "RecursiveMapping" +aliases_recursive.py:52:24 - error: Expression of type "dict[str, str | int | dict[str, str | int | list[int]]]" is incompatible with declared type "RecursiveMapping" +  Type "dict[str, str | int | dict[str, str | int | list[int]]]" is incompatible with type "RecursiveMapping"     "dict[str, str | int | dict[str, str | int | list[int]]]" is incompatible with "str"     "dict[str, str | int | dict[str, str | int | list[int]]]" is incompatible with "int"     "dict[str, str | int | dict[str, str | int | list[int]]]" is incompatible with "Mapping[str, RecursiveMapping]"       Type parameter "_VT_co@Mapping" is covariant, but "str | int | dict[str, str | int | list[int]]" is not a subtype of "RecursiveMapping" (reportAssignmentType) -aliases_recursive.py:63:38 - error: Expression of type "list[str | list[float]]" cannot be assigned to declared type "GenericTypeAlias1[str]" -  Type "float" cannot be assigned to type "GenericTypeAlias1[T1@GenericTypeAlias1] | str" +aliases_recursive.py:63:38 - error: Expression of type "list[str | list[float]]" is incompatible with declared type "GenericTypeAlias1[str]" +  Type "float" is incompatible with type "GenericTypeAlias1[T1@GenericTypeAlias1] | str"     "float" is incompatible with "GenericTypeAlias1[T1@GenericTypeAlias1]"     "float" is incompatible with "str" (reportAssignmentType) -aliases_recursive.py:69:51 - error: Expression of type "list[list[int | list[str | int | list[float]]] | str]" cannot be assigned to declared type "GenericTypeAlias2[str, int]" -  Type "float" cannot be assigned to type "GenericTypeAlias2[T1@GenericTypeAlias2, T2@GenericTypeAlias2] | str | int" +aliases_recursive.py:69:51 - error: Expression of type "list[list[int | list[str | int | list[float]]] | str]" is incompatible with declared type "GenericTypeAlias2[str, int]" +  Type "float" is incompatible with type "GenericTypeAlias2[T1@GenericTypeAlias2, T2@GenericTypeAlias2] | str | int"     "float" is incompatible with "GenericTypeAlias2[T1@GenericTypeAlias2, T2@GenericTypeAlias2]"     "float" is incompatible with "str"     "float" is incompatible with "int" (reportAssignmentType) diff --git a/conformance/results/pyright/aliases_type_statement.toml b/conformance/results/pyright/aliases_type_statement.toml index 7c3534a53..63bd24874 100644 --- a/conformance/results/pyright/aliases_type_statement.toml +++ b/conformance/results/pyright/aliases_type_statement.toml @@ -1,13 +1,13 @@ conformant = "Pass" output = """ -aliases_type_statement.py:17:12 - error: Cannot access member "bit_count" for type "TypeAliasType" -  Member "bit_count" is unknown (reportAttributeAccessIssue) +aliases_type_statement.py:17:12 - error: Cannot access attribute "bit_count" for class "TypeAliasType" +  Attribute "bit_count" is unknown (reportAttributeAccessIssue) aliases_type_statement.py:19:1 - error: Object of type "TypeAliasType" is not callable (reportCallIssue) -aliases_type_statement.py:23:18 - error: Cannot access member "other_attrib" for type "TypeAliasType" -  Member "other_attrib" is unknown (reportAttributeAccessIssue) +aliases_type_statement.py:23:18 - error: Cannot access attribute "other_attrib" for class "TypeAliasType" +  Attribute "other_attrib" is unknown (reportAttributeAccessIssue) 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: Argument of type "GoodAlias1" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "isinstance" -  Type "TypeAliasType" cannot be assigned to type "_ClassInfo" +  Type "TypeAliasType" is incompatible with type "_ClassInfo"     "TypeAliasType" is incompatible with "type"     "TypeAliasType" is incompatible with "UnionType"     "TypeAliasType" is incompatible with "tuple[_ClassInfo, ...]" (reportArgumentType) @@ -40,10 +40,10 @@ aliases_type_statement.py:58:10 - error: A type statement can be used only withi 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]" -  Type "str" cannot be assigned to type "int" +  Type "str" is incompatible with type "int"     "str" is incompatible with "int" aliases_type_statement.py:81:7 - error: Could not specialize type "RecursiveTypeAlias2[S@RecursiveTypeAlias2, T@RecursiveTypeAlias2, P@RecursiveTypeAlias2]" -  Type "int" cannot be assigned to type "str" +  Type "int" is incompatible with type "str"     "int" is incompatible with "str" 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) diff --git a/conformance/results/pyright/aliases_typealiastype.toml b/conformance/results/pyright/aliases_typealiastype.toml index 94da78ea9..48ebb2a23 100644 --- a/conformance/results/pyright/aliases_typealiastype.toml +++ b/conformance/results/pyright/aliases_typealiastype.toml @@ -1,9 +1,9 @@ conformant = "Pass" output = """ -aliases_typealiastype.py:32:18 - error: Cannot access member "other_attrib" for type "TypeAliasType" -  Member "other_attrib" is unknown (reportAttributeAccessIssue) +aliases_typealiastype.py:32:18 - error: Cannot access attribute "other_attrib" for class "TypeAliasType" +  Attribute "other_attrib" is unknown (reportAttributeAccessIssue) 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" +  Type "int" is incompatible with type "str"     "int" is incompatible with "str" aliases_typealiastype.py:43:45 - error: Type variable "S" has no meaning in this context (reportGeneralTypeIssues) aliases_typealiastype.py:44:45 - error: Type variable "S" has no meaning in this context (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/annotations_generators.toml b/conformance/results/pyright/annotations_generators.toml index eda62089a..23081ff4f 100644 --- a/conformance/results/pyright/annotations_generators.toml +++ b/conformance/results/pyright/annotations_generators.toml @@ -2,7 +2,7 @@ conformant = "Pass" output = """ annotations_generators.py:51:21 - error: Function with declared return type "C" must return value on all code paths   "None" is incompatible with "C" (reportReturnType) -annotations_generators.py:54:16 - error: Expression of type "Literal[False]" cannot be assigned to return type "C" +annotations_generators.py:54:16 - error: Expression of type "Literal[False]" is incompatible with return type "C"   "Literal[False]" is incompatible with "C" (reportReturnType) annotations_generators.py:57:15 - error: Return type of generator function must be compatible with "Generator[Literal[3], Any, Any]"   "Literal[3]" is incompatible with "A" (reportReturnType) diff --git a/conformance/results/pyright/callables_kwargs.toml b/conformance/results/pyright/callables_kwargs.toml index d1e88a718..c82031c93 100644 --- a/conformance/results/pyright/callables_kwargs.toml +++ b/conformance/results/pyright/callables_kwargs.toml @@ -13,15 +13,15 @@ callables_kwargs.py:64:16 - error: Unable to match unpacked TypedDict argument t   Parameter "v3" is already assigned (reportCallIssue) callables_kwargs.py:65:19 - error: Unable to match unpacked TypedDict argument to parameters   Parameter "v1" is already assigned (reportCallIssue) -callables_kwargs.py:101:19 - error: Expression of type "(**kwargs: **TD2) -> None" cannot be assigned to declared type "TDProtocol3" -  Type "(**kwargs: **TD2) -> None" cannot be assigned to type "(*, v1: int, v2: int, v3: str) -> None" -    Keyword parameter "v2" of type "int" cannot be assigned to type "str" +callables_kwargs.py:101:19 - error: Expression of type "(**kwargs: **TD2) -> None" is incompatible with declared type "TDProtocol3" +  Type "(**kwargs: **TD2) -> None" is incompatible with type "(*, v1: int, v2: int, v3: str) -> None" +    Keyword parameter "v2" of type "int" is incompatible with type "str"       "int" is incompatible with "str" (reportAssignmentType) -callables_kwargs.py:102:19 - error: Expression of type "(**kwargs: **TD2) -> None" cannot be assigned to declared type "TDProtocol4" -  Type "(**kwargs: **TD2) -> None" cannot be assigned to type "(*, v1: int) -> None" +callables_kwargs.py:102:19 - error: Expression of type "(**kwargs: **TD2) -> None" is incompatible with declared type "TDProtocol4" +  Type "(**kwargs: **TD2) -> None" is incompatible with type "(*, v1: int) -> None"     Keyword parameter "v3" is missing in destination (reportAssignmentType) -callables_kwargs.py:103:19 - error: Expression of type "(**kwargs: **TD2) -> None" cannot be assigned to declared type "TDProtocol5" -  Type "(**kwargs: **TD2) -> None" cannot be assigned to type "(v1: int, v3: str) -> None" +callables_kwargs.py:103:19 - error: Expression of type "(**kwargs: **TD2) -> None" is incompatible with declared type "TDProtocol5" +  Type "(**kwargs: **TD2) -> None" is incompatible with type "(v1: int, v3: str) -> None"     Function accepts too many positional parameters; expected 0 but received 2       Keyword parameter "v1" is missing in destination       Keyword parameter "v3" is missing in destination (reportAssignmentType) diff --git a/conformance/results/pyright/callables_protocol.toml b/conformance/results/pyright/callables_protocol.toml index 500f94472..747dc38ea 100644 --- a/conformance/results/pyright/callables_protocol.toml +++ b/conformance/results/pyright/callables_protocol.toml @@ -1,61 +1,61 @@ conformant = "Pass" output = """ -callables_protocol.py:35:7 - error: Expression of type "(*vals: bytes, max_items: int | None) -> list[bytes]" cannot be assigned to declared type "Proto1" -  Type "(*vals: bytes, max_items: int | None) -> list[bytes]" cannot be assigned to type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" +callables_protocol.py:35:7 - error: Expression of type "(*vals: bytes, max_items: int | None) -> list[bytes]" is incompatible with declared type "Proto1" +  Type "(*vals: bytes, max_items: int | None) -> list[bytes]" is incompatible with type "(*vals: bytes, max_len: int | None = None) -> list[bytes]"     Keyword parameter "max_items" is missing in destination     Keyword parameter "max_len" is missing in source (reportAssignmentType) -callables_protocol.py:36:7 - error: Expression of type "(*vals: bytes) -> list[bytes]" cannot be assigned to declared type "Proto1" -  Type "(*vals: bytes) -> list[bytes]" cannot be assigned to type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" +callables_protocol.py:36:7 - error: Expression of type "(*vals: bytes) -> list[bytes]" is incompatible with declared type "Proto1" +  Type "(*vals: bytes) -> list[bytes]" is incompatible with type "(*vals: bytes, max_len: int | None = None) -> list[bytes]"     Keyword parameter "max_len" is missing in source (reportAssignmentType) -callables_protocol.py:37:7 - error: Expression of type "(*vals: bytes, max_len: str | None) -> list[bytes]" cannot be assigned to declared type "Proto1" -  Type "(*vals: bytes, max_len: str | None) -> list[bytes]" cannot be assigned to type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" -    Keyword parameter "max_len" of type "int | None" cannot be assigned to type "str | None" +callables_protocol.py:37:7 - error: Expression of type "(*vals: bytes, max_len: str | None) -> list[bytes]" is incompatible with declared type "Proto1" +  Type "(*vals: bytes, max_len: str | None) -> list[bytes]" is incompatible with type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" +    Keyword parameter "max_len" of type "int | None" is incompatible with type "str | None"     Parameter "max_len" is missing default argument (reportAssignmentType) -callables_protocol.py:67:7 - error: Expression of type "(*a: bytes) -> None" cannot be assigned to declared type "Proto2" -  Type "(*a: bytes) -> None" cannot be assigned to type "(*vals: bytes, **kwargs: str) -> None" +callables_protocol.py:67:7 - error: Expression of type "(*a: bytes) -> None" is incompatible with declared type "Proto2" +  Type "(*a: bytes) -> None" is incompatible with type "(*vals: bytes, **kwargs: str) -> None"     Parameter "**kwargs" has no corresponding parameter (reportAssignmentType) -callables_protocol.py:68:7 - error: Expression of type "(*a: str, **b: str) -> None" cannot be assigned to declared type "Proto2" -  Type "(*a: str, **b: str) -> None" cannot be assigned to type "(*vals: bytes, **kwargs: str) -> None" -    Parameter 1: type "*tuple[bytes, ...]" cannot be assigned to type "*tuple[str, ...]" +callables_protocol.py:68:7 - error: Expression of type "(*a: str, **b: str) -> None" is incompatible with declared type "Proto2" +  Type "(*a: str, **b: str) -> None" is incompatible with type "(*vals: bytes, **kwargs: str) -> None" +    Parameter 1: type "*tuple[bytes, ...]" is incompatible with type "*tuple[str, ...]"       "*tuple[bytes, ...]" is incompatible with "*tuple[str, ...]"         Tuple entry 1 is incorrect type           "bytes" is incompatible with "str" (reportAssignmentType) -callables_protocol.py:69:7 - error: Expression of type "(*a: bytes, **b: bytes) -> None" cannot be assigned to declared type "Proto2" -  Type "(*a: bytes, **b: bytes) -> None" cannot be assigned to type "(*vals: bytes, **kwargs: str) -> None" -    Parameter 2: type "str" cannot be assigned to type "bytes" +callables_protocol.py:69:7 - error: Expression of type "(*a: bytes, **b: bytes) -> None" is incompatible with declared type "Proto2" +  Type "(*a: bytes, **b: bytes) -> None" is incompatible with type "(*vals: bytes, **kwargs: str) -> None" +    Parameter 2: type "str" is incompatible with type "bytes"       "str" is incompatible with "bytes" (reportAssignmentType) -callables_protocol.py:70:7 - error: Expression of type "(**b: str) -> None" cannot be assigned to declared type "Proto2" -  Type "(**b: str) -> None" cannot be assigned to type "(*vals: bytes, **kwargs: str) -> None" +callables_protocol.py:70:7 - error: Expression of type "(**b: str) -> None" is incompatible with declared type "Proto2" +  Type "(**b: str) -> None" is incompatible with type "(*vals: bytes, **kwargs: str) -> None"     Parameter "*vals" has no corresponding parameter (reportAssignmentType) -callables_protocol.py:97:16 - error: Expression of type "(x: int) -> None" cannot be assigned to declared type "Proto4" +callables_protocol.py:97:16 - error: Expression of type "(x: int) -> None" is incompatible with declared type "Proto4"   "function" is incompatible with protocol "Proto4"     "other_attribute" is not present     "__call__" is not present (reportAssignmentType) -callables_protocol.py:121:18 - error: Expression of type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" cannot be assigned to declared type "NotProto6" +callables_protocol.py:121:18 - error: Expression of type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" is incompatible with declared type "NotProto6"   "function" is incompatible with "NotProto6" (reportAssignmentType) -callables_protocol.py:169:7 - error: Expression of type "(x: int) -> Any" cannot be assigned to declared type "Proto8" +callables_protocol.py:169:7 - error: Expression of type "(x: int) -> Any" is incompatible with declared type "Proto8"   One or more overloads of "__call__" is not assignable -    Type "(x: int) -> Any" cannot be assigned to type "(x: str) -> str" -      Parameter 1: type "str" cannot be assigned to type "int" +    Type "(x: int) -> Any" is incompatible with type "(x: str) -> str" +      Parameter 1: type "str" is incompatible with type "int"         "str" is incompatible with "int" (reportAssignmentType) -callables_protocol.py:186:33 - error: Cannot assign member "other_attribute" for type "Proto9[P@decorator1, R@decorator1]" +callables_protocol.py:186:33 - error: Cannot assign to attribute "other_attribute" for class "Proto9[P@decorator1, R@decorator1]"   "Literal['str']" is incompatible with "int" (reportAttributeAccessIssue) -callables_protocol.py:187:15 - error: Cannot assign member "xxx" for type "Proto9[P@decorator1, R@decorator1]" -  Member "xxx" is unknown (reportAttributeAccessIssue) -callables_protocol.py:197:16 - error: Cannot access member "other_attribute2" for type "Proto9[(x: int), str]" -  Member "other_attribute2" is unknown (reportAttributeAccessIssue) -callables_protocol.py:238:8 - error: Expression of type "(x: int, y: str, /) -> Any" cannot be assigned to declared type "Proto11" -  Type "(x: int, y: str, /) -> Any" cannot be assigned to type "(x: int, /, y: str) -> Any" +callables_protocol.py:187:15 - error: Cannot assign to attribute "xxx" for class "Proto9[P@decorator1, R@decorator1]" +  Attribute "xxx" is unknown (reportAttributeAccessIssue) +callables_protocol.py:197:16 - error: Cannot access attribute "other_attribute2" for class "Proto9[(x: int), str]" +  Attribute "other_attribute2" is unknown (reportAttributeAccessIssue) +callables_protocol.py:238:8 - error: Expression of type "(x: int, y: str, /) -> Any" is incompatible with declared type "Proto11" +  Type "(x: int, y: str, /) -> Any" is incompatible with type "(x: int, /, y: str) -> Any"     Position-only parameter mismatch; parameter "y" is not position-only     Position-only parameter mismatch; expected 2 but received 1 (reportAssignmentType) -callables_protocol.py:260:8 - error: Expression of type "(*args: Any, kwarg0: Any) -> None" cannot be assigned to declared type "Proto12" -  Type "(*args: Any, kwarg0: Any) -> None" cannot be assigned to type "(*args: Any, kwarg0: Any, kwarg1: Any) -> None" +callables_protocol.py:260:8 - error: Expression of type "(*args: Any, kwarg0: Any) -> None" is incompatible with declared type "Proto12" +  Type "(*args: Any, kwarg0: Any) -> None" is incompatible with type "(*args: Any, kwarg0: Any, kwarg1: Any) -> None"     Keyword parameter "kwarg1" is missing in source (reportAssignmentType) -callables_protocol.py:284:27 - error: Expression of type "(path: str) -> str" cannot be assigned to declared type "Proto13_Default" -  Type "(path: str) -> str" cannot be assigned to type "(path: str = ...) -> str" +callables_protocol.py:284:27 - error: Expression of type "(path: str) -> str" is incompatible with declared type "Proto13_Default" +  Type "(path: str) -> str" is incompatible with type "(path: str = ...) -> str"     Parameter "path" is missing default argument (reportAssignmentType) -callables_protocol.py:311:27 - error: Expression of type "(*, path: str) -> str" cannot be assigned to declared type "Proto14_Default" -  Type "(*, path: str) -> str" cannot be assigned to type "(*, path: str = ...) -> str" +callables_protocol.py:311:27 - error: Expression of type "(*, path: str) -> str" is incompatible with declared type "Proto14_Default" +  Type "(*, path: str) -> str" is incompatible with type "(*, path: str = ...) -> str"     Parameter "path" is missing default argument (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/classes_classvar.toml b/conformance/results/pyright/classes_classvar.toml index aa417b136..c2a71906e 100644 --- a/conformance/results/pyright/classes_classvar.toml +++ b/conformance/results/pyright/classes_classvar.toml @@ -6,7 +6,7 @@ classes_classvar.py:38:14 - error: "var" is not defined (reportUndefinedVariable classes_classvar.py:43:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues) classes_classvar.py:44:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues) classes_classvar.py:45:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues) -classes_classvar.py:50:33 - error: Expression of type "dict[Any, Any]" cannot be assigned to declared type "list[str]" (reportAssignmentType) +classes_classvar.py:50:33 - error: Expression of type "dict[Any, Any]" is incompatible with declared type "list[str]" (reportAssignmentType) classes_classvar.py:52:11 - error: "Final" is not defined (reportUndefinedVariable) classes_classvar.py:53:17 - error: "ClassVar" is not allowed in this context classes_classvar.py:61:26 - error: "ClassVar" is not allowed in this context @@ -15,10 +15,10 @@ classes_classvar.py:63:18 - error: "ClassVar" is not allowed in this context classes_classvar.py:65:26 - error: "ClassVar" is not allowed in this context classes_classvar.py:69:8 - error: "ClassVar" is not allowed in this context classes_classvar.py:70:20 - error: "ClassVar" is not allowed in this context -classes_classvar.py:100:14 - error: Cannot assign member "stats" for type "Starship" -  Member "stats" cannot be assigned through a class instance because it is a ClassVar -    Member "__set__" is unknown (reportAttributeAccessIssue) -classes_classvar.py:129:13 - error: Expression of type "ProtoAImpl" cannot be assigned to declared type "ProtoA" +classes_classvar.py:100:14 - error: Cannot assign to attribute "stats" for class "Starship" +  Attribute "stats" cannot be assigned through a class instance because it is a ClassVar +    Attribute "__set__" is unknown (reportAttributeAccessIssue) +classes_classvar.py:129:13 - error: Expression of type "ProtoAImpl" is incompatible with declared type "ProtoA"   "ProtoAImpl" is incompatible with protocol "ProtoA"     "x" is defined as a ClassVar in protocol     "y" is defined as a ClassVar in protocol (reportAssignmentType) diff --git a/conformance/results/pyright/constructors_call_init.toml b/conformance/results/pyright/constructors_call_init.toml index 55f59c18e..a4dfda04b 100644 --- a/conformance/results/pyright/constructors_call_init.toml +++ b/conformance/results/pyright/constructors_call_init.toml @@ -1,26 +1,18 @@ -conformant = "Partial" -notes = """ -Does not support function-scoped TypeVars in self annotation in __init__ method. -Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method. -""" -conformance_automated = "Fail" +conformant = "Pass" +conformance_automated = "Pass" errors_diff = """ -Line 107: Expected 1 errors -Line 91: Unexpected errors ['constructors_call_init.py:91:13 - error: "assert_type" mismatch: expected "Class6[int, str]" but received "Class6[Unknown, Unknown]" (reportAssertTypeFailure)'] -Line 99: Unexpected errors ['constructors_call_init.py:99:13 - error: "assert_type" mismatch: expected "Class7[str, int]" but received "Class7[Unknown, Unknown]" (reportAssertTypeFailure)'] """ output = """ constructors_call_init.py:21:13 - error: Argument of type "float" cannot be assigned to parameter "x" of type "int" in function "__init__"   "float" is incompatible with "int" (reportArgumentType) constructors_call_init.py:42:8 - error: Argument of type "Class2[Unknown]" cannot be assigned to parameter "x" of type "Class3 | None" in function "__init__" -  Type "Class2[Unknown]" cannot be assigned to type "Class3 | None" +  Type "Class2[Unknown]" is incompatible with type "Class3 | None"     "Class2[Unknown]" is incompatible with "Class3"     "Class2[Unknown]" is incompatible with "None" (reportArgumentType) constructors_call_init.py:56:1 - error:   Could not bind method "__init__" because "Class4[str]" is not assignable to parameter "self"     "Class4[str]" is incompatible with "Class4[int]"       Type parameter "T@Class4" is invariant, but "str" is not the same as "int" (reportGeneralTypeIssues) -constructors_call_init.py:91:13 - error: "assert_type" mismatch: expected "Class6[int, str]" but received "Class6[Unknown, Unknown]" (reportAssertTypeFailure) -constructors_call_init.py:99:13 - error: "assert_type" mismatch: expected "Class7[str, int]" but received "Class7[Unknown, Unknown]" (reportAssertTypeFailure) +constructors_call_init.py:107:24 - error: Type annotation for "self" parameter of "__init__" method cannot contain class-scoped type varaiables (reportGeneralTypeIssues) constructors_call_init.py:130:1 - error: Expected no arguments to "Class11" constructor (reportCallIssue) """ diff --git a/conformance/results/pyright/constructors_call_metaclass.toml b/conformance/results/pyright/constructors_call_metaclass.toml index 61f79e8fa..6ccac5985 100644 --- a/conformance/results/pyright/constructors_call_metaclass.toml +++ b/conformance/results/pyright/constructors_call_metaclass.toml @@ -1,7 +1,14 @@ -conformant = "Pass" +conformant = "Partial" +notes = """ +Does not evaluate __new__ method when metaclass call has no return type annotation. +Evaluates wrong type for constructor call when metaclass call has no return type annotation. +""" errors_diff = """ +Line 65: Expected 1 errors +Line 66: Unexpected errors ['constructors_call_metaclass.py:66:13 - error: "assert_type" mismatch: expected "Class4" but received "Any" (reportAssertTypeFailure)'] """ output = """ constructors_call_metaclass.py:51:1 - error: Argument missing for parameter "x" (reportCallIssue) -constructors_call_metaclass.py:65:1 - error: Argument missing for parameter "x" (reportCallIssue) +constructors_call_metaclass.py:66:13 - error: "assert_type" mismatch: expected "Class4" but received "Any" (reportAssertTypeFailure) """ +conformance_automated = "Fail" diff --git a/conformance/results/pyright/constructors_call_new.toml b/conformance/results/pyright/constructors_call_new.toml index a938ed94d..8ca005715 100644 --- a/conformance/results/pyright/constructors_call_new.toml +++ b/conformance/results/pyright/constructors_call_new.toml @@ -7,6 +7,6 @@ constructors_call_new.py:21:13 - error: Argument of type "float" cannot be assig constructors_call_new.py:145:1 - error:   Could not bind method "__new__" because "type[Class11[str]]" is not assignable to parameter "cls"     "type[Class11[str]]" is incompatible with "type[Class11[int]]" -    Type "type[Class11[str]]" cannot be assigned to type "type[Class11[int]]" +    Type "type[Class11[str]]" is incompatible with type "type[Class11[int]]"       Type parameter "T@Class11" is invariant, but "str" is not the same as "int" (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/constructors_call_type.toml b/conformance/results/pyright/constructors_call_type.toml index 596065570..536ad6fdc 100644 --- a/conformance/results/pyright/constructors_call_type.toml +++ b/conformance/results/pyright/constructors_call_type.toml @@ -1,15 +1,15 @@ conformant = "Pass" errors_diff = """ -Line 59: Expected 1 errors -Line 64: Expected 1 errors """ output = """ constructors_call_type.py:30:5 - error: Arguments missing for parameters "x", "y" (reportCallIssue) constructors_call_type.py:40:5 - error: Arguments missing for parameters "x", "y" (reportCallIssue) constructors_call_type.py:50:5 - error: Arguments missing for parameters "x", "y" (reportCallIssue) +constructors_call_type.py:59:5 - error: Expected no arguments to "Class4" constructor (reportCallIssue) +constructors_call_type.py:64:5 - error: Expected no arguments to "object" constructor (reportCallIssue) constructors_call_type.py:72:5 - error: Arguments missing for parameters "x", "y" (reportCallIssue) constructors_call_type.py:81:5 - error: Argument missing for parameter "y" (reportCallIssue) constructors_call_type.py:82:12 - error: Argument of type "Literal[2]" cannot be assigned to parameter "y" of type "str" in function "__new__"   "Literal[2]" is incompatible with "str" (reportArgumentType) """ -conformance_automated = "Fail" +conformance_automated = "Pass" diff --git a/conformance/results/pyright/constructors_callable.toml b/conformance/results/pyright/constructors_callable.toml index a67414db8..1bf7c7ab7 100644 --- a/conformance/results/pyright/constructors_callable.toml +++ b/conformance/results/pyright/constructors_callable.toml @@ -1,20 +1,6 @@ -conformant = "Partial" -notes = """ -Does not generate a union type for __new__ and __init__ when converting class to callable. -Does not ignore __init__ based on __new__ return type when converting class to callable. -Does not support __new__ return type that is different from class being constructed. -Does not use annotated type of self in __init__ method to generate return type of callable. -""" -conformance_automated = "Fail" +conformant = "Pass" +conformance_automated = "Pass" errors_diff = """ -Line 127: Expected 1 errors -Line 144: Expected 1 errors -Line 100: Unexpected errors ['constructors_callable.py:100:17 - error: "assert_type" mismatch: expected "NoReturn" but received "Class5" (reportAssertTypeFailure)'] -Line 105: Unexpected errors ['constructors_callable.py:105:17 - error: "assert_type" mismatch: expected "NoReturn" but received "Class5" (reportAssertTypeFailure)'] -Line 126: Unexpected errors ['constructors_callable.py:126:13 - error: Argument missing for parameter "x" (reportCallIssue)', 'constructors_callable.py:126:13 - error: "assert_type" mismatch: expected "Class6Proxy" but received "Unknown" (reportAssertTypeFailure)'] -Line 143: Unexpected errors ['constructors_callable.py:143:13 - error: Argument missing for parameter "x" (reportCallIssue)'] -Line 164: Unexpected errors ['constructors_callable.py:164:13 - error: "assert_type" mismatch: expected "Class7[int]" but received "Class7[Unknown]" (reportAssertTypeFailure)'] -Line 165: Unexpected errors ['constructors_callable.py:165:13 - error: "assert_type" mismatch: expected "Class7[str]" but received "Class7[Unknown]" (reportAssertTypeFailure)'] """ output = """ constructors_callable.py:36:13 - information: Type of "r1" is "(x: int) -> Class1" @@ -32,17 +18,12 @@ constructors_callable.py:77:13 - information: Type of "r4" is "(x: int) -> int" constructors_callable.py:79:1 - error: Argument missing for parameter "x" (reportCallIssue) constructors_callable.py:80:1 - error: Argument missing for parameter "x" (reportCallIssue) constructors_callable.py:80:4 - error: No parameter named "y" (reportCallIssue) -constructors_callable.py:97:13 - information: Type of "r5" is "(*args: Any, **kwargs: Any) -> Class5" -constructors_callable.py:100:17 - error: "assert_type" mismatch: expected "NoReturn" but received "Class5" (reportAssertTypeFailure) -constructors_callable.py:105:17 - error: "assert_type" mismatch: expected "NoReturn" but received "Class5" (reportAssertTypeFailure) -constructors_callable.py:125:13 - information: Type of "r6" is "(x: int) -> Class6" -constructors_callable.py:126:13 - error: Argument missing for parameter "x" (reportCallIssue) -constructors_callable.py:126:13 - error: "assert_type" mismatch: expected "Class6Proxy" but received "Unknown" (reportAssertTypeFailure) -constructors_callable.py:142:13 - information: Type of "r6_any" is "(x: int) -> Class6Any" -constructors_callable.py:143:13 - error: Argument missing for parameter "x" (reportCallIssue) -constructors_callable.py:162:5 - information: Type of "r7" is "Overload[(x: int) -> Class7[Unknown], (x: str) -> Class7[Unknown]]" -constructors_callable.py:164:13 - error: "assert_type" mismatch: expected "Class7[int]" but received "Class7[Unknown]" (reportAssertTypeFailure) -constructors_callable.py:165:13 - error: "assert_type" mismatch: expected "Class7[str]" but received "Class7[Unknown]" (reportAssertTypeFailure) +constructors_callable.py:97:13 - information: Type of "r5" is "(*args: Any, **kwargs: Any) -> NoReturn" +constructors_callable.py:125:13 - information: Type of "r6" is "() -> Class6Proxy" +constructors_callable.py:127:4 - error: Expected 0 positional arguments (reportCallIssue) +constructors_callable.py:142:13 - information: Type of "r6_any" is "() -> Any" +constructors_callable.py:144:8 - error: Expected 0 positional arguments (reportCallIssue) +constructors_callable.py:162:5 - information: Type of "r7" is "Overload[(x: int) -> Class7[int], (x: str) -> Class7[str]]" constructors_callable.py:182:13 - information: Type of "r8" is "(x: list[T@Class8], y: list[T@Class8]) -> Class8[T@Class8]" constructors_callable.py:184:10 - error: Argument of type "list[str]" cannot be assigned to parameter "y" of type "list[T@Class8]"   "Literal['']" is incompatible with "int" (reportArgumentType) diff --git a/conformance/results/pyright/dataclasses_frozen.toml b/conformance/results/pyright/dataclasses_frozen.toml index 3142f2c7d..4175c762d 100644 --- a/conformance/results/pyright/dataclasses_frozen.toml +++ b/conformance/results/pyright/dataclasses_frozen.toml @@ -1,11 +1,11 @@ conformant = "Pass" output = """ -dataclasses_frozen.py:16:5 - error: Cannot assign member "a" for type "DC1" +dataclasses_frozen.py:16:5 - error: Cannot assign to attribute "a" for class "DC1"   "DC1" is frozen -    Member "__set__" is unknown (reportAttributeAccessIssue) -dataclasses_frozen.py:17:5 - error: Cannot assign member "b" for type "DC1" +    Attribute "__set__" is unknown (reportAttributeAccessIssue) +dataclasses_frozen.py:17:5 - error: Cannot assign to attribute "b" for class "DC1"   "DC1" is frozen -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) dataclasses_frozen.py:22:1 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues) dataclasses_frozen.py:32:12 - error: A frozen class cannot inherit from a class that is not frozen (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/dataclasses_hash.toml b/conformance/results/pyright/dataclasses_hash.toml index 801569976..748f32bdb 100644 --- a/conformance/results/pyright/dataclasses_hash.toml +++ b/conformance/results/pyright/dataclasses_hash.toml @@ -1,13 +1,13 @@ conformant = "Pass" output = """ -dataclasses_hash.py:15:16 - error: Expression of type "DC1" cannot be assigned to declared type "Hashable" +dataclasses_hash.py:15:16 - error: Expression of type "DC1" is incompatible with declared type "Hashable"   "DC1" is incompatible with protocol "Hashable"     "__hash__" is an incompatible type -      Type "None" cannot be assigned to type "() -> int" (reportAssignmentType) -dataclasses_hash.py:32:16 - error: Expression of type "DC3" cannot be assigned to declared type "Hashable" +      Type "None" is incompatible with type "() -> int" (reportAssignmentType) +dataclasses_hash.py:32:16 - error: Expression of type "DC3" is incompatible with declared type "Hashable"   "DC3" is incompatible with protocol "Hashable"     "__hash__" is an incompatible type -      Type "None" cannot be assigned to type "() -> int" (reportAssignmentType) +      Type "None" is incompatible with type "() -> int" (reportAssignmentType) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/dataclasses_postinit.toml b/conformance/results/pyright/dataclasses_postinit.toml index 6db781b7d..029868bc5 100644 --- a/conformance/results/pyright/dataclasses_postinit.toml +++ b/conformance/results/pyright/dataclasses_postinit.toml @@ -2,10 +2,10 @@ conformant = "Pass" output = """ dataclasses_postinit.py:19:40 - error: Dataclass __post_init__ method parameter type mismatch for field "y"   "str" is incompatible with "int" (reportGeneralTypeIssues) -dataclasses_postinit.py:28:11 - error: Cannot access member "x" for type "DC1" -  Member "x" is an init-only field (reportAttributeAccessIssue) -dataclasses_postinit.py:29:11 - error: Cannot access member "y" for type "DC1" -  Member "y" is an init-only field (reportAttributeAccessIssue) +dataclasses_postinit.py:28:11 - error: Cannot access attribute "x" for class "DC1" +  "x" is an init-only field (reportAttributeAccessIssue) +dataclasses_postinit.py:29:11 - error: Cannot access attribute "y" for class "DC1" +  "y" is an init-only field (reportAttributeAccessIssue) dataclasses_postinit.py:36:9 - error: Dataclass __post_init__ incorrect parameter count; number of InitVar fields is 2 (reportGeneralTypeIssues) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/dataclasses_slots.toml b/conformance/results/pyright/dataclasses_slots.toml index be8764979..021a84417 100644 --- a/conformance/results/pyright/dataclasses_slots.toml +++ b/conformance/results/pyright/dataclasses_slots.toml @@ -3,10 +3,10 @@ output = """ dataclasses_slots.py:10:12 - error: __slots__ is already defined in class (reportGeneralTypeIssues) dataclasses_slots.py:25:14 - error: "y" is not specified in __slots__ (reportGeneralTypeIssues) dataclasses_slots.py:38:14 - error: "y" is not specified in __slots__ (reportGeneralTypeIssues) -dataclasses_slots.py:66:5 - error: Cannot access member "__slots__" for type "type[DC6]" -  Member "__slots__" is unknown (reportAttributeAccessIssue) -dataclasses_slots.py:69:8 - error: Cannot access member "__slots__" for type "DC6" -  Member "__slots__" is unknown (reportAttributeAccessIssue) +dataclasses_slots.py:66:5 - error: Cannot access attribute "__slots__" for class "type[DC6]" +  Attribute "__slots__" is unknown (reportAttributeAccessIssue) +dataclasses_slots.py:69:8 - error: Cannot access attribute "__slots__" for class "DC6" +  Attribute "__slots__" is unknown (reportAttributeAccessIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/dataclasses_transform_class.toml b/conformance/results/pyright/dataclasses_transform_class.toml index f5d2cc96b..76157c6d6 100644 --- a/conformance/results/pyright/dataclasses_transform_class.toml +++ b/conformance/results/pyright/dataclasses_transform_class.toml @@ -1,15 +1,15 @@ conformant = "Pass" output = """ dataclasses_transform_class.py:48:7 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues) -dataclasses_transform_class.py:60:6 - error: Cannot assign member "id" for type "Customer1" +dataclasses_transform_class.py:60:6 - error: Cannot assign to attribute "id" for class "Customer1"   "Customer1" is frozen -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) dataclasses_transform_class.py:63:18 - error: Expected 0 positional arguments (reportCallIssue) dataclasses_transform_class.py:69:6 - error: Operator "<" not supported for types "Customer1" and "Customer1" (reportOperatorIssue) dataclasses_transform_class.py:79:18 - error: Expected 0 positional arguments (reportCallIssue) -dataclasses_transform_class.py:119:6 - error: Cannot assign member "id" for type "Customer3" +dataclasses_transform_class.py:119:6 - error: Cannot assign to attribute "id" for class "Customer3"   "Customer3" is frozen -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/dataclasses_transform_func.toml b/conformance/results/pyright/dataclasses_transform_func.toml index dee6927db..55a0df3e3 100644 --- a/conformance/results/pyright/dataclasses_transform_func.toml +++ b/conformance/results/pyright/dataclasses_transform_func.toml @@ -1,14 +1,14 @@ conformant = "Pass" output = """ -dataclasses_transform_func.py:57:13 - error: Cannot assign member "name" for type "Customer1" +dataclasses_transform_func.py:57:13 - error: Cannot assign to attribute "name" for class "Customer1"   "Literal[3]" is incompatible with "str" (reportAttributeAccessIssue) dataclasses_transform_func.py:61:6 - error: Operator "<" not supported for types "Customer1" and "Customer1" (reportOperatorIssue) dataclasses_transform_func.py:65:36 - error: No parameter named "salary" (reportCallIssue) dataclasses_transform_func.py:71:18 - error: Expected 0 positional arguments (reportCallIssue) dataclasses_transform_func.py:89:1 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues) -dataclasses_transform_func.py:97:6 - error: Cannot assign member "id" for type "Customer3" +dataclasses_transform_func.py:97:6 - error: Cannot assign to attribute "id" for class "Customer3"   "Customer3" is frozen -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/dataclasses_transform_meta.toml b/conformance/results/pyright/dataclasses_transform_meta.toml index b68b1352b..6e77a130f 100644 --- a/conformance/results/pyright/dataclasses_transform_meta.toml +++ b/conformance/results/pyright/dataclasses_transform_meta.toml @@ -1,15 +1,15 @@ conformant = "Pass" output = """ dataclasses_transform_meta.py:48:36 - error: A non-frozen class cannot inherit from a class that is frozen (reportGeneralTypeIssues) -dataclasses_transform_meta.py:60:6 - error: Cannot assign member "id" for type "Customer1" +dataclasses_transform_meta.py:60:6 - error: Cannot assign to attribute "id" for class "Customer1"   "Customer1" is frozen -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) dataclasses_transform_meta.py:63:18 - error: Expected 0 positional arguments (reportCallIssue) dataclasses_transform_meta.py:70:6 - error: Operator "<" not supported for types "Customer1" and "Customer1" (reportOperatorIssue) dataclasses_transform_meta.py:80:18 - error: Expected 0 positional arguments (reportCallIssue) -dataclasses_transform_meta.py:100:6 - error: Cannot assign member "id" for type "Customer3" +dataclasses_transform_meta.py:100:6 - error: Cannot assign to attribute "id" for class "Customer3"   "Customer3" is frozen -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/dataclasses_usage.toml b/conformance/results/pyright/dataclasses_usage.toml index c0b61c582..e9c7365f3 100644 --- a/conformance/results/pyright/dataclasses_usage.toml +++ b/conformance/results/pyright/dataclasses_usage.toml @@ -1,19 +1,19 @@ conformant = "Pass" output = """ -dataclasses_usage.py:51:6 - error: Argument missing for parameter "unit_price" (reportCallIssue) -dataclasses_usage.py:52:28 - error: Argument of type "Literal['price']" cannot be assigned to parameter "unit_price" of type "float" in function "__init__" +dataclasses_usage.py:50:6 - error: Argument missing for parameter "unit_price" (reportCallIssue) +dataclasses_usage.py:51:28 - error: Argument of type "Literal['price']" cannot be assigned to parameter "unit_price" of type "float" in function "__init__"   "Literal['price']" is incompatible with "float" (reportArgumentType) -dataclasses_usage.py:53:36 - error: Expected 3 positional arguments (reportCallIssue) -dataclasses_usage.py:62:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues) -dataclasses_usage.py:68:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues) -dataclasses_usage.py:74:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues) -dataclasses_usage.py:84:13 - error: Expected 1 positional argument (reportCallIssue) -dataclasses_usage.py:89:36 - error: Argument of type "type[str]" cannot be assigned to parameter "default_factory" of type "() -> _T@field" in function "field" +dataclasses_usage.py:52:36 - error: Expected 3 positional arguments (reportCallIssue) +dataclasses_usage.py:61:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues) +dataclasses_usage.py:67:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues) +dataclasses_usage.py:73:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues) +dataclasses_usage.py:83:13 - error: Expected 1 positional argument (reportCallIssue) +dataclasses_usage.py:88:36 - error: Argument of type "type[str]" cannot be assigned to parameter "default_factory" of type "() -> _T@field" in function "field"   No overloaded function matches type "() -> int" (reportArgumentType) -dataclasses_usage.py:127:8 - error: Expected 1 positional argument (reportCallIssue) -dataclasses_usage.py:130:1 - error: Argument missing for parameter "y" (reportCallIssue) -dataclasses_usage.py:179:1 - error: Expected no arguments to "DC13" constructor (reportCallIssue) -dataclasses_usage.py:228:9 - error: Dataclass field without type annotation will cause runtime exception (reportGeneralTypeIssues) +dataclasses_usage.py:126:8 - error: Expected 1 positional argument (reportCallIssue) +dataclasses_usage.py:129:1 - error: Argument missing for parameter "y" (reportCallIssue) +dataclasses_usage.py:178:1 - error: Expected no arguments to "DC13" constructor (reportCallIssue) +dataclasses_usage.py:227:9 - error: Dataclass field without type annotation will cause runtime exception (reportGeneralTypeIssues) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/directives_no_type_check.toml b/conformance/results/pyright/directives_no_type_check.toml index fe4f85531..9f73f7153 100644 --- a/conformance/results/pyright/directives_no_type_check.toml +++ b/conformance/results/pyright/directives_no_type_check.toml @@ -3,7 +3,7 @@ notes = """ Does not honor `@no_type_check` class decorator (allowed). """ output = """ -directives_no_type_check.py:15:14 - error: Expression of type "Literal['']" cannot be assigned to declared type "int" +directives_no_type_check.py:15:14 - error: Expression of type "Literal['']" is incompatible with declared type "int"   "Literal['']" is incompatible with "int" (reportAssignmentType) directives_no_type_check.py:32:1 - error: Arguments missing for parameters "a", "b" (reportCallIssue) """ diff --git a/conformance/results/pyright/directives_type_ignore_file2.toml b/conformance/results/pyright/directives_type_ignore_file2.toml index 5efc43b17..21a0a593b 100644 --- a/conformance/results/pyright/directives_type_ignore_file2.toml +++ b/conformance/results/pyright/directives_type_ignore_file2.toml @@ -1,6 +1,6 @@ conformant = "Pass" output = """ -directives_type_ignore_file2.py:14:10 - error: Expression of type "Literal['']" cannot be assigned to declared type "int" +directives_type_ignore_file2.py:14:10 - error: Expression of type "Literal['']" is incompatible with declared type "int"   "Literal['']" is incompatible with "int" (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/generics_paramspec_components.toml b/conformance/results/pyright/generics_paramspec_components.toml index 9363b6e86..c66227eee 100644 --- a/conformance/results/pyright/generics_paramspec_components.toml +++ b/conformance/results/pyright/generics_paramspec_components.toml @@ -1,17 +1,17 @@ conformant = "Pass" 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 (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 (reportGeneralTypeIssues) +generics_paramspec_components.py:17:25 - error: "kwargs" attribute of ParamSpec is valid only when used with **kwargs parameter +generics_paramspec_components.py:17:45 - error: "args" attribute of ParamSpec is valid only when used with *args parameter +generics_paramspec_components.py:20:23 - error: "args" attribute of ParamSpec is valid only when used with *args parameter +generics_paramspec_components.py:23:28 - error: "args" and "kwargs" attributes of ParamSpec must both appear within a function signature (reportGeneralTypeIssues) +generics_paramspec_components.py:23:46 - error: "args" attribute of ParamSpec is valid only when used with *args parameter +generics_paramspec_components.py:26:28 - error: "args" and "kwargs" attributes 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 (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:35:18 - error: "args" attribute of ParamSpec is valid only when used with *args parameter +generics_paramspec_components.py:36:20 - error: "kwargs" attribute of ParamSpec is valid only when used with **kwargs parameter +generics_paramspec_components.py:38:26 - error: "args" and "kwargs" attributes of ParamSpec must both appear within a function signature (reportGeneralTypeIssues) +generics_paramspec_components.py:41:31 - error: "args" and "kwargs" attributes of ParamSpec must both appear within a function signature (reportGeneralTypeIssues) generics_paramspec_components.py:49:9 - error: Arguments for ParamSpec "P@decorator" are missing (reportCallIssue) generics_paramspec_components.py:51:11 - error: Expected 0 positional arguments (reportCallIssue) 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_paramspec_semantics.toml b/conformance/results/pyright/generics_paramspec_semantics.toml index 213c91bf0..3a3e0bcd0 100644 --- a/conformance/results/pyright/generics_paramspec_semantics.toml +++ b/conformance/results/pyright/generics_paramspec_semantics.toml @@ -7,11 +7,11 @@ generics_paramspec_semantics.py:26:6 - error: Expected 2 more positional argumen generics_paramspec_semantics.py:27:9 - error: Argument of type "Literal['A']" cannot be assigned to parameter "b" of type "bool"   "Literal['A']" is incompatible with "bool" (reportArgumentType) generics_paramspec_semantics.py:46:17 - error: Argument of type "(y: int, x: str) -> int" cannot be assigned to parameter "y" of type "(**P@func1) -> int" in function "func1" -  Type "(y: int, x: str) -> int" cannot be assigned to type "(x: int, y: str) -> int" +  Type "(y: int, x: str) -> int" is incompatible with type "(x: int, y: str) -> int"     Parameter name mismatch: "x" versus "y"     Parameter name mismatch: "y" versus "x" (reportArgumentType) generics_paramspec_semantics.py:61:23 - error: Argument of type "(*, y: int) -> int" cannot be assigned to parameter "y" of type "(**P@func1) -> int" in function "func1" -  Type "(*, y: int) -> int" cannot be assigned to type "(*, x: int) -> int" +  Type "(*, y: int) -> int" is incompatible with type "(*, x: int) -> int"     Keyword parameter "y" is missing in destination     Keyword parameter "x" is missing in source (reportArgumentType) generics_paramspec_semantics.py:97:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str" @@ -21,14 +21,14 @@ generics_paramspec_semantics.py:107:4 - error: Argument of type "Literal[1]" can generics_paramspec_semantics.py:119:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str"   "Literal[1]" is incompatible with "str" (reportArgumentType) generics_paramspec_semantics.py:126:2 - error: Argument of type "(x: str) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first" -  Type "(x: str) -> int" cannot be assigned to type "(int, **P@expects_int_first) -> int" -    Parameter 1: type "int" cannot be assigned to type "str" +  Type "(x: str) -> int" is incompatible with type "(int, **P@expects_int_first) -> int" +    Parameter 1: type "int" is incompatible with type "str"       "int" is incompatible with "str" (reportArgumentType) generics_paramspec_semantics.py:131:2 - error: Argument of type "(*, x: int) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first" -  Type "(*, x: int) -> int" cannot be assigned to type "(int, **P@expects_int_first) -> int" +  Type "(*, x: int) -> int" is incompatible with type "(int, **P@expects_int_first) -> int"     Function accepts too many positional parameters; expected 0 but received 1 (reportArgumentType) generics_paramspec_semantics.py:136:2 - error: Argument of type "(**kwargs: int) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first" -  Type "(**kwargs: int) -> int" cannot be assigned to type "(int, **P@expects_int_first) -> int" +  Type "(**kwargs: int) -> int" is incompatible with type "(int, **P@expects_int_first) -> int"     Function accepts too many positional parameters; expected 0 but received 1 (reportArgumentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/generics_self_attributes.toml b/conformance/results/pyright/generics_self_attributes.toml index e28aaa598..6b439eb2e 100644 --- a/conformance/results/pyright/generics_self_attributes.toml +++ b/conformance/results/pyright/generics_self_attributes.toml @@ -1,14 +1,14 @@ conformant = "Pass" output = """ generics_self_attributes.py:26:38 - error: Argument of type "LinkedList[int]" cannot be assigned to parameter "next" of type "OrdinalLinkedList | None" in function "__init__" -  Type "LinkedList[int]" cannot be assigned to type "OrdinalLinkedList | None" +  Type "LinkedList[int]" is incompatible with type "OrdinalLinkedList | None"     "LinkedList[int]" is incompatible with "OrdinalLinkedList"     "LinkedList[int]" is incompatible with "None" (reportArgumentType) -generics_self_attributes.py:32:8 - error: Cannot assign member "next" for type "OrdinalLinkedList" -  Expression of type "LinkedList[int]" cannot be assigned to member "next" of class "OrdinalLinkedList" -    Member "__set__" is unknown -    Member "__set__" is unknown -    Type "LinkedList[int]" cannot be assigned to type "OrdinalLinkedList | None" +generics_self_attributes.py:32:8 - error: Cannot assign to attribute "next" for class "OrdinalLinkedList" +  Expression of type "LinkedList[int]" cannot be assigned to attribute "next" of class "OrdinalLinkedList" +    Attribute "__set__" is unknown +    Attribute "__set__" is unknown +    Type "LinkedList[int]" is incompatible with type "OrdinalLinkedList | None"       "LinkedList[int]" is incompatible with "OrdinalLinkedList"       "LinkedList[int]" is incompatible with "None" (reportAttributeAccessIssue) """ diff --git a/conformance/results/pyright/generics_self_basic.toml b/conformance/results/pyright/generics_self_basic.toml index 6e8a7b7bd..3fa07521f 100644 --- a/conformance/results/pyright/generics_self_basic.toml +++ b/conformance/results/pyright/generics_self_basic.toml @@ -1,9 +1,9 @@ conformant = "Pass" output = """ -generics_self_basic.py:19:16 - error: Expression of type "Shape" cannot be assigned to return type "Self@Shape" -  Type "Shape" cannot be assigned to type "Self@Shape" (reportReturnType) -generics_self_basic.py:32:16 - error: Expression of type "Shape" cannot be assigned to return type "Self@Shape" -  Type "Shape" cannot be assigned to type "Self@Shape" (reportReturnType) +generics_self_basic.py:20:16 - error: Expression of type "Shape" is incompatible with return type "Self@Shape" +  Type "Shape" is incompatible with type "Self@Shape" (reportReturnType) +generics_self_basic.py:33:16 - error: Expression of type "Shape" is incompatible with return type "Self@Shape" +  Type "Shape" is incompatible with type "Self@Shape" (reportReturnType) generics_self_basic.py:64:31 - error: Expected no type arguments for class "Self" (reportInvalidTypeArguments) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/generics_self_protocols.toml b/conformance/results/pyright/generics_self_protocols.toml index 99d6049cf..9f77ef795 100644 --- a/conformance/results/pyright/generics_self_protocols.toml +++ b/conformance/results/pyright/generics_self_protocols.toml @@ -3,13 +3,13 @@ output = """ generics_self_protocols.py:61:19 - error: Argument of type "BadReturnType" cannot be assigned to parameter "shape" of type "ShapeProtocol" in function "accepts_shape"   "BadReturnType" is incompatible with protocol "ShapeProtocol"     "set_scale" is an incompatible type -      Type "(scale: float) -> int" cannot be assigned to type "(scale: float) -> BadReturnType" +      Type "(scale: float) -> int" is incompatible with type "(scale: float) -> BadReturnType"         Function return type "int" is incompatible with type "BadReturnType"           "int" is incompatible with "BadReturnType" (reportArgumentType) generics_self_protocols.py:64:19 - error: Argument of type "ReturnDifferentClass" cannot be assigned to parameter "shape" of type "ShapeProtocol" in function "accepts_shape"   "ReturnDifferentClass" is incompatible with protocol "ShapeProtocol"     "set_scale" is an incompatible type -      Type "(scale: float) -> ReturnConcreteShape" cannot be assigned to type "(scale: float) -> ReturnDifferentClass" +      Type "(scale: float) -> ReturnConcreteShape" is incompatible with type "(scale: float) -> ReturnDifferentClass"         Function return type "ReturnConcreteShape" is incompatible with type "ReturnDifferentClass"           "ReturnConcreteShape" is incompatible with "ReturnDifferentClass" (reportArgumentType) """ diff --git a/conformance/results/pyright/generics_self_usage.toml b/conformance/results/pyright/generics_self_usage.toml index ddc53c042..5e7184bac 100644 --- a/conformance/results/pyright/generics_self_usage.toml +++ b/conformance/results/pyright/generics_self_usage.toml @@ -6,8 +6,8 @@ generics_self_usage.py:76:6 - error: "Self" is not valid in this context (report generics_self_usage.py:82:44 - warning: TypeVar "TFoo2" appears only once in generic function signature   Use "Foo2" instead (reportInvalidTypeVarUse) generics_self_usage.py:82:54 - error: "Self" cannot be used in a function with a `self` or `cls` parameter that has a type annotation other than "Self" (reportGeneralTypeIssues) -generics_self_usage.py:86:16 - error: Expression of type "Foo3" cannot be assigned to return type "Self@Foo3" -  Type "Foo3" cannot be assigned to type "Self@Foo3" (reportReturnType) +generics_self_usage.py:86:16 - error: Expression of type "Foo3" is incompatible with return type "Self@Foo3" +  Type "Foo3" is incompatible with type "Self@Foo3" (reportReturnType) generics_self_usage.py:101:15 - error: "Self" is not valid in this context (reportGeneralTypeIssues) generics_self_usage.py:103:12 - error: "Self" is not valid in this context (reportGeneralTypeIssues) generics_self_usage.py:106:30 - error: "Self" is not valid in this context (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/generics_syntax_declarations.toml b/conformance/results/pyright/generics_syntax_declarations.toml index 87e53e365..d11d6b19c 100644 --- a/conformance/results/pyright/generics_syntax_declarations.toml +++ b/conformance/results/pyright/generics_syntax_declarations.toml @@ -1,24 +1,17 @@ -conformant = "Partial" -notes = """ -Does not assume deferred evaluation of bounds and constraints expressions. -""" +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 member "is_integer" for type "str*" -  Member "is_integer" is unknown (reportAttributeAccessIssue) -generics_syntax_declarations.py:41:17 - error: "ForwardReference" is not defined (reportUndefinedVariable) +generics_syntax_declarations.py:34: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 generics_syntax_declarations.py:50:17 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues) -generics_syntax_declarations.py:58:18 - error: "ForwardReference" is not defined (reportUndefinedVariable) 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: Expected type expression but received "tuple[type[bytes], type[str]]" (reportGeneralTypeIssues) generics_syntax_declarations.py:77:18 - error: Expected type expression but received "Literal[3]" (reportGeneralTypeIssues) generics_syntax_declarations.py:81:23 - error: "S" is not defined (reportUndefinedVariable) """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 41: Unexpected errors ['generics_syntax_declarations.py:41:17 - error: "ForwardReference" is not defined (reportUndefinedVariable)'] -Line 58: Unexpected errors ['generics_syntax_declarations.py:58:18 - error: "ForwardReference" is not defined (reportUndefinedVariable)'] """ diff --git a/conformance/results/pyright/generics_syntax_infer_variance.toml b/conformance/results/pyright/generics_syntax_infer_variance.toml index 93ad7fd03..355c321a4 100644 --- a/conformance/results/pyright/generics_syntax_infer_variance.toml +++ b/conformance/results/pyright/generics_syntax_infer_variance.toml @@ -2,61 +2,61 @@ conformant = "Pass" output = """ generics_syntax_infer_variance.py:15:51 - error: TypeVar cannot be both covariant and contravariant generics_syntax_infer_variance.py:17:55 - error: TypeVar cannot be both covariant and contravariant -generics_syntax_infer_variance.py:29:35 - error: Expression of type "ShouldBeCovariant1[float]" cannot be assigned to declared type "ShouldBeCovariant1[int]" +generics_syntax_infer_variance.py:29:35 - error: Expression of type "ShouldBeCovariant1[float]" is incompatible with declared type "ShouldBeCovariant1[int]"   "ShouldBeCovariant1[float]" is incompatible with "ShouldBeCovariant1[int]"     Type parameter "T@ShouldBeCovariant1" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_syntax_infer_variance.py:37:35 - error: Expression of type "ShouldBeCovariant2[float]" cannot be assigned to declared type "ShouldBeCovariant2[int]" +generics_syntax_infer_variance.py:37:35 - error: Expression of type "ShouldBeCovariant2[float]" is incompatible with declared type "ShouldBeCovariant2[int]"   "ShouldBeCovariant2[float]" is incompatible with "ShouldBeCovariant2[int]"     Type parameter "T@ShouldBeCovariant2" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_syntax_infer_variance.py:46:35 - error: Expression of type "ShouldBeCovariant3[float]" cannot be assigned to declared type "ShouldBeCovariant3[int]" +generics_syntax_infer_variance.py:46:35 - error: Expression of type "ShouldBeCovariant3[float]" is incompatible with declared type "ShouldBeCovariant3[int]"   "ShouldBeCovariant3[float]" is incompatible with "ShouldBeCovariant3[int]"     Type parameter "T@ShouldBeCovariant3" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_syntax_infer_variance.py:55:34 - error: Expression of type "ShouldBeCovariant4[float]" cannot be assigned to declared type "ShouldBeCovariant4[int]" +generics_syntax_infer_variance.py:55:34 - error: Expression of type "ShouldBeCovariant4[float]" is incompatible with declared type "ShouldBeCovariant4[int]"   "ShouldBeCovariant4[float]" is incompatible with "ShouldBeCovariant4[int]"     Type parameter "T@ShouldBeCovariant4" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_syntax_infer_variance.py:68:34 - error: Expression of type "ShouldBeCovariant5[float]" cannot be assigned to declared type "ShouldBeCovariant5[int]" +generics_syntax_infer_variance.py:68:34 - error: Expression of type "ShouldBeCovariant5[float]" is incompatible with declared type "ShouldBeCovariant5[int]"   "ShouldBeCovariant5[float]" is incompatible with "ShouldBeCovariant5[int]"     Type parameter "T@ShouldBeCovariant5" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_syntax_infer_variance.py:79:34 - error: Expression of type "ShouldBeCovariant6[float]" cannot be assigned to declared type "ShouldBeCovariant6[int]" +generics_syntax_infer_variance.py:79:34 - error: Expression of type "ShouldBeCovariant6[float]" is incompatible with declared type "ShouldBeCovariant6[int]"   "ShouldBeCovariant6[float]" is incompatible with "ShouldBeCovariant6[int]"     Type parameter "T@ShouldBeCovariant6" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_syntax_infer_variance.py:95:38 - error: Expression of type "ShouldBeInvariant1[int]" cannot be assigned to declared type "ShouldBeInvariant1[float]" +generics_syntax_infer_variance.py:95:38 - error: Expression of type "ShouldBeInvariant1[int]" is incompatible with declared type "ShouldBeInvariant1[float]"   "ShouldBeInvariant1[int]" is incompatible with "ShouldBeInvariant1[float]"     Type parameter "T@ShouldBeInvariant1" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_syntax_infer_variance.py:96:36 - error: Expression of type "ShouldBeInvariant1[float]" cannot be assigned to declared type "ShouldBeInvariant1[int]" +generics_syntax_infer_variance.py:96:36 - error: Expression of type "ShouldBeInvariant1[float]" is incompatible with declared type "ShouldBeInvariant1[int]"   "ShouldBeInvariant1[float]" is incompatible with "ShouldBeInvariant1[int]"     Type parameter "T@ShouldBeInvariant1" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_syntax_infer_variance.py:110:38 - error: Expression of type "ShouldBeInvariant2[int]" cannot be assigned to declared type "ShouldBeInvariant2[float]" +generics_syntax_infer_variance.py:110:38 - error: Expression of type "ShouldBeInvariant2[int]" is incompatible with declared type "ShouldBeInvariant2[float]"   "ShouldBeInvariant2[int]" is incompatible with "ShouldBeInvariant2[float]"     Type parameter "T@ShouldBeInvariant2" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_syntax_infer_variance.py:111:36 - error: Expression of type "ShouldBeInvariant2[float]" cannot be assigned to declared type "ShouldBeInvariant2[int]" +generics_syntax_infer_variance.py:111:36 - error: Expression of type "ShouldBeInvariant2[float]" is incompatible with declared type "ShouldBeInvariant2[int]"   "ShouldBeInvariant2[float]" is incompatible with "ShouldBeInvariant2[int]"     Type parameter "T@ShouldBeInvariant2" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_syntax_infer_variance.py:118:43 - error: Expression of type "ShouldBeInvariant3[int, str]" cannot be assigned to declared type "ShouldBeInvariant3[float, str]" +generics_syntax_infer_variance.py:118:43 - error: Expression of type "ShouldBeInvariant3[int, str]" is incompatible with declared type "ShouldBeInvariant3[float, str]"   "ShouldBeInvariant3[int, str]" is incompatible with "ShouldBeInvariant3[float, str]"     Type parameter "K@ShouldBeInvariant3" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_syntax_infer_variance.py:119:41 - error: Expression of type "ShouldBeInvariant3[float, str]" cannot be assigned to declared type "ShouldBeInvariant3[int, str]" +generics_syntax_infer_variance.py:119:41 - error: Expression of type "ShouldBeInvariant3[float, str]" is incompatible with declared type "ShouldBeInvariant3[int, str]"   "ShouldBeInvariant3[float, str]" is incompatible with "ShouldBeInvariant3[int, str]"     Type parameter "K@ShouldBeInvariant3" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_syntax_infer_variance.py:120:43 - error: Expression of type "ShouldBeInvariant3[str, int]" cannot be assigned to declared type "ShouldBeInvariant3[str, float]" +generics_syntax_infer_variance.py:120:43 - error: Expression of type "ShouldBeInvariant3[str, int]" is incompatible with declared type "ShouldBeInvariant3[str, float]"   "ShouldBeInvariant3[str, int]" is incompatible with "ShouldBeInvariant3[str, float]"     Type parameter "V@ShouldBeInvariant3" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_syntax_infer_variance.py:121:41 - error: Expression of type "ShouldBeInvariant3[str, float]" cannot be assigned to declared type "ShouldBeInvariant3[str, int]" +generics_syntax_infer_variance.py:121:41 - error: Expression of type "ShouldBeInvariant3[str, float]" is incompatible with declared type "ShouldBeInvariant3[str, int]"   "ShouldBeInvariant3[str, float]" is incompatible with "ShouldBeInvariant3[str, int]"     Type parameter "V@ShouldBeInvariant3" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_syntax_infer_variance.py:129:38 - error: Expression of type "ShouldBeInvariant4[int]" cannot be assigned to declared type "ShouldBeInvariant4[float]" +generics_syntax_infer_variance.py:129:38 - error: Expression of type "ShouldBeInvariant4[int]" is incompatible with declared type "ShouldBeInvariant4[float]"   "ShouldBeInvariant4[int]" is incompatible with "ShouldBeInvariant4[float]"     Type parameter "T@ShouldBeInvariant4" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_syntax_infer_variance.py:137:38 - error: Expression of type "ShouldBeInvariant5[int]" cannot be assigned to declared type "ShouldBeInvariant5[float]" +generics_syntax_infer_variance.py:137:38 - error: Expression of type "ShouldBeInvariant5[int]" is incompatible with declared type "ShouldBeInvariant5[float]"   "ShouldBeInvariant5[int]" is incompatible with "ShouldBeInvariant5[float]"     Type parameter "T@ShouldBeInvariant5" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_syntax_infer_variance.py:148:45 - error: Expression of type "ShouldBeContravariant1[int]" cannot be assigned to declared type "ShouldBeContravariant1[float]" +generics_syntax_infer_variance.py:148:45 - error: Expression of type "ShouldBeContravariant1[int]" is incompatible with declared type "ShouldBeContravariant1[float]"   "ShouldBeContravariant1[int]" is incompatible with "ShouldBeContravariant1[float]"     Type parameter "T@ShouldBeContravariant1" is contravariant, but "int" is not a supertype of "float"       "float" is incompatible with "int" (reportAssignmentType) diff --git a/conformance/results/pyright/generics_syntax_scoping.toml b/conformance/results/pyright/generics_syntax_scoping.toml index 82e64f386..bc0477a33 100644 --- a/conformance/results/pyright/generics_syntax_scoping.toml +++ b/conformance/results/pyright/generics_syntax_scoping.toml @@ -1,7 +1,10 @@ -conformant = "Pass" +conformant = "Partial" +notes = """ +Does not reject use of type variable in upper bound expression. +""" output = """ -generics_syntax_scoping.py:14:29 - error: "S" is not defined (reportUndefinedVariable) -generics_syntax_scoping.py:18:26 - error: "T" is not defined (reportUndefinedVariable) +generics_syntax_scoping.py:14:29 - error: Expected type expression but received "int" (reportGeneralTypeIssues) +generics_syntax_scoping.py:18:26 - error: Expected type expression but received "int" (reportGeneralTypeIssues) generics_syntax_scoping.py:35:7 - error: "T" is not defined (reportUndefinedVariable) generics_syntax_scoping.py:44:17 - error: "T" is not defined (reportUndefinedVariable) generics_syntax_scoping.py:92:17 - error: Type parameter "T" is already in use diff --git a/conformance/results/pyright/generics_type_erasure.toml b/conformance/results/pyright/generics_type_erasure.toml index 9b2dafdd0..35398f2c1 100644 --- a/conformance/results/pyright/generics_type_erasure.toml +++ b/conformance/results/pyright/generics_type_erasure.toml @@ -1,11 +1,11 @@ conformant = "Pass" output = """ generics_type_erasure.py:36:16 - error: Argument of type "Literal['']" cannot be assigned to parameter "label" of type "int | None" in function "__init__" -  Type "Literal['']" cannot be assigned to type "int | None" +  Type "Literal['']" is incompatible with type "int | None"     "Literal['']" is incompatible with "int"     "Literal['']" is incompatible with "None" (reportArgumentType) generics_type_erasure.py:38:16 - error: Argument of type "Literal[0]" cannot be assigned to parameter "label" of type "str | None" in function "__init__" -  Type "Literal[0]" cannot be assigned to type "str | None" +  Type "Literal[0]" is incompatible with type "str | None"     "Literal[0]" is incompatible with "str"     "Literal[0]" is incompatible with "None" (reportArgumentType) generics_type_erasure.py:40:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/generics_typevartuple_basic.toml b/conformance/results/pyright/generics_typevartuple_basic.toml index d09f76105..af03b67e2 100644 --- a/conformance/results/pyright/generics_typevartuple_basic.toml +++ b/conformance/results/pyright/generics_typevartuple_basic.toml @@ -2,10 +2,10 @@ conformant = "Pass" 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__"   "Height" is incompatible with "tuple[*Shape@Array]" (reportArgumentType) -generics_typevartuple_basic.py:43:35 - error: Expression of type "Array[Batch, Width]" cannot be assigned to declared type "Array[Batch, Height, Width]" +generics_typevartuple_basic.py:43:35 - error: Expression of type "Array[Batch, Width]" is incompatible with declared type "Array[Batch, Height, Width]"   "Array[Batch, Width]" is incompatible with "Array[Batch, Height, Width]"     Type parameter "Shape@Array" is invariant, but "*tuple[Batch, Width]" is not the same as "*tuple[Batch, Height, Width]" (reportAssignmentType) -generics_typevartuple_basic.py:44:41 - error: Expression of type "Array[Time, Batch, Width, Height]" cannot be assigned to declared type "Array[Time, Batch, Height, Width]" +generics_typevartuple_basic.py:44:41 - error: Expression of type "Array[Time, Batch, Width, Height]" is incompatible with declared type "Array[Time, Batch, Height, Width]"   "Array[Time, Batch, Width, Height]" is incompatible with "Array[Time, Batch, Height, Width]"     Type parameter "Shape@Array" is invariant, but "*tuple[Time, Batch, Width, Height]" is not the same as "*tuple[Time, Batch, Height, Width]" (reportAssignmentType) generics_typevartuple_basic.py:52:22 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape diff --git a/conformance/results/pyright/generics_upper_bound.toml b/conformance/results/pyright/generics_upper_bound.toml index 717f73946..5075bba9e 100644 --- a/conformance/results/pyright/generics_upper_bound.toml +++ b/conformance/results/pyright/generics_upper_bound.toml @@ -3,11 +3,11 @@ output = """ generics_upper_bound.py:22:34 - error: TypeVar bound type cannot be generic generics_upper_bound.py:22:39 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues) generics_upper_bound.py:48:8 - error: Argument of type "Literal[3]" cannot be assigned to parameter "x" of type "ST@longer" in function "longer" -  Type "Literal[3]" cannot be assigned to type "Sized" +  Type "Literal[3]" is incompatible with type "Sized"     "Literal[3]" is incompatible with protocol "Sized"       "__len__" is not present (reportArgumentType) generics_upper_bound.py:48:11 - error: Argument of type "Literal[3]" cannot be assigned to parameter "y" of type "ST@longer" in function "longer" -  Type "Literal[3]" cannot be assigned to type "Sized" +  Type "Literal[3]" is incompatible with type "Sized"     "Literal[3]" is incompatible with protocol "Sized"       "__len__" is not present (reportArgumentType) generics_upper_bound.py:53:44 - error: TypeVar cannot be both bound and constrained diff --git a/conformance/results/pyright/generics_variance_inference.toml b/conformance/results/pyright/generics_variance_inference.toml index b8936151b..e2b3de347 100644 --- a/conformance/results/pyright/generics_variance_inference.toml +++ b/conformance/results/pyright/generics_variance_inference.toml @@ -1,81 +1,81 @@ conformant = "Pass" output = """ -generics_variance_inference.py:24:33 - error: Expression of type "ClassA[float, int, int]" cannot be assigned to declared type "ClassA[int, int, int]" +generics_variance_inference.py:24:33 - error: Expression of type "ClassA[float, int, int]" is incompatible with declared type "ClassA[int, int, int]"   "ClassA[float, int, int]" is incompatible with "ClassA[int, int, int]"     Type parameter "T1@ClassA" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_variance_inference.py:25:37 - error: Expression of type "ClassA[float, int, int]" cannot be assigned to declared type "ClassA[float, float, int]" +generics_variance_inference.py:25:37 - error: Expression of type "ClassA[float, int, int]" is incompatible with declared type "ClassA[float, float, int]"   "ClassA[float, int, int]" is incompatible with "ClassA[float, float, int]"     Type parameter "T2@ClassA" is contravariant, but "int" is not a supertype of "float"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:28:33 - error: Expression of type "ClassA[int, float, float]" cannot be assigned to declared type "ClassA[int, int, int]" +generics_variance_inference.py:28:33 - error: Expression of type "ClassA[int, float, float]" is incompatible with declared type "ClassA[int, int, int]"   "ClassA[int, float, float]" is incompatible with "ClassA[int, int, int]"     Type parameter "T3@ClassA" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:41:35 - error: Expression of type "ShouldBeCovariant1[float]" cannot be assigned to declared type "ShouldBeCovariant1[int]" +generics_variance_inference.py:41:35 - error: Expression of type "ShouldBeCovariant1[float]" is incompatible with declared type "ShouldBeCovariant1[int]"   "ShouldBeCovariant1[float]" is incompatible with "ShouldBeCovariant1[int]"     Type parameter "T@ShouldBeCovariant1" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:49:35 - error: Expression of type "ShouldBeCovariant2[float]" cannot be assigned to declared type "ShouldBeCovariant2[int]" +generics_variance_inference.py:49:35 - error: Expression of type "ShouldBeCovariant2[float]" is incompatible with declared type "ShouldBeCovariant2[int]"   "ShouldBeCovariant2[float]" is incompatible with "ShouldBeCovariant2[int]"     Type parameter "T@ShouldBeCovariant2" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:58:35 - error: Expression of type "ShouldBeCovariant3[float]" cannot be assigned to declared type "ShouldBeCovariant3[int]" +generics_variance_inference.py:58:35 - error: Expression of type "ShouldBeCovariant3[float]" is incompatible with declared type "ShouldBeCovariant3[int]"   "ShouldBeCovariant3[float]" is incompatible with "ShouldBeCovariant3[int]"     Type parameter "T@ShouldBeCovariant3" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:67:34 - error: Expression of type "ShouldBeCovariant4[float]" cannot be assigned to declared type "ShouldBeCovariant4[int]" +generics_variance_inference.py:67:34 - error: Expression of type "ShouldBeCovariant4[float]" is incompatible with declared type "ShouldBeCovariant4[int]"   "ShouldBeCovariant4[float]" is incompatible with "ShouldBeCovariant4[int]"     Type parameter "T@ShouldBeCovariant4" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:80:34 - error: Expression of type "ShouldBeCovariant5[float]" cannot be assigned to declared type "ShouldBeCovariant5[int]" +generics_variance_inference.py:80:34 - error: Expression of type "ShouldBeCovariant5[float]" is incompatible with declared type "ShouldBeCovariant5[int]"   "ShouldBeCovariant5[float]" is incompatible with "ShouldBeCovariant5[int]"     Type parameter "T@ShouldBeCovariant5" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:96:38 - error: Expression of type "ShouldBeInvariant1[int]" cannot be assigned to declared type "ShouldBeInvariant1[float]" +generics_variance_inference.py:96:38 - error: Expression of type "ShouldBeInvariant1[int]" is incompatible with declared type "ShouldBeInvariant1[float]"   "ShouldBeInvariant1[int]" is incompatible with "ShouldBeInvariant1[float]"     Type parameter "T@ShouldBeInvariant1" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_variance_inference.py:97:36 - error: Expression of type "ShouldBeInvariant1[float]" cannot be assigned to declared type "ShouldBeInvariant1[int]" +generics_variance_inference.py:97:36 - error: Expression of type "ShouldBeInvariant1[float]" is incompatible with declared type "ShouldBeInvariant1[int]"   "ShouldBeInvariant1[float]" is incompatible with "ShouldBeInvariant1[int]"     Type parameter "T@ShouldBeInvariant1" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_variance_inference.py:111:38 - error: Expression of type "ShouldBeInvariant2[int]" cannot be assigned to declared type "ShouldBeInvariant2[float]" +generics_variance_inference.py:111:38 - error: Expression of type "ShouldBeInvariant2[int]" is incompatible with declared type "ShouldBeInvariant2[float]"   "ShouldBeInvariant2[int]" is incompatible with "ShouldBeInvariant2[float]"     Type parameter "T@ShouldBeInvariant2" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_variance_inference.py:112:36 - error: Expression of type "ShouldBeInvariant2[float]" cannot be assigned to declared type "ShouldBeInvariant2[int]" +generics_variance_inference.py:112:36 - error: Expression of type "ShouldBeInvariant2[float]" is incompatible with declared type "ShouldBeInvariant2[int]"   "ShouldBeInvariant2[float]" is incompatible with "ShouldBeInvariant2[int]"     Type parameter "T@ShouldBeInvariant2" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_variance_inference.py:119:43 - error: Expression of type "ShouldBeInvariant3[int, str]" cannot be assigned to declared type "ShouldBeInvariant3[float, str]" +generics_variance_inference.py:119:43 - error: Expression of type "ShouldBeInvariant3[int, str]" is incompatible with declared type "ShouldBeInvariant3[float, str]"   "ShouldBeInvariant3[int, str]" is incompatible with "ShouldBeInvariant3[float, str]"     Type parameter "K@ShouldBeInvariant3" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_variance_inference.py:120:41 - error: Expression of type "ShouldBeInvariant3[float, str]" cannot be assigned to declared type "ShouldBeInvariant3[int, str]" +generics_variance_inference.py:120:41 - error: Expression of type "ShouldBeInvariant3[float, str]" is incompatible with declared type "ShouldBeInvariant3[int, str]"   "ShouldBeInvariant3[float, str]" is incompatible with "ShouldBeInvariant3[int, str]"     Type parameter "K@ShouldBeInvariant3" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_variance_inference.py:121:43 - error: Expression of type "ShouldBeInvariant3[str, int]" cannot be assigned to declared type "ShouldBeInvariant3[str, float]" +generics_variance_inference.py:121:43 - error: Expression of type "ShouldBeInvariant3[str, int]" is incompatible with declared type "ShouldBeInvariant3[str, float]"   "ShouldBeInvariant3[str, int]" is incompatible with "ShouldBeInvariant3[str, float]"     Type parameter "V@ShouldBeInvariant3" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_variance_inference.py:122:41 - error: Expression of type "ShouldBeInvariant3[str, float]" cannot be assigned to declared type "ShouldBeInvariant3[str, int]" +generics_variance_inference.py:122:41 - error: Expression of type "ShouldBeInvariant3[str, float]" is incompatible with declared type "ShouldBeInvariant3[str, int]"   "ShouldBeInvariant3[str, float]" is incompatible with "ShouldBeInvariant3[str, int]"     Type parameter "V@ShouldBeInvariant3" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_variance_inference.py:130:38 - error: Expression of type "ShouldBeInvariant4[int]" cannot be assigned to declared type "ShouldBeInvariant4[float]" +generics_variance_inference.py:130:38 - error: Expression of type "ShouldBeInvariant4[int]" is incompatible with declared type "ShouldBeInvariant4[float]"   "ShouldBeInvariant4[int]" is incompatible with "ShouldBeInvariant4[float]"     Type parameter "T@ShouldBeInvariant4" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_variance_inference.py:138:38 - error: Expression of type "ShouldBeInvariant5[int]" cannot be assigned to declared type "ShouldBeInvariant5[float]" +generics_variance_inference.py:138:38 - error: Expression of type "ShouldBeInvariant5[int]" is incompatible with declared type "ShouldBeInvariant5[float]"   "ShouldBeInvariant5[int]" is incompatible with "ShouldBeInvariant5[float]"     Type parameter "T@ShouldBeInvariant5" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_variance_inference.py:149:45 - error: Expression of type "ShouldBeContravariant1[int]" cannot be assigned to declared type "ShouldBeContravariant1[float]" +generics_variance_inference.py:149:45 - error: Expression of type "ShouldBeContravariant1[int]" is incompatible with declared type "ShouldBeContravariant1[float]"   "ShouldBeContravariant1[int]" is incompatible with "ShouldBeContravariant1[float]"     Type parameter "T@ShouldBeContravariant1" is contravariant, but "int" is not a supertype of "float"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:169:31 - error: Expression of type "ShouldBeInvariant6[float]" cannot be assigned to declared type "ShouldBeInvariant6[int]" +generics_variance_inference.py:169:31 - error: Expression of type "ShouldBeInvariant6[float]" is incompatible with declared type "ShouldBeInvariant6[int]"   "ShouldBeInvariant6[float]" is incompatible with "ShouldBeInvariant6[int]"     Type parameter "T@ShouldBeInvariant6" is invariant, but "float" is not the same as "int" (reportAssignmentType) -generics_variance_inference.py:170:33 - error: Expression of type "ShouldBeInvariant6[int]" cannot be assigned to declared type "ShouldBeInvariant6[float]" +generics_variance_inference.py:170:33 - error: Expression of type "ShouldBeInvariant6[int]" is incompatible with declared type "ShouldBeInvariant6[float]"   "ShouldBeInvariant6[int]" is incompatible with "ShouldBeInvariant6[float]"     Type parameter "T@ShouldBeInvariant6" is invariant, but "int" is not the same as "float" (reportAssignmentType) -generics_variance_inference.py:181:31 - error: Expression of type "ShouldBeCovariant6[float]" cannot be assigned to declared type "ShouldBeCovariant6[int]" +generics_variance_inference.py:181:31 - error: Expression of type "ShouldBeCovariant6[float]" is incompatible with declared type "ShouldBeCovariant6[int]"   "ShouldBeCovariant6[float]" is incompatible with "ShouldBeCovariant6[int]"     Type parameter "T@ShouldBeCovariant6" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -generics_variance_inference.py:194:37 - error: Expression of type "ShouldBeContravariant2[int]" cannot be assigned to declared type "ShouldBeContravariant2[float]" +generics_variance_inference.py:194:37 - error: Expression of type "ShouldBeContravariant2[int]" is incompatible with declared type "ShouldBeContravariant2[float]"   "ShouldBeContravariant2[int]" is incompatible with "ShouldBeContravariant2[float]"     Type parameter "T@ShouldBeContravariant2" is contravariant, but "int" is not a supertype of "float"       "float" is incompatible with "int" (reportAssignmentType) diff --git a/conformance/results/pyright/literals_literalstring.toml b/conformance/results/pyright/literals_literalstring.toml index 4c73a0a0f..f82f0123d 100644 --- a/conformance/results/pyright/literals_literalstring.toml +++ b/conformance/results/pyright/literals_literalstring.toml @@ -2,21 +2,21 @@ conformant = "Pass" output = """ literals_literalstring.py:36:29 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_literalstring.py:37:22 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value -literals_literalstring.py:43:23 - error: Expression of type "Literal['two']" cannot be assigned to declared type "Literal['']" -  "Literal['two']" cannot be assigned to type "Literal['']" (reportAssignmentType) -literals_literalstring.py:66:25 - error: Expression of type "str" cannot be assigned to declared type "LiteralString" +literals_literalstring.py:43:23 - error: Expression of type "Literal['two']" is incompatible with declared type "Literal['']" +  "Literal['two']" is incompatible with type "Literal['']" (reportAssignmentType) +literals_literalstring.py:66:25 - error: Expression of type "str" is incompatible with declared type "LiteralString"   "str" is incompatible with "LiteralString" (reportAssignmentType) -literals_literalstring.py:74:25 - error: Expression of type "Literal[3]" cannot be assigned to declared type "LiteralString" +literals_literalstring.py:74:25 - error: Expression of type "Literal[3]" is incompatible with declared type "LiteralString"   "Literal[3]" is incompatible with "LiteralString" (reportAssignmentType) -literals_literalstring.py:75:25 - error: Expression of type "Literal[b"test"]" cannot be assigned to declared type "LiteralString" +literals_literalstring.py:75:25 - error: Expression of type "Literal[b"test"]" is incompatible with declared type "LiteralString"   "Literal[b"test"]" is incompatible with "LiteralString" (reportAssignmentType) literals_literalstring.py:120:22 - error: Argument of type "str" cannot be assigned to parameter "s" of type "TLiteral@literal_identity" in function "literal_identity" -  Type "str" cannot be assigned to type "LiteralString" +  Type "str" is incompatible with type "LiteralString"     "str" is incompatible with "LiteralString" (reportArgumentType) literals_literalstring.py:134:51 - error: Argument of type "str" cannot be assigned to parameter "value" of type "T@Container" in function "__init__" -  Type "str" cannot be assigned to type "LiteralString" +  Type "str" is incompatible with type "LiteralString"     "str" is incompatible with "LiteralString" (reportArgumentType) -literals_literalstring.py:171:21 - error: Expression of type "list[LiteralString]" cannot be assigned to declared type "list[str]" +literals_literalstring.py:171:21 - error: Expression of type "list[LiteralString]" is incompatible with declared type "list[str]"   "list[LiteralString]" is incompatible with "list[str]"     Type parameter "_T@list" is invariant, but "LiteralString" is not the same as "str"     Consider switching from "list" to "Sequence" which is covariant (reportAssignmentType) diff --git a/conformance/results/pyright/literals_parameterizations.toml b/conformance/results/pyright/literals_parameterizations.toml index f4fb4e8d7..4b5ab694f 100644 --- a/conformance/results/pyright/literals_parameterizations.toml +++ b/conformance/results/pyright/literals_parameterizations.toml @@ -16,8 +16,8 @@ literals_parameterizations.py:53:16 - error: Type arguments for "Literal" must b literals_parameterizations.py:56:28 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:60:4 - error: "Literal" cannot be used in this context without a type argument literals_parameterizations.py:61:12 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value -literals_parameterizations.py:65:32 - error: Expression of type "Literal[Color.RED]" cannot be assigned to declared type "Literal['Color.RED']" -  "Literal[Color.RED]" cannot be assigned to type "Literal['Color.RED']" (reportAssignmentType) +literals_parameterizations.py:65:32 - error: Expression of type "Literal[Color.RED]" is incompatible with declared type "Literal['Color.RED']" +  "Literal[Color.RED]" is incompatible with type "Literal['Color.RED']" (reportAssignmentType) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/literals_semantics.toml b/conformance/results/pyright/literals_semantics.toml index 780cb342d..2606d3f0e 100644 --- a/conformance/results/pyright/literals_semantics.toml +++ b/conformance/results/pyright/literals_semantics.toml @@ -1,12 +1,12 @@ conformant = "Pass" output = """ -literals_semantics.py:10:18 - error: Expression of type "Literal[4]" cannot be assigned to declared type "Literal[3]" -  "Literal[4]" cannot be assigned to type "Literal[3]" (reportAssignmentType) -literals_semantics.py:24:26 - error: Expression of type "Literal[0]" cannot be assigned to declared type "Literal[False]" -  "Literal[0]" cannot be assigned to type "Literal[False]" (reportAssignmentType) -literals_semantics.py:25:22 - error: Expression of type "Literal[False]" cannot be assigned to declared type "Literal[0]" -  "Literal[False]" cannot be assigned to type "Literal[0]" (reportAssignmentType) -literals_semantics.py:33:10 - error: Expression of type "Literal[6, 7, 8]" cannot be assigned to declared type "Literal[3, 4, 5]" (reportAssignmentType) +literals_semantics.py:10:18 - error: Expression of type "Literal[4]" is incompatible with declared type "Literal[3]" +  "Literal[4]" is incompatible with type "Literal[3]" (reportAssignmentType) +literals_semantics.py:24:26 - error: Expression of type "Literal[0]" is incompatible with declared type "Literal[False]" +  "Literal[0]" is incompatible with type "Literal[False]" (reportAssignmentType) +literals_semantics.py:25:22 - error: Expression of type "Literal[False]" is incompatible with declared type "Literal[0]" +  "Literal[False]" is incompatible with type "Literal[0]" (reportAssignmentType) +literals_semantics.py:33:10 - error: Expression of type "Literal[6, 7, 8]" is incompatible with declared type "Literal[3, 4, 5]" (reportAssignmentType) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/namedtuples_type_compat.toml b/conformance/results/pyright/namedtuples_type_compat.toml index 45cd25410..aa8f69e63 100644 --- a/conformance/results/pyright/namedtuples_type_compat.toml +++ b/conformance/results/pyright/namedtuples_type_compat.toml @@ -1,9 +1,9 @@ conformant = "Pass" output = """ -namedtuples_type_compat.py:22:23 - error: Expression of type "Point" cannot be assigned to declared type "tuple[int, int]" +namedtuples_type_compat.py:22:23 - error: Expression of type "Point" is incompatible with declared type "tuple[int, int]"   "Point" is incompatible with "tuple[int, int]"     Tuple size mismatch; expected 2 but received 3 (reportAssignmentType) -namedtuples_type_compat.py:23:28 - error: Expression of type "Point" cannot be assigned to declared type "tuple[int, str, str]" +namedtuples_type_compat.py:23:28 - error: Expression of type "Point" is incompatible with declared type "tuple[int, str, str]"   "Point" is incompatible with "tuple[int, str, str]"     Tuple entry 2 is incorrect type       "int" is incompatible with "str" (reportAssignmentType) diff --git a/conformance/results/pyright/namedtuples_usage.toml b/conformance/results/pyright/namedtuples_usage.toml index 912e4ca2d..693e8c389 100644 --- a/conformance/results/pyright/namedtuples_usage.toml +++ b/conformance/results/pyright/namedtuples_usage.toml @@ -2,13 +2,13 @@ conformant = "Pass" output = """ namedtuples_usage.py:34:7 - error: Index 3 is out of range for type Point (reportGeneralTypeIssues) namedtuples_usage.py:35:7 - error: Index -4 is out of range for type Point (reportGeneralTypeIssues) -namedtuples_usage.py:40:3 - error: Cannot assign member "x" for type "Point" +namedtuples_usage.py:40:3 - error: Cannot assign to attribute "x" for class "Point"   Attribute "x" is read-only -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) namedtuples_usage.py:41:1 - error: "__setitem__" method not defined on type "Point" (reportIndexIssue) -namedtuples_usage.py:42:7 - error: Cannot delete member "x" for type "Point" +namedtuples_usage.py:42:7 - error: Cannot delete attribute "x" for class "Point"   Attribute "x" is read-only -    Member "__delete__" is unknown (reportAttributeAccessIssue) +    Attribute "__delete__" is unknown (reportAttributeAccessIssue) namedtuples_usage.py:43:5 - error: "__delitem__" method not defined on type "Point" (reportIndexIssue) namedtuples_usage.py:52:1 - error: Expression with type "Point" cannot be assigned to target tuple   Type "Point" is incompatible with target tuple diff --git a/conformance/results/pyright/narrowing_typeguard.toml b/conformance/results/pyright/narrowing_typeguard.toml index dec295f5a..ecab95858 100644 --- a/conformance/results/pyright/narrowing_typeguard.toml +++ b/conformance/results/pyright/narrowing_typeguard.toml @@ -3,12 +3,12 @@ output = """ narrowing_typeguard.py:102:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues) narrowing_typeguard.py:107:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues) narrowing_typeguard.py:128:20 - error: Argument of type "(val: object) -> TypeGuard[int]" cannot be assigned to parameter "f" of type "(object) -> str" in function "takes_callable_str" -  Type "(val: object) -> TypeGuard[int]" cannot be assigned to type "(object) -> str" +  Type "(val: object) -> TypeGuard[int]" is incompatible with type "(object) -> str"     Function return type "TypeGuard[int]" is incompatible with type "str"       "TypeGuard[int]" is incompatible with "str"       "bool" is incompatible with "str" (reportArgumentType) narrowing_typeguard.py:148:26 - error: Argument of type "(val: object) -> TypeGuard[int]" cannot be assigned to parameter "f" of type "CallableStrProto" in function "takes_callable_str_proto" -  Type "(val: object) -> TypeGuard[int]" cannot be assigned to type "(val: object) -> str" +  Type "(val: object) -> TypeGuard[int]" is incompatible with type "(val: object) -> str"     Function return type "TypeGuard[int]" is incompatible with type "str"       "TypeGuard[int]" is incompatible with "str"       "bool" is incompatible with "str" (reportArgumentType) diff --git a/conformance/results/pyright/narrowing_typeis.toml b/conformance/results/pyright/narrowing_typeis.toml index ae6be1e4a..731a636e8 100644 --- a/conformance/results/pyright/narrowing_typeis.toml +++ b/conformance/results/pyright/narrowing_typeis.toml @@ -6,27 +6,27 @@ output = """ narrowing_typeis.py:105:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues) narrowing_typeis.py:110:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues) narrowing_typeis.py:132:20 - error: Argument of type "(val: object) -> TypeIs[int]" cannot be assigned to parameter "f" of type "(object) -> str" in function "takes_callable_str" -  Type "(val: object) -> TypeIs[int]" cannot be assigned to type "(object) -> str" +  Type "(val: object) -> TypeIs[int]" is incompatible with type "(object) -> str"     Function return type "TypeIs[int]" is incompatible with type "str"       "TypeIs[int]" is incompatible with "str"       "bool" is incompatible with "str" (reportArgumentType) narrowing_typeis.py:152:26 - error: Argument of type "(val: object) -> TypeIs[int]" cannot be assigned to parameter "f" of type "CallableStrProto" in function "takes_callable_str_proto" -  Type "(val: object) -> TypeIs[int]" cannot be assigned to type "(val: object) -> str" +  Type "(val: object) -> TypeIs[int]" is incompatible with type "(val: object) -> str"     Function return type "TypeIs[int]" is incompatible with type "str"       "TypeIs[int]" is incompatible with "str"       "bool" is incompatible with "str" (reportArgumentType) narrowing_typeis.py:169:17 - error: Argument of type "(val: object) -> TypeIs[int]" cannot be assigned to parameter "f" of type "(object) -> TypeGuard[int]" in function "takes_typeguard" -  Type "(val: object) -> TypeIs[int]" cannot be assigned to type "(object) -> TypeGuard[int]" +  Type "(val: object) -> TypeIs[int]" is incompatible with type "(object) -> TypeGuard[int]"     Function return type "TypeIs[int]" is incompatible with type "TypeGuard[int]"       "TypeIs[int]" is incompatible with "TypeGuard[int]"       "bool" is incompatible with "TypeGuard[int]" (reportArgumentType) narrowing_typeis.py:170:14 - error: Argument of type "(val: object) -> TypeGuard[int]" cannot be assigned to parameter "f" of type "(object) -> TypeIs[int]" in function "takes_typeis" -  Type "(val: object) -> TypeGuard[int]" cannot be assigned to type "(object) -> TypeIs[int]" +  Type "(val: object) -> TypeGuard[int]" is incompatible with type "(object) -> TypeIs[int]"     Function return type "TypeGuard[int]" is incompatible with type "TypeIs[int]"       "TypeGuard[int]" is incompatible with "TypeIs[int]"       "bool" is incompatible with "TypeIs[int]" (reportArgumentType) narrowing_typeis.py:191:18 - error: Argument of type "(val: object) -> TypeIs[bool]" cannot be assigned to parameter "f" of type "(object) -> TypeIs[int]" in function "takes_int_typeis" -  Type "(val: object) -> TypeIs[bool]" cannot be assigned to type "(object) -> TypeIs[int]" +  Type "(val: object) -> TypeIs[bool]" is incompatible with type "(object) -> TypeIs[int]"     Function return type "TypeIs[bool]" is incompatible with type "TypeIs[int]"       "TypeIs[bool]" is incompatible with "TypeIs[int]"         Type parameter "T@TypeIs" is invariant, but "bool" is not the same as "int" diff --git a/conformance/results/pyright/protocols_class_objects.toml b/conformance/results/pyright/protocols_class_objects.toml index 3890a2991..8841024c2 100644 --- a/conformance/results/pyright/protocols_class_objects.toml +++ b/conformance/results/pyright/protocols_class_objects.toml @@ -2,26 +2,26 @@ 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]" (reportArgumentType) -protocols_class_objects.py:34:7 - error: Expression of type "type[Proto]" cannot be assigned to declared type "type[Proto]" +protocols_class_objects.py:34:7 - error: Expression of type "type[Proto]" is incompatible with declared type "type[Proto]"   "Proto" is not a concrete class type and cannot be assigned to type "type[Proto]" (reportAssignmentType) -protocols_class_objects.py:58:16 - error: Expression of type "type[ConcreteA]" cannot be assigned to declared type "ProtoA1" +protocols_class_objects.py:58:16 - error: Expression of type "type[ConcreteA]" is incompatible with declared type "ProtoA1"   "type[type]" is incompatible with "type[ConcreteA]"   "type[type]" is incompatible with "type[ConcreteA]"   "method1" is an incompatible type -    Type "(self: ConcreteA, x: int) -> int" cannot be assigned to type "(x: int) -> int" +    Type "(self: ConcreteA, x: int) -> int" is incompatible with type "(x: int) -> int"       Parameter name mismatch: "x" versus "self" -      Parameter 1: type "int" cannot be assigned to type "ConcreteA" +      Parameter 1: type "int" is incompatible with type "ConcreteA"         "int" is incompatible with "ConcreteA" (reportAssignmentType) -protocols_class_objects.py:74:16 - error: Expression of type "type[ConcreteB]" cannot be assigned to declared type "ProtoB1" +protocols_class_objects.py:74:16 - error: Expression of type "type[ConcreteB]" is incompatible with declared type "ProtoB1"   "prop1" is an incompatible type     "property" is incompatible with "int" (reportAssignmentType) -protocols_class_objects.py:101:16 - error: Expression of type "type[ConcreteC1]" cannot be assigned to declared type "ProtoC1" +protocols_class_objects.py:101:16 - error: Expression of type "type[ConcreteC1]" is incompatible with declared type "ProtoC1"   "attr1" is defined as a ClassVar in protocol (reportAssignmentType) -protocols_class_objects.py:103:16 - error: Expression of type "type[ConcreteC2]" cannot be assigned to declared type "ProtoC1" +protocols_class_objects.py:103:16 - error: Expression of type "type[ConcreteC2]" is incompatible with declared type "ProtoC1"   "attr1" is defined as a ClassVar in protocol (reportAssignmentType) -protocols_class_objects.py:104:16 - error: Expression of type "type[ConcreteC2]" cannot be assigned to declared type "ProtoC2" +protocols_class_objects.py:104:16 - error: Expression of type "type[ConcreteC2]" is incompatible with declared type "ProtoC2"   "attr1" must be defined as a ClassVar to be compatible with protocol (reportAssignmentType) -protocols_class_objects.py:105:16 - error: Expression of type "type[ConcreteC3]" cannot be assigned to declared type "ProtoC1" +protocols_class_objects.py:105:16 - error: Expression of type "type[ConcreteC3]" is incompatible with declared type "ProtoC1"   "attr1" is defined as a ClassVar in protocol (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/protocols_definition.toml b/conformance/results/pyright/protocols_definition.toml index 02ea57ba4..9d55e8296 100644 --- a/conformance/results/pyright/protocols_definition.toml +++ b/conformance/results/pyright/protocols_definition.toml @@ -4,92 +4,92 @@ protocols_definition.py:30:12 - error: Argument of type "list[int]" cannot be as   "Literal[1]" is incompatible with protocol "SupportsClose"     "close" is not present (reportArgumentType) protocols_definition.py:67:14 - error: Instance or class variables within a Protocol class must be explicitly declared within the class body -protocols_definition.py:114:22 - error: Expression of type "Concrete2_Bad1" cannot be assigned to declared type "Template2" +protocols_definition.py:114:22 - error: Expression of type "Concrete2_Bad1" is incompatible with declared type "Template2"   "Concrete2_Bad1" is incompatible with protocol "Template2"     "val1" is not present (reportAssignmentType) -protocols_definition.py:115:22 - error: Expression of type "Concrete2_Bad2" cannot be assigned to declared type "Template2" +protocols_definition.py:115:22 - error: Expression of type "Concrete2_Bad2" is incompatible with declared type "Template2"   "Concrete2_Bad2" is incompatible with protocol "Template2"     "val1" is invariant because it is mutable     "val1" is an incompatible type     "val1" is defined as a ClassVar in protocol       "Sequence[float]" is incompatible with "Sequence[int]" (reportAssignmentType) -protocols_definition.py:116:22 - error: Expression of type "Concrete2_Bad3" cannot be assigned to declared type "Template2" +protocols_definition.py:116:22 - error: Expression of type "Concrete2_Bad3" is incompatible with declared type "Template2"   "Concrete2_Bad3" is incompatible with protocol "Template2"     "val1" is invariant because it is mutable     "val1" is an incompatible type     "val1" is defined as a ClassVar in protocol       "list[int]" is incompatible with "Sequence[int]" (reportAssignmentType) -protocols_definition.py:117:22 - error: Expression of type "Concrete2_Bad4" cannot be assigned to declared type "Template2" +protocols_definition.py:117:22 - error: Expression of type "Concrete2_Bad4" is incompatible with declared type "Template2"   "Concrete2_Bad4" is incompatible with protocol "Template2"     "val1" is defined as a ClassVar in protocol (reportAssignmentType) -protocols_definition.py:156:22 - error: Expression of type "Concrete3_Bad1" cannot be assigned to declared type "Template3" +protocols_definition.py:156:22 - error: Expression of type "Concrete3_Bad1" is incompatible with declared type "Template3"   "Concrete3_Bad1" is incompatible with protocol "Template3"     "val1" is not present (reportAssignmentType) -protocols_definition.py:157:22 - error: Expression of type "Concrete3_Bad2" cannot be assigned to declared type "Template3" +protocols_definition.py:157:22 - error: Expression of type "Concrete3_Bad2" is incompatible with declared type "Template3"   "Concrete3_Bad2" is incompatible with protocol "Template3"     "val1" is not defined as a ClassVar in protocol (reportAssignmentType) -protocols_definition.py:158:22 - error: Expression of type "Concrete3_Bad3" cannot be assigned to declared type "Template3" +protocols_definition.py:158:22 - error: Expression of type "Concrete3_Bad3" is incompatible with declared type "Template3"   "Concrete3_Bad3" is incompatible with protocol "Template3"     "val1" is invariant because it is mutable     "val1" is an incompatible type       "property" is incompatible with "Sequence[int]" (reportAssignmentType) -protocols_definition.py:159:22 - error: Expression of type "Concrete3_Bad4" cannot be assigned to declared type "Template3" +protocols_definition.py:159:22 - error: Expression of type "Concrete3_Bad4" is incompatible with declared type "Template3"   "Concrete3_Bad4" is incompatible with protocol "Template3"     "val1" is invariant because it is mutable     "val1" is an incompatible type       "Sequence[float]" is incompatible with "Sequence[int]" (reportAssignmentType) -protocols_definition.py:160:22 - error: Expression of type "Concrete3_Bad5" cannot be assigned to declared type "Template3" +protocols_definition.py:160:22 - error: Expression of type "Concrete3_Bad5" is incompatible with declared type "Template3"   "Concrete3_Bad5" is incompatible with protocol "Template3"     "val1" is invariant because it is mutable     "val1" is an incompatible type       "list[int]" is incompatible with "Sequence[int]" (reportAssignmentType) -protocols_definition.py:218:22 - error: Expression of type "Concrete4_Bad1" cannot be assigned to declared type "Template4" +protocols_definition.py:218:22 - error: Expression of type "Concrete4_Bad1" is incompatible with declared type "Template4"   "Concrete4_Bad1" is incompatible with protocol "Template4"     "val1" is an incompatible type       "function" is incompatible with "Sequence[float]" (reportAssignmentType) -protocols_definition.py:219:22 - error: Expression of type "Concrete4_Bad2" cannot be assigned to declared type "Template4" +protocols_definition.py:219:22 - error: Expression of type "Concrete4_Bad2" is incompatible with declared type "Template4"   "Concrete4_Bad2" is incompatible with protocol "Template4"     "val1" is not present (reportAssignmentType) protocols_definition.py:276:17 - warning: Static methods should not take a "self" or "cls" parameter (reportSelfClsParameterName) -protocols_definition.py:285:22 - error: Expression of type "Concrete5_Bad1" cannot be assigned to declared type "Template5" +protocols_definition.py:285:22 - error: Expression of type "Concrete5_Bad1" is incompatible with declared type "Template5"   "Concrete5_Bad1" is incompatible with protocol "Template5"     "method1" is an incompatible type -      Type "(a: Unknown, c: Unknown) -> int" cannot be assigned to type "(a: int, b: int) -> float" +      Type "(a: Unknown, c: Unknown) -> int" is incompatible with type "(a: int, b: int) -> float"         Parameter name mismatch: "b" versus "c" (reportAssignmentType) -protocols_definition.py:286:22 - error: Expression of type "Concrete5_Bad2" cannot be assigned to declared type "Template5" +protocols_definition.py:286:22 - error: Expression of type "Concrete5_Bad2" is incompatible with declared type "Template5"   "Concrete5_Bad2" is incompatible with protocol "Template5"     "method1" is an incompatible type -      Type "(a: int, c: int) -> int" cannot be assigned to type "(a: int, b: int) -> float" +      Type "(a: int, c: int) -> int" is incompatible with type "(a: int, b: int) -> float"         Parameter name mismatch: "b" versus "c" (reportAssignmentType) -protocols_definition.py:287:22 - error: Expression of type "Concrete5_Bad3" cannot be assigned to declared type "Template5" +protocols_definition.py:287:22 - error: Expression of type "Concrete5_Bad3" is incompatible with declared type "Template5"   "Concrete5_Bad3" is incompatible with protocol "Template5"     "method1" is an incompatible type -      Type "(*, a: int, b: int) -> float" cannot be assigned to type "(a: int, b: int) -> float" +      Type "(*, a: int, b: int) -> float" is incompatible with type "(a: int, b: int) -> float"         Function accepts too many positional parameters; expected 0 but received 2           Keyword parameter "a" is missing in destination           Keyword parameter "b" is missing in destination (reportAssignmentType) -protocols_definition.py:288:22 - error: Expression of type "Concrete5_Bad4" cannot be assigned to declared type "Template5" +protocols_definition.py:288:22 - error: Expression of type "Concrete5_Bad4" is incompatible with declared type "Template5"   "Concrete5_Bad4" is incompatible with protocol "Template5"     "method1" is an incompatible type -      Type "(a: int, b: int, /) -> float" cannot be assigned to type "(a: int, b: int) -> float" +      Type "(a: int, b: int, /) -> float" is incompatible with type "(a: int, b: int) -> float"         Position-only parameter mismatch; parameter "a" is not position-only         Position-only parameter mismatch; parameter "b" is not position-only         Position-only parameter mismatch; expected 2 but received 0 (reportAssignmentType) -protocols_definition.py:289:22 - error: Expression of type "Concrete5_Bad5" cannot be assigned to declared type "Template5" +protocols_definition.py:289:22 - error: Expression of type "Concrete5_Bad5" is incompatible with declared type "Template5"   "Concrete5_Bad5" is incompatible with protocol "Template5"     "method1" is an incompatible type -      Type "(self: Unknown, a: int, b: int) -> float" cannot be assigned to type "(a: int, b: int) -> float" +      Type "(self: Unknown, a: int, b: int) -> float" is incompatible with type "(a: int, b: int) -> float"         Parameter name mismatch: "a" versus "self"         Parameter name mismatch: "b" versus "a" (reportAssignmentType) -protocols_definition.py:339:22 - error: Expression of type "Concrete6_Bad1" cannot be assigned to declared type "Template6" +protocols_definition.py:339:22 - error: Expression of type "Concrete6_Bad1" is incompatible with declared type "Template6"   "Concrete6_Bad1" is incompatible with protocol "Template6"     "val1" is an incompatible type       Property setter method is missing         "Template6" is incompatible with "Concrete6_Bad1" (reportAssignmentType) -protocols_definition.py:340:22 - error: Expression of type "Concrete6_Bad2" cannot be assigned to declared type "Template6" +protocols_definition.py:340:22 - error: Expression of type "Concrete6_Bad2" is incompatible with declared type "Template6"   "Concrete6_Bad2" is incompatible with protocol "Template6"     "val1" is writable in protocol (reportAssignmentType) -protocols_definition.py:341:22 - error: Expression of type "Concrete6_Bad3" cannot be assigned to declared type "Template6" +protocols_definition.py:341:22 - error: Expression of type "Concrete6_Bad3" is incompatible with declared type "Template6"   "Concrete6_Bad3" is incompatible with protocol "Template6"     "val1" is writable in protocol (reportAssignmentType) """ diff --git a/conformance/results/pyright/protocols_explicit.toml b/conformance/results/pyright/protocols_explicit.toml index af3878e14..c6b503d29 100644 --- a/conformance/results/pyright/protocols_explicit.toml +++ b/conformance/results/pyright/protocols_explicit.toml @@ -1,7 +1,7 @@ conformant = "Pass" output = """ protocols_explicit.py:27:16 - error: Method "draw" cannot be called because it is abstract and unimplemented (reportAbstractUsage) -protocols_explicit.py:56:32 - error: Cannot assign member "rgb" for type "Point*" +protocols_explicit.py:56:32 - error: Cannot assign to attribute "rgb" for class "Point*"   "str" is incompatible with "int" (reportAttributeAccessIssue) protocols_explicit.py:59:5 - error: Cannot instantiate abstract class "Point"   "RGB.other" is not implemented diff --git a/conformance/results/pyright/protocols_generic.toml b/conformance/results/pyright/protocols_generic.toml index 9c1a067f4..02a95883a 100644 --- a/conformance/results/pyright/protocols_generic.toml +++ b/conformance/results/pyright/protocols_generic.toml @@ -1,42 +1,42 @@ conformant = "Pass" output = """ -protocols_generic.py:40:24 - error: Expression of type "Concrete1" cannot be assigned to declared type "Proto1[int, str]" +protocols_generic.py:40:24 - error: Expression of type "Concrete1" is incompatible with declared type "Proto1[int, str]"   "Concrete1" is incompatible with protocol "Proto1[int, str]"     "method1" is an incompatible type -      Type "(x: str) -> str" cannot be assigned to type "(x: S@Proto1) -> S@Proto1" -        Parameter 1: type "S@Proto1" cannot be assigned to type "str" +      Type "(x: str) -> str" is incompatible with type "(x: S@Proto1) -> S@Proto1" +        Parameter 1: type "S@Proto1" is incompatible with type "str"           "int" is incompatible with "str"         Function return type "str" is incompatible with type "S@Proto1" -          Type "str" cannot be assigned to type "int" +          Type "str" is incompatible with type "int"     "__iter__" is an incompatible type ... (reportAssignmentType) protocols_generic.py:44:30 - error: Only one Generic[...] or Protocol[...] base class allowed (reportGeneralTypeIssues) -protocols_generic.py:56:20 - error: Expression of type "Box[float]" cannot be assigned to declared type "Box[int]" +protocols_generic.py:56:20 - error: Expression of type "Box[float]" is incompatible with declared type "Box[int]"   "Box[float]" is incompatible with "Box[int]"     Type parameter "T_co@Box" is covariant, but "float" is not a subtype of "int"       "float" is incompatible with "int" (reportAssignmentType) -protocols_generic.py:66:25 - error: Expression of type "Sender[int]" cannot be assigned to declared type "Sender[float]" +protocols_generic.py:66:25 - error: Expression of type "Sender[int]" is incompatible with declared type "Sender[float]"   "Sender[int]" is incompatible with "Sender[float]"     Type parameter "T_contra@Sender" is contravariant, but "int" is not a supertype of "float"       "float" is incompatible with "int" (reportAssignmentType) -protocols_generic.py:74:28 - error: Expression of type "AttrProto[int]" cannot be assigned to declared type "AttrProto[float]" +protocols_generic.py:74:28 - error: Expression of type "AttrProto[int]" is incompatible with declared type "AttrProto[float]"   "AttrProto[int]" is incompatible with "AttrProto[float]"     Type parameter "T@AttrProto" is invariant, but "int" is not the same as "float" (reportAssignmentType) -protocols_generic.py:75:26 - error: Expression of type "AttrProto[float]" cannot be assigned to declared type "AttrProto[int]" +protocols_generic.py:75:26 - error: Expression of type "AttrProto[float]" is incompatible with declared type "AttrProto[int]"   "AttrProto[float]" is incompatible with "AttrProto[int]"     Type parameter "T@AttrProto" is invariant, but "float" is not the same as "int" (reportAssignmentType) -protocols_generic.py:146:25 - error: Expression of type "ConcreteHasProperty3" cannot be assigned to declared type "HasPropertyProto" +protocols_generic.py:146:25 - error: Expression of type "ConcreteHasProperty3" is incompatible with declared type "HasPropertyProto"   "ConcreteHasProperty3" is incompatible with protocol "HasPropertyProto"     "f" is an incompatible type -      Type "() -> int" cannot be assigned to type "() -> HasPropertyProto" +      Type "() -> int" is incompatible with type "() -> HasPropertyProto"         Function return type "int" is incompatible with type "HasPropertyProto"           "int" is incompatible with protocol "HasPropertyProto" (reportAssignmentType) -protocols_generic.py:147:25 - error: Expression of type "ConcreteHasProperty4" cannot be assigned to declared type "HasPropertyProto" +protocols_generic.py:147:25 - error: Expression of type "ConcreteHasProperty4" is incompatible with declared type "HasPropertyProto"   "ConcreteHasProperty4" is incompatible with protocol "HasPropertyProto"     "m" is an incompatible type -      Type "(item: str, callback: (int) -> str) -> str" cannot be assigned to type "(item: T@m, callback: (T@m) -> str) -> str" -        Parameter 2: type "(T@m) -> str" cannot be assigned to type "(int) -> str" -          Type "(str) -> str" cannot be assigned to type "(int) -> str" (reportAssignmentType) +      Type "(item: str, callback: (int) -> str) -> str" is incompatible with type "(item: T@m, callback: (T@m) -> str) -> str" +        Parameter 2: type "(T@m) -> str" is incompatible with type "(int) -> str" +          Type "(str) -> str" is incompatible with type "(int) -> str" (reportAssignmentType) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/protocols_merging.toml b/conformance/results/pyright/protocols_merging.toml index 41e037dda..cb43e377f 100644 --- a/conformance/results/pyright/protocols_merging.toml +++ b/conformance/results/pyright/protocols_merging.toml @@ -1,17 +1,17 @@ conformant = "Pass" output = """ -protocols_merging.py:52:25 - error: Expression of type "SCConcrete2" cannot be assigned to declared type "SizedAndClosable1" +protocols_merging.py:52:25 - error: Expression of type "SCConcrete2" is incompatible with declared type "SizedAndClosable1"   "SCConcrete2" is incompatible with protocol "SizedAndClosable1"     "__len__" is not present (reportAssignmentType) -protocols_merging.py:53:25 - error: Expression of type "SCConcrete2" cannot be assigned to declared type "SizedAndClosable2" +protocols_merging.py:53:25 - error: Expression of type "SCConcrete2" is incompatible with declared type "SizedAndClosable2"   "SCConcrete2" is incompatible with protocol "SizedAndClosable2"     "__len__" is not present (reportAssignmentType) -protocols_merging.py:54:25 - error: Expression of type "SCConcrete2" cannot be assigned to declared type "SizedAndClosable3" +protocols_merging.py:54:25 - error: Expression of type "SCConcrete2" is incompatible with declared type "SizedAndClosable3"   "SCConcrete2" is incompatible with "SizedAndClosable3" (reportAssignmentType) protocols_merging.py:67:16 - error: Protocol class "BadProto" cannot derive from non-protocol class "SizedAndClosable3" (reportGeneralTypeIssues) protocols_merging.py:82:5 - error: Cannot instantiate abstract class "SizedAndClosable4"   "SizedAndClosable4.close" is not implemented (reportAbstractUsage) -protocols_merging.py:83:24 - error: Expression of type "SCConcrete1" cannot be assigned to declared type "SizedAndClosable4" +protocols_merging.py:83:24 - error: Expression of type "SCConcrete1" is incompatible with declared type "SizedAndClosable4"   "SCConcrete1" is incompatible with "SizedAndClosable4" (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/protocols_modules.toml b/conformance/results/pyright/protocols_modules.toml index 70595e709..646b6ba13 100644 --- a/conformance/results/pyright/protocols_modules.toml +++ b/conformance/results/pyright/protocols_modules.toml @@ -1,15 +1,15 @@ conformant = "Pass" output = """ -protocols_modules.py:26:17 - error: Expression of type "Module("_protocols_modules1")" cannot be assigned to declared type "Options2" +protocols_modules.py:26:17 - error: Expression of type "Module("_protocols_modules1")" is incompatible with declared type "Options2"   "timeout" is invariant because it is mutable   "timeout" is an incompatible type     "int" is incompatible with "str" (reportAssignmentType) -protocols_modules.py:48:18 - error: Expression of type "Module("_protocols_modules2")" cannot be assigned to declared type "Reporter2" +protocols_modules.py:48:18 - error: Expression of type "Module("_protocols_modules2")" is incompatible with declared type "Reporter2"   "on_error" is an incompatible type -    Type "(x: int) -> None" cannot be assigned to type "(x: int) -> int" +    Type "(x: int) -> None" is incompatible with type "(x: int) -> int"       Function return type "None" is incompatible with type "int"         "None" is incompatible with "int" (reportAssignmentType) -protocols_modules.py:49:18 - error: Expression of type "Module("_protocols_modules2")" cannot be assigned to declared type "Reporter3" +protocols_modules.py:49:18 - error: Expression of type "Module("_protocols_modules2")" is incompatible with declared type "Reporter3"   "not_implemented" is not present (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/protocols_subtyping.toml b/conformance/results/pyright/protocols_subtyping.toml index a55eb38b5..572ac5d8e 100644 --- a/conformance/results/pyright/protocols_subtyping.toml +++ b/conformance/results/pyright/protocols_subtyping.toml @@ -1,24 +1,24 @@ conformant = "Pass" output = """ protocols_subtyping.py:16:6 - error: Cannot instantiate protocol class "Proto1" (reportAbstractUsage) -protocols_subtyping.py:38:21 - error: Expression of type "Proto2" cannot be assigned to declared type "Concrete2" +protocols_subtyping.py:38:21 - error: Expression of type "Proto2" is incompatible with declared type "Concrete2"   "Proto2" is incompatible with "Concrete2" (reportAssignmentType) -protocols_subtyping.py:55:18 - error: Expression of type "Proto2" cannot be assigned to declared type "Proto3" +protocols_subtyping.py:55:18 - error: Expression of type "Proto2" is incompatible with declared type "Proto3"   "Proto2" is incompatible with protocol "Proto3"     "method2" is not present (reportAssignmentType) -protocols_subtyping.py:79:30 - error: Expression of type "Proto5[int]" cannot be assigned to declared type "Proto4[int, float]" +protocols_subtyping.py:79:30 - error: Expression of type "Proto5[int]" is incompatible with declared type "Proto4[int, float]"   "Proto5[int]" is incompatible with protocol "Proto4[int, float]"     Type parameter "T@Proto4" is invariant, but "int" is not the same as "float" (reportAssignmentType) -protocols_subtyping.py:80:25 - error: Expression of type "Proto4[int, int]" cannot be assigned to declared type "Proto5[float]" +protocols_subtyping.py:80:25 - error: Expression of type "Proto4[int, int]" is incompatible with declared type "Proto5[float]"   "Proto4[int, int]" is incompatible with protocol "Proto5[float]"     Type parameter "T@Proto5" is invariant, but "int" is not the same as "float" (reportAssignmentType) -protocols_subtyping.py:102:30 - error: Expression of type "Proto6[float, float]" cannot be assigned to declared type "Proto7[int, float]" +protocols_subtyping.py:102:30 - error: Expression of type "Proto6[float, float]" is incompatible with declared type "Proto7[int, float]"   "Proto6[float, float]" is incompatible with protocol "Proto7[int, float]"     "method1" is an incompatible type -      Type "(a: float) -> Sequence[float]" cannot be assigned to type "(a: T_contra@Proto7) -> Sequence[S_co@Proto7]" +      Type "(a: float) -> Sequence[float]" is incompatible with type "(a: T_contra@Proto7) -> Sequence[S_co@Proto7]"         Function return type "Sequence[float]" is incompatible with type "Sequence[S_co@Proto7]"           "Sequence[float]" is incompatible with "Sequence[S_co@Proto7]" (reportAssignmentType) -protocols_subtyping.py:103:33 - error: Expression of type "Proto6[float, float]" cannot be assigned to declared type "Proto7[float, object]" +protocols_subtyping.py:103:33 - error: Expression of type "Proto6[float, float]" is incompatible with declared type "Proto7[float, object]"   "Proto6[float, float]" is incompatible with protocol "Proto7[float, object]"     Type parameter "T_contra@Proto7" is contravariant, but "float" is not a supertype of "object"       "object" is incompatible with "float" (reportAssignmentType) diff --git a/conformance/results/pyright/qualifiers_annotated.toml b/conformance/results/pyright/qualifiers_annotated.toml index 9a475c9b7..6884de6e7 100644 --- a/conformance/results/pyright/qualifiers_annotated.toml +++ b/conformance/results/pyright/qualifiers_annotated.toml @@ -17,8 +17,8 @@ qualifiers_annotated.py:52:18 - error: Expected type expression but received "Li qualifiers_annotated.py:53:18 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) qualifiers_annotated.py:54:18 - error: Type annotations cannot use format string literals (f-strings) (reportGeneralTypeIssues) qualifiers_annotated.py:64:8 - error: Expected one type argument and one or more annotations for "Annotated" -qualifiers_annotated.py:76:24 - error: Expression of type "type[int]" cannot be assigned to declared type "type[Any]" (reportAssignmentType) -qualifiers_annotated.py:77:24 - error: Expression of type "SmallInt" cannot be assigned to declared type "type[Any]" (reportAssignmentType) +qualifiers_annotated.py:76:24 - error: Expression of type "type[int]" is incompatible with declared type "type[Any]" (reportAssignmentType) +qualifiers_annotated.py:77:24 - error: Expression of type "SmallInt" is incompatible with declared type "type[Any]" (reportAssignmentType) qualifiers_annotated.py:84:7 - error: Argument of type "type[str]" cannot be assigned to parameter "x" of type "type[T@func4]" in function "func4" (reportArgumentType) qualifiers_annotated.py:85:7 - error: Argument of type "SmallInt" cannot be assigned to parameter "x" of type "type[T@func4]" in function "func4" (reportArgumentType) qualifiers_annotated.py:91:1 - error: "Annotated" cannot be instantiated (reportCallIssue) diff --git a/conformance/results/pyright/qualifiers_final_annotation.toml b/conformance/results/pyright/qualifiers_final_annotation.toml index cb1efe674..d56995649 100644 --- a/conformance/results/pyright/qualifiers_final_annotation.toml +++ b/conformance/results/pyright/qualifiers_final_annotation.toml @@ -4,28 +4,28 @@ qualifiers_final_annotation.py:16:1 - error: "BAD1" is declared Final, but value 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 (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 (reportAttributeAccessIssue) +qualifiers_final_annotation.py:54:14 - error: Cannot assign to attribute "ID5" for class "ClassA*" +  Attribute "ID5" cannot be assigned through a class instance because it is a ClassVar +    Attribute "__set__" is unknown (reportAttributeAccessIssue) qualifiers_final_annotation.py:62:19 - error: "Final" is not allowed in this context qualifiers_final_annotation.py:63:19 - error: "Final" is not allowed in this context -qualifiers_final_annotation.py:63:32 - error: Cannot assign member "id4" for type "ClassA*" +qualifiers_final_annotation.py:63:32 - error: Cannot assign to attribute "id4" for class "ClassA*"   "Literal[1]" is incompatible with "Final" (reportAttributeAccessIssue) -qualifiers_final_annotation.py:65:14 - error: Cannot assign member "ID7" for type "ClassA*" -  Member "ID7" cannot be assigned through a class instance because it is a ClassVar +qualifiers_final_annotation.py:65:14 - error: Cannot assign to attribute "ID7" for class "ClassA*" +  Attribute "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 (reportAttributeAccessIssue) -qualifiers_final_annotation.py:67:14 - error: Cannot assign member "ID7" for type "ClassA*" -  Member "ID7" cannot be assigned through a class instance because it is a ClassVar +    Attribute "__set__" is unknown (reportAttributeAccessIssue) +qualifiers_final_annotation.py:67:14 - error: Cannot assign to attribute "ID7" for class "ClassA*" +  Attribute "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 (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) 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]" +qualifiers_final_annotation.py:81:8 - error: Cannot assign to attribute "DEFAULT_ID" for class "type[ClassB]"   "DEFAULT_ID" is declared as Final and cannot be reassigned -    Member "__set__" is unknown (reportAttributeAccessIssue) +    Attribute "__set__" is unknown (reportAttributeAccessIssue) 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:107:31 - error: Expression of type "Literal[1]" cannot be assigned to declared type "Final" +qualifiers_final_annotation.py:107:31 - error: Expression of type "Literal[1]" is incompatible with declared type "Final"   "Literal[1]" is incompatible with "Final" (reportAssignmentType) 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 diff --git a/conformance/results/pyright/specialtypes_never.toml b/conformance/results/pyright/specialtypes_never.toml index 2c45faa0f..51770402b 100644 --- a/conformance/results/pyright/specialtypes_never.toml +++ b/conformance/results/pyright/specialtypes_never.toml @@ -1,11 +1,11 @@ conformant = "Pass" output = """ specialtypes_never.py:19:22 - error: Function with declared return type "NoReturn" cannot return "None" (reportReturnType) -specialtypes_never.py:82:21 - error: Expression of type "list[Never]" cannot be assigned to declared type "list[int]" +specialtypes_never.py:82:21 - error: Expression of type "list[Never]" is incompatible with declared type "list[int]"   "list[Never]" is incompatible with "list[int]"     Type parameter "_T@list" is invariant, but "Never" is not the same as "int"     Consider switching from "list" to "Sequence" which is covariant (reportAssignmentType) -specialtypes_never.py:101:12 - error: Expression of type "ClassC[Never]" cannot be assigned to return type "ClassC[U@func10]" +specialtypes_never.py:101:12 - error: Expression of type "ClassC[Never]" is incompatible with return type "ClassC[U@func10]"   "ClassC[Never]" is incompatible with "ClassC[U@func10]"     Type parameter "T@ClassC" is invariant, but "Never" is not the same as "U@func10" (reportReturnType) """ diff --git a/conformance/results/pyright/specialtypes_none.toml b/conformance/results/pyright/specialtypes_none.toml index 883d07706..fe9033f6f 100644 --- a/conformance/results/pyright/specialtypes_none.toml +++ b/conformance/results/pyright/specialtypes_none.toml @@ -2,11 +2,11 @@ conformant = "Pass" output = """ specialtypes_none.py:21:7 - error: Argument of type "type[None]" cannot be assigned to parameter "val1" of type "None" in function "func1"   "type[type]" is incompatible with "type[None]" (reportArgumentType) -specialtypes_none.py:27:19 - error: Expression of type "None" cannot be assigned to declared type "Iterable[Unknown]" +specialtypes_none.py:27:19 - error: Expression of type "None" is incompatible with declared type "Iterable[Unknown]"   "None" is incompatible with protocol "Iterable[Unknown]"     "__iter__" is not present (reportAssignmentType) specialtypes_none.py:41:7 - error: Argument of type "None" cannot be assigned to parameter "val1" of type "type[None]" in function "func2" -  Type "None" cannot be assigned to type "type[None]" (reportArgumentType) +  Type "None" is incompatible with type "type[None]" (reportArgumentType) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/specialtypes_promotions.toml b/conformance/results/pyright/specialtypes_promotions.toml index 524b92658..20daf3a3e 100644 --- a/conformance/results/pyright/specialtypes_promotions.toml +++ b/conformance/results/pyright/specialtypes_promotions.toml @@ -1,7 +1,7 @@ conformant = "Pass" output = """ -specialtypes_promotions.py:13:7 - error: Cannot access member "numerator" for type "float" -  Member "numerator" is unknown (reportAttributeAccessIssue) +specialtypes_promotions.py:13:7 - error: Cannot access attribute "numerator" for class "float" +  Attribute "numerator" is unknown (reportAttributeAccessIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/specialtypes_type.toml b/conformance/results/pyright/specialtypes_type.toml index 3c047e2fe..5a64d5e4a 100644 --- a/conformance/results/pyright/specialtypes_type.toml +++ b/conformance/results/pyright/specialtypes_type.toml @@ -1,25 +1,25 @@ 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]" +  Type "type[TeamUser]" is incompatible with type "type[BasicUser] | type[ProUser]"     "type[TeamUser]" is incompatible with "type[BasicUser]" -    Type "type[TeamUser]" cannot be assigned to type "type[BasicUser]" +    Type "type[TeamUser]" is incompatible with type "type[BasicUser]"     "type[TeamUser]" is incompatible with "type[ProUser]" -    Type "type[TeamUser]" cannot be assigned to type "type[ProUser]" (reportArgumentType) +    Type "type[TeamUser]" is incompatible with type "type[ProUser]" (reportArgumentType) 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" (reportArgumentType) 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 (reportAttributeAccessIssue) -specialtypes_type.py:120:7 - error: Cannot access member "unknown" for type "type[object]" -  Member "unknown" is unknown (reportAttributeAccessIssue) -specialtypes_type.py:143:5 - error: Cannot access member "unknown" for type "TA1" -  Member "unknown" is unknown (reportAttributeAccessIssue) -specialtypes_type.py:144:5 - error: Cannot access member "unknown" for type "TA2" -  Member "unknown" is unknown (reportAttributeAccessIssue) -specialtypes_type.py:145:5 - error: Cannot access member "unknown" for type "TA3" -  Member "unknown" is unknown (reportAttributeAccessIssue) -specialtypes_type.py:146:5 - error: Cannot access member "unknown" for type "TA4" -  Member "unknown" is unknown (reportAttributeAccessIssue) +specialtypes_type.py:117:7 - error: Cannot access attribute "unknown" for class "type[object]" +  Attribute "unknown" is unknown (reportAttributeAccessIssue) +specialtypes_type.py:120:7 - error: Cannot access attribute "unknown" for class "type[object]" +  Attribute "unknown" is unknown (reportAttributeAccessIssue) +specialtypes_type.py:143:5 - error: Cannot access attribute "unknown" for class "TA1" +  Attribute "unknown" is unknown (reportAttributeAccessIssue) +specialtypes_type.py:144:5 - error: Cannot access attribute "unknown" for class "TA2" +  Attribute "unknown" is unknown (reportAttributeAccessIssue) +specialtypes_type.py:145:5 - error: Cannot access attribute "unknown" for class "TA3" +  Attribute "unknown" is unknown (reportAttributeAccessIssue) +specialtypes_type.py:146:5 - error: Cannot access attribute "unknown" for class "TA4" +  Attribute "unknown" is unknown (reportAttributeAccessIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/tuples_type_compat.toml b/conformance/results/pyright/tuples_type_compat.toml index 27a885744..184606a6b 100644 --- a/conformance/results/pyright/tuples_type_compat.toml +++ b/conformance/results/pyright/tuples_type_compat.toml @@ -1,46 +1,46 @@ conformant = "Pass" output = """ -tuples_type_compat.py:15:27 - error: Expression of type "tuple[float, complex]" cannot be assigned to declared type "tuple[int, int]" +tuples_type_compat.py:15:27 - error: Expression of type "tuple[float, complex]" is incompatible with declared type "tuple[int, int]"   "tuple[float, complex]" is incompatible with "tuple[int, int]"     Tuple entry 1 is incorrect type       "float" is incompatible with "int" (reportAssignmentType) -tuples_type_compat.py:29:10 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int, *tuple[int, ...]]" +tuples_type_compat.py:29:10 - error: Expression of type "tuple[int, ...]" is incompatible with declared type "tuple[int, *tuple[int, ...]]"   "tuple[int, ...]" is incompatible with "tuple[int, *tuple[int, ...]]"     Tuple size mismatch; expected 1 or more but received indeterminate (reportAssignmentType) -tuples_type_compat.py:32:10 - error: Expression of type "tuple[int, *tuple[int, ...]]" cannot be assigned to declared type "tuple[int]" +tuples_type_compat.py:32:10 - error: Expression of type "tuple[int, *tuple[int, ...]]" is incompatible with declared type "tuple[int]"   "tuple[int, *tuple[int, ...]]" is incompatible with "tuple[int]"     Tuple size mismatch; expected 1 but received indeterminate (reportAssignmentType) -tuples_type_compat.py:33:10 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int]" +tuples_type_compat.py:33:10 - error: Expression of type "tuple[int, ...]" is incompatible with declared type "tuple[int]"   "tuple[int, ...]" is incompatible with "tuple[int]"     Tuple size mismatch; expected 1 but received indeterminate (reportAssignmentType) -tuples_type_compat.py:43:22 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int]" +tuples_type_compat.py:43:22 - error: Expression of type "tuple[int, ...]" is incompatible with declared type "tuple[int]"   "tuple[int, ...]" is incompatible with "tuple[int]"     Tuple size mismatch; expected 1 but received indeterminate (reportAssignmentType) -tuples_type_compat.py:62:26 - error: Expression of type "tuple[int, ...]" cannot be assigned to declared type "tuple[int, int]" +tuples_type_compat.py:62:26 - error: Expression of type "tuple[int, ...]" is incompatible with declared type "tuple[int, int]"   "tuple[int, ...]" is incompatible with "tuple[int, int]"     Tuple size mismatch; expected 2 but received indeterminate (reportAssignmentType) -tuples_type_compat.py:144:6 - error: Expression of type "tuple[Literal[1], Literal[''], Literal['']]" cannot be assigned to declared type "tuple[int, str]" +tuples_type_compat.py:144:6 - error: Expression of type "tuple[Literal[1], Literal[''], Literal['']]" is incompatible with declared type "tuple[int, str]"   "tuple[Literal[1], Literal[''], Literal['']]" is incompatible with "tuple[int, str]"     Tuple size mismatch; expected 2 but received 3 (reportAssignmentType) -tuples_type_compat.py:149:10 - error: Expression of type "tuple[Literal[1], Literal[1], Literal['']]" cannot be assigned to declared type "tuple[int, *tuple[str, ...]]" +tuples_type_compat.py:149:10 - error: Expression of type "tuple[Literal[1], Literal[1], Literal['']]" is incompatible with declared type "tuple[int, *tuple[str, ...]]"   "Literal[1]" is incompatible with "str" (reportAssignmentType) -tuples_type_compat.py:150:14 - error: Expression of type "tuple[Literal[1], Literal[''], Literal[1]]" cannot be assigned to declared type "tuple[int, *tuple[str, ...]]" +tuples_type_compat.py:150:14 - error: Expression of type "tuple[Literal[1], Literal[''], Literal[1]]" is incompatible with declared type "tuple[int, *tuple[str, ...]]"   "Literal[1]" is incompatible with "str" (reportAssignmentType) -tuples_type_compat.py:156:14 - error: Expression of type "tuple[Literal[1], Literal[''], Literal['']]" cannot be assigned to declared type "tuple[int, *tuple[str, ...], int]" +tuples_type_compat.py:156:14 - error: Expression of type "tuple[Literal[1], Literal[''], Literal['']]" is incompatible with declared type "tuple[int, *tuple[str, ...], int]"   "Literal['']" is incompatible with "int" (reportAssignmentType) -tuples_type_compat.py:157:18 - error: Expression of type "tuple[Literal[1], Literal[''], Literal[''], float]" cannot be assigned to declared type "tuple[int, *tuple[str, ...], int]" +tuples_type_compat.py:157:18 - error: Expression of type "tuple[Literal[1], Literal[''], Literal[''], float]" is incompatible with declared type "tuple[int, *tuple[str, ...], int]"   "float" is incompatible with "int" (reportAssignmentType) -tuples_type_compat.py:162:7 - error: Expression of type "tuple[Literal[1], Literal[''], Literal[1]]" cannot be assigned to declared type "tuple[*tuple[str, ...], int]" +tuples_type_compat.py:162:7 - error: Expression of type "tuple[Literal[1], Literal[''], Literal[1]]" is incompatible with declared type "tuple[*tuple[str, ...], int]"   "Literal[1]" is incompatible with "str" (reportAssignmentType) -tuples_type_compat.py:163:15 - error: Expression of type "tuple[Literal[''], Literal[''], float]" cannot be assigned to declared type "tuple[*tuple[str, ...], int]" +tuples_type_compat.py:163:15 - error: Expression of type "tuple[Literal[''], Literal[''], float]" is incompatible with declared type "tuple[*tuple[str, ...], int]"   "float" is incompatible with "int" (reportAssignmentType) -tuples_type_compat.py:168:40 - error: Expression of type "tuple[str, str]" cannot be assigned to declared type "tuple[str, str, int]" +tuples_type_compat.py:168:40 - error: Expression of type "tuple[str, str]" is incompatible with declared type "tuple[str, str, int]"   "tuple[str, str]" is incompatible with "tuple[str, str, int]"     Tuple size mismatch; expected 3 but received 2 (reportAssignmentType) -tuples_type_compat.py:171:50 - error: Expression of type "tuple[str, str]" cannot be assigned to declared type "tuple[str, str, str, *tuple[str, ...]]" +tuples_type_compat.py:171:50 - error: Expression of type "tuple[str, str]" is incompatible with declared type "tuple[str, str, str, *tuple[str, ...]]"   "tuple[str, str]" is incompatible with "tuple[str, str, str, *tuple[str, ...]]"     Tuple size mismatch; expected 3 or more but received 2 (reportAssignmentType) -tuples_type_compat.py:175:50 - error: Expression of type "tuple[str, str]" cannot be assigned to declared type "tuple[*tuple[str, ...], str, str, str]" +tuples_type_compat.py:175:50 - error: Expression of type "tuple[str, str]" is incompatible with declared type "tuple[*tuple[str, ...], str, str, str]"   "tuple[str, str]" is incompatible with "tuple[*tuple[str, ...], str, str, str]"     Tuple size mismatch; expected 3 or more but received 2 (reportAssignmentType) """ diff --git a/conformance/results/pyright/tuples_type_form.toml b/conformance/results/pyright/tuples_type_form.toml index 499e3dd4d..827bb138d 100644 --- a/conformance/results/pyright/tuples_type_form.toml +++ b/conformance/results/pyright/tuples_type_form.toml @@ -1,17 +1,17 @@ conformant = "Pass" output = """ -tuples_type_form.py:12:6 - error: Expression of type "tuple[Literal[1], Literal[2]]" cannot be assigned to declared type "tuple[int]" +tuples_type_form.py:12:6 - error: Expression of type "tuple[Literal[1], Literal[2]]" is incompatible with declared type "tuple[int]"   "tuple[Literal[1], Literal[2]]" is incompatible with "tuple[int]"     Tuple size mismatch; expected 1 but received 2 (reportAssignmentType) -tuples_type_form.py:14:6 - error: Expression of type "tuple[Literal[1]]" cannot be assigned to declared type "tuple[int, int]" +tuples_type_form.py:14:6 - error: Expression of type "tuple[Literal[1]]" is incompatible with declared type "tuple[int, int]"   "tuple[Literal[1]]" is incompatible with "tuple[int, int]"     Tuple size mismatch; expected 2 but received 1 (reportAssignmentType) -tuples_type_form.py:15:10 - error: Expression of type "tuple[Literal[1], Literal['']]" cannot be assigned to declared type "tuple[int, int]" +tuples_type_form.py:15:10 - error: Expression of type "tuple[Literal[1], Literal['']]" is incompatible with declared type "tuple[int, int]"   "Literal['']" is incompatible with "int" (reportAssignmentType) -tuples_type_form.py:25:7 - error: Expression of type "tuple[Literal[1]]" cannot be assigned to declared type "tuple[()]" +tuples_type_form.py:25:7 - error: Expression of type "tuple[Literal[1]]" is incompatible with declared type "tuple[()]"   "tuple[Literal[1]]" is incompatible with "tuple[()]"     Tuple size mismatch; expected 0 but received 1 (reportAssignmentType) -tuples_type_form.py:36:17 - error: Expression of type "tuple[Literal[1], Literal[2], Literal[3], Literal['']]" cannot be assigned to declared type "tuple[int, ...]" +tuples_type_form.py:36:17 - error: Expression of type "tuple[Literal[1], Literal[2], Literal[3], Literal['']]" is incompatible with declared type "tuple[int, ...]"   "Literal['']" is incompatible with "int" (reportAssignmentType) tuples_type_form.py:40:22 - error: "..." is allowed only as the second of two arguments tuples_type_form.py:41:12 - error: "..." is allowed only as the second of two arguments diff --git a/conformance/results/pyright/typeddicts_alt_syntax.toml b/conformance/results/pyright/typeddicts_alt_syntax.toml index 408b449b5..ed85c45e0 100644 --- a/conformance/results/pyright/typeddicts_alt_syntax.toml +++ b/conformance/results/pyright/typeddicts_alt_syntax.toml @@ -4,7 +4,7 @@ typeddicts_alt_syntax.py:23:17 - error: Expected dict or keyword parameter as se 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 (reportCallIssue) -typeddicts_alt_syntax.py:45:43 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "Movie2" +typeddicts_alt_syntax.py:45:43 - error: Expression of type "dict[str, str]" is incompatible with declared type "Movie2"   "Literal['']" is incompatible with "int" (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/typeddicts_operations.toml b/conformance/results/pyright/typeddicts_operations.toml index 257189bb7..f98bba88d 100644 --- a/conformance/results/pyright/typeddicts_operations.toml +++ b/conformance/results/pyright/typeddicts_operations.toml @@ -8,19 +8,19 @@ typeddicts_operations.py:24:1 - error: Could not assign item in TypedDict   "other" is not a defined key in "Movie" (reportGeneralTypeIssues) typeddicts_operations.py:26:7 - error: Could not access item in TypedDict   "other" is not a defined key in "Movie" (reportGeneralTypeIssues) -typeddicts_operations.py:28:9 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "Movie" +typeddicts_operations.py:28:9 - error: Expression of type "dict[str, str]" is incompatible with declared type "Movie"   "year" is required in "Movie" (reportAssignmentType) -typeddicts_operations.py:29:42 - error: Expression of type "dict[str, str | float]" cannot be assigned to declared type "Movie" +typeddicts_operations.py:29:42 - error: Expression of type "dict[str, str | float]" is incompatible with declared type "Movie"   "float" is incompatible with "int" (reportAssignmentType) -typeddicts_operations.py:32:36 - error: Expression of type "dict[str, str | int]" cannot be assigned to declared type "Movie" +typeddicts_operations.py:32:36 - error: Expression of type "dict[str, str | int]" is incompatible with declared type "Movie"   "other" is an undefined item in type "Movie" (reportAssignmentType) -typeddicts_operations.py:37:20 - error: Expression of type "dict[str, str | int]" cannot be assigned to declared type "Movie" (reportAssignmentType) -typeddicts_operations.py:47:7 - error: Cannot access member "clear" for type "Movie" -  Member "clear" is unknown (reportAttributeAccessIssue) +typeddicts_operations.py:37:20 - error: Expression of type "dict[str, str | int]" is incompatible with declared type "Movie" (reportAssignmentType) +typeddicts_operations.py:47:7 - error: Cannot access attribute "clear" for class "Movie" +  Attribute "clear" is unknown (reportAttributeAccessIssue) typeddicts_operations.py:49:5 - error: Could not delete item in TypedDict   "name" is a required key and cannot be deleted (reportGeneralTypeIssues) -typeddicts_operations.py:62:16 - error: Cannot access member "clear" for type "MovieOptional" -  Member "clear" is unknown (reportAttributeAccessIssue) +typeddicts_operations.py:62:16 - error: Cannot access attribute "clear" for class "MovieOptional" +  Attribute "clear" is unknown (reportAttributeAccessIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/typeddicts_readonly_consistency.toml b/conformance/results/pyright/typeddicts_readonly_consistency.toml index 9c4a58831..c295c4779 100644 --- a/conformance/results/pyright/typeddicts_readonly_consistency.toml +++ b/conformance/results/pyright/typeddicts_readonly_consistency.toml @@ -1,20 +1,20 @@ conformant = "Pass" output = """ -typeddicts_readonly_consistency.py:37:14 - error: Expression of type "A1" cannot be assigned to declared type "B1" +typeddicts_readonly_consistency.py:37:14 - error: Expression of type "A1" is incompatible with declared type "B1"   "y" is missing from "A1" (reportAssignmentType) -typeddicts_readonly_consistency.py:38:14 - error: Expression of type "C1" cannot be assigned to declared type "B1" +typeddicts_readonly_consistency.py:38:14 - error: Expression of type "C1" is incompatible with declared type "B1"   "y" is not read-only in "B1" (reportAssignmentType) -typeddicts_readonly_consistency.py:40:14 - error: Expression of type "A1" cannot be assigned to declared type "C1" +typeddicts_readonly_consistency.py:40:14 - error: Expression of type "A1" is incompatible with declared type "C1"   "y" is an incompatible type     "object" is incompatible with "str" (reportAssignmentType) -typeddicts_readonly_consistency.py:81:14 - error: Expression of type "A2" cannot be assigned to declared type "B2" +typeddicts_readonly_consistency.py:81:14 - error: Expression of type "A2" is incompatible with declared type "B2"   "x" is not read-only in "B2" (reportAssignmentType) -typeddicts_readonly_consistency.py:82:14 - error: Expression of type "C2" cannot be assigned to declared type "B2" +typeddicts_readonly_consistency.py:82:14 - error: Expression of type "C2" is incompatible with declared type "B2"   "x" is not required in "B2" (reportAssignmentType) -typeddicts_readonly_consistency.py:84:14 - error: Expression of type "A2" cannot be assigned to declared type "C2" +typeddicts_readonly_consistency.py:84:14 - error: Expression of type "A2" is incompatible with declared type "C2"   "x" is required in "C2"   "x" is not read-only in "C2" (reportAssignmentType) -typeddicts_readonly_consistency.py:85:14 - error: Expression of type "B2" cannot be assigned to declared type "C2" +typeddicts_readonly_consistency.py:85:14 - error: Expression of type "B2" is incompatible with declared type "C2"   "x" is required in "C2" (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/typeddicts_readonly_inheritance.toml b/conformance/results/pyright/typeddicts_readonly_inheritance.toml index 0b8a3398d..a77014bc5 100644 --- a/conformance/results/pyright/typeddicts_readonly_inheritance.toml +++ b/conformance/results/pyright/typeddicts_readonly_inheritance.toml @@ -6,13 +6,13 @@ typeddicts_readonly_inheritance.py:50:5 - error: "alt" overrides symbol of same   "list[str]" is incompatible with "list[str | int]"     Type parameter "_T@list" is invariant, but "str" is not the same as "str | int"     Consider switching from "list" to "Sequence" which is covariant (reportIncompatibleVariableOverride) -typeddicts_readonly_inheritance.py:65:19 - error: Expression of type "dict[Any, Any]" cannot be assigned to declared type "RequiredName" +typeddicts_readonly_inheritance.py:65:19 - error: Expression of type "dict[Any, Any]" is incompatible with declared type "RequiredName"   "name" is required in "RequiredName" (reportAssignmentType) typeddicts_readonly_inheritance.py:82:1 - error: Could not assign item in TypedDict   "Literal[3]" is incompatible with "str" (reportGeneralTypeIssues) -typeddicts_readonly_inheritance.py:83:15 - error: Expression of type "dict[str, int]" cannot be assigned to declared type "User" +typeddicts_readonly_inheritance.py:83:15 - error: Expression of type "dict[str, int]" is incompatible with declared type "User"   "Literal[3]" is incompatible with "str" (reportAssignmentType) -typeddicts_readonly_inheritance.py:84:5 - error: Expression of type "dict[Any, Any]" cannot be assigned to declared type "User" +typeddicts_readonly_inheritance.py:84:5 - error: Expression of type "dict[Any, Any]" is incompatible with declared type "User"   "ident" is required in "User" (reportAssignmentType) typeddicts_readonly_inheritance.py:94:5 - error: TypedDict item "a" cannot be redefined as ReadOnly (reportGeneralTypeIssues) typeddicts_readonly_inheritance.py:98:5 - error: TypedDict item "a" cannot be redefined as NotRequired (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/typeddicts_readonly_update.toml b/conformance/results/pyright/typeddicts_readonly_update.toml index 35d75c425..405e1acca 100644 --- a/conformance/results/pyright/typeddicts_readonly_update.toml +++ b/conformance/results/pyright/typeddicts_readonly_update.toml @@ -3,7 +3,7 @@ output = """ typeddicts_readonly_update.py:23:1 - error: No overloads for "update" match the provided arguments (reportCallIssue) typeddicts_readonly_update.py:23:11 - error: Argument of type "A" cannot be assigned to parameter "__m" of type "Partial[A]" in function "update"   "x" is an incompatible type -    Type "int" cannot be assigned to type "Never" (reportArgumentType) +    Type "int" is incompatible with type "Never" (reportArgumentType) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/typeddicts_type_consistency.toml b/conformance/results/pyright/typeddicts_type_consistency.toml index 3ca5380be..dcda72179 100644 --- a/conformance/results/pyright/typeddicts_type_consistency.toml +++ b/conformance/results/pyright/typeddicts_type_consistency.toml @@ -1,26 +1,26 @@ conformant = "Pass" output = """ -typeddicts_type_consistency.py:21:10 - error: Expression of type "B1" cannot be assigned to declared type "A1" +typeddicts_type_consistency.py:21:10 - error: Expression of type "B1" is incompatible with declared type "A1"   "x" is an incompatible type -    Type "int" cannot be assigned to type "int | None" +    Type "int" is incompatible with type "int | None"       "int" is incompatible with "None" (reportAssignmentType) -typeddicts_type_consistency.py:38:10 - error: Expression of type "B2" cannot be assigned to declared type "A2" +typeddicts_type_consistency.py:38:10 - error: Expression of type "B2" is incompatible with declared type "A2"   "x" is not required in "A2" (reportAssignmentType) -typeddicts_type_consistency.py:65:6 - error: Expression of type "A3" cannot be assigned to declared type "B3" +typeddicts_type_consistency.py:65:6 - error: Expression of type "A3" is incompatible with declared type "B3"   "y" is missing from "A3" (reportAssignmentType) -typeddicts_type_consistency.py:69:21 - error: Expression of type "dict[str, int]" cannot be assigned to declared type "A3" +typeddicts_type_consistency.py:69:21 - error: Expression of type "dict[str, int]" is incompatible with declared type "A3"   "y" is an undefined item in type "A3" (reportAssignmentType) -typeddicts_type_consistency.py:76:22 - error: Expression of type "B3" cannot be assigned to declared type "dict[str, int]" +typeddicts_type_consistency.py:76:22 - error: Expression of type "B3" is incompatible with declared type "dict[str, int]"   "B3" is incompatible with "dict[str, int]" (reportAssignmentType) -typeddicts_type_consistency.py:77:25 - error: Expression of type "B3" cannot be assigned to declared type "dict[str, object]" +typeddicts_type_consistency.py:77:25 - error: Expression of type "B3" is incompatible with declared type "dict[str, object]"   "B3" is incompatible with "dict[str, object]" (reportAssignmentType) -typeddicts_type_consistency.py:78:22 - error: Expression of type "B3" cannot be assigned to declared type "dict[Any, Any]" +typeddicts_type_consistency.py:78:22 - error: Expression of type "B3" is incompatible with declared type "dict[Any, Any]"   "B3" is incompatible with "dict[Any, Any]" (reportAssignmentType) -typeddicts_type_consistency.py:82:25 - error: Expression of type "B3" cannot be assigned to declared type "Mapping[str, int]" +typeddicts_type_consistency.py:82:25 - error: Expression of type "B3" is incompatible with declared type "Mapping[str, int]"   "B3" is incompatible with "Mapping[str, int]"     Type parameter "_VT_co@Mapping" is covariant, but "object" is not a subtype of "int"       "object" is incompatible with "int" (reportAssignmentType) -typeddicts_type_consistency.py:126:56 - error: Expression of type "dict[str, dict[str, dict[str, int]]]" cannot be assigned to declared type "Outer1" +typeddicts_type_consistency.py:126:56 - error: Expression of type "dict[str, dict[str, dict[str, int]]]" is incompatible with declared type "Outer1"   "Literal[1]" is incompatible with "str" (reportAssignmentType) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/typeddicts_usage.toml b/conformance/results/pyright/typeddicts_usage.toml index 29fe6d444..ee77079b0 100644 --- a/conformance/results/pyright/typeddicts_usage.toml +++ b/conformance/results/pyright/typeddicts_usage.toml @@ -4,7 +4,7 @@ typeddicts_usage.py:23:1 - error: Could not assign item in TypedDict   "director" is not a defined key in "Movie" (reportGeneralTypeIssues) typeddicts_usage.py:24:1 - error: Could not assign item in TypedDict   "Literal['1982']" is incompatible with "int" (reportGeneralTypeIssues) -typeddicts_usage.py:28:18 - error: Expression of type "dict[str, str | int]" cannot be assigned to declared type "Movie" +typeddicts_usage.py:28:18 - error: Expression of type "dict[str, str | int]" is incompatible with declared type "Movie"   "title" is an undefined item in type "Movie" (reportAssignmentType) typeddicts_usage.py:35:22 - error: Second argument to "isinstance" must be a class or tuple of classes   TypedDict class not allowed for instance or class checks (reportArgumentType) diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 13b119045..767c25565 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ -version = "pyright 1.1.358" -test_duration = 1.6 +version = "pyright 1.1.359" +test_duration = 1.5 diff --git a/conformance/results/pytype/dataclasses_usage.toml b/conformance/results/pytype/dataclasses_usage.toml index 7b827381c..02ba41ee1 100644 --- a/conformance/results/pytype/dataclasses_usage.toml +++ b/conformance/results/pytype/dataclasses_usage.toml @@ -1,16 +1,16 @@ conformant = "Pass" output = """ -File "dataclasses_usage.py", line 51, in : Missing parameter 'unit_price' in call to function InventoryItem.__init__ [missing-parameter] -File "dataclasses_usage.py", line 52, in : Function InventoryItem.__init__ was called with the wrong arguments [wrong-arg-types] -File "dataclasses_usage.py", line 53, in : Function InventoryItem.__init__ expects 3 arg(s), got 5 [wrong-arg-count] -File "dataclasses_usage.py", line 59, in : In method __init__, non-default argument b follows default argument [invalid-function-definition] -File "dataclasses_usage.py", line 65, in : In method __init__, non-default argument b follows default argument [invalid-function-definition] -File "dataclasses_usage.py", line 71, in : In method __init__, non-default argument b follows default argument [invalid-function-definition] -File "dataclasses_usage.py", line 84, in : Function DC4.__init__ expects 2 arg(s), got 3 [wrong-arg-count] -File "dataclasses_usage.py", line 89, in DC5: Type annotation for a does not match type of assignment [annotation-type-mismatch] -File "dataclasses_usage.py", line 127, in : Function DC7.__init__ expects 2 arg(s), got 3 [wrong-arg-count] -File "dataclasses_usage.py", line 130, in : Missing parameter 'y' in call to function DC8.__init__ [missing-parameter] -File "dataclasses_usage.py", line 179, in : Function DC13.__init__ expects 1 arg(s), got 2 [wrong-arg-count] +File "dataclasses_usage.py", line 50, in : Missing parameter 'unit_price' in call to function InventoryItem.__init__ [missing-parameter] +File "dataclasses_usage.py", line 51, in : Function InventoryItem.__init__ was called with the wrong arguments [wrong-arg-types] +File "dataclasses_usage.py", line 52, in : Function InventoryItem.__init__ expects 3 arg(s), got 5 [wrong-arg-count] +File "dataclasses_usage.py", line 58, in : In method __init__, non-default argument b follows default argument [invalid-function-definition] +File "dataclasses_usage.py", line 64, in : In method __init__, non-default argument b follows default argument [invalid-function-definition] +File "dataclasses_usage.py", line 70, in : In method __init__, non-default argument b follows default argument [invalid-function-definition] +File "dataclasses_usage.py", line 83, in : Function DC4.__init__ expects 2 arg(s), got 3 [wrong-arg-count] +File "dataclasses_usage.py", line 88, in DC5: Type annotation for a does not match type of assignment [annotation-type-mismatch] +File "dataclasses_usage.py", line 126, in : Function DC7.__init__ expects 2 arg(s), got 3 [wrong-arg-count] +File "dataclasses_usage.py", line 129, in : Missing parameter 'y' in call to function DC8.__init__ [missing-parameter] +File "dataclasses_usage.py", line 178, in : Function DC13.__init__ expects 1 arg(s), got 2 [wrong-arg-count] """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pytype/generics_self_basic.toml b/conformance/results/pytype/generics_self_basic.toml index 5f6abca63..f56e7ede2 100644 --- a/conformance/results/pytype/generics_self_basic.toml +++ b/conformance/results/pytype/generics_self_basic.toml @@ -3,23 +3,17 @@ notes = """ Does not understand `Self` type. """ output = """ -File "generics_self_basic.py", line 13, in set_scale: Shape [assert-type] -File "generics_self_basic.py", line 13, in set_scale: Circle [assert-type] +File "generics_self_basic.py", line 14, in set_scale: Shape [assert-type] +File "generics_self_basic.py", line 14, in set_scale: Circle [assert-type] Called from (traceback): - line 51, in current file -File "generics_self_basic.py", line 26, in from_config: Type[Shape] [assert-type] -Called from (traceback): - line 53, in current file -File "generics_self_basic.py", line 26, in from_config: Type[Circle] [assert-type] + line 52, in current file +File "generics_self_basic.py", line 27, in from_config: Type[Shape] [assert-type] Called from (traceback): line 54, in current file -File "generics_self_basic.py", line 27, in from_config: Function Shape.__init__ expects 1 arg(s), got 2 [wrong-arg-count] -Called from (traceback): - line 53, in current file -File "generics_self_basic.py", line 27, in from_config: Function Circle.__init__ expects 1 arg(s), got 2 [wrong-arg-count] +File "generics_self_basic.py", line 27, in from_config: Type[Circle] [assert-type] Called from (traceback): - line 54, in current file -File "generics_self_basic.py", line 39, in difference: Shape [assert-type] + line 55, in current file +File "generics_self_basic.py", line 40, in difference: Shape [assert-type] File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type] Called from (traceback): line 72, in object_with_concrete_type @@ -31,11 +25,10 @@ File "generics_self_basic.py", line 64, in Container: unsupported operand type(s """ conformance_automated = "Fail" errors_diff = """ -Line 19: Expected 1 errors -Line 32: Expected 1 errors -Line 13: Unexpected errors ['File "generics_self_basic.py", line 13, in set_scale: Shape [assert-type]', 'File "generics_self_basic.py", line 13, in set_scale: Circle [assert-type]'] -Line 26: Unexpected errors ['File "generics_self_basic.py", line 26, in from_config: Type[Shape] [assert-type]', 'File "generics_self_basic.py", line 26, in from_config: Type[Circle] [assert-type]'] -Line 27: Unexpected errors ['File "generics_self_basic.py", line 27, in from_config: Function Shape.__init__ expects 1 arg(s), got 2 [wrong-arg-count]', 'File "generics_self_basic.py", line 27, in from_config: Function Circle.__init__ expects 1 arg(s), got 2 [wrong-arg-count]'] -Line 39: Unexpected errors ['File "generics_self_basic.py", line 39, in difference: Shape [assert-type]'] +Line 20: Expected 1 errors +Line 33: Expected 1 errors +Line 14: Unexpected errors ['File "generics_self_basic.py", line 14, in set_scale: Shape [assert-type]', 'File "generics_self_basic.py", line 14, in set_scale: Circle [assert-type]'] +Line 27: Unexpected errors ['File "generics_self_basic.py", line 27, in from_config: Type[Shape] [assert-type]', 'File "generics_self_basic.py", line 27, in from_config: Type[Circle] [assert-type]'] +Line 40: Unexpected errors ['File "generics_self_basic.py", line 40, in difference: Shape [assert-type]'] Line 61: Unexpected errors ['File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type]', 'File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type]', 'File "generics_self_basic.py", line 61, in set_value: bad return type [bad-return-type]'] """ diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml index af75c4a65..69799be6f 100644 --- a/conformance/results/pytype/version.toml +++ b/conformance/results/pytype/version.toml @@ -1,2 +1,2 @@ version = "pytype 2024.04.11" -test_duration = 39.3 +test_duration = 37.5 diff --git a/conformance/results/results.html b/conformance/results/results.html index adfbdbe0c..6e6fe2006 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -159,16 +159,16 @@

Python Type System Conformance Test Results

- + - + @@ -338,7 +338,7 @@

Python Type System Conformance Test Results

- + @@ -350,7 +350,7 @@

Python Type System Conformance Test Results

- + @@ -623,13 +623,13 @@

Python Type System Conformance Test Results

- + - + @@ -647,7 +647,7 @@

Python Type System Conformance Test Results

- + diff --git a/conformance/tests/dataclasses_usage.py b/conformance/tests/dataclasses_usage.py index 05c4d79ec..4338cfa02 100644 --- a/conformance/tests/dataclasses_usage.py +++ b/conformance/tests/dataclasses_usage.py @@ -28,8 +28,7 @@ def total_cost(self) -> float: class InventoryItemInitProto(Protocol): def __call__( self, name: str, unit_price: float, quantity_on_hand: int = ... - ) -> None: - ... + ) -> None: ... # Validate the type of the synthesized __init__ method. @@ -188,7 +187,7 @@ class DC14: @dataclass class DC15(DC14): - prop_2: str + prop_2: str = "" dc15 = DC15(prop_2="test") diff --git a/conformance/tests/generics_self_basic.py b/conformance/tests/generics_self_basic.py index fc9f7f508..fd6a78719 100644 --- a/conformance/tests/generics_self_basic.py +++ b/conformance/tests/generics_self_basic.py @@ -8,6 +8,7 @@ T = TypeVar("T") + class Shape: def set_scale(self, scale: float) -> Self: assert_type(self, Self) @@ -24,7 +25,7 @@ def method3(self) -> "Shape": @classmethod def from_config(cls, config: dict[str, float]) -> Self: assert_type(cls, type[Self]) - return cls(config["scale"]) + return cls() @classmethod def cls_method2(cls) -> Self: @@ -57,8 +58,7 @@ class Circle(Shape): class Container(Generic[T]): value: T - def set_value(self, value: T) -> Self: - ... + def set_value(self, value: T) -> Self: ... # This should generate an error because Self isn't subscriptable. def foo(self, other: Self[int]) -> None: # E
 
mypy 1.9.0
-
2.3sec
-
pyright 1.1.358
1.6sec
pyright 1.1.359
+
1.5sec
+
pyre 0.9.19
-
3.2sec
+
4.0sec
pytype 2024.04.11
-
39.3sec
+
37.5sec
@@ -313,7 +313,7 @@

Python Type System Conformance Test Results

Unsupported

Does not understand `Self` type.

     generics_self_basic
Partial

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

Pass Pass
Unsupported

Does not understand `Self` type.

Unsupported

Does not understand `Self` type.

     generics_syntax_declarations
Unsupported

Type parameter syntax not yet support.

Partial

Does not assume deferred evaluation of bounds and constraints expressions.

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
Partial

Does not reject use of type variable in upper bound expression.

Unsupported

Type parameter syntax not yet support.

Unsupported

Type parameter syntax not yet support.

     constructors_call_init
Partial

Does not report errors during binding to self parameter of __init__ method.

Does not support function-scoped TypeVars in self annotation in __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Partial

Does not support function-scoped TypeVars in self annotation in __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Pass
Partial

Does not infer type of Self for self parameter of __init__ method.

Does not report errors during binding to self parameter of __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Partial

Does not report errors during binding to self parameter of __init__ method.

Does not infer type of Self for self parameter of __init__ method.

Rejects valid type annotation for self parameter in __init__ method.

Does not support function-scoped TypeVars in self annotation in __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

     constructors_call_metaclass
Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

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

Pass
Partial

Does not evaluate __new__ method when metaclass call has no return type annotation.

Evaluates wrong type for constructor call when metaclass call has no return type annotation.

Partial

Does not evaluate __new__ if metaclass __call__ is defined.

Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

     constructors_callable
Partial

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

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

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

Partial

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

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

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

Does not use annotated type of self in __init__ method to generate return type of callable.

Pass
Partial

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

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

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

Does not use annotated type of self in __init__ method to generate return type of callable.

Partial

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

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

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

Does not use annotated type of self in __init__ method to generate return type of callable.