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

@@ -19,7 +19,7 @@ BooleanType = bool
ComplexType = complex
StringType = str
UnicodeType = unicode
StringTypes = ... # type: Tuple[Type[StringType], Type[UnicodeType]]
StringTypes: Tuple[Type[StringType], Type[UnicodeType]]
BufferType = buffer
TupleType = tuple
ListType = list
@@ -27,16 +27,16 @@ DictType = dict
DictionaryType = dict
class _Cell:
cell_contents = ... # type: Any
cell_contents: Any
class FunctionType:
func_closure = ... # type: Optional[Tuple[_Cell, ...]]
func_code = ... # type: CodeType
func_defaults = ... # type: Optional[Tuple[Any, ...]]
func_dict = ... # type: Dict[str, Any]
func_doc = ... # type: Optional[str]
func_globals = ... # type: Dict[str, Any]
func_name = ... # type: str
func_closure: Optional[Tuple[_Cell, ...]] = ...
func_code: CodeType = ...
func_defaults: Optional[Tuple[Any, ...]] = ...
func_dict: Dict[str, Any] = ...
func_doc: Optional[str] = ...
func_globals: Dict[str, Any] = ...
func_name: str = ...
__closure__ = func_closure
__code__ = func_code
__defaults__ = func_defaults
@@ -49,25 +49,25 @@ class FunctionType:
LambdaType = FunctionType
class CodeType:
co_argcount = ... # type: int
co_cellvars = ... # type: Tuple[str, ...]
co_code = ... # type: str
co_consts = ... # type: Tuple[Any, ...]
co_filename = ... # type: str
co_firstlineno = ... # type: int
co_flags = ... # type: int
co_freevars = ... # type: Tuple[str, ...]
co_lnotab = ... # type: str
co_name = ... # type: str
co_names = ... # type: Tuple[str, ...]
co_nlocals = ... # type: int
co_stacksize = ... # type: int
co_varnames = ... # type: Tuple[str, ...]
co_argcount: int
co_cellvars: Tuple[str, ...]
co_code: str
co_consts: Tuple[Any, ...]
co_filename: str
co_firstlineno: int
co_flags: int
co_freevars: Tuple[str, ...]
co_lnotab: str
co_name: str
co_names: Tuple[str, ...]
co_nlocals: int
co_stacksize: int
co_varnames: Tuple[str, ...]
class GeneratorType:
gi_code = ... # type: CodeType
gi_frame = ... # type: FrameType
gi_running = ... # type: int
gi_code: CodeType
gi_frame: FrameType
gi_running: int
def __iter__(self) -> GeneratorType: ...
def close(self) -> None: ...
def next(self) -> Any: ...
@@ -79,10 +79,10 @@ class GeneratorType:
class ClassType: ...
class UnboundMethodType:
im_class = ... # type: type
im_func = ... # type: FunctionType
im_self = ... # type: object
__name__ = ... # type: str
im_class: type = ...
im_func: FunctionType = ...
im_self: object = ...
__name__: str
__func__ = im_func
__self__ = im_self
def __init__(self, func: Callable, obj: object) -> None: ...
@@ -93,40 +93,40 @@ class InstanceType(object): ...
MethodType = UnboundMethodType
class BuiltinFunctionType:
__self__ = ... # type: Optional[object]
__self__: Optional[object]
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
BuiltinMethodType = BuiltinFunctionType
class ModuleType:
__doc__ = ... # type: Optional[str]
__file__ = ... # type: Optional[str]
__name__ = ... # type: str
__package__ = ... # type: Optional[str]
__path__ = ... # type: Optional[Iterable[str]]
__dict__ = ... # type: Dict[str, Any]
__doc__: Optional[str]
__file__: Optional[str]
__name__: str
__package__: Optional[str]
__path__: Optional[Iterable[str]]
__dict__: Dict[str, Any]
def __init__(self, name: str, doc: Optional[str] = ...) -> None: ...
FileType = file
XRangeType = xrange
class TracebackType:
tb_frame = ... # type: FrameType
tb_lasti = ... # type: int
tb_lineno = ... # type: int
tb_next = ... # type: TracebackType
tb_frame: FrameType
tb_lasti: int
tb_lineno: int
tb_next: TracebackType
class FrameType:
f_back = ... # type: FrameType
f_builtins = ... # type: Dict[str, Any]
f_code = ... # type: CodeType
f_exc_type = ... # type: None
f_exc_value = ... # type: None
f_exc_traceback = ... # type: None
f_globals = ... # type: Dict[str, Any]
f_lasti = ... # type: int
f_lineno = ... # type: int
f_locals = ... # type: Dict[str, Any]
f_restricted = ... # type: bool
f_trace = ... # type: Callable[[], None]
f_back: FrameType
f_builtins: Dict[str, Any]
f_code: CodeType
f_exc_type: None
f_exc_value: None
f_exc_traceback: None
f_globals: Dict[str, Any]
f_lasti: int
f_lineno: int
f_locals: Dict[str, Any]
f_restricted: bool
f_trace: Callable[[], None]
def clear(self) -> None: ...
@@ -153,15 +153,15 @@ class DictProxyType:
class NotImplementedType: ...
class GetSetDescriptorType:
__name__ = ... # type: str
__objclass__ = ... # type: type
__name__: str
__objclass__: type
def __get__(self, obj: Any, type: type = ...) -> Any: ...
def __set__(self, obj: Any) -> None: ...
def __delete__(self, obj: Any) -> None: ...
# Same type on Jython, different on CPython and PyPy, unknown on IronPython.
class MemberDescriptorType:
__name__ = ... # type: str
__objclass__ = ... # type: type
__name__: str
__objclass__: type
def __get__(self, obj: Any, type: type = ...) -> Any: ...
def __set__(self, obj: Any) -> None: ...
def __delete__(self, obj: Any) -> None: ...