Fixing flake8 E251 errors

This commit is contained in:
Lukasz Langa
2016-12-20 01:54:34 -08:00
parent 68a49c2c2e
commit 99a57e5cbe
9 changed files with 13 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ from typing import (
Iterable,
Iterator,
List,
Optional,
Tuple,
Union,
)
@@ -68,7 +69,7 @@ def register(search_function: Callable[[str], CodecInfo]) -> None:
def open(filename: str, mode: str = ..., encoding: str = ..., errors: str = ..., buffering: int = ...) -> StreamReaderWriter:
...
def EncodedFile(file: BinaryIO, data_encoding: str, file_encoding: str = ..., errors = ...) -> 'StreamRecoder':
def EncodedFile(file: BinaryIO, data_encoding: str, file_encoding: str = ..., errors: Optional[str] = ...) -> 'StreamRecoder':
...
def iterencode(iterator: Iterable[_decoded], encoding: str, errors: str = ...) -> Iterator[_encoded]:

View File

@@ -63,7 +63,7 @@ class JSONDecoder(object):
strict: bool = ...,
object_pairs_hook: Callable[..., Any] = ...) -> None: ...
def decode(self, s: Union[Text, bytes], _w = ...) -> Any: ...
def decode(self, s: Union[Text, bytes], _w: Any = ...) -> Any: ...
def raw_decode(self,
s: Union[Text, bytes],

View File

@@ -55,9 +55,9 @@ def findlinestarts(code: _have_code) -> Iterator[Tuple[int, int]]: ...
def code_info(x: _have_code_or_string) -> str: ...
# `file` parameter requires sys.version_info >= (3, 4):
def dis(x: _have_code_or_string = ..., *, file = ...) -> None: ...
def distb(tb: types.TracebackType = ..., *, file: IO[str] = ...) -> None: ...
def disassemble(co: _have_code, lasti: int = ..., *, file = ...) -> None: ...
def show_code(co: _have_code, *, file: IO[str]=...) -> None: ...
def dis(x: _have_code_or_string = ..., *, file: IO[str] = None) -> None: ...
def distb(tb: types.TracebackType = ..., *, file: IO[str] = None) -> None: ...
def disassemble(co: _have_code, lasti: int = ..., *, file: IO[str] = None) -> None: ...
def show_code(co: _have_code, *, file: IO[str] = None) -> None: ...
def get_instructions(x: _have_code, *, first_line: int = ...) -> Iterator[Instruction]: ...

View File

@@ -1,7 +1,7 @@
# Filip Hron <filip.hron@gmail.com>
# based heavily on Andrey Vlasovskikh's python-skeletons https://github.com/JetBrains/python-skeletons/blob/master/sqlite3.py
from typing import Any, Union, List, AnyStr, Iterator
from typing import Any, Union, List, AnyStr, Iterator, Optional
from numbers import Integral
from datetime import time, datetime
from collections import Iterable
@@ -106,7 +106,7 @@ class Connection:
def create_aggregate(self, name: str, num_params: int, aggregate_class: type) -> None: ...
def create_collation(self, name: str, callable: Any) -> None: ...
def create_function(self, name: str, num_params: int, func: Any) -> None: ...
def cursor(self, cursorClass= Union[type, None]) -> Cursor: ...
def cursor(self, cursorClass: Optional[type] = ...) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable = ...) -> Cursor: ...
# TODO: please check in executemany() if seq_of_parameters type is possible like this
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]) -> Cursor: ...