Fix pyright unreachable case#11370
Merged
gramster merged 2 commits intomicrosoft:mainfrom Apr 8, 2026
Merged
Conversation
…led (microsoft#11239) The handleInitialized method was not calling updateSettingsForAllWorkspaces() when hasWorkspaceFoldersCapability was true, leaving workspaces with unresolved isInitialized.promise. This caused any code awaiting this promise to hang forever. Restructure the method to always call updateSettingsForAllWorkspaces() regardless of workspace folders capability. Initial plan Initial investigation plan Co-authored-by: gramster <2762632+gramster@users.noreply.github.com> Fix tuple pattern matching regression for unpacked variadic tuples Co-authored-by: gramster <2762632+gramster@users.noreply.github.com> Complete fix validation - all tests pass Co-authored-by: gramster <2762632+gramster@users.noreply.github.com> Add comment for removedIndeterminate flag and regression test Agent-Logs-Url: https://github.com/gramster/pyright/sessions/e717a85e-44f9-46d9-8ce1-1e94af0c0285 Co-authored-by: gramster <2762632+gramster@users.noreply.github.com>
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
- .../projects/sympy/sympy/vector/implicitregion.py:188:18 - error: Operator "/" not supported for types "int | Unknown" and "Alg | Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
+ .../projects/sympy/sympy/vector/implicitregion.py:188:18 - error: Operator "/" not supported for types "int | Unknown" and "Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
- .../projects/sympy/sympy/vector/implicitregion.py:189:18 - error: Operator "/" not supported for types "int | Unknown" and "Alg | Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
+ .../projects/sympy/sympy/vector/implicitregion.py:189:18 - error: Operator "/" not supported for types "int | Unknown" and "Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
- .../projects/sympy/sympy/vector/implicitregion.py:190:18 - error: Operator "/" not supported for types "int | Unknown" and "Alg | Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
+ .../projects/sympy/sympy/vector/implicitregion.py:190:18 - error: Operator "/" not supported for types "int | Unknown" and "Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
- .../projects/sympy/sympy/vector/implicitregion.py:206:18 - error: Operator "*" not supported for types "Unknown | Expr | Any" and "Alg | Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
+ .../projects/sympy/sympy/vector/implicitregion.py:206:18 - error: Operator "*" not supported for types "Unknown | Expr | Any" and "Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
- .../projects/sympy/sympy/vector/implicitregion.py:210:18 - error: Operator "*" not supported for types "Unknown | Expr | Any" and "Alg | Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
+ .../projects/sympy/sympy/vector/implicitregion.py:210:18 - error: Operator "*" not supported for types "Unknown | Expr | Any" and "Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
- .../projects/sympy/sympy/vector/implicitregion.py:214:18 - error: Operator "*" not supported for types "Unknown | Expr | Any" and "Alg | Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
+ .../projects/sympy/sympy/vector/implicitregion.py:214:18 - error: Operator "*" not supported for types "Unknown | Expr | Any" and "Unknown | GaussianRational | MPQ | GaussianInteger | MPZ | Expr | Rational | NaN | ComplexInfinity | One | NegativeOne | Zero | Integer | Infinity | NegativeInfinity | Float | Number | Poly | Any"
jax (https://github.com/google/jax)
+ .../projects/jax/jax/_src/pallas/mosaic/sc_lowering.py:785:11 - error: "log_buffer" is not a known attribute of module "jaxlib.mosaic.python.tpu" (reportAttributeAccessIssue)
+ .../projects/jax/jax/_src/pallas/mosaic/sc_lowering.py:787:11 - error: "log" is not a known attribute of module "jaxlib.mosaic.python.tpu" (reportAttributeAccessIssue)
- 3071 errors, 83 warnings, 0 informations
+ 3073 errors, 83 warnings, 0 informations
|
rchiodo
approved these changes
Apr 8, 2026
Collaborator
rchiodo
left a comment
There was a problem hiding this comment.
Approved via Review Center.
gramster
added a commit
to gramster/pyright
that referenced
this pull request
Apr 9, 2026
…led (microsoft#11239) (microsoft#11370) Tracks whether an indeterminate entry was spliced out to contract the tuple to fit a shorter pattern in match statements. This preserves "potential match" semantics. Fixes microsoft#11249
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracks whether an indeterminate entry was spliced out to contract the tuple to fit a shorter pattern in match statements. This preserves "potential match" semantics.
Fixed #11249