Correct str.maketrans and collections.UserString.maketrans (#9611)

This commit is contained in:
Alex Waygood
2023-01-29 19:45:08 +00:00
committed by GitHub
parent 2ffd867f25
commit dd3aedd133
3 changed files with 5 additions and 8 deletions

View File

@@ -191,12 +191,7 @@ class UserString(Sequence[UserString]):
def ljust(self: Self, width: int, *args: Any) -> Self: ...
def lower(self: Self) -> Self: ...
def lstrip(self: Self, chars: str | None = None) -> Self: ...
@staticmethod
@overload
def maketrans(x: dict[int, _T] | dict[str, _T] | dict[str | int, _T]) -> dict[int, _T]: ...
@staticmethod
@overload
def maketrans(x: str, y: str, z: str = ...) -> dict[int, int | None]: ...
maketrans = str.maketrans
def partition(self, sep: str) -> tuple[str, str, str]: ...
if sys.version_info >= (3, 9):
def removeprefix(self: Self, __prefix: str | UserString) -> Self: ...