Skip to content

Pull Pylance with Pyright 1.1.402 #10593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025

Conversation

bschnurr
Copy link
Member

@bschnurr bschnurr commented Jun 11, 2025

Copy link
Contributor

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

sympy (https://github.com/sympy/sympy)
+   .../projects/sympy/sympy/stats/rv.py:473:25 - error: Argument of type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | tuple[Unknown, ...] | Sum | NaN | Piecewise | Basic | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | int" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
+     Type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | tuple[Unknown, ...] | Sum | NaN | Piecewise | Basic | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | int" is not assignable to type "Expr | complex"
-   .../projects/sympy/sympy/stats/rv.py:473:25 - error: Argument of type "Expr | Lambda | Zero | One | Integral | Unknown | NegativeOne | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Probability | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | int" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
-     Type "Expr | Lambda | Zero | One | Integral | Unknown | NegativeOne | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Probability | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | int" is not assignable to type "Expr | complex"
-       Type "Basic" is not assignable to type "Expr | complex"
-         "Basic" is not assignable to "Expr"
-         "Basic" is not assignable to "complex" (reportArgumentType)
-   .../projects/sympy/sympy/stats/rv.py:473:25 - error: Argument of type "Mul | Expr | Lambda | Zero | One | Integral | Unknown | NegativeOne | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Probability | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | int" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
-     Type "Mul | Expr | Lambda | Zero | One | Integral | Unknown | NegativeOne | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number | Probability | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | int" is not assignable to type "Expr | complex"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:33:23 - error: Operator "/" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:33:23 - error: Operator "/" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "*" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "*" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "/" not supported for types "Unknown | Any | Expr | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Expr* | Infinity | NegativeInfinity | Float | _NotImplementedType | NaN* | tuple[Unknown, ...] | int" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "/" not supported for types "Unknown | Any | Expr | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | _NotImplementedType | tuple[Unknown, ...] | int" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:467:12 - error: Operator "+" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:467:12 - error: Operator "+" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_stochastic_process.py:340:64 - error: Operator "-" not supported for types "Literal[1]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_stochastic_process.py:340:64 - error: Operator "-" not supported for types "Literal[1]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_stochastic_process.py:341:63 - error: Operator "-" not supported for types "Literal[1]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_stochastic_process.py:341:63 - error: Operator "-" not supported for types "Literal[1]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_stochastic_process.py:342:63 - error: Operator "-" not supported for types "Literal[1]" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum* | Piecewise | Basic | Sum | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"

... (truncated 521 lines) ...

@debonte debonte changed the title Pull Pylance with Pyright 1.1.401 Pull Pylance with Pyright 1.1.402 Jun 11, 2025
@debonte debonte merged commit 9496ae0 into main Jun 11, 2025
18 checks passed
@debonte debonte deleted the pull-pylance-with-pyright-1.1.401-20250610-235731 branch June 11, 2025 01:12
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