mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Merge pull request #69 from timabbott/tabbott-html
Add html module stubs.
This commit is contained in:
9
stdlib/3/_markupbase.pyi
Normal file
9
stdlib/3/_markupbase.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Tuple
|
||||
|
||||
class ParserBase(object):
|
||||
def __init__(self) -> None: ...
|
||||
def error(self, message: str) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def getpos(self) -> Tuple[int, int]: ...
|
||||
|
||||
def unkown_decl(self, data: str) -> None: ...
|
||||
@@ -0,0 +1,4 @@
|
||||
from typing import AnyStr
|
||||
|
||||
def escape(s: AnyStr, quote: bool) -> AnyStr: ...
|
||||
def unescape(s: AnyStr) -> AnyStr: ...
|
||||
|
||||
28
stdlib/3/html/parser.pyi
Normal file
28
stdlib/3/html/parser.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
from typing import AnyStr, List, Tuple
|
||||
from _markupbase import ParserBase
|
||||
|
||||
class HTMLParser(ParserBase):
|
||||
def __init__(self, *args, convert_charrefs: bool) -> None: ...
|
||||
def feed(self, feed: AnyStr) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
|
||||
def get_starttag_text(self) -> AnyStr: ...
|
||||
def set_cdata_mode(self, AnyStr) -> None: ...
|
||||
def clear_cdata_mode(self) -> None: ...
|
||||
|
||||
def handle_startendtag(self, tag: AnyStr, attrs: List[Tuple[AnyStr, AnyStr]]): ...
|
||||
def handle_starttag(self, tag: AnyStr, attrs: List[Tuple[AnyStr, AnyStr]]): ...
|
||||
def handle_endtag(self, tag: AnyStr): ...
|
||||
def handle_charref(self, name: AnyStr): ...
|
||||
def handle_entityref(self, name: AnyStr): ...
|
||||
def handle_data(self, data: AnyStr): ...
|
||||
def handle_comment(self, data: AnyStr): ...
|
||||
def handle_decl(self, decl: AnyStr): ...
|
||||
def handle_pi(self, data: AnyStr): ...
|
||||
|
||||
def unknown_decl(self, data: AnyStr): ...
|
||||
|
||||
def unescape(self, s: AnyStr) -> AnyStr: ...
|
||||
|
||||
class HTMLParseError(Exception): ...
|
||||
Reference in New Issue
Block a user