massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2 / ConfigParser.pyi
1 from typing import Any, IO, Sequence, Tuple, Union, List, Dict\r
2 \r
3 DEFAULTSECT = ...  # type: str\r
4 MAX_INTERPOLATION_DEPTH = ...  # type: int\r
5 \r
6 class Error(Exception):\r
7     message = ...  # type: Any\r
8     def __init__(self, msg: str = ...) -> None: ...\r
9     def _get_message(self) -> None: ...\r
10     def _set_message(self, value: str) -> None: ...\r
11     def __repr__(self) -> str: ...\r
12     def __str__(self) -> str: ...\r
13 \r
14 class NoSectionError(Error):\r
15     section = ...  # type: str\r
16     def __init__(self, section: str) -> None: ...\r
17 \r
18 class DuplicateSectionError(Error):\r
19     section = ...  # type: str\r
20     def __init__(self, section: str) -> None: ...\r
21 \r
22 class NoOptionError(Error):\r
23     section = ...  # type: str\r
24     option = ...  # type: str\r
25     def __init__(self, option: str, section: str) -> None: ...\r
26 \r
27 class InterpolationError(Error):\r
28     section = ...  # type: str\r
29     option = ...  # type: str\r
30     msg = ...  # type: str\r
31     def __init__(self, option: str, section: str, msg: str) -> None: ...\r
32 \r
33 class InterpolationMissingOptionError(InterpolationError):\r
34     reference = ...  # type: str\r
35     def __init__(self, option: str, section: str, rawval: str, reference: str) -> None: ...\r
36 \r
37 class InterpolationSyntaxError(InterpolationError): ...\r
38 \r
39 class InterpolationDepthError(InterpolationError):\r
40     def __init__(self, option: str, section: str, rawval: str) -> None: ...\r
41 \r
42 class ParsingError(Error):\r
43     filename = ...  # type: str\r
44     errors = ...  # type: List[Tuple[Any, Any]]\r
45     def __init__(self, filename: str) -> None: ...\r
46     def append(self, lineno: Any, line: Any) -> None: ...\r
47 \r
48 class MissingSectionHeaderError(ParsingError):\r
49     lineno = ...  # type: Any\r
50     line = ...  # type: Any\r
51     def __init__(self, filename: str, lineno: Any, line: Any) -> None: ...\r
52 \r
53 \r
54 class RawConfigParser:\r
55     _dict = ...  # type: Any\r
56     _sections = ...  # type: dict\r
57     _defaults = ...  # type: dict\r
58     _optcre = ...  # type: Any\r
59     SECTCRE = ...  # type: Any\r
60     OPTCRE = ...  # type: Any\r
61     OPTCRE_NV = ...  # type: Any\r
62     def __init__(self, defaults: Dict[Any, Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ...\r
63     def defaults(self) -> Dict[Any, Any]: ...\r
64     def sections(self) -> List[str]: ...\r
65     def add_section(self, section: str) -> None: ...\r
66     def has_section(self, section: str) -> bool: ...\r
67     def options(self, section: str) -> List[str]: ...\r
68     def read(self, filenames: Union[str, Sequence[str]]) -> List[str]: ...\r
69     def readfp(self, fp: IO[str], filename: str = ...) -> None: ...\r
70     def get(self, section: str, option: str) -> str: ...\r
71     def items(self, section: str) -> List[Tuple[Any, Any]]: ...\r
72     def _get(self, section: str, conv: type, option: str) -> Any: ...\r
73     def getint(self, section: str, option: str) -> int: ...\r
74     def getfloat(self, section: str, option: str) -> float: ...\r
75     _boolean_states = ...  # type: Dict[str, bool]\r
76     def getboolean(self, section: str, option: str) -> bool: ...\r
77     def optionxform(self, optionstr: str) -> str: ...\r
78     def has_option(self, section: str, option: str) -> bool: ...\r
79     def set(self, section: str, option: str, value: Any = ...) -> None: ...\r
80     def write(self, fp: IO[str]) -> None: ...\r
81     def remove_option(self, section: str, option: Any) -> bool: ...\r
82     def remove_section(self, section: str) -> bool: ...\r
83     def _read(self, fp: IO[str], fpname: str) -> None: ...\r
84 \r
85 class ConfigParser(RawConfigParser):\r
86     _KEYCRE = ...  # type: Any\r
87     def get(self, section: str, option: str, raw: bool = ..., vars: dict = ...) -> Any: ...\r
88     def items(self, section: str, raw: bool = ..., vars: dict = ...) -> List[Tuple[str, Any]]: ...\r
89     def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...\r
90     def _interpolation_replace(self, match: Any) -> str: ...\r
91 \r
92 class SafeConfigParser(ConfigParser):\r
93     _interpvar_re = ...  # type: Any\r
94     def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...\r
95     def _interpolate_some(self, option: str, accum: list, rest: str, section: str, map: dict, depth: int) -> None: ...\r