3 # Based on http://docs.python.org/3.2/library/string.html
\r
5 from typing import Mapping, Sequence, Any, Optional, Union, List, Tuple, Iterable
\r
7 ascii_letters = ... # type: str
\r
8 ascii_lowercase = ... # type: str
\r
9 ascii_uppercase = ... # type: str
\r
10 digits = ... # type: str
\r
11 hexdigits = ... # type: str
\r
12 octdigits = ... # type: str
\r
13 punctuation = ... # type: str
\r
14 printable = ... # type: str
\r
15 whitespace = ... # type: str
\r
17 def capwords(s: str, sep: str = ...) -> str: ...
\r
20 template = ... # type: str
\r
22 def __init__(self, template: str) -> None: ...
\r
23 def substitute(self, mapping: Mapping[str, str] = ..., **kwds: str) -> str: ...
\r
24 def safe_substitute(self, mapping: Mapping[str, str] = ...,
\r
25 **kwds: str) -> str: ...
\r
27 # TODO(MichalPokorny): This is probably badly and/or loosely typed.
\r
29 def format(self, format_string: str, *args: Any, **kwargs: Any) -> str: ...
\r
30 def vformat(self, format_string: str, args: Sequence[Any],
\r
31 kwargs: Mapping[str, Any]) -> str: ...
\r
32 def parse(self, format_string: str) -> Iterable[Tuple[str, Optional[str], Optional[str], Optional[str]]]: ...
\r
33 def get_field(self, field_name: str, args: Sequence[Any],
\r
34 kwargs: Mapping[str, Any]) -> Any: ...
\r
35 def get_value(self, key: Union[int, str], args: Sequence[Any],
\r
36 kwargs: Mapping[str, Any]) -> Any:
\r
39 def check_unused_args(self, used_args: Sequence[Union[int, str]], args: Sequence[Any],
\r
40 kwargs: Mapping[str, Any]) -> None: ...
\r
41 def format_field(self, value: Any, format_spec: str) -> Any: ...
\r
42 def convert_field(self, value: Any, conversion: str) -> Any: ...
\r