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

@@ -5,9 +5,9 @@
from typing import Union, Optional, Callable
from .ElementTree import Element
XINCLUDE = ... # type: str
XINCLUDE_INCLUDE = ... # type: str
XINCLUDE_FALLBACK = ... # type: str
XINCLUDE = ... # type: str
XINCLUDE_INCLUDE = ... # type: str
XINCLUDE_FALLBACK = ... # type: str
class FatalIncludeError(SyntaxError): ...

View File

@@ -5,7 +5,7 @@
from typing import Pattern, Dict, Generator, Tuple, List, Union, TypeVar, Callable, Optional
from .ElementTree import Element
xpath_tokenizer_re = ... # type: Pattern
xpath_tokenizer_re = ... # type: Pattern
_token = Tuple[str, str]
_next = Callable[[], _token]
@@ -20,11 +20,11 @@ def prepare_descendant(next: _next, token: _token) -> _callback: ...
def prepare_parent(next: _next, token: _token) -> _callback: ...
def prepare_predicate(next: _next, token: _token) -> _callback: ...
ops = ... # type: Dict[str, Callable[[_next, _token], _callback]]
ops = ... # type: Dict[str, Callable[[_next, _token], _callback]]
class _SelectorContext:
parent_map = ... # type: Dict[Element, Element]
root = ... # type: Element
parent_map = ... # type: Dict[Element, Element]
root = ... # type: Element
def __init__(self, root: Element) -> None: ...
_T = TypeVar('_T')

View File

@@ -5,7 +5,7 @@
from typing import Any, AnyStr, Union, IO, Callable, Dict, List, Tuple, Sequence, Iterator, TypeVar, Optional, KeysView, ItemsView, Generator
import io
VERSION = ... # type: str
VERSION = ... # type: str
class ParseError(SyntaxError): ...
@@ -16,10 +16,10 @@ _T = TypeVar('_T')
_str_or_bytes = Union[str, bytes]
class Element(Sequence['Element']):
tag = ... # type: _str_or_bytes
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
text = ... # type: Optional[_str_or_bytes]
tail = ... # type: Optional[_str_or_bytes]
tag = ... # type: _str_or_bytes
attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes]
text = ... # type: Optional[_str_or_bytes]
tail = ... # type: Optional[_str_or_bytes]
def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> None: ...
def append(self, subelement: 'Element') -> None: ...
def clear(self) -> None: ...
@@ -50,10 +50,10 @@ def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., *
def Comment(text: _str_or_bytes=...) -> Element: ...
def ProcessingInstruction(target: str, text: str=...) -> Element: ...
PI = ... # type: Callable[..., Element]
PI = ... # type: Callable[..., Element]
class QName:
text = ... # type: str
text = ... # type: str
def __init__(self, text_or_uri: str, tag: str=...) -> None: ...
@@ -81,7 +81,7 @@ def iterparse(source: _file_or_filename, events: Sequence[str]=..., parser: 'XML
class _IterParseIterator:
root = ... # type: Any
root = ... # type: Any
def __init__(self, source: _file_or_filename, events: Sequence[str], parser: 'XMLParser', close_source: bool=...) -> None: ...
def __next__(self) -> Tuple[str, Element]: ...
def __iter__(self) -> _IterParseIterator: ...
@@ -90,7 +90,7 @@ def XML(text: AnyStr, parser: 'XMLParser'=...) -> Element: ...
def XMLID(text: AnyStr, parser: 'XMLParser'=...) -> Tuple[Element, Dict[str, Element]]: ...
# TODO-improve this type
fromstring = ... # type: Callable[..., Element]
fromstring = ... # type: Callable[..., Element]
def fromstringlist(sequence: Sequence[AnyStr], parser: 'XMLParser'=...) -> Element: ...
@@ -102,11 +102,11 @@ class TreeBuilder:
def end(self, tag: AnyStr) -> Element: ...
class XMLParser:
parser = ... # type: Any
target = ... # type: TreeBuilder
parser = ... # type: Any
target = ... # type: TreeBuilder
# TODO-what is entity used for???
entity = ... # type: Any
version = ... # type: str
entity = ... # type: Any
version = ... # type: str
def __init__(self, html: int=..., target: TreeBuilder=..., encoding: str=...) -> None: ...
def doctype(self, name: str, pubid: str, system: str) -> None: ...
def close(self) -> Any: ... # TODO-most of the time, this will be Element, but it can be anything target.close() returns