Skip to content

Pull Pylance with Pyright 1.1.413 - #11697

Merged
Heejae Chang (heejaechang) merged 1 commit into
microsoft:mainfrom
heejaechang:sync-pylance-1-1-413-pnpm-builds
Sep 2, 2026
Merged

Heejae Chang (heejaechang) merged 1 commit into
microsoft:mainfrom
heejaechang:sync-pylance-1-1-413-pnpm-builds

Conversation

@heejaechang

Copy link
Copy Markdown
Collaborator

Synchronizes Pylance compatibility changes with the current Pyright codebase.

Rollup:

  • Uses explicit package build approvals so dependency installation is reproducible.
  • Updates dependency metadata and Pylance compatibility diagnostics coverage.

REVIEWER: Review only Pyright/Pylance synchronization and compatibility changes in this PR; do not leave unrelated feedback.

@bschnurr

Bill Schnurr (bschnurr) commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

🔒 Automated review in progress — Bill Schnurr (@bschnurr) is auto-reviewing this PR.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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

sympy (https://github.com/sympy/sympy)
-   .../projects/sympy/sympy/solvers/ode/lie_group.py:619:61 - error: Operator "-" not supported for type "Unknown | Basic" (reportOperatorIssue)
+   .../projects/sympy/sympy/solvers/ode/riccati.py:275:12 - error: No overloads for "__init__" match the provided arguments (reportCallIssue)
+   .../projects/sympy/sympy/solvers/ode/riccati.py:275:17 - error: Argument of type "zip[Unknown]" cannot be assigned to parameter "iterable" of type "Iterable[list[bytes]]" in function "__init__"
+     "zip[Unknown]" is incompatible with protocol "Iterable[list[bytes]]"
+       "__iter__" is an incompatible type
+         Type "() -> zip[Unknown]" is not assignable to type "() -> Iterator[_T_co@Iterable]"
+           Function return type "zip[Unknown]" is incompatible with type "Iterator[_T_co@Iterable]"
+             "zip[Unknown]" is incompatible with protocol "Iterator[_T_co@Iterable]" (reportArgumentType)
+   .../projects/sympy/sympy/solvers/ode/single.py:867:9 - error: Expression with type "tuple[ComplexInfinity | NaN | Rational | Zero | Infinity | NegativeInfinity | Float | NotImplementedType | Expr | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown]] | tuple[ComplexInfinity | NaN | Rational | Zero | Infinity | NegativeInfinity | Float | NotImplementedType | Expr | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown], list[tuple[Unknown, Unknown]] | list[Unknown]]" cannot be assigned to target tuple
+     Type "tuple[ComplexInfinity | NaN | Rational | Zero | Infinity | NegativeInfinity | Float | NotImplementedType | Expr | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown], list[tuple[Unknown, Unknown]] | list[Unknown]]" is incompatible with target tuple
+       Tuple size mismatch; expected 2 but received 3 (reportAssignmentType)
-   .../projects/sympy/sympy/solvers/recurr.py:424:16 - error: Cannot access attribute "is_polynomial" for class "tuple[Unknown, list[Expr | Unknown]]"
+   .../projects/sympy/sympy/solvers/recurr.py:424:16 - error: Cannot access attribute "is_polynomial" for class "tuple[Unknown, list[Unknown]]"
-   .../projects/sympy/sympy/solvers/recurr.py:424:16 - error: Cannot access attribute "is_polynomial" for class "tuple[Unknown | tuple[Unknown, list[Poly]], list[Poly] | Unknown | Unbound]"
+   .../projects/sympy/sympy/solvers/recurr.py:424:16 - error: Cannot access attribute "is_polynomial" for class "tuple[Unknown, Unknown | Unbound]"
-   .../projects/sympy/sympy/solvers/recurr.py:424:16 - error: Cannot access attribute "is_polynomial" for class "tuple[Unknown, list[Poly]]"
-     Attribute "is_polynomial" is unknown (reportAttributeAccessIssue)
-   .../projects/sympy/sympy/solvers/recurr.py:425:20 - error: Cannot access attribute "as_numer_denom" for class "tuple[Unknown, list[Expr | Unknown]]"
+   .../projects/sympy/sympy/solvers/recurr.py:425:20 - error: Cannot access attribute "as_numer_denom" for class "tuple[Unknown, list[Unknown]]"
-   .../projects/sympy/sympy/solvers/recurr.py:425:20 - error: Cannot access attribute "as_numer_denom" for class "tuple[Unknown | tuple[Unknown, list[Poly]], list[Poly] | Unknown | Unbound]"
-     Attribute "as_numer_denom" is unknown (reportAttributeAccessIssue)
-   .../projects/sympy/sympy/solvers/recurr.py:425:20 - error: Cannot access attribute "as_numer_denom" for class "tuple[Unknown, list[Poly]]"
+   .../projects/sympy/sympy/solvers/recurr.py:425:20 - error: Cannot access attribute "as_numer_denom" for class "tuple[Unknown, Unknown | Unbound]"
-   .../projects/sympy/sympy/solvers/recurr.py:440:26 - error: Cannot access attribute "subs" for class "Alg"
-     Attribute "subs" is unknown (reportAttributeAccessIssue)
-   .../projects/sympy/sympy/solvers/recurr.py:442:26 - error: Cannot access attribute "subs" for class "Alg"
-     Attribute "subs" is unknown (reportAttributeAccessIssue)
-   .../projects/sympy/sympy/solvers/recurr.py:449:13 - error: No overloads for "__setitem__" match the provided arguments (reportCallIssue)
-   .../projects/sympy/sympy/solvers/recurr.py:449:13 - error: Argument of type "Expr | Unknown | Poly" cannot be assigned to parameter "value" of type "Zero" in function "__setitem__"
-     Type "Expr | Unknown | Poly" is not assignable to type "Zero"
-       "Expr" is not assignable to "Zero" (reportArgumentType)
+   .../projects/sympy/sympy/solvers/solveset.py:4138:23 - error: No overloads for "__init__" match the provided arguments (reportCallIssue)
+   .../projects/sympy/sympy/solvers/solveset.py:4138:28 - error: Argument of type "zip[Unknown]" cannot be assigned to parameter "iterable" of type "Iterable[list[bytes]]" in function "__init__"
+     "zip[Unknown]" is incompatible with protocol "Iterable[list[bytes]]"
+       "__iter__" is an incompatible type
+         Type "() -> zip[Unknown]" is not assignable to type "() -> Iterator[_T_co@Iterable]"
+           Function return type "zip[Unknown]" is incompatible with type "Iterator[_T_co@Iterable]"
+             "zip[Unknown]" is incompatible with protocol "Iterator[_T_co@Iterable]" (reportArgumentType)
-   .../projects/sympy/sympy/stats/drv.py:269:22 - error: Argument of type "Generator[Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
+   .../projects/sympy/sympy/stats/drv.py:269:22 - error: Argument of type "Generator[Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None, None, None]" cannot be assigned to parameter "iterable" of type "Iterable[_SupportsSumNoDefaultT@sum]" in function "sum"
-     "Generator[Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
+     "Generator[Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None, None, None]" is not assignable to "Iterable[_SupportsSumNoDefaultT@sum]"
-       Type parameter "_T_co@Iterable" is covariant, but "Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
+       Type parameter "_T_co@Iterable" is covariant, but "Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None" is not a subtype of "_SupportsSumNoDefaultT@sum"
-         Type "Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+         Type "Self@Basic | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
-           Type "Basic* | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
+           Type "Basic* | tuple[Unknown, ...] | Unknown | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | int | None" is not assignable to type "_SupportsSumWithNoDefaultGiven"
-   .../projects/sympy/sympy/stats/drv_types.py:293:16 - error: Operator "*" not supported for types "Expr" and "tuple[Unknown, ...] | Unknown | Self@Basic | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic"
+   .../projects/sympy/sympy/stats/drv_types.py:293:16 - error: Operator "*" not supported for types "Expr" and "tuple[Unknown, ...] | Unknown | Self@Basic | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic"
-   .../projects/sympy/sympy/stats/rv.py:473:25 - error: Argument of type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | Self@Basic | tuple[Unknown, ...] | Sum | ZeroMatrix | Add | NaN | Piecewise | Basic | int | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
+   .../projects/sympy/sympy/stats/rv.py:473:25 - error: Argument of type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | Self@Basic | tuple[Unknown, ...] | Sum | ZeroMatrix | NaN | Piecewise | Basic | int | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
-     Type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | Self@Basic | tuple[Unknown, ...] | Sum | ZeroMatrix | Add | NaN | Piecewise | Basic | int | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number" is not assignable to type "Expr | complex"
+     Type "Expr | Lambda | Zero | One | Integral | Unknown | Probability | Self@Basic | tuple[Unknown, ...] | Sum | ZeroMatrix | NaN | Piecewise | Basic | int | NegativeOne | Integer | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | Number" is not assignable to type "Expr | complex"
-   .../projects/sympy/sympy/stats/stochastic_process_types.py:1839:25 - error: Argument of type "tuple[Unknown, ...] | Unknown | Self@Basic | Sum | Expr | ZeroMatrix | Add | Zero | NaN | Piecewise | Basic | Integral | Any | int" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"
+   .../projects/sympy/sympy/stats/stochastic_process_types.py:1839:25 - error: Argument of type "tuple[Unknown, ...] | Unknown | Self@Basic | Sum | Expr | ZeroMatrix | Zero | NaN | Piecewise | Basic | Integral | Any | int" cannot be assigned to parameter "args" of type "Expr | complex" in function "__new__"

... (truncated 136 lines) ...

@heejaechang
Heejae Chang (heejaechang) merged commit fa9b200 into microsoft:main Sep 2, 2026
16 checks passed
@bschnurr

Copy link
Copy Markdown
Member

Result: 🔴 could-not-verify

Verification details

Verification: Isolated verification observed failures that were not classified as caused by this PR: Repository and dependency discovery, Locked offline dependency bootstrap. The relevant tests could not be fully run in the isolated environment; this review is not fully verified.

Summary: No meaningful tests could execute because the verification image lacks `pnpm`, so the required locked offline bootstrap failed. The PR adds four symlink-watcher tests and one stub-generator test; hover expectations are also updated in existing fourslash coverage. Runtime confidence is therefore low.

Test runs: 2 failed, 4 not run

  • ⚠️ Not run | Analyzer service watcher tests | node ./node_modules/jest/bin/jest.js src/tests/service.test.ts --runInBand
  • ⚠️ Not run | Hover provider tests | node ./node_modules/jest/bin/jest.js src/tests/hoverProvider.test.ts --runInBand
  • ⚠️ Not run | Hover fourslash tests | node ./node_modules/jest/bin/jest.js src/tests/fourSlashRunner.test.ts --runInBand -t hover
  • ⚠️ Not run | Stub generator and tokenizer tests | node ./node_modules/jest/bin/jest.js src/tests/typeServer/stubGenerator.test.ts src/tests/tokenizer.test.ts --runInBand
  • ❌ Failed | unrelated to this PR | Repository and dependency discovery | git status --short && printf '\nBASE_CANDIDATES\n' && git branch -r --contains HEAD 2>/dev/null | head -20 && printf '\nCHANGED_FILES\n' && git diff --name-status HEAD^..HEAD && printf '\nTEST_DIFF_SYMBOLS\n' && git diff --unified=0 HEAD^..HEAD -- packages/pyright-internal/src/tests | grep -E '^+[^+].*(test(|it(|describe(|@filename:|////)' | head -200 || true && printf '\nDEPENDENCIES\n' && test -d packages/pyright-internal/node_modules && echo pyright-internal-node_modules=present || echo pyright-internal-node_modules=missing && test -f packages/pyright-internal/node_modules/jest/bin/jest.js && echo jest=present || echo jest=missing && node --version 2>/dev/null || true && pnpm --version 2>/dev/null || true && printf '\nSCRIPTS\n' && node -e "const p=require('./packages/pyright-internal/package.json'); console.log(JSON.stringify(p.scripts,null,2))" 2>/dev/null || true
  • ❌ Failed | unrelated to this PR | Locked offline dependency bootstrap | pnpm install --offline --frozen-lockfile
⚠️ Analyzer service watcher tests diagnostic output
Blocked by dependency bootstrap: /bin/sh: 1: pnpm: not found
⚠️ Hover provider tests diagnostic output
Blocked by dependency bootstrap: /bin/sh: 1: pnpm: not found
⚠️ Hover fourslash tests diagnostic output
Blocked by dependency bootstrap: /bin/sh: 1: pnpm: not found
⚠️ Stub generator and tokenizer tests diagnostic output
Blocked by dependency bootstrap: /bin/sh: 1: pnpm: not found
❌ Repository and dependency discovery diagnostic output
fatal: not a git repository (or any parent up to mount point /)
pyright-internal-node_modules=missing
jest=missing
❌ Locked offline dependency bootstrap diagnostic output
/bin/sh: 1: pnpm: not found

@bschnurr Bill Schnurr (bschnurr) added the review-auto:approved Automated review: no blocking findings (approval posted). label Sep 2, 2026
@bschnurr

Copy link
Copy Markdown
Member

/benchmark

@github-actions

Copy link
Copy Markdown
Contributor

Compared candidate fa9b200906fadc093e862ce62ec1afa985c7233d against its first parent e690634a94ab05cf7dd003b63b1ac67cd6d6878e.

Type checker benchmark

🟢 No performance regressions detected.

Regression threshold: 20.0%
Variance guard: >1.0s time and >100.0 MB memory

Package Checker Files checked Time Time delta Peak memory Memory delta Status
ansible pyright 583 21.239s -1.9% 1065.1 MB -4.1% 🟢 Pass
click pyright 17 3.018s +3.8% 362.1 MB +0.3% 🟢 Pass
homeassistant pyright 9850 146.450s -7.5% 6197.8 MB +0.1% 🟢 Pass
numpy pyright 356 43.194s -0.6% 1826.8 MB -1.3% 🟢 Pass
pandas pyright 1459 888.427s -10.2% 4385.6 MB -1.1% 🟢 Pass
pytest pyright 243 12.960s +3.1% 891.3 MB -4.3% 🟢 Pass
requests pyright 19 2.362s +2.7% 345.9 MB -0.4% 🟢 Pass
torch pyright 2400 149.268s -2.9% 5035.0 MB +2.9% 🟢 Pass
transformers pyright 2901 125.491s -6.7% 5203.6 MB +1.4% 🟢 Pass

Pyright stats

Package Parsed/bound Checked Find Read Tokenize Parse Imports Bind Check Cycles
ansible 989 583 0.050s 0.070s 0.410s 0.770s 0.210s 0.960s 18.170s 0.000s
click 111 17 0.000s 0.020s 0.120s 0.220s 0.030s 0.250s 2.080s 0.000s
homeassistant 11146 9850 0.450s 0.710s 2.650s 4.650s 2.040s 6.490s 126.000s 0.000s
numpy 603 356 0.010s 0.070s 0.360s 0.730s 0.240s 0.850s 40.350s 0.000s
pandas 1895 1459 0.070s 0.210s 1.110s 2.270s 0.290s 2.510s 880.700s 0.000s
pytest 542 243 0.020s 0.050s 0.350s 0.530s 0.110s 0.720s 10.750s 0.000s
requests 168 19 0.000s 0.010s 0.120s 0.220s 0.070s 0.270s 1.360s 0.000s
torch 3076 2400 0.150s 0.420s 2.160s 3.750s 0.580s 4.660s 136.170s 0.000s
transformers 3534 2901 0.140s 0.420s 2.210s 3.730s 0.940s 8.930s 111.940s 0.000s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants