Skip to content

Pull Pylance with Pyright 1.1.413 - #11678

Merged
Heejae Chang (heejaechang) merged 1 commit into
microsoft:mainfrom
heejaechang:pull-pylance-pyright-1.1.413-20260825
Aug 25, 2026
Merged

Heejae Chang (heejaechang) merged 1 commit into
microsoft:mainfrom
heejaechang:pull-pylance-pyright-1.1.413-20260825

Conversation

@heejaechang

Copy link
Copy Markdown
Collaborator

Synchronizes Pylance compatibility changes with the current Pyright codebase.

Rollup:

  • Improves type stub generation and rendering, including reusable output and message components.
  • Aligns evaluator, analysis service, background analysis, and CLI behavior used by Pylance.
  • Adds focused regression coverage for type stub generation, CLI behavior, iterator handling, and shared type utilities.
  • Refreshes generated architecture and repository graph documentation.

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

@github-actions

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/diophantine/diophantine.py:176:44 - error: Cannot access attribute "expand" for class "Basic"
-     Attribute "expand" is unknown (reportAttributeAccessIssue)
+   .../projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:380:15 - error: Operator "*" not supported for "None" (reportOptionalOperand)
+   .../projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:383:13 - error: No overloads for "__init__" match the provided arguments (reportCallIssue)
+   .../projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:383:18 - error: Argument of type "list[Iterator[Unknown]]" cannot be assigned to parameter "iterable" of type "Iterable[list[bytes]]" in function "__init__" (reportArgumentType)
+   .../projects/sympy/sympy/solvers/diophantine/tests/test_diophantine.py:383:78 - error: "args" is not a known attribute of "None" (reportOptionalMemberAccess)
-   .../projects/sympy/sympy/solvers/ode/lie_group.py:619:61 - error: Operator "-" not supported for type "Unknown | Basic" (reportOperatorIssue)
-   .../projects/sympy/sympy/solvers/ode/nonhomogeneous.py:225:45 - error: Cannot access attribute "has" for class "tuple[Expr, int]"
-     Attribute "has" is unknown (reportAttributeAccessIssue)
+   .../projects/sympy/sympy/solvers/ode/nonhomogeneous.py:223:22 - error: No overloads for "__new__" match the provided arguments (reportCallIssue)
+   .../projects/sympy/sympy/solvers/ode/nonhomogeneous.py:223:25 - error: Argument of type "CRootOf | tuple[Expr, int]" cannot be assigned to parameter "arg" of type "Expr" in function "__new__"
+     Type "CRootOf | tuple[Expr, int]" is not assignable to type "Expr"
+       "tuple[Expr, int]" is not assignable to "Expr" (reportArgumentType)
+   .../projects/sympy/sympy/solvers/ode/nonhomogeneous.py:238:40 - error: No overloads for "__new__" match the provided arguments (reportCallIssue)
+   .../projects/sympy/sympy/solvers/ode/nonhomogeneous.py:238:50 - error: Argument of type "CRootOf | tuple[Expr, int]" cannot be assigned to parameter "arg" of type "Expr" in function "__new__"
+     Type "CRootOf | tuple[Expr, int]" is not assignable to type "Expr"
+       "tuple[Expr, int]" is not assignable to "Expr" (reportArgumentType)
+   .../projects/sympy/sympy/solvers/ode/single.py:867:9 - error: Expression with type "tuple[ComplexInfinity | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown]] | tuple[ComplexInfinity | Unknown | Any, list[tuple[Unknown, Unknown]] | list[Unknown], list[tuple[Unknown, Unknown]] | list[Unknown]]" cannot be assigned to target tuple
+     Type "tuple[ComplexInfinity | 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/ode/single.py:2646:27 - error: Argument of type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Unknown | Expr | NegativeInfinity | Number | int" cannot be assigned to parameter "stop" of type "SupportsIndex" in function "__new__"
-     Type "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Unknown | Expr | NegativeInfinity | Number | int" is not assignable to type "SupportsIndex"
-       "Expr" is incompatible with protocol "SupportsIndex"
-         "__index__" is not present (reportArgumentType)
-   .../projects/sympy/sympy/solvers/ode/single.py:2652:9 - error: Operator "+=" not supported for types "One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Unknown | Expr | Any" and "Basic | Any | Unknown"
+   .../projects/sympy/sympy/solvers/ode/single.py:2652:9 - error: Operator "+=" not supported for types "Unknown | Any | Zero | One | NegativeOne | Integer | NaN | ComplexInfinity | Rational | Expr" and "Basic | Any | Unknown"
-   .../projects/sympy/sympy/solvers/solveset.py:776:18 - error: Argument of type "Expr | Unknown | None" cannot be assigned to parameter "expr" of type "Expr" in function "together"
+   .../projects/sympy/sympy/solvers/solveset.py:776:18 - error: Argument of type "Unknown | None" cannot be assigned to parameter "expr" of type "Expr" in function "together"
-     Type "Expr | Unknown | None" is not assignable to type "Expr"
+     Type "Unknown | None" is not assignable to type "Expr"
-   .../projects/sympy/sympy/solvers/tests/test_numeric.py:24:12 - error: Operator ">" not supported for types "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix" and "float"
+   .../projects/sympy/sympy/solvers/tests/test_numeric.py:24:12 - error: Operator ">" not supported for types "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix" and "float"
-     Operator ">" not supported for types "list[dict[bytes, bytes]]" and "float"
+     Operator ">" not supported for types "list[dict[str, str]]" and "float"
-   .../projects/sympy/sympy/solvers/tests/test_numeric.py:24:27 - error: Operator "<" not supported for types "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix" and "float"
+   .../projects/sympy/sympy/solvers/tests/test_numeric.py:24:27 - error: Operator "<" not supported for types "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix" and "float"
-     Operator "<" not supported for types "list[dict[bytes, bytes]]" and "float"
+     Operator "<" not supported for types "list[dict[str, str]]" and "float"
-   .../projects/sympy/sympy/solvers/tests/test_numeric.py:37:12 - error: Operator "-" not supported for types "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix" and "Expr"
+   .../projects/sympy/sympy/solvers/tests/test_numeric.py:37:12 - error: Operator "-" not supported for types "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix" and "Expr"
-     Operator "-" not supported for types "list[dict[bytes, bytes]]" and "Expr"
+     Operator "-" not supported for types "list[dict[str, str]]" and "Expr"
-   .../projects/sympy/sympy/solvers/tests/test_numeric.py:67:28 - error: Argument of type "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+   .../projects/sympy/sympy/solvers/tests/test_numeric.py:67:28 - error: Argument of type "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
-     Type "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix" is not assignable to type "Iterable[_SupportsRound1[_T@round]]"
+     Type "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix" is not assignable to type "Iterable[_SupportsRound1[_T@round]]"
-   .../projects/sympy/sympy/solvers/tests/test_numeric.py:67:28 - error: Argument of type "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
+   .../projects/sympy/sympy/solvers/tests/test_numeric.py:67:28 - error: Argument of type "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix" cannot be assigned to parameter "iterable" of type "Iterable[_T1@__new__]" in function "__new__"
-     Type "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix" is not assignable to type "Iterable[_T1@__new__]"
+     Type "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix" is not assignable to type "Iterable[_T1@__new__]"
-   .../projects/sympy/sympy/solvers/tests/test_numeric.py:94:16 - error: Operator "-" not supported for types "Expr" and "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix"
+   .../projects/sympy/sympy/solvers/tests/test_numeric.py:94:16 - error: Operator "-" not supported for types "Expr" and "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix"
-     Operator "-" not supported for types "Expr" and "list[dict[bytes, bytes]]" when expected type is "SupportsAbs[Unknown]"
+     Operator "-" not supported for types "Expr" and "list[dict[str, str]]" when expected type is "SupportsAbs[Unknown]"
-   .../projects/sympy/sympy/solvers/tests/test_numeric.py:99:16 - error: Operator "-" not supported for types "Expr" and "list[dict[Unknown, Unknown]] | Unknown | list[dict[bytes, bytes]] | MutableDenseMatrix"
+   .../projects/sympy/sympy/solvers/tests/test_numeric.py:99:16 - error: Operator "-" not supported for types "Expr" and "list[dict[Unknown, Unknown]] | Unknown | list[dict[str, str]] | MutableDenseMatrix"
-     Operator "-" not supported for types "Expr" and "list[dict[bytes, bytes]]" when expected type is "SupportsAbs[Unknown]"
+     Operator "-" not supported for types "Expr" and "list[dict[str, str]]" when expected type is "SupportsAbs[Unknown]"
+   .../projects/sympy/sympy/stats/crv_types.py:2544:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
+     Return type mismatch: base method returns type "None", override returns type "ComplexInfinity | Unknown"
+       Type "ComplexInfinity | Unknown" is not assignable to type "None"
+         "ComplexInfinity" is not assignable to "None" (reportIncompatibleMethodOverride)
+   .../projects/sympy/sympy/stats/crv_types.py:2723:9 - error: Method "_cdf" overrides class "SingleContinuousDistribution" in an incompatible manner
+     Return type mismatch: base method returns type "None", override returns type "Expr | Unknown"
+       Type "Expr | Unknown" is not assignable to type "None"

... (truncated 1373 lines) ...

@rchiodo

Copy link
Copy Markdown
Collaborator

🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR.

@rchiodo

Copy link
Copy Markdown
Collaborator

Verification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified.

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@rchiodo Rich Chiodo (rchiodo) added the review-auto:approved Automated review: no blocking findings (approval posted). label Aug 25, 2026
@heejaechang
Heejae Chang (heejaechang) merged commit 20380f2 into microsoft:main Aug 25, 2026
22 of 23 checks passed
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