Improve some in-place BinOp methods (#7149)

This commit is contained in:
Alex Waygood
2022-02-06 23:36:57 +00:00
committed by GitHub
parent 3b8412650e
commit a62fd92fb0
5 changed files with 14 additions and 11 deletions

View File

@@ -645,10 +645,10 @@ class bytearray(MutableSequence[int], ByteString):
def __setitem__(self, __s: slice, __x: Iterable[SupportsIndex] | bytes) -> None: ...
def __delitem__(self, __i: SupportsIndex | slice) -> None: ...
def __add__(self, __s: bytes) -> bytearray: ...
def __iadd__(self, __s: Iterable[int]) -> bytearray: ...
def __iadd__(self: Self, __s: Iterable[int]) -> Self: ...
def __mul__(self, __n: SupportsIndex) -> bytearray: ...
def __rmul__(self, __n: SupportsIndex) -> bytearray: ...
def __imul__(self, __n: SupportsIndex) -> bytearray: ...
def __imul__(self: Self, __n: SupportsIndex) -> Self: ...
def __mod__(self, __value: Any) -> bytes: ...
# Incompatible with Sequence.__contains__
def __contains__(self, __o: SupportsIndex | bytes) -> bool: ... # type: ignore[override]