Use variable annotations everywhere (#2909)

This commit is contained in:
Michael Lee
2019-04-13 01:40:52 -07:00
committed by Sebastian Rittau
parent b3c76aab49
commit efb67946f8
458 changed files with 9135 additions and 9135 deletions

View File

@@ -1,10 +1,10 @@
from typing import Any, IO, Sequence, Tuple, Union, List, Dict, Protocol, Optional
DEFAULTSECT = ... # type: str
MAX_INTERPOLATION_DEPTH = ... # type: int
DEFAULTSECT: str
MAX_INTERPOLATION_DEPTH: int
class Error(Exception):
message = ... # type: Any
message: Any
def __init__(self, msg: str = ...) -> None: ...
def _get_message(self) -> None: ...
def _set_message(self, value: str) -> None: ...
@@ -12,26 +12,26 @@ class Error(Exception):
def __str__(self) -> str: ...
class NoSectionError(Error):
section = ... # type: str
section: str
def __init__(self, section: str) -> None: ...
class DuplicateSectionError(Error):
section = ... # type: str
section: str
def __init__(self, section: str) -> None: ...
class NoOptionError(Error):
section = ... # type: str
option = ... # type: str
section: str
option: str
def __init__(self, option: str, section: str) -> None: ...
class InterpolationError(Error):
section = ... # type: str
option = ... # type: str
msg = ... # type: str
section: str
option: str
msg: str
def __init__(self, option: str, section: str, msg: str) -> None: ...
class InterpolationMissingOptionError(InterpolationError):
reference = ... # type: str
reference: str
def __init__(self, option: str, section: str, rawval: str, reference: str) -> None: ...
class InterpolationSyntaxError(InterpolationError): ...
@@ -40,27 +40,27 @@ class InterpolationDepthError(InterpolationError):
def __init__(self, option: str, section: str, rawval: str) -> None: ...
class ParsingError(Error):
filename = ... # type: str
errors = ... # type: List[Tuple[Any, Any]]
filename: str
errors: List[Tuple[Any, Any]]
def __init__(self, filename: str) -> None: ...
def append(self, lineno: Any, line: Any) -> None: ...
class MissingSectionHeaderError(ParsingError):
lineno = ... # type: Any
line = ... # type: Any
lineno: Any
line: Any
def __init__(self, filename: str, lineno: Any, line: Any) -> None: ...
class _Readable(Protocol):
def readline(self) -> str: ...
class RawConfigParser:
_dict = ... # type: Any
_sections = ... # type: dict
_defaults = ... # type: dict
_optcre = ... # type: Any
SECTCRE = ... # type: Any
OPTCRE = ... # type: Any
OPTCRE_NV = ... # type: Any
_dict: Any
_sections: dict
_defaults: dict
_optcre: Any
SECTCRE: Any
OPTCRE: Any
OPTCRE_NV: Any
def __init__(self, defaults: Dict[Any, Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ...
def defaults(self) -> Dict[Any, Any]: ...
def sections(self) -> List[str]: ...
@@ -74,7 +74,7 @@ class RawConfigParser:
def _get(self, section: str, conv: type, option: str) -> Any: ...
def getint(self, section: str, option: str) -> int: ...
def getfloat(self, section: str, option: str) -> float: ...
_boolean_states = ... # type: Dict[str, bool]
_boolean_states: Dict[str, bool]
def getboolean(self, section: str, option: str) -> bool: ...
def optionxform(self, optionstr: str) -> str: ...
def has_option(self, section: str, option: str) -> bool: ...
@@ -85,13 +85,13 @@ class RawConfigParser:
def _read(self, fp: IO[str], fpname: str) -> None: ...
class ConfigParser(RawConfigParser):
_KEYCRE = ... # type: Any
_KEYCRE: Any
def get(self, section: str, option: str, raw: bool = ..., vars: Optional[dict] = ...) -> Any: ...
def items(self, section: str, raw: bool = ..., vars: Optional[dict] = ...) -> List[Tuple[str, Any]]: ...
def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...
def _interpolation_replace(self, match: Any) -> str: ...
class SafeConfigParser(ConfigParser):
_interpvar_re = ... # type: Any
_interpvar_re: Any
def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...
def _interpolate_some(self, option: str, accum: list, rest: str, section: str, map: dict, depth: int) -> None: ...