run black over stubs, add checking to travis

This commit is contained in:
Maxim Kurnikov
2018-12-03 18:52:44 +03:00
parent d5bc7d4ab2
commit cf6119bf9b
420 changed files with 2295 additions and 8384 deletions

View File

@@ -1,7 +1,7 @@
from html.parser import HTMLParser
from typing import Any, List, Optional, Tuple, Union, TypeVar
_Self = TypeVar('_Self')
_Self = TypeVar("_Self")
WHITESPACE: Any
@@ -11,11 +11,7 @@ class Element:
name: Optional[str] = ...
attributes: List[Tuple[str, Optional[str]]] = ...
children: List[Union[Element, str]] = ...
def __init__(
self,
name: Optional[str],
attributes: Union[List[Tuple[str, Optional[str]]], Tuple],
) -> None: ...
def __init__(self, name: Optional[str], attributes: Union[List[Tuple[str, Optional[str]]], Tuple]) -> None: ...
def append(self, element: Union[Element, str]) -> None: ...
def finalize(self) -> None: ...
def __contains__(self, element: Union[Element, str]) -> bool: ...
@@ -36,17 +32,11 @@ class Parser(HTMLParser):
element_positions: Any = ...
def __init__(self) -> None: ...
def error(self, msg: str) -> Any: ...
def format_position(
self, position: None = ..., element: None = ...
) -> str: ...
def format_position(self, position: None = ..., element: None = ...) -> str: ...
@property
def current(self) -> Element: ...
def handle_startendtag(
self, tag: str, attrs: List[Tuple[str, Optional[str]]]
) -> None: ...
def handle_starttag(
self, tag: str, attrs: List[Tuple[str, Optional[str]]]
) -> None: ...
def handle_startendtag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None: ...
def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None: ...
def handle_endtag(self, tag: str) -> None: ...
def handle_data(self, data: str) -> None: ...
def handle_charref(self, name: str) -> None: ...