mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
builtins: updates for py313 (#12028)
This commit is contained in:
@@ -461,7 +461,7 @@ class str(Sequence[str]):
|
||||
def format(self: LiteralString, *args: LiteralString, **kwargs: LiteralString) -> LiteralString: ...
|
||||
@overload
|
||||
def format(self, *args: object, **kwargs: object) -> str: ...
|
||||
def format_map(self, map: _FormatMapMapping) -> str: ...
|
||||
def format_map(self, mapping: _FormatMapMapping, /) -> str: ...
|
||||
def index(self, sub: str, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /) -> int: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
@@ -495,10 +495,20 @@ class str(Sequence[str]):
|
||||
def partition(self: LiteralString, sep: LiteralString, /) -> tuple[LiteralString, LiteralString, LiteralString]: ...
|
||||
@overload
|
||||
def partition(self, sep: str, /) -> tuple[str, str, str]: ... # type: ignore[misc]
|
||||
@overload
|
||||
def replace(self: LiteralString, old: LiteralString, new: LiteralString, count: SupportsIndex = -1, /) -> LiteralString: ...
|
||||
@overload
|
||||
def replace(self, old: str, new: str, count: SupportsIndex = -1, /) -> str: ... # type: ignore[misc]
|
||||
if sys.version_info >= (3, 13):
|
||||
@overload
|
||||
def replace(
|
||||
self: LiteralString, old: LiteralString, new: LiteralString, /, count: SupportsIndex = -1
|
||||
) -> LiteralString: ...
|
||||
@overload
|
||||
def replace(self, old: str, new: str, /, count: SupportsIndex = -1) -> str: ... # type: ignore[misc]
|
||||
else:
|
||||
@overload
|
||||
def replace(
|
||||
self: LiteralString, old: LiteralString, new: LiteralString, count: SupportsIndex = -1, /
|
||||
) -> LiteralString: ...
|
||||
@overload
|
||||
def replace(self, old: str, new: str, count: SupportsIndex = -1, /) -> str: ... # type: ignore[misc]
|
||||
if sys.version_info >= (3, 9):
|
||||
@overload
|
||||
def removeprefix(self: LiteralString, prefix: LiteralString, /) -> LiteralString: ...
|
||||
@@ -1214,6 +1224,9 @@ class property:
|
||||
fset: Callable[[Any, Any], None] | None
|
||||
fdel: Callable[[Any], None] | None
|
||||
__isabstractmethod__: bool
|
||||
if sys.version_info >= (3, 13):
|
||||
__name__: str
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
fget: Callable[[Any], Any] | None = ...,
|
||||
@@ -2057,3 +2070,7 @@ if sys.version_info >= (3, 11):
|
||||
def split(
|
||||
self, condition: Callable[[_ExceptionT_co | Self], bool], /
|
||||
) -> tuple[ExceptionGroup[_ExceptionT_co] | None, ExceptionGroup[_ExceptionT_co] | None]: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
class IncompleteInputError(SyntaxError): ...
|
||||
class PythonFinalizationError(RuntimeError): ...
|
||||
|
||||
Reference in New Issue
Block a user