Skip to content

Commit

Permalink
Fixing flake8 E261 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Langa committed Dec 20, 2016
1 parent b84f20a commit fe0e374
Show file tree
Hide file tree
Showing 219 changed files with 4,047 additions and 3,105 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
ignore = F401, F811, E301, E302, E305, E501, E701, E704

# Errors that we need to fix before enabling flake8 by default:
# 3097 E261 at least 2 spaces before inline comment
# 921 F821 undefined name
# 221 E128 continuation line under-indented for visual indent
# 213 E231 missing whitespace after , or :
Expand Down
52 changes: 26 additions & 26 deletions stdlib/2/ConfigParser.pyi
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
from typing import Any, Tuple, IO

__all__ = ... # type: list[str]
DEFAULTSECT = ... # type: str
MAX_INTERPOLATION_DEPTH = ... # type: int
__all__ = ... # type: list[str]
DEFAULTSECT = ... # type: str
MAX_INTERPOLATION_DEPTH = ... # type: int

class Error(Exception):
message = ... # type: Any
message = ... # type: Any
def __init__(self, msg: str = ...) -> None: ...
def _get_message(self) -> None: ...
def _set_message(self, value: str) -> None: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...

class NoSectionError(Error):
section = ... # type: str
section = ... # type: str
def __init__(self, section: str) -> None: ...

class DuplicateSectionError(Error):
section = ... # type: str
section = ... # type: str
def __init__(self, section: str) -> None: ...

class NoOptionError(Error):
section = ... # type: str
option = ... # type: str
section = ... # type: str
option = ... # type: str
def __init__(self, option: str, section: str) -> None: ...

class InterpolationError(Error):
section = ... # type: str
option = ... # type: str
msg = ... # type: str
section = ... # type: str
option = ... # type: str
msg = ... # type: str
def __init__(self, option: str, section: str, msg: str) -> None: ...

class InterpolationMissingOptionError(InterpolationError):
reference = ... # type: str
reference = ... # type: str
def __init__(self, option: str, section: str, rawval: str, reference: str) -> None: ...

class InterpolationSyntaxError(InterpolationError): ...
Expand All @@ -41,25 +41,25 @@ class InterpolationDepthError(InterpolationError):
def __init__(self, option: str, section: str, rawval: str) -> None: ...

class ParsingError(Error):
filename = ... # type: str
errors = ... # type: list[Tuple[Any,Any]]
filename = ... # type: str
errors = ... # type: list[Tuple[Any,Any]]
def __init__(self, filename: str) -> None: ...
def append(self, lineno: Any, line: Any) -> None: ...

class MissingSectionHeaderError(ParsingError):
lineno = ... # type: Any
line = ... # type: Any
lineno = ... # type: Any
line = ... # type: Any
def __init__(self, filename: str, lineno: Any, line: Any) -> None: ...


class RawConfigParser:
_dict = ... # type: Any
_sections = ... # type: dict
_defaults = ... # type: dict
_optcre = ... # type: Any
SECTCRE = ... # type: Any
OPTCRE = ... # type: Any
OPTCRE_NV = ... # type: Any
_dict = ... # type: Any
_sections = ... # type: dict
_defaults = ... # type: dict
_optcre = ... # type: Any
SECTCRE = ... # type: Any
OPTCRE = ... # type: Any
OPTCRE_NV = ... # type: Any
def __init__(self, defaults: dict[Any,Any] = ..., dict_type: Any = ..., allow_no_value: bool = ...) -> None: ...
def defaults(self) -> dict[Any,Any]: ...
def sections(self) -> list[str]: ...
Expand All @@ -73,7 +73,7 @@ class RawConfigParser:
def _get(self, section: str, conv: type, option: str) -> Any: ...
def getint(self, section: str, option: str) -> int: ...
def getfloat(self, section: str, option: str) -> float: ...
_boolean_states = ... # type: dict[str,bool]
_boolean_states = ... # type: dict[str,bool]
def getboolean(self, section: str, option: str) -> bool: ...
def optionxform(self, optionstr: str) -> str: ...
def has_option(self, section: str, option: str) -> bool: ...
Expand All @@ -84,13 +84,13 @@ class RawConfigParser:
def _read(self, fp: file, fpname: str) -> None: ...

class ConfigParser(RawConfigParser):
_KEYCRE = ... # type: Any
_KEYCRE = ... # type: Any
def get(self, section: str, option: str, raw: bool = ..., vars: dict = ...) -> Any: ...
def items(self, section: str, raw: bool = ..., vars: dict = ...) -> list[Tuple[str,Any]]: ...
def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...
def _interpolation_replace(self, match: Any) -> str: ...

class SafeConfigParser(ConfigParser):
_interpvar_re = ... # type: Any
_interpvar_re = ... # type: Any
def _interpolate(self, section: str, option: str, rawval: Any, vars: Any) -> str: ...
def _interpolate_some(self, option: str, accum: list, rest: str, section: str, map: dict, depth: int) -> None: ...
8 changes: 4 additions & 4 deletions stdlib/2/Cookie.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ from typing import Any
class CookieError(Exception): ...

class Morsel(dict):
key = ... # type: Any
key = ... # type: Any
def __init__(self): ...
def __setitem__(self, K, V): ...
def isReservedKey(self, K): ...
value = ... # type: Any
coded_value = ... # type: Any
value = ... # type: Any
coded_value = ... # type: Any
def set(self, key, val, coded_val, LegalChars=..., idmap=..., translate=...): ...
def output(self, attrs=None, header=...): ...
def js_output(self, attrs=None): ...
Expand Down Expand Up @@ -41,4 +41,4 @@ class SmartCookie(BaseCookie):
def value_decode(self, val): ...
def value_encode(self, val): ...

Cookie = ... # type: Any
Cookie = ... # type: Any
12 changes: 6 additions & 6 deletions stdlib/2/Queue.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ class Empty(Exception): ...
class Full(Exception): ...

class Queue(Generic[_T]):
maxsize = ... # type: Any
mutex = ... # type: Any
not_empty = ... # type: Any
not_full = ... # type: Any
all_tasks_done = ... # type: Any
unfinished_tasks = ... # type: Any
maxsize = ... # type: Any
mutex = ... # type: Any
not_empty = ... # type: Any
not_full = ... # type: Any
all_tasks_done = ... # type: Any
unfinished_tasks = ... # type: Any
def __init__(self, maxsize: int = ...) -> None: ...
def task_done(self) -> None: ...
def join(self) -> None: ...
Expand Down
8 changes: 4 additions & 4 deletions stdlib/2/StringIO.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from typing import Any, IO, AnyStr, Iterator, Iterable, Generic, List

class StringIO(IO[AnyStr], Generic[AnyStr]):
closed = ... # type: bool
softspace = ... # type: int
len = ... # type: int
name = ... # type: str
closed = ... # type: bool
softspace = ... # type: int
len = ... # type: int
name = ... # type: str
def __init__(self, buf: AnyStr = ...) -> None: ...
def __iter__(self) -> Iterator[AnyStr]: ...
def next(self) -> AnyStr: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/2/UserDict.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _KT = TypeVar('_KT')
_VT = TypeVar('_VT')

class UserDict(Dict[_KT, _VT], Generic[_KT, _VT]):
data = ... # type: Mapping[_KT, _VT]
data = ... # type: Mapping[_KT, _VT]

def __init__(self, initialdata: Mapping[_KT, _VT] = ...) -> None: ...

Expand Down
14 changes: 7 additions & 7 deletions stdlib/2/__builtin__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -808,13 +808,13 @@ class buffer(Sized):
def __mul__(self, x: int) -> str: ...

class memoryview(Sized, Container[bytes]):
format = ... # type: str
itemsize = ... # type: int
shape = ... # type: Optional[Tuple[int, ...]]
strides = ... # type: Optional[Tuple[int, ...]]
suboffsets = ... # type: Optional[Tuple[int, ...]]
readonly = ... # type: bool
ndim = ... # type: int
format = ... # type: str
itemsize = ... # type: int
shape = ... # type: Optional[Tuple[int, ...]]
strides = ... # type: Optional[Tuple[int, ...]]
suboffsets = ... # type: Optional[Tuple[int, ...]]
readonly = ... # type: bool
ndim = ... # type: int

def __init__(self, obj: Union[str, bytearray, buffer, memoryview]) -> None: ...

Expand Down
4 changes: 2 additions & 2 deletions stdlib/2/_ast.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ PyCF_ONLY_AST = ... # type: int
identifier = str

class AST:
_attributes = ... # type: typing.Tuple[str, ...]
_fields = ... # type: typing.Tuple[str, ...]
_attributes = ... # type: typing.Tuple[str, ...]
_fields = ... # type: typing.Tuple[str, ...]
def __init__(self, *args, **kwargs) -> None: ...

class mod(AST):
Expand Down
1 change: 0 additions & 1 deletion stdlib/2/builtins.pyi

This file was deleted.

Loading

0 comments on commit fe0e374

Please sign in to comment.