stdlib: Add bytes defaults (#9660)

This commit is contained in:
Alex Waygood
2023-02-03 00:01:54 +00:00
committed by GitHub
parent f1aede7162
commit 100cd62373
8 changed files with 34 additions and 34 deletions

View File

@@ -595,7 +595,7 @@ class bytes(ByteString):
@overload
def __new__(cls: type[Self]) -> Self: ...
def capitalize(self) -> bytes: ...
def center(self, __width: SupportsIndex, __fillchar: bytes = ...) -> bytes: ...
def center(self, __width: SupportsIndex, __fillchar: bytes = b" ") -> bytes: ...
def count(
self, __sub: ReadableBuffer | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
) -> int: ...
@@ -631,7 +631,7 @@ class bytes(ByteString):
def istitle(self) -> bool: ...
def isupper(self) -> bool: ...
def join(self, __iterable_of_bytes: Iterable[ReadableBuffer]) -> bytes: ...
def ljust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = ...) -> bytes: ...
def ljust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = b" ") -> bytes: ...
def lower(self) -> bytes: ...
def lstrip(self, __bytes: ReadableBuffer | None = None) -> bytes: ...
def partition(self, __sep: ReadableBuffer) -> tuple[bytes, bytes, bytes]: ...
@@ -646,7 +646,7 @@ class bytes(ByteString):
def rindex(
self, __sub: ReadableBuffer | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
) -> int: ...
def rjust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = ...) -> bytes: ...
def rjust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = b" ") -> bytes: ...
def rpartition(self, __sep: ReadableBuffer) -> tuple[bytes, bytes, bytes]: ...
def rsplit(self, sep: ReadableBuffer | None = None, maxsplit: SupportsIndex = -1) -> list[bytes]: ...
def rstrip(self, __bytes: ReadableBuffer | None = None) -> bytes: ...
@@ -661,7 +661,7 @@ class bytes(ByteString):
def strip(self, __bytes: ReadableBuffer | None = None) -> bytes: ...
def swapcase(self) -> bytes: ...
def title(self) -> bytes: ...
def translate(self, __table: ReadableBuffer | None, delete: bytes = ...) -> bytes: ...
def translate(self, __table: ReadableBuffer | None, delete: bytes = b"") -> bytes: ...
def upper(self) -> bytes: ...
def zfill(self, __width: SupportsIndex) -> bytes: ...
@classmethod
@@ -699,7 +699,7 @@ class bytearray(MutableSequence[int], ByteString):
def __init__(self, __string: str, encoding: str, errors: str = ...) -> None: ...
def append(self, __item: SupportsIndex) -> None: ...
def capitalize(self) -> bytearray: ...
def center(self, __width: SupportsIndex, __fillchar: bytes = ...) -> bytearray: ...
def center(self, __width: SupportsIndex, __fillchar: bytes = b" ") -> bytearray: ...
def count(
self, __sub: ReadableBuffer | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
) -> int: ...
@@ -738,7 +738,7 @@ class bytearray(MutableSequence[int], ByteString):
def istitle(self) -> bool: ...
def isupper(self) -> bool: ...
def join(self, __iterable_of_bytes: Iterable[ReadableBuffer]) -> bytearray: ...
def ljust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = ...) -> bytearray: ...
def ljust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = b" ") -> bytearray: ...
def lower(self) -> bytearray: ...
def lstrip(self, __bytes: ReadableBuffer | None = None) -> bytearray: ...
def partition(self, __sep: ReadableBuffer) -> tuple[bytearray, bytearray, bytearray]: ...
@@ -755,7 +755,7 @@ class bytearray(MutableSequence[int], ByteString):
def rindex(
self, __sub: ReadableBuffer | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
) -> int: ...
def rjust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = ...) -> bytearray: ...
def rjust(self, __width: SupportsIndex, __fillchar: bytes | bytearray = b" ") -> bytearray: ...
def rpartition(self, __sep: ReadableBuffer) -> tuple[bytearray, bytearray, bytearray]: ...
def rsplit(self, sep: ReadableBuffer | None = None, maxsplit: SupportsIndex = -1) -> list[bytearray]: ...
def rstrip(self, __bytes: ReadableBuffer | None = None) -> bytearray: ...
@@ -770,7 +770,7 @@ class bytearray(MutableSequence[int], ByteString):
def strip(self, __bytes: ReadableBuffer | None = None) -> bytearray: ...
def swapcase(self) -> bytearray: ...
def title(self) -> bytearray: ...
def translate(self, __table: ReadableBuffer | None, delete: bytes = ...) -> bytearray: ...
def translate(self, __table: ReadableBuffer | None, delete: bytes = b"") -> bytearray: ...
def upper(self) -> bytearray: ...
def zfill(self, __width: SupportsIndex) -> bytearray: ...
@classmethod