2 from re import RegexFlag
3 from typing import Any, Iterable, Mapping, Sequence
5 if sys.version_info >= (3, 8):
8 from typing import Pattern
20 def capwords(s: str, sep: str | None = ...) -> str: ...
26 braceidpattern: str | None
29 def __init__(self, template: str) -> None: ...
30 def substitute(self, __mapping: Mapping[str, object] = ..., **kwds: object) -> str: ...
31 def safe_substitute(self, __mapping: Mapping[str, object] = ..., **kwds: object) -> str: ...
33 # TODO(MichalPokorny): This is probably badly and/or loosely typed.
35 def format(self, __format_string: str, *args: Any, **kwargs: Any) -> str: ...
36 def vformat(self, format_string: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> str: ...
37 def parse(self, format_string: str) -> Iterable[tuple[str, str | None, str | None, str | None]]: ...
38 def get_field(self, field_name: str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
39 def get_value(self, key: int | str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
40 def check_unused_args(self, used_args: Sequence[int | str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ...
41 def format_field(self, value: Any, format_spec: str) -> Any: ...
42 def convert_field(self, value: Any, conversion: str) -> Any: ...