Skip to content

Update typeshed to 7030b265d887eeacee07e47aa2cca412b07950c4 - #11915

Merged
Bill Schnurr (bschnurr) merged 3 commits into
microsoft:mainfrom
bschnurr:update-typeshed-20261022
Oct 23, 2026
Merged

Bill Schnurr (bschnurr) merged 3 commits into
microsoft:mainfrom
bschnurr:update-typeshed-20261022

Conversation

@bschnurr

@bschnurr Bill Schnurr (bschnurr) commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Upstream typeshed update

Updates bundled typeshed from 6dcbc4c3b0efddc3cb46daa4e5bbe7520979bd1a (current main) to 7030b265d887eeacee07e47aa2cca412b07950c4.

Upstream compare: python/typeshed@6dcbc4c...7030b26

Initially generated using python build/updateTypeshed.py; merged latest upstream main to preserve its existing Pyright-specific builtins and logging stub adjustments. Retains the newer bytes/bytearray percent-formatting signatures from python/typeshed#16529.

Failure classification summary

No failures in the affected evaluator suites after merging main. Earlier ellipsis-related failures against the original base are already handled by current main (python/typeshed#15712); the final PR has no test changes relative to main. Initial environment setup required pnpm install --frozen-lockfile after missing worktree dependencies.

Pyright fixes

None. No analyzer implementation changes. Existing upstream main stub adjustments are preserved.

Test updates

None relative to current main. Preserve upstream's ellipsis diagnostic case and matching expected error count.

Precision report

No test reveal_type expectations are weakened. However, the update includes a deliberate upstream precision tradeoff: python/typeshed#16529 changes the bytes/bytearray percent-formatting operand to Any. This fixes legitimate numeric and mapping formatting but also stops rejecting some invalid operands. For example, b"%s" % None is now inferred as bytes even though it raises TypeError at runtime. The primer diff includes a lost None check in urllib3's test/with_dummyserver/test_socketlevel.py:1315.

Separately, python/typeshed#15852 restricts tuple hashability to hashable elements, causing downstream annotation compatibility changes. These are not merely diagnostic text churn. See the review and migration guidance below.

mypy_primer review and downstream impact

Reviewed all eight untruncated artifacts from primer run 39863469669, rather than relying on the shortened bot comment. The run compares candidate merge f729179d0af88767f51d1d53094c8de79838baac (PR head 915392a812f0780403039086e36273e2743d29b6) against base e04be03129cdfbe589f14e0ca8bdff3d5a48d8bf.

Across 20 affected projects: 58 diagnostic occurrences removed, 30 added, and 31 replacements at existing diagnostic locations; net 28 fewer errors. A successful primer check means the comparison completed, not that every behavioral change is benign.

Area Observed effect Assessment
static-frame 29 added errors, 695 to 724 Primarily tuple hashability and follow-on selector/overload errors from python/typeshed#15852 (9755c8ba0d2265431d2ecbde6da9527171a33a36). The project's Python 3.11 target and selector unions containing slices, lists, arrays, or containers make this a real compatibility change. Representative repros confirm the tighter behavior; the entire downstream project was not rerun locally.
Bytes formatting across projects 53 operator errors removed python/typeshed#16529 (541803c22d1286dfbd7497518d3c9eaa6517dcbe) permits legitimate numeric formatting, but also loses some invalid-operand checks as documented above.
scikit-learn / dd-trace-py Existing diagnostics change wording/types Wrapped methods bind through the new descriptor signatures from python/typeshed#16515; several bytes results improve from Unknown to bytes. Existing errors remain. A bounded wrapped-method repro improves from a missing-argument error/Unknown to the correct bound signature and int result.
Spack One additional diagnostic at an already-failing call site A replacement callback's inferred result improves from `str
Other removals Ibis method-call errors, COCO input rejection, and metaclass attribute errors disappear Consistent with wrapped-method binding, expanded COCO.loadRes inputs (python/typeshed#16570), and corrected type.__mro__ modeling (python/typeshed#16549).

No Pyright evaluator regression was demonstrated by this investigation. This does not eliminate the intentional upstream permissiveness or downstream migration impact.

User workarounds and migration guidance

Tuple hashability and selector annotations

  • When code genuinely hashes a tuple or uses it as a dictionary/set key, ensure its elements are hashable. Convert lists to tuples only when the nested elements are also hashable and doing so preserves the intended semantics; do not blindly cast an unhashable value to Hashable.
  • When a tuple represents a compound selector rather than a hash key, model that in the receiving API's annotation. For example, allow tuple[AxisSelector, AxisSelector] explicitly where two-axis selection is supported, instead of relying on Hashable to admit arbitrary tuples. This can require a fix in the dependency's annotations, not in user application code.
  • Slices are unhashable before Python 3.12. Python 3.12+ permits hashing a slice when its start, stop, and step are hashable. Change Pyright's pythonVersion only if the project's actual supported runtime baseline permits it; this does not make tuples containing lists or arrays hashable.
  • For an annotation defect in third-party code, prefer a dependency fix or a narrowly scoped local stub matching the real API. Do not globally disable argument/assignment diagnostics just to hide the new errors. No released static-frame fix was established by this investigation.

Bytes percent-formatting

Ordinary numeric formatting such as b"%d" % 42 now works without a workaround. Because the new operand is Any, users should not rely on % to reject optional or incompatible operands statically. Narrow optional values explicitly, and use typed boundaries or simple bytes concatenation when operand checking matters. For example:

def host_header(host: bytes | None) -> bytes:
    if host is None:
        raise ValueError("host is required")
    return b"Host: " + host + b"\r\n"

For a missing value, choose the application's intended error/omission behavior explicitly rather than silently coercing None. This example rejects it and keeps the concatenation operands statically checked. A format-aware checker enhancement would be separate work; this PR does not implement one.

These are migration options, not additional patches included in this PR.

Validation

After merging current main:

  • pnpm --dir packages\pyright-internal run test:norebuild --runInBand --runTestsByPath src/tests/typeEvaluator1.test.ts src/tests/typeEvaluator5.test.ts: 2 suites passed; 241 tests passed.
  • pnpm run check:eslint: passed.
  • Prettier checks for the affected TypeScript test files: passed.
  • PR diff whitespace check against upstream/main: passed. An unrelated whitespace issue inherited from main is unchanged.

Before the main merge, the full suite passed: 96 suites passed, 1 skipped; 3427 tests passed, 12 skipped. The full suite has not been rerun after the merge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b5fccb8-2031-4188-bdc6-cf3405acbc3f
Classification A/C: typeshed commit 0d9b1926fc75ea33c643171b83cea73e3dd9990c (python/typeshed#15712) removes builtins.ellipsis, which never existed at runtime. Use types.EllipsisType to retain exact narrowing expectations, update the builtins symbol list, and remove the obsolete pseudo-type runtime-check case. No reveal expectations are weakened.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b5fccb8-2031-4188-bdc6-cf3405acbc3f
@heejaechang

Heejae Chang (heejaechang) commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

🔒 Automated review in progress — Heejae Chang (@heejaechang) is auto-reviewing this PR.

@overload
def __get__(
self: Callable[Concatenate[_WrapperSelfT, _PBound], _RWrapper], instance: _WrapperSelfT, owner: type | None = None, /
) -> Callable[_PBound, _RWrapper]: ...

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.

Warning · Non-blocking recommendation

Could this descriptor overload distinguish function wrappers from callable-instance wrappers? functools.wraps can return a callable instance that is stored on a class but is not a runtime descriptor; declaring __get__ here can make an access such as Holder().callback(3) report an attribute-access error and infer Unknown despite working at runtime. Please verify that case before importing this upstream change.

Keep typeshed 7030b265 and its newer percent-formatting signatures, preserve upstream builtins and logging adjustments, and retain upstream's ellipsis diagnostic test and matching error count. The PR now needs no test changes relative to main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b5fccb8-2031-4188-bdc6-cf3405acbc3f
@bschnurr

Copy link
Copy Markdown
Member Author

/benchmark

@heejaechang Heejae Chang (heejaechang) added the review-auto:changes-requested Automated review: posted blocking findings to address. label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

ibis (https://github.com/ibis-project/ibis)
-   .../projects/ibis/ibis/expr/types/relations.py:3733:20 - error: Argument of type "str | Sequence[str | BooleanColumn | tuple[str | Column | Deferred, str | Column | Deferred] | BooleanValue | bool]" cannot be assigned to parameter "right" of type "Table" in function "__call__"
-     Type "str | Sequence[str | BooleanColumn | tuple[str | Column | Deferred, str | Column | Deferred] | BooleanValue | bool]" is not assignable to type "Table"
-       "Sequence[str | BooleanColumn | tuple[str | Column | Deferred, str | Column | Deferred] | BooleanValue | bool]" is not assignable to "Table" (reportArgumentType)
-   .../projects/ibis/ibis/expr/types/relations.py:3860:16 - error: Expected 1 more positional argument (reportCallIssue)
- 7236 errors, 247 warnings, 0 informations
+ 7234 errors, 247 warnings, 0 informations

werkzeug (https://github.com/pallets/werkzeug)
-   .../projects/werkzeug/src/werkzeug/http.py:1316:28 - error: Operator "%" not supported for types "Literal[b"\%03o"]" and "int" (reportOperatorIssue)
- 312 errors, 5 warnings, 0 informations
+ 311 errors, 5 warnings, 0 informations

scikit-learn (https://github.com/scikit-learn/scikit-learn)
-   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:643:22 - error: Cannot access attribute "shape" for class "_Wrapped[..., Unknown, ..., Unknown]"
+   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:643:22 - error: Cannot access attribute "shape" for class "FunctionType"
-     Attribute "shape" is unknown (reportAttributeAccessIssue)
+     Attribute "shape" is unknown (reportFunctionMemberAccess)
-   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:644:22 - error: Cannot access attribute "shape" for class "_Wrapped[..., Unknown, ..., Unknown]"
+   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:644:22 - error: Cannot access attribute "shape" for class "FunctionType"
-     Attribute "shape" is unknown (reportAttributeAccessIssue)
+     Attribute "shape" is unknown (reportFunctionMemberAccess)
-   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2182:20 - error: Cannot access attribute "shape" for class "_Wrapped[..., Unknown, ..., Unknown]"
+   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2182:20 - error: Cannot access attribute "shape" for class "FunctionType"
-     Attribute "shape" is unknown (reportAttributeAccessIssue)
+     Attribute "shape" is unknown (reportFunctionMemberAccess)
-   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2186:21 - error: Argument of type "type | Unknown | _Wrapped[..., Unknown, ..., Unknown]" cannot be assigned to parameter "actual" of type "_NumericArrayLike" in function "assert_allclose"
+   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2186:21 - error: Argument of type "type | Unknown | ((...) -> Unknown)" cannot be assigned to parameter "actual" of type "_NumericArrayLike" in function "assert_allclose"
-     Type "type | Unknown | _Wrapped[..., Unknown, ..., Unknown]" is not assignable to type "_NumericArrayLike"
+     Type "type | Unknown | ((...) -> Unknown)" is not assignable to type "_NumericArrayLike"
-       Type "type" is not assignable to type "_NumericArrayLike"
+       Type "(...) -> Unknown" is not assignable to type "_NumericArrayLike"
-         "type" is incompatible with protocol "_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]"
+         "FunctionType" is incompatible with protocol "_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]"
-         "type" is incompatible with protocol "_NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]]"
+         "FunctionType" is incompatible with protocol "_NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]]"
-   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2186:30 - error: "__getitem__" method not defined on type "_Wrapped[..., Unknown, ..., Unknown]" (reportIndexIssue)
+   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2186:30 - error: Object of type "(...) -> Unknown" is not subscriptable (reportIndexIssue)
-   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2238:21 - error: Argument of type "type | Unknown | _Wrapped[..., Unknown, ..., Unknown]" cannot be assigned to parameter "actual" of type "_NumericArrayLike" in function "assert_allclose"
+   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2238:21 - error: Argument of type "type | Unknown | ((...) -> Unknown)" cannot be assigned to parameter "actual" of type "_NumericArrayLike" in function "assert_allclose"
-     Type "type | Unknown | _Wrapped[..., Unknown, ..., Unknown]" is not assignable to type "_NumericArrayLike"
+     Type "type | Unknown | ((...) -> Unknown)" is not assignable to type "_NumericArrayLike"
-       Type "type" is not assignable to type "_NumericArrayLike"
+       Type "(...) -> Unknown" is not assignable to type "_NumericArrayLike"
-         "type" is incompatible with protocol "_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]"
+         "FunctionType" is incompatible with protocol "_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]"
-         "type" is incompatible with protocol "_NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]]"
+         "FunctionType" is incompatible with protocol "_NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool] | number[Any, int | float | complex]]]]"
-   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2238:30 - error: "__getitem__" method not defined on type "_Wrapped[..., Unknown, ..., Unknown]" (reportIndexIssue)
+   .../projects/scikit-learn/sklearn/linear_model/tests/test_logistic.py:2238:30 - error: Object of type "(...) -> Unknown" is not subscriptable (reportIndexIssue)
-   .../projects/scikit-learn/sklearn/utils/estimator_checks.py:4029:63 - error: "property" is not iterable
-     "__iter__" method not defined (reportGeneralTypeIssues)
- 17620 errors, 470 warnings, 0 informations
+ 17619 errors, 470 warnings, 0 informations

pyodide (https://github.com/pyodide/pyodide)
-   .../projects/pyodide/src/tests/test_python_socket.py:273:31 - error: Operator "%" not supported for types "Literal[b"line%02d\x0a"]" and "int" (reportOperatorIssue)
-   .../projects/pyodide/src/tests/test_python_socket.py:296:35 - error: Operator "%" not supported for types "Literal[b"line%02d\x0a"]" and "int" (reportOperatorIssue)
- 855 errors, 24 warnings, 0 informations
+ 853 errors, 24 warnings, 0 informations

mkdocs (https://github.com/mkdocs/mkdocs)
- .../projects/mkdocs/mkdocs/livereload/__init__.py
-   .../projects/mkdocs/mkdocs/livereload/__init__.py:283:29 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
-   .../projects/mkdocs/mkdocs/tests/livereload_tests.py:434:49 - error: Operator "%" not supported for types "Literal[b"[%d]"]" and "int" (reportOperatorIssue)
- 166 errors, 16 warnings, 0 informations
+ 164 errors, 16 warnings, 0 informations

vision (https://github.com/pytorch/vision)
-   .../projects/vision/references/detection/coco_eval.py:35:54 - error: Argument of type "list[Unknown]" cannot be assigned to parameter "resFile" of type "str" in function "loadRes"
-     "list[Unknown]" is not assignable to "str" (reportArgumentType)
- 1519 errors, 47 warnings, 0 informations
+ 1518 errors, 47 warnings, 0 informations

static-frame (https://github.com/static-frame/static-frame)
+   .../projects/static-frame/static_frame/core/frame.py:760:17 - error: Argument of type "Iterator[Tuple[TLabel, IndexBase]]" cannot be assigned to parameter "value" of type "TIndexInitOrAuto" in function "index_from_optional_constructor"
+     Type "Iterator[Tuple[TLabel, IndexBase]]" is not assignable to type "TIndexInitOrAuto"
+       "Iterator[Tuple[TLabel, IndexBase]]" is not assignable to "IndexBase"
+       "Iterator[Tuple[TLabel, IndexBase]]" is not assignable to "Iterable[TLabel]"
+         Type parameter "_T_co@Iterable" is covariant, but "Tuple[TLabel, IndexBase]" is not a subtype of "TLabel"
+           Type "Tuple[TLabel, IndexBase]" is not assignable to type "TLabel"
+             "Tuple[TLabel, IndexBase]" is incompatible with protocol "Hashable"
+             "Tuple[TLabel, IndexBase]" is not assignable to "int"
+             "Tuple[TLabel, IndexBase]" is not assignable to "integer[Any]"
+     ... (reportArgumentType)
+   .../projects/static-frame/static_frame/core/frame.py:772:17 - error: Argument of type "Iterator[Tuple[TLabel, IndexBase]]" cannot be assigned to parameter "value" of type "TIndexInitOrAuto" in function "index_from_optional_constructor"
+     Type "Iterator[Tuple[TLabel, IndexBase]]" is not assignable to type "TIndexInitOrAuto"
+       "Iterator[Tuple[TLabel, IndexBase]]" is not assignable to "IndexBase"
+       "Iterator[Tuple[TLabel, IndexBase]]" is not assignable to "Iterable[TLabel]"
+         Type parameter "_T_co@Iterable" is covariant, but "Tuple[TLabel, IndexBase]" is not a subtype of "TLabel"
+           Type "Tuple[TLabel, IndexBase]" is not assignable to type "TLabel"
+             "Tuple[TLabel, IndexBase]" is incompatible with protocol "Hashable"
+             "Tuple[TLabel, IndexBase]" is not assignable to "int"
+             "Tuple[TLabel, IndexBase]" is not assignable to "integer[Any]"
+     ... (reportArgumentType)
+   .../projects/static-frame/static_frame/core/frame.py:5558:54 - error: Argument of type "TLocSelectorCompound" cannot be assigned to parameter "key" of type "TLocSelector" in function "_loc_to_iloc"
+     Type "TLocSelectorCompound" is not assignable to type "TLocSelector"
+       Type "Tuple[TLocSelector, TLocSelector]" is not assignable to type "TLocSelector"
+         "Tuple[TLocSelector, TLocSelector]" is incompatible with protocol "Hashable"
+           Could not bind method "__hash__" because "Tuple[TLocSelector, TLocSelector]" is not assignable to parameter "self"
+             "Tuple[TLocSelector, TLocSelector]" is not assignable to "tuple[Hashable, ...]"
+         "Tuple[TLocSelector, TLocSelector]" is not assignable to "int"
+         "Tuple[TLocSelector, TLocSelector]" is not assignable to "integer[Any]"
+         "Tuple[TLocSelector, TLocSelector]" is not assignable to "bool"
+     ... (reportArgumentType)
+   .../projects/static-frame/static_frame/core/hloc.py:11:19 - error: Type "tuple[TLocSelector | tuple[Unknown, ...]]" is not assignable to declared type "TLocSelector"
+     Type "tuple[TLocSelector | tuple[Unknown, ...]]" is not assignable to type "TLocSelector"
+       "tuple[TLocSelector | tuple[Unknown, ...]]" is incompatible with protocol "Hashable"
+         Could not bind method "__hash__" because "tuple[TLocSelector | tuple[Unknown, ...]]" is not assignable to parameter "self"
+           "tuple[TLocSelector | tuple[Unknown, ...]]" is not assignable to "tuple[Hashable, ...]"
+             Tuple entry 1 is incorrect type
+       "tuple[TLocSelector | tuple[Unknown, ...]]" is not assignable to "int"
+       "tuple[TLocSelector | tuple[Unknown, ...]]" is not assignable to "integer[Any]"
+       "tuple[TLocSelector | tuple[Unknown, ...]]" is not assignable to "bool"
+     ... (reportAssignmentType)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:2183:19 - error: Type "tuple[TLocSelector, ...]" is not assignable to declared type "TLocSelector | ILoc | HLoc"
+     Type "tuple[TLocSelector, ...]" is not assignable to type "TLocSelector | ILoc | HLoc"
+       "tuple[TLocSelector, ...]" is incompatible with protocol "Hashable"
+         Could not bind method "__hash__" because "tuple[TLocSelector, ...]" is not assignable to parameter "self"
+           "tuple[TLocSelector, ...]" is not assignable to "tuple[Hashable, ...]"
+             Tuple entry 1 is incorrect type
+       "tuple[TLocSelector, ...]" is not assignable to "int"
+       "tuple[TLocSelector, ...]" is not assignable to "integer[Any]"
+       "tuple[TLocSelector, ...]" is not assignable to "bool"
+     ... (reportAssignmentType)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:2184:20 - error: Argument of type "TLocSelector | ILoc | HLoc" cannot be assigned to parameter "obj" of type "Sized" in function "len"
+     Type "TLocSelector | ILoc | HLoc" is not assignable to type "Sized"
+       "Hashable" is incompatible with protocol "Sized"
+         "__len__" is not present (reportArgumentType)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:3200:21 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:3200:21 - error: Argument of type "tuple[slice[None, None, None], Literal[0]]" cannot be assigned to parameter "key" of type "TLabel" in function "__getitem__"
+     Type "tuple[slice[None, None, None], Literal[0]]" is not assignable to type "TLabel"
+       "tuple[slice[None, None, None], Literal[0]]" is incompatible with protocol "Hashable"
+         Could not bind method "__hash__" because "tuple[slice[None, None, None], Literal[0]]" is not assignable to parameter "self"
+           "tuple[slice[None, None, None], Literal[0]]" is not assignable to "tuple[Hashable, ...]"
+             Tuple entry 1 is incorrect type
+       "tuple[slice[None, None, None], Literal[0]]" is not assignable to "int"
+       "tuple[slice[None, None, None], Literal[0]]" is not assignable to "integer[Any]"
+       "tuple[slice[None, None, None], Literal[0]]" is not assignable to "bool" (reportArgumentType)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:3220:17 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:3220:17 - error: Argument of type "tuple[slice[None, None, None], Literal[-1]]" cannot be assigned to parameter "key" of type "TLabel" in function "__getitem__"
+     Type "tuple[slice[None, None, None], Literal[-1]]" is not assignable to type "TLabel"
+       "tuple[slice[None, None, None], Literal[-1]]" is incompatible with protocol "Hashable"
+         Could not bind method "__hash__" because "tuple[slice[None, None, None], Literal[-1]]" is not assignable to parameter "self"
+           "tuple[slice[None, None, None], Literal[-1]]" is not assignable to "tuple[Hashable, ...]"
+             Tuple entry 1 is incorrect type
+       "tuple[slice[None, None, None], Literal[-1]]" is not assignable to "int"
+       "tuple[slice[None, None, None], Literal[-1]]" is not assignable to "integer[Any]"
+       "tuple[slice[None, None, None], Literal[-1]]" is not assignable to "bool" (reportArgumentType)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:3229:20 - error: No overloads for "__getitem__" match the provided arguments (reportCallIssue)
+   .../projects/static-frame/static_frame/core/index_hierarchy.py:3229:20 - error: Argument of type "tuple[slice[None, None, None], slice[int, None, None]]" cannot be assigned to parameter "key" of type "TLabel" in function "__getitem__"
+     Type "tuple[slice[None, None, None], slice[int, None, None]]" is not assignable to type "TLabel"
+       "tuple[slice[None, None, None], slice[int, None, None]]" is incompatible with protocol "Hashable"
+         Could not bind method "__hash__" because "tuple[slice[None, None, None], slice[int, None, None]]" is not assignable to parameter "self"
+           "tuple[slice[None, None, None], slice[int, None, None]]" is not assignable to "tuple[Hashable, ...]"
+             Tuple entry 1 is incorrect type
+       "tuple[slice[None, None, None], slice[int, None, None]]" is not assignable to "int"
+       "tuple[slice[None, None, None], slice[int, None, None]]" is not assignable to "integer[Any]"
+       "tuple[slice[None, None, None], slice[int, None, None]]" is not assignable to "bool" (reportArgumentType)
+   .../projects/static-frame/static_frame/core/quilt.py:1172:67 - error: Argument of type "tuple[TLabel, slice[Any, Any, Any]]" cannot be assigned to parameter "key" of type "TLocSelector" in function "__getitem__"
+     Type "tuple[TLabel, slice[Any, Any, Any]]" is not assignable to type "TLocSelector"
+       "tuple[TLabel, slice[Any, Any, Any]]" is incompatible with protocol "Hashable"
+         Could not bind method "__hash__" because "tuple[TLabel, slice[Any, Any, Any]]" is not assignable to parameter "self"
+           "tuple[TLabel, slice[Any, Any, Any]]" is not assignable to "tuple[Hashable, ...]"
+             Tuple entry 1 is incorrect type
+       "tuple[TLabel, slice[Any, Any, Any]]" is not assignable to "int"
+       "tuple[TLabel, slice[Any, Any, Any]]" is not assignable to "integer[Any]"
+       "tuple[TLabel, slice[Any, Any, Any]]" is not assignable to "bool" (reportArgumentType)
+   .../projects/static-frame/static_frame/core/quilt.py:1280:54 - error: Argument of type "TLocSelectorCompound" cannot be assigned to parameter "key" of type "TLocSelector" in function "_loc_to_iloc"
+     Type "TLocSelectorCompound" is not assignable to type "TLocSelector"
+       Type "Tuple[TLocSelector, TLocSelector]" is not assignable to type "TLocSelector"
+         "Tuple[TLocSelector, TLocSelector]" is incompatible with protocol "Hashable"
+           Could not bind method "__hash__" because "Tuple[TLocSelector, TLocSelector]" is not assignable to parameter "self"

... (truncated 87 lines) ...

mypy (https://github.com/python/mypy)
- .../projects/mypy/mypyc/codegen/literals.py
-   .../projects/mypy/mypyc/codegen/literals.py:253:19 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
- 1075 errors, 79 warnings, 0 informations
+ 1074 errors, 79 warnings, 0 informations

urllib3 (https://github.com/urllib3/urllib3)
-   .../projects/urllib3/src/urllib3/connection.py:596:31 - error: Operator "%" not supported for types "Literal[b"%x\x0d\x0a%b\x0d\x0a"]" and "tuple[int, bytes]" (reportOperatorIssue)
- .../projects/urllib3/src/urllib3/util/url.py
-   .../projects/urllib3/src/urllib3/util/url.py:318:34 - error: Operator "%" not supported for types "Literal[b"%%%02X"]" and "int" (reportOperatorIssue)
- .../projects/urllib3/test/with_dummyserver/test_socketlevel.py
-   .../projects/urllib3/test/with_dummyserver/test_socketlevel.py:1315:16 - error: Operator "%" not supported for types "Literal[b"Host: %s\x0d\x0a"]" and "bytes | None"
-     Operator "%" not supported for types "Literal[b"Host: %s\x0d\x0a"]" and "None" (reportOperatorIssue)
-   .../projects/urllib3/test/with_dummyserver/test_socketlevel.py:2127:17 - error: Operator "%" not supported for types "Literal[b"HTTP/1.1 200 OK\x0d\x0aContent-Type: text/plain\x0d\x0aContent\x26"]" and "Literal[2147483648]" (reportOperatorIssue)
-   .../projects/urllib3/test/with_dummyserver/test_socketlevel.py:2541:17 - error: Operator "%" not supported for types "Literal[b"HTTP/1.1 200 OK\x0d\x0aContent-Length: %d\x0d\x0aContent-Encod\x26"]" and "tuple[int]" (reportOperatorIssue)
- 169 errors, 15 warnings, 0 informations
+ 164 errors, 15 warnings, 0 informations

scrapy (https://github.com/scrapy/scrapy)
-   .../projects/scrapy/tests/test_linkextractors.py:843:27 - error: Operator "%" not supported for types "Literal[b"<a href=\"/p?b=2&a=1#f%d\">x</a>"]" and "int" (reportOperatorIssue)
- 839 errors, 52 warnings, 0 informations
+ 838 errors, 52 warnings, 0 informations

psycopg (https://github.com/psycopg/psycopg)
- .../projects/psycopg/psycopg/psycopg/_queries.py
-   .../projects/psycopg/psycopg/psycopg/_queries.py:220:27 - error: Operator "%" not supported for types "Literal[b"$%d"]" and "int" (reportOperatorIssue)
-   .../projects/psycopg/psycopg/psycopg/_queries.py:230:22 - error: Operator "%" not supported for types "Literal[b"$%d"]" and "int" (reportOperatorIssue)
- .../projects/psycopg/psycopg/psycopg/_tstrings.py
-   .../projects/psycopg/psycopg/psycopg/_tstrings.py:108:29 - error: Operator "%" not supported for types "Literal[b"$%d"]" and "int" (reportOperatorIssue)
-   .../projects/psycopg/psycopg/psycopg/types/datetime.py:216:16 - error: Operator "%" not supported for types "Literal[b"%+d day %+d second %+d microsecond"]" and "tuple[int, int, int]" (reportOperatorIssue)
- .../projects/psycopg/psycopg/psycopg/types/uuid.py
-   .../projects/psycopg/psycopg/psycopg/types/uuid.py:28:16 - error: Operator "%" not supported for types "Literal[b"%032x"]" and "int" (reportOperatorIssue)
-   .../projects/psycopg/tests/pq/test_escaping.py:175:15 - error: Operator "%" not supported for types "Literal[b"\x%02x"]" and "int" (reportOperatorIssue)
- 1988 errors, 113 warnings, 0 informations
+ 1982 errors, 113 warnings, 0 informations

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- .../projects/mitmproxy/mitmproxy/net/http/http1/assemble.py
-   .../projects/mitmproxy/mitmproxy/net/http/http1/assemble.py:41:23 - error: Operator "%" not supported for types "Literal[b"%x\x0d\x0a%s\x0d\x0a"]" and "tuple[int, Unknown]" (reportOperatorIssue)
-   .../projects/mitmproxy/mitmproxy/net/http/url.py:151:20 - error: Operator "%" not supported for types "Literal[b"%s:%d"]" and "tuple[bytes*, int]" (reportOperatorIssue)
-   .../projects/mitmproxy/mitmproxy/proxy/layers/http/_http1.py:254:23 - error: Operator "%" not supported for types "Literal[b"%x\x0d\x0a%s\x0d\x0a"]" and "tuple[int, bytes]" (reportOperatorIssue)
-   .../projects/mitmproxy/mitmproxy/proxy/layers/http/_http1.py:382:23 - error: Operator "%" not supported for types "Literal[b"%x\x0d\x0a%s\x0d\x0a"]" and "tuple[int, bytes]" (reportOperatorIssue)
-   .../projects/mitmproxy/mitmproxy/proxy/layers/http/_http2.py:152:46 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
-   .../projects/mitmproxy/mitmproxy/proxy/layers/http/_http2.py:395:22 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
-   .../projects/mitmproxy/mitmproxy/proxy/layers/http/_http3.py:94:46 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
- 2336 errors, 321 warnings, 0 informations
+ 2329 errors, 321 warnings, 0 informations

dd-trace-py (https://github.com/DataDog/dd-trace-py)
-   .../projects/dd-trace-py/benchmarks/bm/iast_fixtures/str_methods.py:912:12 - error: Operator "%" not supported for types "Literal[b"INSERT INTO \"show_client\" (\"username\") VALUES (%(n\x26"]" and "dict[Unknown, Unknown]" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/appsec/contrib_appsec/aiohttp_app/app.py:120:30 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/appsec/iast/aspects/test_modulo_aspect_fixtures.py:271:13 - error: Operator "%" not supported for types "Literal[b"INSERT INTO \"show_client\" (\"username\") VALUES (%s)\x26"]" and "tuple[Literal[1]]" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/appsec/iast/aspects/test_modulo_aspect_fixtures.py:277:13 - error: Operator "%" not supported for types "Literal[b"INSERT INTO \"show_client\" (\"username\") VALUES (%(n\x26"]" and "dict[str, Any | Unknown]" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/appsec/iast/taint_tracking/test_native_taint_range.py:172:28 - error: Operator "%" not supported for types "Literal[b"N%04d"]" and "int" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/appsec/iast/taint_tracking/test_native_taint_range.py:177:13 - error: Operator "%" not supported for types "Literal[b"T%04d"]" and "int" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/appsec/iast/taint_tracking/test_native_taint_range.py:241:28 - error: Operator "%" not supported for types "Literal[b"N%04d"]" and "int" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/appsec/iast/taint_tracking/test_native_taint_range.py:246:13 - error: Operator "%" not supported for types "Literal[b"T%04d"]" and "int" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:33:15 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:42:19 - error: Operator "%" not supported for types "Literal[b"%d"]" and "int" (reportOperatorIssue)
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:110:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:110:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:129:30 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:129:30 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:200:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:200:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:220:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:220:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:245:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:245:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:261:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:261:36 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:276:40 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:276:40 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:292:40 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:292:40 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
-   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:324:40 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[Unknown, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"
+   .../projects/dd-trace-py/tests/contrib/wsgi/test_wsgi.py:324:40 - error: Argument of type "(environ: Unknown, start_response: Unknown) -> (Generator[bytes, Any, None] | list[bytes] | None)" cannot be assigned to parameter "application" of type "Iterable[Any]" in function "__init__"

... (truncated 82 lines) ...```

@github-actions

Copy link
Copy Markdown
Contributor

Compared candidate f729179d0af88767f51d1d53094c8de79838baac against its first parent e04be03129cdfbe589f14e0ca8bdff3d5a48d8bf.

View the full release history charts with the base and PR results.

Execution time history

Execution time history

Peak memory history

Peak memory history

Download the chart artifact.

Type checker benchmark

🟢 No performance regressions detected.

Regression threshold: 20.0%
Statistic: median
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 20.352s -0.1% 1083.8 MB -1.1% 🟢 Pass
click pyright 17 2.292s +0.4% 358.2 MB +0.2% 🟢 Pass
homeassistant pyright 9850 104.875s -2.1% 6090.9 MB -0.0% 🟢 Pass
numpy pyright 356 29.820s -2.0% 1330.9 MB +6.8% 🟢 Pass
pandas pyright 1459 73.828s -7.4% 3658.8 MB +3.3% 🟢 Pass
pytest pyright 243 11.656s -1.3% 856.5 MB +0.0% 🟢 Pass
requests pyright 19 2.497s +2.9% 344.1 MB +0.5% 🟢 Pass
torch pyright 2400 113.711s -6.2% 4955.1 MB +5.3% 🟢 Pass
transformers pyright 2901 98.013s +0.6% 5194.6 MB -1.7% 🟢 Pass

Pyright stats

Package Parsed/bound Checked Find Read Tokenize Parse Imports Bind Check Cycles
ansible 988 583 0.050s 0.087s 0.417s 0.793s 0.220s 1.053s 17.100s 0.000s
click 111 17 0.000s 0.013s 0.093s 0.163s 0.027s 0.207s 1.530s 0.000s
homeassistant 11150 9850 0.530s 0.600s 2.237s 3.770s 1.597s 4.997s 87.557s 0.000s
numpy 605 356 0.010s 0.057s 0.313s 0.600s 0.210s 0.747s 27.383s 0.000s
pandas 1898 1459 0.040s 0.147s 0.840s 1.667s 0.210s 1.973s 68.677s 0.000s
pytest 545 243 0.017s 0.057s 0.350s 0.503s 0.093s 0.663s 9.567s 0.000s
requests 167 19 0.000s 0.020s 0.123s 0.233s 0.057s 0.277s 1.467s 0.000s
torch 3078 2400 0.133s 0.363s 1.760s 2.983s 0.550s 4.303s 103.833s 0.000s
transformers 3536 2901 0.127s 0.437s 2.080s 3.103s 0.817s 8.053s 87.657s 0.000s

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.

@heejaechang Heejae Chang (heejaechang) added review-auto:approved Automated review: no blocking findings (approval posted). and removed review-auto:changes-requested Automated review: posted blocking findings to address. labels Oct 23, 2026
@bschnurr
Bill Schnurr (bschnurr) merged commit 4975f45 into microsoft:main Oct 23, 2026
11 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