mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-11 06:21:57 +08:00
Upgrade black version (#7089)
This commit is contained in:
@@ -108,6 +108,7 @@ class object:
|
||||
def __reduce_ex__(self, __protocol: SupportsIndex) -> str | tuple[Any, ...]: ...
|
||||
else:
|
||||
def __reduce_ex__(self, __protocol: int) -> str | tuple[Any, ...]: ...
|
||||
|
||||
def __dir__(self) -> Iterable[str]: ...
|
||||
def __init_subclass__(cls) -> None: ...
|
||||
|
||||
@@ -185,6 +186,7 @@ class int:
|
||||
def __new__(cls: type[Self], __x: str | bytes | bytearray, base: SupportsIndex) -> Self: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def as_integer_ratio(self) -> tuple[int, Literal[1]]: ...
|
||||
|
||||
@property
|
||||
def real(self) -> int: ...
|
||||
@property
|
||||
@@ -197,6 +199,7 @@ class int:
|
||||
def bit_length(self) -> int: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
def bit_count(self) -> int: ...
|
||||
|
||||
def to_bytes(self, length: SupportsIndex, byteorder: Literal["little", "big"], *, signed: bool = ...) -> bytes: ...
|
||||
@classmethod
|
||||
def from_bytes(
|
||||
@@ -303,6 +306,7 @@ class float:
|
||||
if sys.version_info >= (3, 9):
|
||||
def __ceil__(self) -> int: ...
|
||||
def __floor__(self) -> int: ...
|
||||
|
||||
@overload
|
||||
def __round__(self, __ndigits: None = ...) -> int: ...
|
||||
@overload
|
||||
@@ -371,6 +375,7 @@ class str(Sequence[str]):
|
||||
def expandtabs(self, tabsize: SupportsIndex = ...) -> str: ...
|
||||
else:
|
||||
def expandtabs(self, tabsize: int = ...) -> str: ...
|
||||
|
||||
def find(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
|
||||
def format(self, *args: object, **kwargs: object) -> str: ...
|
||||
def format_map(self, map: _FormatMapMapping) -> str: ...
|
||||
@@ -379,6 +384,7 @@ class str(Sequence[str]):
|
||||
def isalpha(self) -> bool: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def isascii(self) -> bool: ...
|
||||
|
||||
def isdecimal(self) -> bool: ...
|
||||
def isdigit(self) -> bool: ...
|
||||
def isidentifier(self) -> bool: ...
|
||||
@@ -397,6 +403,7 @@ class str(Sequence[str]):
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self, __prefix: str) -> str: ...
|
||||
def removesuffix(self, __suffix: str) -> str: ...
|
||||
|
||||
def rfind(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
|
||||
def rindex(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
|
||||
def rjust(self, __width: SupportsIndex, __fillchar: str = ...) -> str: ...
|
||||
@@ -462,6 +469,7 @@ class bytes(ByteString):
|
||||
def expandtabs(self, tabsize: SupportsIndex = ...) -> bytes: ...
|
||||
else:
|
||||
def expandtabs(self, tabsize: int = ...) -> bytes: ...
|
||||
|
||||
def find(
|
||||
self, __sub: bytes | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
|
||||
) -> int: ...
|
||||
@@ -469,6 +477,7 @@ class bytes(ByteString):
|
||||
def hex(self, sep: str | bytes = ..., bytes_per_sep: SupportsIndex = ...) -> str: ...
|
||||
else:
|
||||
def hex(self) -> str: ...
|
||||
|
||||
def index(
|
||||
self, __sub: bytes | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
|
||||
) -> int: ...
|
||||
@@ -476,6 +485,7 @@ class bytes(ByteString):
|
||||
def isalpha(self) -> bool: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def isascii(self) -> bool: ...
|
||||
|
||||
def isdigit(self) -> bool: ...
|
||||
def islower(self) -> bool: ...
|
||||
def isspace(self) -> bool: ...
|
||||
@@ -490,6 +500,7 @@ class bytes(ByteString):
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self, __prefix: bytes) -> bytes: ...
|
||||
def removesuffix(self, __suffix: bytes) -> bytes: ...
|
||||
|
||||
def rfind(
|
||||
self, __sub: bytes | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
|
||||
) -> int: ...
|
||||
@@ -562,6 +573,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def expandtabs(self, tabsize: SupportsIndex = ...) -> bytearray: ...
|
||||
else:
|
||||
def expandtabs(self, tabsize: int = ...) -> bytearray: ...
|
||||
|
||||
def extend(self, __iterable_of_ints: Iterable[SupportsIndex]) -> None: ...
|
||||
def find(
|
||||
self, __sub: bytes | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
|
||||
@@ -570,6 +582,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def hex(self, sep: str | bytes = ..., bytes_per_sep: SupportsIndex = ...) -> str: ...
|
||||
else:
|
||||
def hex(self) -> str: ...
|
||||
|
||||
def index(
|
||||
self, __sub: bytes | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
|
||||
) -> int: ...
|
||||
@@ -578,6 +591,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def isalpha(self) -> bool: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def isascii(self) -> bool: ...
|
||||
|
||||
def isdigit(self) -> bool: ...
|
||||
def islower(self) -> bool: ...
|
||||
def isspace(self) -> bool: ...
|
||||
@@ -591,6 +605,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self, __prefix: bytes) -> bytearray: ...
|
||||
def removesuffix(self, __suffix: bytes) -> bytearray: ...
|
||||
|
||||
def replace(self, __old: bytes, __new: bytes, __count: SupportsIndex = ...) -> bytearray: ...
|
||||
def rfind(
|
||||
self, __sub: bytes | SupportsIndex, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
|
||||
@@ -691,9 +706,11 @@ class memoryview(Sized, Sequence[int]):
|
||||
def tobytes(self, order: Literal["C", "F", "A"] | None = ...) -> bytes: ...
|
||||
else:
|
||||
def tobytes(self) -> bytes: ...
|
||||
|
||||
def tolist(self) -> list[int]: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def toreadonly(self) -> memoryview: ...
|
||||
|
||||
def release(self) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def hex(self, sep: str | bytes = ..., bytes_per_sep: SupportsIndex = ...) -> str: ...
|
||||
@@ -1506,6 +1523,7 @@ class zip(Iterator[_T_co], Generic[_T_co]):
|
||||
__iter6: Iterable[Any],
|
||||
*iterables: Iterable[Any],
|
||||
) -> zip[tuple[Any, ...]]: ...
|
||||
|
||||
def __iter__(self) -> Iterator[_T_co]: ...
|
||||
def __next__(self) -> _T_co: ...
|
||||
|
||||
@@ -1679,6 +1697,7 @@ if sys.version_info >= (3, 10):
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
_SplitCondition = type[BaseException] | tuple[type[BaseException], ...] | Callable[[BaseException], bool]
|
||||
|
||||
class BaseExceptionGroup(BaseException):
|
||||
def __new__(cls, __message: str, __exceptions: Sequence[BaseException]) -> BaseExceptionGroup | ExceptionGroup: ...
|
||||
@property
|
||||
@@ -1688,6 +1707,7 @@ if sys.version_info >= (3, 11):
|
||||
def subgroup(self: Self, __condition: _SplitCondition) -> Self | None: ...
|
||||
def split(self: Self, __condition: _SplitCondition) -> tuple[Self | None, Self | None]: ...
|
||||
def derive(self: Self, __excs: Sequence[BaseException]) -> Self: ...
|
||||
|
||||
class ExceptionGroup(BaseExceptionGroup, Exception):
|
||||
def __new__(cls, __message: str, __exceptions: Sequence[Exception]) -> ExceptionGroup: ...
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user