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

@@ -30,25 +30,25 @@ raiseExceptions: bool
def currentframe() -> FrameType: ...
if sys.version_info >= (3,):
_levelToName = ... # type: Dict[int, str]
_nameToLevel = ... # type: Dict[str, int]
_levelToName: Dict[int, str]
_nameToLevel: Dict[str, int]
else:
_levelNames = ... # type: dict
_levelNames: dict
class Filterer(object):
filters = ... # type: List[Filter]
filters: List[Filter]
def __init__(self) -> None: ...
def addFilter(self, filter: Filter) -> None: ...
def removeFilter(self, filter: Filter) -> None: ...
def filter(self, record: LogRecord) -> bool: ...
class Logger(Filterer):
name = ... # type: str
level = ... # type: int
parent = ... # type: Union[Logger, PlaceHolder]
propagate = ... # type: bool
handlers = ... # type: List[Handler]
disabled = ... # type: int
name: str
level: int
parent: Union[Logger, PlaceHolder]
propagate: bool
handlers: List[Handler]
disabled: int
def __init__(self, name: str, level: _Level = ...) -> None: ...
def setLevel(self, level: Union[int, str]) -> None: ...
def isEnabledFor(self, lvl: int) -> bool: ...
@@ -165,13 +165,13 @@ class Handler(Filterer):
class Formatter:
converter = ... # type: Callable[[Optional[float]], struct_time]
_fmt = ... # type: Optional[str]
datefmt = ... # type: Optional[str]
converter: Callable[[Optional[float]], struct_time]
_fmt: Optional[str]
datefmt: Optional[str]
if sys.version_info >= (3,):
_style = ... # type: PercentStyle
default_time_format = ... # type: str
default_msec_format = ... # type: str
_style: PercentStyle
default_time_format: str
default_msec_format: str
if sys.version_info >= (3,):
def __init__(self, fmt: Optional[str] = ...,
@@ -196,29 +196,29 @@ class Filter:
class LogRecord:
args = ... # type: _ArgsType
asctime = ... # type: str
created = ... # type: int
exc_info = ... # type: Optional[_SysExcInfoType]
exc_text = ... # type: Optional[str]
filename = ... # type: str
funcName = ... # type: str
levelname = ... # type: str
levelno = ... # type: int
lineno = ... # type: int
module = ... # type: str
msecs = ... # type: int
message = ... # type: str
msg = ... # type: str
name = ... # type: str
pathname = ... # type: str
process = ... # type: int
processName = ... # type: str
relativeCreated = ... # type: int
args: _ArgsType
asctime: str
created: int
exc_info: Optional[_SysExcInfoType]
exc_text: Optional[str]
filename: str
funcName: str
levelname: str
levelno: int
lineno: int
module: str
msecs: int
message: str
msg: str
name: str
pathname: str
process: int
processName: str
relativeCreated: int
if sys.version_info >= (3,):
stack_info = ... # type: Optional[str]
thread = ... # type: int
threadName = ... # type: str
stack_info: Optional[str]
thread: int
threadName: str
if sys.version_info >= (3,):
def __init__(self, name: str, level: int, pathname: str, lineno: int,
msg: Any, args: _ArgsType,
@@ -376,21 +376,21 @@ if sys.version_info >= (3,):
if sys.version_info >= (3,):
lastResort = ... # type: Optional[StreamHandler]
lastResort: Optional[StreamHandler]
class StreamHandler(Handler):
stream = ... # type: IO[str]
stream: IO[str]
if sys.version_info >= (3,):
terminator = ... # type: str
terminator: str
def __init__(self, stream: Optional[IO[str]] = ...) -> None: ...
class FileHandler(Handler):
baseFilename = ... # type: str
mode = ... # type: str
encoding = ... # type: Optional[str]
delay = ... # type: bool
baseFilename: str
mode: str
encoding: Optional[str]
delay: bool
def __init__(self, filename: _Path, mode: str = ...,
encoding: Optional[str] = ..., delay: bool = ...) -> None: ...
@@ -407,15 +407,15 @@ class PlaceHolder:
class RootLogger(Logger): ...
root = ... # type: RootLogger
root: RootLogger
if sys.version_info >= (3,):
class PercentStyle(object):
default_format = ... # type: str
asctime_format = ... # type: str
asctime_search = ... # type: str
_fmt = ... # type: str
default_format: str
asctime_format: str
asctime_search: str
_fmt: str
def __init__(self, fmt: str) -> None: ...
def usesTime(self) -> bool: ...
@@ -425,9 +425,9 @@ if sys.version_info >= (3,):
...
class StringTemplateStyle(PercentStyle):
_tpl = ... # type: Template
_tpl: Template
_STYLES = ... # type: Dict[str, Tuple[PercentStyle, str]]
_STYLES: Dict[str, Tuple[PercentStyle, str]]
BASIC_FORMAT = ... # type: str
BASIC_FORMAT: str

View File

@@ -41,9 +41,9 @@ class WatchedFileHandler(Handler):
if sys.version_info >= (3,):
class BaseRotatingHandler(FileHandler):
terminator = ... # type: str
namer = ... # type: Optional[Callable[[str], str]]
rotator = ... # type: Optional[Callable[[str, str], None]]
terminator: str
namer: Optional[Callable[[str], str]]
rotator: Optional[Callable[[str, str], None]]
def __init__(self, filename: _Path, mode: str,
encoding: Optional[str] = ...,
delay: bool = ...) -> None: ...
@@ -89,9 +89,9 @@ else:
class SocketHandler(Handler):
retryStart = ... # type: float
retryFactor = ... # type: float
retryMax = ... # type: float
retryStart: float
retryFactor: float
retryMax: float
if sys.version_info >= (3, 4):
def __init__(self, host: str, port: Optional[int]) -> None: ...
else:
@@ -106,34 +106,34 @@ class DatagramHandler(SocketHandler): ...
class SysLogHandler(Handler):
LOG_ALERT = ... # type: int
LOG_CRIT = ... # type: int
LOG_DEBUG = ... # type: int
LOG_EMERG = ... # type: int
LOG_ERR = ... # type: int
LOG_INFO = ... # type: int
LOG_NOTICE = ... # type: int
LOG_WARNING = ... # type: int
LOG_AUTH = ... # type: int
LOG_AUTHPRIV = ... # type: int
LOG_CRON = ... # type: int
LOG_DAEMON = ... # type: int
LOG_FTP = ... # type: int
LOG_KERN = ... # type: int
LOG_LPR = ... # type: int
LOG_MAIL = ... # type: int
LOG_NEWS = ... # type: int
LOG_SYSLOG = ... # type: int
LOG_USER = ... # type: int
LOG_UUCP = ... # type: int
LOG_LOCAL0 = ... # type: int
LOG_LOCAL1 = ... # type: int
LOG_LOCAL2 = ... # type: int
LOG_LOCAL3 = ... # type: int
LOG_LOCAL4 = ... # type: int
LOG_LOCAL5 = ... # type: int
LOG_LOCAL6 = ... # type: int
LOG_LOCAL7 = ... # type: int
LOG_ALERT: int
LOG_CRIT: int
LOG_DEBUG: int
LOG_EMERG: int
LOG_ERR: int
LOG_INFO: int
LOG_NOTICE: int
LOG_WARNING: int
LOG_AUTH: int
LOG_AUTHPRIV: int
LOG_CRON: int
LOG_DAEMON: int
LOG_FTP: int
LOG_KERN: int
LOG_LPR: int
LOG_MAIL: int
LOG_NEWS: int
LOG_SYSLOG: int
LOG_USER: int
LOG_UUCP: int
LOG_LOCAL0: int
LOG_LOCAL1: int
LOG_LOCAL2: int
LOG_LOCAL3: int
LOG_LOCAL4: int
LOG_LOCAL5: int
LOG_LOCAL6: int
LOG_LOCAL7: int
def __init__(self, address: Union[Tuple[str, int], str] = ...,
facility: int = ..., socktype: _SocketKind = ...) -> None: ...
def encodePriority(self, facility: Union[int, str],