Skip to content

Pull Pylance with Pyright 1.1.401#10486

Merged
debonte merged 2 commits intomainfrom
pull-pylance-with-pyright-1.1.401-20250521-185403
May 21, 2025
Merged

Pull Pylance with Pyright 1.1.401#10486
debonte merged 2 commits intomainfrom
pull-pylance-with-pyright-1.1.401-20250521-185403

Conversation

@bschnurr
Copy link
Member

@bschnurr bschnurr commented May 21, 2025

  • Refactorings to facilitate prototyping around Type Server Protocol
  • Fix component governance issue with tar-fs

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
-   ...:64:2 - error: Argument of type "(expr: ArraySymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims)" cannot be assigned to parameter of type "(...) -> NoReturn"
+   ...:64:2 - error: Argument of type "(expr: ArraySymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims)" cannot be assigned to parameter of type "(...) -> NoReturn"
-     Type "(expr: ArraySymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims)" is not assignable to type "(...) -> NoReturn"
+     Type "(expr: ArraySymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims)" is not assignable to type "(...) -> NoReturn"
-       Function return type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is incompatible with type "NoReturn"
+       Function return type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is incompatible with type "NoReturn"
-         Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to type "NoReturn"
+         Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to type "NoReturn"
-   ...:74:2 - error: Argument of type "(expr: MatrixSymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims)" cannot be assigned to parameter of type "(...) -> NoReturn"
+   ...:74:2 - error: Argument of type "(expr: MatrixSymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims)" cannot be assigned to parameter of type "(...) -> NoReturn"
-     Type "(expr: MatrixSymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims)" is not assignable to type "(...) -> NoReturn"
+     Type "(expr: MatrixSymbol, x: _ArrayExpr) -> (Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims)" is not assignable to type "(...) -> NoReturn"
-       Function return type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is incompatible with type "NoReturn"
+       Function return type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is incompatible with type "NoReturn"
-         Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to type "NoReturn"
+         Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to type "NoReturn"
+   ...:50:25 - error: No overloads for "__setitem__" match the provided arguments (reportCallIssue)
+   ...:50:25 - error: Argument of type "Unknown | Basic" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__setitem__"
+     Type "Unknown | Basic" is not assignable to type "slice[Any, Any, Any]"
+       "Basic" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   ...:81:36 - error: Argument of type "Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct | ArrayDiagonal | ArrayAdd | ArrayContraction" cannot be assigned to parameter "base_array" of type "ArrayContraction | ArrayDiagonal | ArrayTensorProduct" in function "__init__"
+   ...:81:36 - error: Argument of type "Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct | ArrayContraction" cannot be assigned to parameter "base_array" of type "ArrayContraction | ArrayDiagonal | ArrayTensorProduct" in function "__init__"
-     Type "Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct | ArrayDiagonal | ArrayAdd | ArrayContraction" is not assignable to type "ArrayContraction | ArrayDiagonal | ArrayTensorProduct"
+     Type "Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct | ArrayContraction" is not assignable to type "ArrayContraction | ArrayDiagonal | ArrayTensorProduct"
-   ...:214:12 - error: Type "ArrayContraction | Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct | ArrayDiagonal | ArrayAdd" is not assignable to declared type "ArrayContraction"
+   ...:214:12 - error: Type "ArrayContraction | Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct" is not assignable to declared type "ArrayContraction"
-     Type "ArrayContraction | Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct | ArrayDiagonal | ArrayAdd" is not assignable to type "ArrayContraction"
+     Type "ArrayContraction | Basic | Unknown | Zero | ZeroArray | ArrayTensorProduct" is not assignable to type "ArrayContraction"
-   ...:215:12 - error: Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to declared type "ArrayContraction"
+   ...:215:12 - error: Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to declared type "ArrayContraction"
-     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to type "ArrayContraction"
+     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to type "ArrayContraction"
-   ...:216:12 - error: Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to declared type "ArrayContraction"
+   ...:216:12 - error: Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to declared type "ArrayContraction"
-     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to type "ArrayContraction"
+     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to type "ArrayContraction"
-   ...:217:12 - error: Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to declared type "ArrayContraction"
+   ...:217:12 - error: Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to declared type "ArrayContraction"
-     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to type "ArrayContraction"
+     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims" is not assignable to type "ArrayContraction"
-   ...:233:39 - error: Cannot access attribute "contraction_indices" for class "ArrayDiagonal"
-     Attribute "contraction_indices" is unknown (reportAttributeAccessIssue)
-   ...:233:39 - error: Cannot access attribute "contraction_indices" for class "ArrayAdd"
-     Attribute "contraction_indices" is unknown (reportAttributeAccessIssue)
+   ...:256:40 - error: Argument of type "Unknown | Zero | ZeroArray | ArrayContraction | Basic | PermuteDims | ArrayAdd | ArrayDiagonal" cannot be assigned to parameter "expr" of type "ArrayContraction | ArrayDiagonal" in function "identify_hadamard_products"
+     Type "Unknown | Zero | ZeroArray | ArrayContraction | Basic | PermuteDims | ArrayAdd | ArrayDiagonal" is not assignable to type "ArrayContraction | ArrayDiagonal"
+       Type "Basic" is not assignable to type "ArrayContraction | ArrayDiagonal"
+         "Basic" is not assignable to "ArrayContraction"
+         "Basic" is not assignable to "ArrayDiagonal" (reportArgumentType)
-   ...:307:17 - error: Argument of type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims | Any | Transpose" cannot be assigned to parameter "value" of type "None" in function "__setitem__"
+   ...:307:17 - error: Argument of type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims | Any | Transpose" cannot be assigned to parameter "value" of type "None" in function "__setitem__"
-     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims | Any | Transpose" is not assignable to type "None"
+     Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims | Any | Transpose" is not assignable to type "None"
-   ...:408:31 - error: Operator "*" not supported for types "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims | Any | Transpose | One | NegativeOne | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | MatMul" and "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims | Any | Transpose | MatrixExpr"
+   ...:408:31 - error: Operator "*" not supported for types "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims | Any | Transpose | One | NegativeOne | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | _NotImplementedType | Expr | MatMul" and "Zero | ZeroArray | Unknown | ArrayContraction | Basic | PermuteDims | Any | Transpose | MatrixExpr"
-     Operator "*" not supported for types "Basic" and "ArrayDiagonal"
-     Operator "*" not supported for types "Basic" and "ArrayAdd"
-     Operator "*" not supported for types "ArrayDiagonal" and "Basic"
+     Operator "*" not supported for types "PermuteDims" and "Basic"
-     Operator "*" not supported for types "ArrayDiagonal" and "ArrayDiagonal"
-     Operator "*" not supported for types "ArrayDiagonal" and "ArrayAdd"
-     Operator "*" not supported for types "ArrayDiagonal" and "PermuteDims"
+     Operator "*" not supported for types "PermuteDims" and "PermuteDims" (reportOperatorIssue)
-     ... (reportOperatorIssue)
-   ...:465:22 - error: Type "Zero | ZeroArray | Unknown | ArrayContraction | Basic | ArrayDiagonal | ArrayAdd | PermuteDims" is not assignable to declared type "ArrayContraction"

... (truncated 324 lines) ...

@debonte debonte enabled auto-merge (squash) May 21, 2025 19:51
@debonte debonte disabled auto-merge May 21, 2025 20:09
@debonte debonte merged commit b249d11 into main May 21, 2025
17 checks passed
@debonte debonte deleted the pull-pylance-with-pyright-1.1.401-20250521-185403 branch May 21, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants