Fixing flake8 E231 errors

This commit is contained in:
Lukasz Langa
2016-12-19 22:22:14 -08:00
parent 93ec300dd4
commit 67e38b6806
26 changed files with 181 additions and 181 deletions

View File

@@ -11,41 +11,41 @@ def register(search_function: Callable[[str], Any]) -> None: ...
def register_error(errors: str, handler: _Handler) -> None: ...
def lookup(a: str) -> codecs.CodecInfo: ...
def lookup_error(a: str) -> _Handler: ...
def decode(obj: Any, encoding:str = ..., errors:str = ...) -> Any: ...
def encode(obj: Any, encoding:str = ..., errors:str = ...) -> Any: ...
def decode(obj: Any, encoding: str = ..., errors: str = ...) -> Any: ...
def encode(obj: Any, encoding: str = ..., errors: str = ...) -> Any: ...
def charmap_build(a: str) -> Dict[int, int]: ...
def ascii_decode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
def ascii_encode(data: AnyStr, errors:str = ...) -> Tuple[bytes, int]: ...
def ascii_decode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
def ascii_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def charbuffer_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def charmap_decode(data: AnyStr, errors: str = ..., mapping: Optional[Dict[int, int]] = ...) -> Tuple[str, int]: ...
def charmap_encode(data: AnyStr, errors: str, mapping: Optional[Dict[int, int]] = ...) -> Tuple[bytes, int]: ...
def escape_decode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
def escape_encode(data: AnyStr, errors:str = ...) -> Tuple[bytes, int]: ...
def latin_1_decode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
def latin_1_encode(data: AnyStr, errors:str = ...) -> Tuple[bytes, int]: ...
def raw_unicode_escape_decode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
def raw_unicode_escape_encode(data: AnyStr, errors:str = ...) -> Tuple[bytes, int]: ...
def readbuffer_encode(data: AnyStr, errors:str = ...) -> Tuple[bytes, int]: ...
def unicode_escape_decode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
def unicode_escape_encode(data: AnyStr, errors:str = ...) -> Tuple[bytes, int]: ...
def unicode_internal_decode(data: AnyStr, errors:str = ...) -> Tuple[str, int]: ...
def unicode_internal_encode(data: AnyStr, errors:str = ...) -> Tuple[bytes, int]: ...
def utf_16_be_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_16_be_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def utf_16_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_16_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def utf_16_ex_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_16_le_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_16_le_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def utf_32_be_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_32_be_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def utf_32_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_32_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def utf_32_ex_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_32_le_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_32_le_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def utf_7_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_7_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def utf_8_decode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[str, int]: ...
def utf_8_encode(data: AnyStr, errors:str = ..., final:int = ...) -> Tuple[bytes, int]: ...
def escape_decode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
def escape_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def latin_1_decode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
def latin_1_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def raw_unicode_escape_decode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
def raw_unicode_escape_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def readbuffer_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def unicode_escape_decode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
def unicode_escape_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def unicode_internal_decode(data: AnyStr, errors: str = ...) -> Tuple[str, int]: ...
def unicode_internal_encode(data: AnyStr, errors: str = ...) -> Tuple[bytes, int]: ...
def utf_16_be_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_16_be_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...
def utf_16_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_16_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...
def utf_16_ex_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_16_le_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_16_le_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...
def utf_32_be_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_32_be_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...
def utf_32_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_32_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...
def utf_32_ex_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_32_le_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_32_le_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...
def utf_7_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_7_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...
def utf_8_decode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[str, int]: ...
def utf_8_encode(data: AnyStr, errors: str = ..., final: int = ...) -> Tuple[bytes, int]: ...

View File

@@ -27,4 +27,4 @@ class make_scanner:
def __call__(self, string: str, index: int) -> Tuple[Any, int]: ...
def encode_basestring_ascii(s: str) -> str: ...
def scanstring(string: str, end: int, strict:bool = ...) -> Tuple[str, int]: ...
def scanstring(string: str, end: int, strict: bool = ...) -> Tuple[str, int]: ...

View File

@@ -4,8 +4,8 @@ _defaultaction = ... # type: str
_onceregistry = ... # type: dict
filters = ... # type: List[tuple]
def warn(message: Warning, category:type = ..., stacklevel:int = ...) -> None: ...
def warn_explicit(message: Warning, category:type,
def warn(message: Warning, category: type = ..., stacklevel: int = ...) -> None: ...
def warn_explicit(message: Warning, category: type,
filename: str, lineno: int,
module:Any = ..., registry:dict = ...,
module_globals:dict = ...) -> None: ...
module: Any = ..., registry: dict = ...,
module_globals: dict = ...) -> None: ...

View File

@@ -727,11 +727,11 @@ def map(func: Callable[[_T1, _T2], _S], iter1: Iterable[_T1],
@overload
def max(arg1: _T, arg2: _T, *args: _T, key: Callable[[_T], Any] = ...) -> _T: ...
@overload
def max(iterable: Iterable[_T], key: Callable[[_T], Any] = ..., default:_T = ...) -> _T: ...
def max(iterable: Iterable[_T], key: Callable[[_T], Any] = ..., default: _T = ...) -> _T: ...
@overload
def min(arg1: _T, arg2: _T, *args: _T, key: Callable[[_T], Any] = ...) -> _T: ...
@overload
def min(iterable: Iterable[_T], key: Callable[[_T], Any] = ..., default:_T = ...) -> _T: ...
def min(iterable: Iterable[_T], key: Callable[[_T], Any] = ..., default: _T = ...) -> _T: ...
@overload
def next(i: Iterator[_T]) -> _T: ...
@overload

View File

@@ -1,5 +1,5 @@
from typing import Any
def getline(filename:str, lineno:int, module_globals: Any=...) -> str: pass
def getline(filename: str, lineno: int, module_globals: Any=...) -> str: pass
def clearcache() -> None: pass
def getlines(filename: str, module_globals: Any=...) -> None: pass

View File

@@ -1,7 +1,7 @@
# Stubs for os
# Ron Murawski <ron@horizonchess.com>
# based on http://docs.python.org/3.2/library/os.html
# based on http: //docs.python.org/3.2/library/os.html
from typing import (
Mapping, MutableMapping, Dict, List, Any, Tuple, Iterator, overload, Union, AnyStr,
@@ -105,7 +105,7 @@ WNOHANG = 0 # Unix only
TMP_MAX = 0 # Undocumented, but used by tempfile
# ----- os classes (structures) -----
if sys.version_info >= (3,6):
if sys.version_info >= (3, 6):
class PathLike:
def __fspath__(self) -> AnyStr: ...

View File

@@ -98,41 +98,41 @@ class Iterator(Iterable[_T_co], Generic[_T_co]):
class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
@abstractmethod
def __next__(self) -> _T_co:...
def __next__(self) -> _T_co: ...
@abstractmethod
def send(self, value: _T_contra) -> _T_co:...
def send(self, value: _T_contra) -> _T_co: ...
@abstractmethod
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = None,
# TODO: tb should be TracebackType but that's defined in types
tb: Any = None) -> None:...
tb: Any = None) -> None: ...
@abstractmethod
def close(self) -> None:...
def close(self) -> None: ...
@abstractmethod
def __iter__(self) -> 'Generator[_T_co, _T_contra, _V_co]': ...
# TODO: Several types should only be defined if sys.python_version >= (3, 5):
# Awaitable, AsyncIterator, AsyncIterable, Coroutine, Collection, ContextManager.
# See https://github.com/python/typeshed/issues/655 for why this is not easy.
# See https: //github.com/python/typeshed/issues/655 for why this is not easy.
class Awaitable(Generic[_T_co]):
@abstractmethod
def __await__(self) -> Generator[Any, None, _T_co]:...
def __await__(self) -> Generator[Any, None, _T_co]: ...
class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]):
@abstractmethod
def send(self, value: _T_contra) -> _T_co:...
def send(self, value: _T_contra) -> _T_co: ...
@abstractmethod
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = None,
# TODO: tb should be TracebackType but that's defined in types
tb: Any = None) -> None:...
tb: Any = None) -> None: ...
@abstractmethod
def close(self) -> None:...
def close(self) -> None: ...
# NOTE: This type does not exist in typing.py or PEP 484.
@@ -143,13 +143,13 @@ class AwaitableGenerator(Generator[_T_co, _T_contra, _V_co], Awaitable[_V_co],
class AsyncIterable(Generic[_T_co]):
@abstractmethod
def __anext__(self) -> Awaitable[_T_co]:...
def __anext__(self) -> Awaitable[_T_co]: ...
class AsyncIterator(AsyncIterable[_T_co],
Generic[_T_co]):
@abstractmethod
def __anext__(self) -> Awaitable[_T_co]:...
def __aiter__(self) -> 'AsyncIterator[_T_co]':...
def __anext__(self) -> Awaitable[_T_co]: ...
def __aiter__(self) -> 'AsyncIterator[_T_co]': ...
class Container(Generic[_T_co]):
@abstractmethod
@@ -245,7 +245,7 @@ class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]):
class Mapping(Iterable[_KT], Container[_KT], Sized, Generic[_KT, _VT_co]):
# TODO: We wish the key type could also be covariant, but that doesn't work,
# see discussion in https://github.com/python/typing/pull/273.
# see discussion in https: //github.com/python/typing/pull/273.
@abstractmethod
def __getitem__(self, k: _KT) -> _VT_co:
...

View File

@@ -86,7 +86,7 @@ class ParseResultBytes(_ParseResultBase[bytes], _NetlocResultMixinBytes): ...
def parse_qs(qs: str, keep_blank_values : bool = ..., strict_parsing : bool = ..., encoding : str = ..., errors: str = ...) -> Dict[str, List[str]]: ...
def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> List[Tuple[str,str]]: ...
def parse_qsl(qs: str, keep_blank_values: bool = ..., strict_parsing: bool = ..., encoding: str = ..., errors: str = ...) -> List[Tuple[str, str]]: ...
@overload
def quote(string: str, safe: AnyStr = ..., encoding: str = ..., errors: str = ...) -> str: ...