Fixing flake8 E261 errors

This commit is contained in:
Lukasz Langa
2016-12-19 22:09:35 -08:00
parent b84f20a011
commit fe0e3744cc
219 changed files with 4041 additions and 3099 deletions

View File

@@ -94,4 +94,4 @@ DefaultEventLoopPolicy = ... # type: Type[AbstractEventLoopPolicy]
# TODO: AbstractChildWatcher (UNIX only)
__all__ = ... # type: str
__all__ = ... # type: str

View File

@@ -1,6 +1,6 @@
from typing import Any, Callable, Generator, TypeVar
__all__ = ... # type: str
__all__ = ... # type: str
_F = TypeVar('_F', bound=Callable[..., Any])

View File

@@ -3,7 +3,7 @@ from abc import ABCMeta, abstractmethod
from asyncio.futures import Future
from asyncio.coroutines import coroutine
__all__ = ... # type: str
__all__ = ... # type: str
_T = TypeVar('_T')
@@ -14,7 +14,7 @@ AI_PASSIVE = 0
class Handle:
_cancelled = False
_args = ... # type: List[Any]
_args = ... # type: List[Any]
def __init__(self, callback: Callable[..., Any], args: List[Any],
loop: AbstractEventLoop) -> None: ...
def __repr__(self) -> str: ...
@@ -30,7 +30,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
@abstractmethod
def run_forever(self) -> None: ...
# Can't use a union, see mypy issue #1873.
# Can't use a union, see mypy issue #1873.
@overload
@abstractmethod
def run_until_complete(self, future: Generator[Any, Any, _T]) -> _T: ...
@@ -127,11 +127,11 @@ class AbstractEventLoop(metaclass=ABCMeta):
def remove_writer(self, fd: int) -> None: ...
# Completion based I/O methods returning Futures.
@abstractmethod
def sock_recv(self, sock: Any, nbytes: int) -> Any: ... #TODO
def sock_recv(self, sock: Any, nbytes: int) -> Any: ... #TODO
@abstractmethod
def sock_sendall(self, sock: Any, data: bytes) -> None: ... #TODO
def sock_sendall(self, sock: Any, data: bytes) -> None: ... #TODO
@abstractmethod
def sock_connect(self, sock: Any, address: str) -> Any: ... #TODO
def sock_connect(self, sock: Any, address: str) -> Any: ... #TODO
@abstractmethod
def sock_accept(self, sock: Any) -> Any: ...
# Signal handling.
@@ -163,7 +163,7 @@ class AbstractEventLoopPolicy(metaclass=ABCMeta):
@abstractmethod
def get_child_watcher(self) -> Any: ... # TODO: unix_events.AbstractChildWatcher
@abstractmethod
def set_child_watcher(self, watcher: Any) -> None: ... # TODO: unix_events.AbstractChildWatcher
def set_child_watcher(self, watcher: Any) -> None: ... # TODO: unix_events.AbstractChildWatcher
class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy):
def __init__(self) -> None: ...
@@ -179,4 +179,4 @@ def set_event_loop(loop: AbstractEventLoop) -> None: ...
def new_event_loop() -> AbstractEventLoop: ...
def get_child_watcher() -> Any: ... # TODO: unix_events.AbstractChildWatcher
def set_child_watcher(watcher: Any) -> None: ... # TODO: unix_events.AbstractChildWatcher
def set_child_watcher(watcher: Any) -> None: ... # TODO: unix_events.AbstractChildWatcher

View File

@@ -1,7 +1,7 @@
from typing import Any, Union, Callable, TypeVar, List, Generic, Iterable, Generator, Awaitable
from .events import AbstractEventLoop
__all__ = ... # type: str
__all__ = ... # type: str
_T = TypeVar('_T')
@@ -16,7 +16,7 @@ class InvalidStateError(Error): ...
class _TracebackLogger:
exc = ... # type: BaseException
tb = ... # type: List[str]
tb = ... # type: List[str]
def __init__(self, exc: Any, loop: AbstractEventLoop) -> None: ...
def activate(self) -> None: ...
def clear(self) -> None: ...
@@ -24,7 +24,7 @@ class _TracebackLogger:
class Future(Iterable[_T], Awaitable[_T], Generic[_T]):
_state = ... # type: str
_exception = ... # type: BaseException
_exception = ... # type: BaseException
_blocking = False
_log_traceback = False
_tb_logger = _TracebackLogger

View File

@@ -1,6 +1,6 @@
from typing import AnyStr
__all__ = ... # type: str
__all__ = ... # type: str
from asyncio import transports

View File

@@ -1,6 +1,6 @@
from typing import TypeVar, Generic
__all__ = ... # type: str
__all__ = ... # type: str
from asyncio.events import AbstractEventLoop
from .coroutines import coroutine

View File

@@ -8,7 +8,7 @@ from . import events
from . import protocols
from . import transports
__all__ = ... # type: str
__all__ = ... # type: str
class IncompleteReadError(EOFError):
def __init__(self, partial: str, expected: int) -> None: ...

View File

@@ -1,6 +1,6 @@
from typing import Any, AnyStr, Tuple, Union
__all__ = ... # type: str
__all__ = ... # type: str
from asyncio import events
from asyncio import protocols
@@ -9,9 +9,9 @@ from asyncio import transports
from asyncio.coroutines import coroutine
PIPE = ... # type: int
STDOUT = ... # type: int
DEVNULL = ... # type: int
PIPE = ... # type: int
STDOUT = ... # type: int
DEVNULL = ... # type: int
class SubprocessStreamProtocol(streams.FlowControlMixin,
protocols.SubprocessProtocol):
@@ -40,7 +40,7 @@ class Process:
@coroutine
def create_subprocess_shell(
*Args: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236
*Args: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236
stdin: int = ...,
stdout: int = ...,
stderr: int = ...,
@@ -50,7 +50,7 @@ def create_subprocess_shell(
@coroutine
def create_subprocess_exec(
program: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236
program: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236
*args: Any,
stdin: int = ...,
stdout: int = ...,

View File

@@ -3,7 +3,7 @@ from typing import (Any, TypeVar, Set, Dict, List, TextIO, Union, Tuple, Generic
Optional)
import concurrent.futures
__all__ = ... # type: str
__all__ = ... # type: str
from .events import AbstractEventLoop
from .futures import Future
@@ -41,7 +41,7 @@ class Task(Future[_T], Generic[_T]):
@classmethod
def all_tasks(cls, loop: AbstractEventLoop = ...) -> Set[Task]: ...
# Can't use a union, see mypy issue #1873.
# Can't use a union, see mypy issue #1873.
@overload
def __init__(self, coro: Generator[Any, None, _T],
*, loop: AbstractEventLoop = ...) -> None: ...

View File

@@ -1,6 +1,6 @@
from typing import Dict, Any, TypeVar, Mapping, List
__all__ = ... # type: str
__all__ = ... # type: str
class BaseTransport:
def __init__(self, extra: Mapping[Any, Any] = ...) -> None: ...