mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 11:51:28 +08:00
Correct str.maketrans and collections.UserString.maketrans (#9611)
This commit is contained in:
@@ -551,7 +551,10 @@ class str(Sequence[str]):
|
||||
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 | None = ...) -> dict[int, int | None]: ...
|
||||
def maketrans(__x: str, __y: str) -> dict[int, int]: ...
|
||||
@staticmethod
|
||||
@overload
|
||||
def maketrans(__x: str, __y: str, __z: str) -> dict[int, int | None]: ...
|
||||
@overload
|
||||
def __add__(self: LiteralString, __s: LiteralString) -> LiteralString: ...
|
||||
@overload
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user