diff --git a/conformance/results/pyright/aliases_explicit.toml b/conformance/results/pyright/aliases_explicit.toml index e1f0c29b..cebb2602 100644 --- a/conformance/results/pyright/aliases_explicit.toml +++ b/conformance/results/pyright/aliases_explicit.toml @@ -11,36 +11,38 @@ aliases_explicit.py:79:21 - error: Call expression not allowed in type expressio aliases_explicit.py:80:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:80:21 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -aliases_explicit.py:80:21 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues) +aliases_explicit.py:80:21 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) aliases_explicit.py:81:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:81:21 - error: Tuple expression not allowed in type annotation   Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) aliases_explicit.py:82:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:82:21 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -aliases_explicit.py:82:21 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_explicit.py:82:21 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) aliases_explicit.py:83:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:83:21 - error: Dictionary expression not allowed in type annotation   Use Dict[T1, T2] to indicate a dictionary type (reportInvalidTypeForm) -aliases_explicit.py:83:21 - error: Expected type expression but received "dict[str, Unknown]" (reportGeneralTypeIssues) +aliases_explicit.py:83:21 - error: Expected class but received "dict[str, Unknown]" (reportGeneralTypeIssues) aliases_explicit.py:83:28 - error: "b" is not defined (reportUndefinedVariable) aliases_explicit.py:84:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:84:21 - error: Call expression not allowed in type expression (reportInvalidTypeForm) aliases_explicit.py:85:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:85:21 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -aliases_explicit.py:85:21 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_explicit.py:85:21 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_explicit.py:85:27 - error: Expected class but received "Literal[0]" (reportGeneralTypeIssues) aliases_explicit.py:86:21 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:86:21 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm) aliases_explicit.py:87:21 - error: Variable not allowed in type expression (reportInvalidTypeForm) -aliases_explicit.py:88:22 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) +aliases_explicit.py:88:22 - error: Expected class but received "Literal[True]" (reportGeneralTypeIssues) aliases_explicit.py:89:22 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) -aliases_explicit.py:89:22 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +aliases_explicit.py:89:22 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) aliases_explicit.py:90:22 - error: Invalid expression form for type alias definition (reportInvalidTypeForm) aliases_explicit.py:90:22 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) aliases_explicit.py:91:22 - error: Type annotations cannot use format string literals (f-strings) (reportGeneralTypeIssues) aliases_explicit.py:100:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments) -aliases_explicit.py:101:6 - error: Object of type "UnionType" is not callable (reportCallIssue) +aliases_explicit.py:101:6 - error: Object of type "UnionType" is not callable +  Attribute "__call__" is unknown (reportCallIssue) aliases_explicit.py:102:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments) aliases_explicit.py:102:5 - error: Type "set[Unknown]" is already specialized (reportInvalidTypeArguments) """ diff --git a/conformance/results/pyright/aliases_implicit.toml b/conformance/results/pyright/aliases_implicit.toml index bc319996..9c6ffb3c 100644 --- a/conformance/results/pyright/aliases_implicit.toml +++ b/conformance/results/pyright/aliases_implicit.toml @@ -23,7 +23,8 @@ aliases_implicit.py:116:10 - error: Variable not allowed in type expression (rep aliases_implicit.py:117:10 - error: Variable not allowed in type expression (reportInvalidTypeForm) aliases_implicit.py:118:10 - error: Variable not allowed in type expression (reportInvalidTypeForm) aliases_implicit.py:119:10 - error: Variable not allowed in type expression (reportInvalidTypeForm) -aliases_implicit.py:133:6 - error: Object of type "UnionType" is not callable (reportCallIssue) +aliases_implicit.py:133:6 - error: Object of type "UnionType" is not callable +  Attribute "__call__" is unknown (reportCallIssue) aliases_implicit.py:135:5 - error: Type "list[Unknown]" is already specialized (reportInvalidTypeArguments) aliases_implicit.py:135:5 - error: Type "set[Unknown]" is already specialized (reportInvalidTypeArguments) """ diff --git a/conformance/results/pyright/aliases_type_statement.toml b/conformance/results/pyright/aliases_type_statement.toml index 73c0013d..825faaab 100644 --- a/conformance/results/pyright/aliases_type_statement.toml +++ b/conformance/results/pyright/aliases_type_statement.toml @@ -2,38 +2,38 @@ conformant = "Pass" output = """ 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:19:1 - error: Object of type "TypeAliasType" is not callable +  Attribute "__call__" is unknown (reportCallIssue) 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" +aliases_type_statement.py:31:22 - error: Argument of type "TypeAliasType" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "isinstance"   Type "TypeAliasType" is incompatible with type "_ClassInfo"     "TypeAliasType" is incompatible with "type"     "TypeAliasType" is incompatible with "UnionType"     "TypeAliasType" is incompatible with "tuple[_ClassInfo, ...]" (reportArgumentType) -aliases_type_statement.py:31:22 - error: Second argument to "isinstance" must be a class or tuple of classes -  Type alias created with "type" statement cannot be used with instance and class checks (reportArgumentType) aliases_type_statement.py:37:22 - error: Call expression not allowed in type expression (reportInvalidTypeForm) aliases_type_statement.py:38:22 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -aliases_type_statement.py:38:22 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues) +aliases_type_statement.py:38:22 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) aliases_type_statement.py:39:22 - error: Tuple expression not allowed in type annotation   Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) aliases_type_statement.py:40:22 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -aliases_type_statement.py:40:22 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_type_statement.py:40:22 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) aliases_type_statement.py:41:22 - error: Dictionary expression not allowed in type annotation   Use Dict[T1, T2] to indicate a dictionary type (reportInvalidTypeForm) -aliases_type_statement.py:41:22 - error: Expected type expression but received "dict[str, Unknown]" (reportGeneralTypeIssues) +aliases_type_statement.py:41:22 - error: Expected class but received "dict[str, Unknown]" (reportGeneralTypeIssues) aliases_type_statement.py:41:29 - error: "b" is not defined (reportUndefinedVariable) aliases_type_statement.py:42:22 - error: Call expression not allowed in type expression (reportInvalidTypeForm) aliases_type_statement.py:43:22 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -aliases_type_statement.py:43:22 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_type_statement.py:43:22 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_type_statement.py:43:28 - error: Expected class but received "Literal[0]" (reportGeneralTypeIssues) aliases_type_statement.py:44:22 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm) aliases_type_statement.py:45:22 - error: Variable not allowed in type expression (reportInvalidTypeForm) -aliases_type_statement.py:46:23 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) -aliases_type_statement.py:47:23 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +aliases_type_statement.py:46:23 - error: Expected class but received "Literal[True]" (reportGeneralTypeIssues) +aliases_type_statement.py:47:23 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) aliases_type_statement.py:48:23 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) aliases_type_statement.py:49:23 - error: Type annotations cannot use format string literals (f-strings) (reportGeneralTypeIssues) aliases_type_statement.py:52:10 - error: Type alias declaration "BadTypeAlias14" is obscured by a declaration of the same name (reportRedeclaration) diff --git a/conformance/results/pyright/aliases_typealiastype.toml b/conformance/results/pyright/aliases_typealiastype.toml index 967f4ae6..8b1fda76 100644 --- a/conformance/results/pyright/aliases_typealiastype.toml +++ b/conformance/results/pyright/aliases_typealiastype.toml @@ -12,19 +12,20 @@ aliases_typealiastype.py:46:40 - error: Type alias "BadAlias4" cannot use itself aliases_typealiastype.py:47:40 - error: Type alias "BadAlias5" cannot use itself in its definition (reportGeneralTypeIssues) aliases_typealiastype.py:48:40 - error: Type alias "BadAlias6" cannot use itself in its definition (reportGeneralTypeIssues) aliases_typealiastype.py:52:40 - error: Call expression not allowed in type expression (reportInvalidTypeForm) -aliases_typealiastype.py:53:40 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues) -aliases_typealiastype.py:54:42 - error: Expected type expression but received "tuple[tuple[type[int], type[str]]]" (reportGeneralTypeIssues) -aliases_typealiastype.py:55:42 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) -aliases_typealiastype.py:56:42 - error: Expected type expression but received "dict[str, Unknown]" (reportGeneralTypeIssues) +aliases_typealiastype.py:53:40 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) +aliases_typealiastype.py:54:42 - error: Expected class but received "tuple[tuple[type[int], type[str]]]" (reportGeneralTypeIssues) +aliases_typealiastype.py:55:42 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_typealiastype.py:56:42 - error: Expected class but received "dict[str, Unknown]" (reportGeneralTypeIssues) aliases_typealiastype.py:56:49 - error: "b" is not defined (reportUndefinedVariable) aliases_typealiastype.py:57:42 - error: Call expression not allowed in type expression (reportInvalidTypeForm) aliases_typealiastype.py:58:42 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -aliases_typealiastype.py:58:42 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_typealiastype.py:58:42 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) +aliases_typealiastype.py:58:48 - error: Expected class but received "Literal[0]" (reportGeneralTypeIssues) aliases_typealiastype.py:59:42 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm) aliases_typealiastype.py:60:42 - error: Variable not allowed in type expression (reportInvalidTypeForm) -aliases_typealiastype.py:61:42 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) -aliases_typealiastype.py:62:42 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +aliases_typealiastype.py:61:42 - error: Expected class but received "Literal[True]" (reportGeneralTypeIssues) +aliases_typealiastype.py:62:42 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) aliases_typealiastype.py:63:42 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) aliases_typealiastype.py:64:42 - error: Type annotations cannot use format string literals (f-strings) (reportGeneralTypeIssues) """ diff --git a/conformance/results/pyright/annotations_forward_refs.toml b/conformance/results/pyright/annotations_forward_refs.toml index 4ddb40f3..ae62e5d0 100644 --- a/conformance/results/pyright/annotations_forward_refs.toml +++ b/conformance/results/pyright/annotations_forward_refs.toml @@ -7,23 +7,24 @@ annotations_forward_refs.py:25:13 - error: Union syntax cannot be used with stri annotations_forward_refs.py:41:9 - error: Expected type but received a string literal (reportGeneralTypeIssues) annotations_forward_refs.py:42:10 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -annotations_forward_refs.py:42:10 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues) +annotations_forward_refs.py:42:10 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) annotations_forward_refs.py:43:10 - error: Tuple expression not allowed in type annotation   Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) annotations_forward_refs.py:44:10 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -annotations_forward_refs.py:44:10 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +annotations_forward_refs.py:44:10 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) annotations_forward_refs.py:45:10 - error: Dictionary expression not allowed in type annotation   Use Dict[T1, T2] to indicate a dictionary type (reportInvalidTypeForm) -annotations_forward_refs.py:45:10 - error: Expected type expression but received "dict[Unknown, Unknown]" (reportGeneralTypeIssues) +annotations_forward_refs.py:45:10 - error: Expected class but received "dict[Unknown, Unknown]" (reportGeneralTypeIssues) annotations_forward_refs.py:46:10 - error: Call expression not allowed in type expression (reportInvalidTypeForm) annotations_forward_refs.py:47:10 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -annotations_forward_refs.py:47:10 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +annotations_forward_refs.py:47:10 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) +annotations_forward_refs.py:47:16 - error: Expected class but received "Literal[0]" (reportGeneralTypeIssues) annotations_forward_refs.py:48:10 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm) annotations_forward_refs.py:49:10 - error: Variable not allowed in type expression (reportInvalidTypeForm) -annotations_forward_refs.py:50:11 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) -annotations_forward_refs.py:51:11 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +annotations_forward_refs.py:50:11 - error: Expected class but received "Literal[True]" (reportGeneralTypeIssues) +annotations_forward_refs.py:51:11 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) annotations_forward_refs.py:52:11 - error: Unary operator not allowed in type annotation (reportInvalidTypeForm) annotations_forward_refs.py:53:11 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) annotations_forward_refs.py:54:11 - error: Type annotations cannot use format string literals (f-strings) (reportGeneralTypeIssues) @@ -31,7 +32,7 @@ annotations_forward_refs.py:55:10 - error: Module cannot be used as a type (repo annotations_forward_refs.py:66:26 - error: "ClassB" is not defined (reportUndefinedVariable) annotations_forward_refs.py:80:14 - error: Type of "ClassF" could not be determined because it refers to itself (reportGeneralTypeIssues) annotations_forward_refs.py:80:14 - error: Variable not allowed in type expression (reportInvalidTypeForm) -annotations_forward_refs.py:89:8 - error: Expected type expression but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues) +annotations_forward_refs.py:89:8 - error: Expected class but received "(self: Self@ClassD) -> None" (reportGeneralTypeIssues) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/annotations_typeexpr.toml b/conformance/results/pyright/annotations_typeexpr.toml index 1afdc4e4..9eed10f3 100644 --- a/conformance/results/pyright/annotations_typeexpr.toml +++ b/conformance/results/pyright/annotations_typeexpr.toml @@ -3,23 +3,24 @@ output = """ annotations_typeexpr.py:88:9 - error: Call expression not allowed in type expression (reportInvalidTypeForm) annotations_typeexpr.py:89:9 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -annotations_typeexpr.py:89:9 - error: Expected type expression but received "list[Unknown]" (reportGeneralTypeIssues) +annotations_typeexpr.py:89:9 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) annotations_typeexpr.py:90:9 - error: Tuple expression not allowed in type annotation   Use tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) annotations_typeexpr.py:91:9 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -annotations_typeexpr.py:91:9 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +annotations_typeexpr.py:91:9 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) annotations_typeexpr.py:92:9 - error: Dictionary expression not allowed in type annotation   Use Dict[T1, T2] to indicate a dictionary type (reportInvalidTypeForm) -annotations_typeexpr.py:92:9 - error: Expected type expression but received "dict[Unknown, Unknown]" (reportGeneralTypeIssues) +annotations_typeexpr.py:92:9 - error: Expected class but received "dict[Unknown, Unknown]" (reportGeneralTypeIssues) annotations_typeexpr.py:93:9 - error: Call expression not allowed in type expression (reportInvalidTypeForm) annotations_typeexpr.py:94:9 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -annotations_typeexpr.py:94:9 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +annotations_typeexpr.py:94:9 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) +annotations_typeexpr.py:94:15 - error: Expected class but received "Literal[0]" (reportGeneralTypeIssues) annotations_typeexpr.py:95:9 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm) annotations_typeexpr.py:96:9 - error: Variable not allowed in type expression (reportInvalidTypeForm) -annotations_typeexpr.py:97:10 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) -annotations_typeexpr.py:98:10 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +annotations_typeexpr.py:97:10 - error: Expected class but received "Literal[True]" (reportGeneralTypeIssues) +annotations_typeexpr.py:98:10 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) annotations_typeexpr.py:99:10 - error: Unary operator not allowed in type annotation (reportInvalidTypeForm) annotations_typeexpr.py:100:10 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) annotations_typeexpr.py:101:10 - error: Type annotations cannot use format string literals (f-strings) (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/classes_classvar.toml b/conformance/results/pyright/classes_classvar.toml index c31f7a24..3e50fc7c 100644 --- a/conformance/results/pyright/classes_classvar.toml +++ b/conformance/results/pyright/classes_classvar.toml @@ -1,7 +1,7 @@ conformant = "Pass" output = """ classes_classvar.py:38:25 - error: Expected only one type argument after "ClassVar" -classes_classvar.py:39:14 - error: Expected type expression but received "Literal[3]" (reportGeneralTypeIssues) +classes_classvar.py:39:14 - error: Expected class but received "Literal[3]" (reportGeneralTypeIssues) classes_classvar.py:40:14 - error: "var" is not defined (reportUndefinedVariable) classes_classvar.py:45:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues) classes_classvar.py:46:20 - error: "ClassVar" type cannot include type variables (reportGeneralTypeIssues) diff --git a/conformance/results/pyright/directives_cast.toml b/conformance/results/pyright/directives_cast.toml index 9e439f77..d7dc7e22 100644 --- a/conformance/results/pyright/directives_cast.toml +++ b/conformance/results/pyright/directives_cast.toml @@ -2,7 +2,7 @@ conformant = "Pass" output = """ directives_cast.py:15:8 - error: No overloads for "cast" match the provided arguments   Argument types: () (reportCallIssue) -directives_cast.py:16:13 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +directives_cast.py:16:13 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) directives_cast.py:17:8 - error: No overloads for "cast" match the provided arguments   Argument types: (type[int], Literal[''], Literal['']) (reportCallIssue) """ diff --git a/conformance/results/pyright/enums_members.toml b/conformance/results/pyright/enums_members.toml index 00145a6d..db932d71 100644 --- a/conformance/results/pyright/enums_members.toml +++ b/conformance/results/pyright/enums_members.toml @@ -9,8 +9,10 @@ output = """ enums_members.py:46:5 - error: Type annotations are not allowed for enum members (reportGeneralTypeIssues) enums_members.py:78:13 - error: "assert_type" mismatch: expected "Unknown" but received "(x: Unknown) -> str" (reportAssertTypeFailure) enums_members.py:78:37 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +enums_members.py:78:42 - error: Variable not allowed in type expression (reportInvalidTypeForm) enums_members.py:79:13 - error: "assert_type" mismatch: expected "Unknown" but received "(x: int) -> int" (reportAssertTypeFailure) enums_members.py:79:37 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +enums_members.py:79:42 - error: Variable not allowed in type expression (reportInvalidTypeForm) enums_members.py:80:13 - error: "assert_type" mismatch: expected "Unknown" but received "property" (reportAssertTypeFailure) enums_members.py:80:35 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value enums_members.py:81:13 - error: "assert_type" mismatch: expected "Unknown" but received "(self: Pet4) -> None" (reportAssertTypeFailure) @@ -20,6 +22,7 @@ enums_members.py:112:32 - error: Type arguments for "Literal" must be None, a li enums_members.py:124:21 - information: Type of "Example2.__B" is "Literal[2]" enums_members.py:125:21 - error: "assert_type" mismatch: expected "Unknown" but received "Literal[2]" (reportAssertTypeFailure) enums_members.py:125:43 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +enums_members.py:125:52 - error: Variable not allowed in type expression (reportInvalidTypeForm) enums_members.py:142:13 - error: "assert_type" mismatch: expected "int" but received "Literal[Pet5.DOG]" (reportAssertTypeFailure) enums_members.py:143:13 - error: "assert_type" mismatch: expected "int" but received "Literal[Pet5.FISH]" (reportAssertTypeFailure) """ diff --git a/conformance/results/pyright/generics_syntax_declarations.toml b/conformance/results/pyright/generics_syntax_declarations.toml index d11d6b19..5d3ab52c 100644 --- a/conformance/results/pyright/generics_syntax_declarations.toml +++ b/conformance/results/pyright/generics_syntax_declarations.toml @@ -5,11 +5,11 @@ generics_syntax_declarations.py:27:20 - error: Type arguments are not allowed wi 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:50:17 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues) generics_syntax_declarations.py:62:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues) generics_syntax_declarations.py:66:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues) -generics_syntax_declarations.py:73:17 - error: 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:73:17 - error: Expected class but received "tuple[type[bytes], type[str]]" (reportGeneralTypeIssues) +generics_syntax_declarations.py:77:18 - error: Expected class but received "Literal[3]" (reportGeneralTypeIssues) generics_syntax_declarations.py:81:23 - error: "S" is not defined (reportUndefinedVariable) """ conformance_automated = "Pass" diff --git a/conformance/results/pyright/literals_parameterizations.toml b/conformance/results/pyright/literals_parameterizations.toml index 4b5ab694..d54dc093 100644 --- a/conformance/results/pyright/literals_parameterizations.toml +++ b/conformance/results/pyright/literals_parameterizations.toml @@ -1,18 +1,26 @@ conformant = "Pass" output = """ +literals_parameterizations.py:41:15 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) literals_parameterizations.py:41:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +literals_parameterizations.py:42:15 - error: Call expression not allowed in type expression (reportInvalidTypeForm) literals_parameterizations.py:42:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +literals_parameterizations.py:43:15 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) literals_parameterizations.py:43:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +literals_parameterizations.py:44:15 - error: Unary operator not allowed in type annotation (reportInvalidTypeForm) literals_parameterizations.py:44:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +literals_parameterizations.py:45:15 - error: Unary operator not allowed in type annotation (reportInvalidTypeForm) literals_parameterizations.py:45:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:46:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:47:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:48:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +literals_parameterizations.py:49:15 - error: Variable not allowed in type expression (reportInvalidTypeForm) literals_parameterizations.py:49:15 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +literals_parameterizations.py:50:16 - error: Type variable "T" has no meaning in this context (reportGeneralTypeIssues) literals_parameterizations.py:50:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:51:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:52:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value literals_parameterizations.py:53:16 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value +literals_parameterizations.py:56:28 - error: Binary operator not allowed in type annotation (reportInvalidTypeForm) 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 diff --git a/conformance/results/pyright/qualifiers_annotated.toml b/conformance/results/pyright/qualifiers_annotated.toml index a7e82db0..8f019a5c 100644 --- a/conformance/results/pyright/qualifiers_annotated.toml +++ b/conformance/results/pyright/qualifiers_annotated.toml @@ -1,30 +1,31 @@ conformant = "Pass" output = """ qualifiers_annotated.py:43:17 - error: List expression not allowed for this type argument -qualifiers_annotated.py:44:17 - error: Expected type expression but received "tuple[tuple[type[int], type[str]]]" (reportGeneralTypeIssues) +qualifiers_annotated.py:44:17 - error: Expected class but received "tuple[tuple[type[int], type[str]]]" (reportGeneralTypeIssues) qualifiers_annotated.py:45:17 - error: List expression not allowed for this type argument -qualifiers_annotated.py:45:18 - error: Expected type expression but received "Generator[type[int], None, None]" (reportGeneralTypeIssues) -qualifiers_annotated.py:46:17 - error: Expected type expression but received "dict[str, Unknown]" (reportGeneralTypeIssues) +qualifiers_annotated.py:45:18 - error: Expected class but received "Generator[type[int], None, None]" (reportGeneralTypeIssues) +qualifiers_annotated.py:46:17 - error: Expected class but received "dict[str, Unknown]" (reportGeneralTypeIssues) qualifiers_annotated.py:46:17 - error: Dictionary expression not allowed in type annotation qualifiers_annotated.py:46:24 - error: "b" is not defined (reportUndefinedVariable) qualifiers_annotated.py:47:17 - error: Call expression not allowed in type expression (reportInvalidTypeForm) qualifiers_annotated.py:48:17 - error: List expression not allowed in type annotation   Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm) -qualifiers_annotated.py:48:17 - error: Expected type expression but received "list[type[int]]" (reportGeneralTypeIssues) +qualifiers_annotated.py:48:17 - error: Expected class but received "list[type[int]]" (reportGeneralTypeIssues) +qualifiers_annotated.py:48:23 - error: Expected class but received "Literal[0]" (reportGeneralTypeIssues) qualifiers_annotated.py:49:17 - error: Ternary expression not allowed in type annotation (reportInvalidTypeForm) qualifiers_annotated.py:50:17 - error: "var1" is not defined (reportUndefinedVariable) -qualifiers_annotated.py:51:17 - error: Expected type expression but received "Literal[True]" (reportGeneralTypeIssues) -qualifiers_annotated.py:52:18 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +qualifiers_annotated.py:51:17 - error: Expected class but received "Literal[True]" (reportGeneralTypeIssues) +qualifiers_annotated.py:52:18 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues) 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[Annotated]" 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:77:24 - error: Expression of type "type[Annotated]" is incompatible with declared type "type[Any]" (reportAssignmentType) qualifiers_annotated.py:84:7 - error: Argument of type "type[Annotated]" 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:85:7 - error: Argument of type "type[Annotated]" 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) -qualifiers_annotated.py:92:1 - error: Object of type "type[Annotated]" is not callable (reportCallIssue) -qualifiers_annotated.py:93:1 - error: Object of type "type[Annotated]" is not callable (reportCallIssue) +qualifiers_annotated.py:92:1 - error: "Annotated" cannot be instantiated (reportCallIssue) +qualifiers_annotated.py:93:1 - error: "Annotated" cannot be instantiated (reportCallIssue) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index b53d80f0..95d61e3a 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ -version = "pyright 1.1.369" +version = "pyright 1.1.371" test_duration = 1.4 diff --git a/conformance/results/results.html b/conformance/results/results.html index 6ff55b51..b7b4ebd8 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -161,7 +161,7 @@

Python Type System Conformance Test Results

mypy 1.10.1
1.4sec
-
pyright 1.1.369
+
pyright 1.1.371
1.4sec
pyre 0.9.22
diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 6ea9d743..cc64e75e 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -84,9 +84,7 @@ def install(self) -> bool: return False def get_version(self) -> str: - proc = run( - [sys.executable, "-m", "mypy", "--version"], stdout=PIPE, text=True - ) + proc = run([sys.executable, "-m", "mypy", "--version"], stdout=PIPE, text=True) version = proc.stdout.strip() # Remove the " (compiled)" if it's present.