Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ from typing import ( # noqa: Y022 # ruff: ignore[deprecated-import]

# we can't import `Literal` from typing or mypy crashes: see #11247
# ruff: ignore[deprecated-import]
from typing_extensions import Buffer, Literal, LiteralString, Self, TypeIs, TypeVarTuple, deprecated, disjoint_base # noqa: Y023
from typing_extensions import Literal, LiteralString, Self, TypeIs, TypeVarTuple, deprecated, disjoint_base # noqa: Y023

if sys.version_info >= (3, 14):
from _typeshed import AnnotateFunc
Expand Down Expand Up @@ -828,7 +828,8 @@ class bytes(Sequence[int]):
def __add__(self, value: ReadableBuffer, /) -> bytes: ...
def __mul__(self, value: SupportsIndex, /) -> bytes: ...
def __rmul__(self, value: SupportsIndex, /) -> bytes: ...
def __mod__(self, value: Buffer | SupportsBytes | tuple[Buffer | SupportsBytes, ...], /) -> bytes: ...
# The format string chooses the conversion, including numbers and %a/%r (PEP 461).
def __mod__(self, value: Any, /) -> bytes: ...
def __rmod__(self, value: bytes, /) -> bytes: ...
# Incompatible with Sequence.__contains__
def __contains__(self, key: SupportsIndex | ReadableBuffer, /) -> bool: ... # type: ignore[override]
Expand Down Expand Up @@ -960,7 +961,8 @@ class bytearray(MutableSequence[int]):
def __mul__(self, value: SupportsIndex, /) -> bytearray: ...
def __rmul__(self, value: SupportsIndex, /) -> bytearray: ...
def __imul__(self, value: SupportsIndex, /) -> Self: ...
def __mod__(self, value: Buffer | SupportsBytes | tuple[Buffer | SupportsBytes, ...], /) -> bytearray: ...
# The format string chooses the conversion, including numbers and %a/%r (PEP 461).
def __mod__(self, value: Any, /) -> bytearray: ...
def __rmod__(self, value: bytearray, /) -> bytearray: ...
# Incompatible with Sequence.__contains__
def __contains__(self, key: SupportsIndex | ReadableBuffer, /) -> bool: ... # type: ignore[override]
Expand Down
Loading