@@ -66,7 +66,7 @@ from typing import ( # noqa: Y022 # ruff: ignore[deprecated-import]
6666
6767# we can't import `Literal` from typing or mypy crashes: see #11247
6868# ruff: ignore[deprecated-import]
69- from typing_extensions import Literal , LiteralString , Self , TypeIs , TypeVarTuple , deprecated , disjoint_base # noqa: Y023
69+ from typing_extensions import Buffer , Literal , LiteralString , Self , TypeIs , TypeVarTuple , deprecated , disjoint_base # noqa: Y023
7070
7171if sys .version_info >= (3 , 14 ):
7272 from _typeshed import AnnotateFunc
@@ -826,7 +826,7 @@ class bytes(Sequence[int]):
826826 def __add__ (self , value : ReadableBuffer , / ) -> bytes : ...
827827 def __mul__ (self , value : SupportsIndex , / ) -> bytes : ...
828828 def __rmul__ (self , value : SupportsIndex , / ) -> bytes : ...
829- def __mod__ (self , value : Any , / ) -> bytes : ...
829+ def __mod__ (self , value : Buffer | SupportsBytes , / ) -> bytes : ...
830830 # Incompatible with Sequence.__contains__
831831 def __contains__ (self , key : SupportsIndex | ReadableBuffer , / ) -> bool : ... # type: ignore[override]
832832 def __eq__ (self , value : object , / ) -> bool : ...
@@ -957,7 +957,7 @@ class bytearray(MutableSequence[int]):
957957 def __mul__ (self , value : SupportsIndex , / ) -> bytearray : ...
958958 def __rmul__ (self , value : SupportsIndex , / ) -> bytearray : ...
959959 def __imul__ (self , value : SupportsIndex , / ) -> Self : ...
960- def __mod__ (self , value : Any , / ) -> bytes : ...
960+ def __mod__ (self , value : Buffer | SupportsBytes , / ) -> bytearray : ...
961961 # Incompatible with Sequence.__contains__
962962 def __contains__ (self , key : SupportsIndex | ReadableBuffer , / ) -> bool : ... # type: ignore[override]
963963 def __eq__ (self , value : object , / ) -> bool : ...
0 commit comments