mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add type-hints for _vformat in string.Formatter (#9228)
This commit is contained in:
@@ -64,11 +64,20 @@ class Formatter:
|
||||
) -> LiteralString: ...
|
||||
@overload
|
||||
def vformat(self, format_string: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> str: ...
|
||||
def _vformat( # undocumented
|
||||
self,
|
||||
format_string: str,
|
||||
args: Sequence[Any],
|
||||
kwargs: Mapping[str, Any],
|
||||
used_args: set[int | str],
|
||||
recursion_depth: int,
|
||||
auto_arg_index: int = ...,
|
||||
) -> tuple[str, int]: ...
|
||||
def parse(
|
||||
self, format_string: StrOrLiteralStr
|
||||
) -> Iterable[tuple[StrOrLiteralStr, StrOrLiteralStr | None, StrOrLiteralStr | None, StrOrLiteralStr | None]]: ...
|
||||
def get_field(self, field_name: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
|
||||
def get_value(self, key: int | str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
|
||||
def check_unused_args(self, used_args: Sequence[int | str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ...
|
||||
def check_unused_args(self, used_args: set[int | str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ...
|
||||
def format_field(self, value: Any, format_spec: str) -> Any: ...
|
||||
def convert_field(self, value: Any, conversion: str) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user