apply black and isort (#4287)

* apply black and isort

* move some type ignores
This commit is contained in:
Jelle Zijlstra
2020-06-28 13:31:00 -07:00
committed by GitHub
parent fe58699ca5
commit 5d553c9584
800 changed files with 13875 additions and 10332 deletions

View File

@@ -1,14 +1,12 @@
# Stubs for types
# Note, all classes "defined" here require special handling.
from typing import (
Any, Callable, Dict, Iterable, Iterator, List, Optional,
Tuple, Type, TypeVar, Union, overload,
)
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Type, TypeVar, Union, overload
_T = TypeVar('_T')
_T = TypeVar("_T")
class NoneType: ...
TypeType = type
ObjectType = object
@@ -43,7 +41,14 @@ class FunctionType:
__dict__ = func_dict
__globals__ = func_globals
__name__ = func_name
def __init__(self, code: CodeType, globals: Dict[str, Any], name: Optional[str] = ..., argdefs: Optional[Tuple[object, ...]] = ..., closure: Optional[Tuple[_Cell, ...]] = ...) -> None: ...
def __init__(
self,
code: CodeType,
globals: Dict[str, Any],
name: Optional[str] = ...,
argdefs: Optional[Tuple[object, ...]] = ...,
closure: Optional[Tuple[_Cell, ...]] = ...,
) -> None: ...
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
def __get__(self, obj: Optional[object], type: Optional[type]) -> UnboundMethodType: ...
@@ -91,13 +96,14 @@ class GeneratorType:
def next(self) -> Any: ...
def send(self, __arg: Any) -> Any: ...
@overload
def throw(self, __typ: Type[BaseException], __val: Union[BaseException, object] = ...,
__tb: Optional[TracebackType] = ...) -> Any: ...
def throw(
self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ...
) -> Any: ...
@overload
def throw(self, __typ: BaseException, __val: None = ...,
__tb: Optional[TracebackType] = ...) -> Any: ...
def throw(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> Any: ...
class ClassType: ...
class UnboundMethodType:
im_class: type = ...
im_func: FunctionType = ...
@@ -115,6 +121,7 @@ MethodType = UnboundMethodType
class BuiltinFunctionType:
__self__: Optional[object]
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
BuiltinMethodType = BuiltinFunctionType
class ModuleType:
@@ -125,6 +132,7 @@ class ModuleType:
__path__: Optional[Iterable[str]]
__dict__: Dict[str, Any]
def __init__(self, name: str, doc: Optional[str] = ...) -> None: ...
FileType = file
XRangeType = xrange
@@ -147,10 +155,10 @@ class FrameType:
f_locals: Dict[str, Any]
f_restricted: bool
f_trace: Callable[[], None]
def clear(self) -> None: ...
SliceType = slice
class EllipsisType: ...
class DictProxyType:
@@ -178,6 +186,7 @@ class GetSetDescriptorType:
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__: str