Flake8 fixes (#2549)

* Fix over-indented continuation lines

* Fix under-indented continuation lines

* Fix whitespace around default operator problems

* Limit line lengths

* Fix inconsistent files
This commit is contained in:
Sebastian Rittau
2018-10-24 16:20:53 +02:00
committed by Jelle Zijlstra
parent f362cf47fa
commit 006a79220f
83 changed files with 567 additions and 547 deletions

View File

@@ -22,7 +22,7 @@ def dataclass(_cls: Type[_T]) -> Type[_T]: ...
@overload
def dataclass(*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ...,
unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ...
unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ...
class Field(Generic[_T]):
@@ -41,18 +41,18 @@ class Field(Generic[_T]):
# to understand the magic that happens at runtime.
@overload # `default` and `default_factory` are optional and mutually exclusive.
def field(*, default: _T,
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
@overload
def field(*, default_factory: Callable[[], _T],
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
@overload
def field(*,
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
metadata: Optional[Mapping[str, Any]] = ...) -> Any: ...
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
metadata: Optional[Mapping[str, Any]] = ...) -> Any: ...
def fields(class_or_instance: Any) -> Tuple[Field[Any], ...]: ...
@@ -64,7 +64,8 @@ class FrozenInstanceError(AttributeError): ...
class InitVar(Generic[_T]): ...
def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *,
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ..., frozen: bool = ...): ...
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ...,
frozen: bool = ...): ...
def replace(obj: _T, **changes: Any) -> _T: ...