mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
py39: add PEP 616 methods (#4090)
This commit is contained in:
@@ -473,6 +473,9 @@ class str(Sequence[str], _str_base):
|
||||
@overload
|
||||
def partition(self, __sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
|
||||
def replace(self, __old: AnyStr, __new: AnyStr, __count: int = ...) -> AnyStr: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self, __prefix: str) -> str: ...
|
||||
def removesuffix(self, __suffix: str) -> str: ...
|
||||
def rfind(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rindex(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, __width: int, __fillchar: str = ...) -> str: ...
|
||||
@@ -595,6 +598,9 @@ if sys.version_info >= (3,):
|
||||
def lstrip(self, __bytes: Optional[bytes] = ...) -> bytes: ...
|
||||
def partition(self, __sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
|
||||
def replace(self, __old: bytes, __new: bytes, __count: int = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self, __prefix: bytes) -> bytes: ...
|
||||
def removesuffix(self, __suffix: bytes) -> bytes: ...
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, __width: int, __fillchar: bytes = ...) -> bytes: ...
|
||||
@@ -708,6 +714,9 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def lower(self) -> bytearray: ...
|
||||
def lstrip(self, __bytes: Optional[bytes] = ...) -> bytearray: ...
|
||||
def partition(self, __sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
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: int = ...) -> bytearray: ...
|
||||
if sys.version_info >= (3,):
|
||||
def rfind(self, __sub: Union[bytes, int], __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
|
||||
@@ -473,6 +473,9 @@ class str(Sequence[str], _str_base):
|
||||
@overload
|
||||
def partition(self, __sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
|
||||
def replace(self, __old: AnyStr, __new: AnyStr, __count: int = ...) -> AnyStr: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self, __prefix: str) -> str: ...
|
||||
def removesuffix(self, __suffix: str) -> str: ...
|
||||
def rfind(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rindex(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, __width: int, __fillchar: str = ...) -> str: ...
|
||||
@@ -595,6 +598,9 @@ if sys.version_info >= (3,):
|
||||
def lstrip(self, __bytes: Optional[bytes] = ...) -> bytes: ...
|
||||
def partition(self, __sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
|
||||
def replace(self, __old: bytes, __new: bytes, __count: int = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self, __prefix: bytes) -> bytes: ...
|
||||
def removesuffix(self, __suffix: bytes) -> bytes: ...
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, __width: int, __fillchar: bytes = ...) -> bytes: ...
|
||||
@@ -708,6 +714,9 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def lower(self) -> bytearray: ...
|
||||
def lstrip(self, __bytes: Optional[bytes] = ...) -> bytearray: ...
|
||||
def partition(self, __sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
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: int = ...) -> bytearray: ...
|
||||
if sys.version_info >= (3,):
|
||||
def rfind(self, __sub: Union[bytes, int], __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
|
||||
@@ -169,6 +169,9 @@ class UserString(Sequence[str]):
|
||||
@overload
|
||||
def maketrans(x: str, y: str, z: str = ...) -> Dict[int, Union[int, None]]: ...
|
||||
def partition(self, sep: str) -> Tuple[str, str, str]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def removeprefix(self: _UserStringT, __prefix: Union[str, UserString]) -> _UserStringT: ...
|
||||
def removesuffix(self: _UserStringT, __suffix: Union[str, UserString]) -> _UserStringT: ...
|
||||
def replace(self: _UserStringT, old: Union[str, UserString], new: Union[str, UserString], maxsplit: int = ...) -> _UserStringT: ...
|
||||
def rfind(self, sub: Union[str, UserString], start: int = ..., end: int = ...) -> int: ...
|
||||
def rindex(self, sub: Union[str, UserString], start: int = ..., end: int = ...) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user