massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / string.pyi
1 # Stubs for string\r
2 \r
3 # Based on http://docs.python.org/3.2/library/string.html\r
4 \r
5 from typing import Mapping, Sequence, Any, Optional, Union, List, Tuple, Iterable\r
6 \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
16 \r
17 def capwords(s: str, sep: str = ...) -> str: ...\r
18 \r
19 class Template:\r
20     template = ...  # type: str\r
21 \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
26 \r
27 # TODO(MichalPokorny): This is probably badly and/or loosely typed.\r
28 class Formatter:\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
37         raise IndexError()\r
38         raise KeyError()\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