Fix a few issues with parameter defaults (#9572)

This commit is contained in:
Alex Waygood
2023-01-20 17:47:59 +00:00
committed by GitHub
parent 7e40d70cad
commit d98d1674e7
10 changed files with 37 additions and 30 deletions

View File

@@ -163,18 +163,18 @@ class UserString(Sequence[UserString]):
def capitalize(self: Self) -> Self: ...
def casefold(self: Self) -> Self: ...
def center(self: Self, width: int, *args: Any) -> Self: ...
def count(self, sub: str | UserString, start: int = 0, end: int = 9223372036854775807) -> int: ...
def count(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ...
if sys.version_info >= (3, 8):
def encode(self: UserString, encoding: str | None = "utf-8", errors: str | None = "strict") -> bytes: ...
else:
def encode(self: Self, encoding: str | None = ..., errors: str | None = ...) -> Self: ...
def endswith(self, suffix: str | tuple[str, ...], start: int | None = 0, end: int | None = 9223372036854775807) -> bool: ...
def endswith(self, suffix: str | tuple[str, ...], start: int | None = 0, end: int | None = ...) -> bool: ...
def expandtabs(self: Self, tabsize: int = 8) -> Self: ...
def find(self, sub: str | UserString, start: int = 0, end: int = 9223372036854775807) -> int: ...
def find(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ...
def format(self, *args: Any, **kwds: Any) -> str: ...
def format_map(self, mapping: Mapping[str, Any]) -> str: ...
def index(self, sub: str, start: int = 0, end: int = 9223372036854775807) -> int: ...
def index(self, sub: str, start: int = 0, end: int = ...) -> int: ...
def isalpha(self) -> bool: ...
def isalnum(self) -> bool: ...
def isdecimal(self) -> bool: ...
@@ -203,15 +203,15 @@ class UserString(Sequence[UserString]):
def removesuffix(self: Self, __suffix: str | UserString) -> Self: ...
def replace(self: Self, old: str | UserString, new: str | UserString, maxsplit: int = -1) -> Self: ...
def rfind(self, sub: str | UserString, start: int = 0, end: int = 9223372036854775807) -> int: ...
def rindex(self, sub: str | UserString, start: int = 0, end: int = 9223372036854775807) -> int: ...
def rfind(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ...
def rindex(self, sub: str | UserString, start: int = 0, end: int = ...) -> int: ...
def rjust(self: Self, width: int, *args: Any) -> Self: ...
def rpartition(self, sep: str) -> tuple[str, str, str]: ...
def rstrip(self: Self, chars: str | None = None) -> Self: ...
def split(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ...
def rsplit(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ...
def splitlines(self, keepends: bool = False) -> list[str]: ...
def startswith(self, prefix: str | tuple[str, ...], start: int | None = 0, end: int | None = 9223372036854775807) -> bool: ...
def startswith(self, prefix: str | tuple[str, ...], start: int | None = 0, end: int | None = ...) -> bool: ...
def strip(self: Self, chars: str | None = None) -> Self: ...
def swapcase(self: Self) -> Self: ...
def title(self: Self) -> Self: ...