diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index a4ed1f738..044819e0f 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -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: ... diff --git a/stdlib/2and3/builtins.pyi b/stdlib/2and3/builtins.pyi index a4ed1f738..044819e0f 100644 --- a/stdlib/2and3/builtins.pyi +++ b/stdlib/2and3/builtins.pyi @@ -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: ... diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index 0771620da..17309d3ca 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -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: ...