mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Split stdlib into Python 2 and 3 versions (#5442)
All new files in stdlib/@python2 are straight copies of the corresponding files in stdlib.
This commit is contained in:
4
stdlib/@python2/html/__init__.pyi
Normal file
4
stdlib/@python2/html/__init__.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from typing import AnyStr
|
||||
|
||||
def escape(s: AnyStr, quote: bool = ...) -> AnyStr: ...
|
||||
def unescape(s: AnyStr) -> AnyStr: ...
|
||||
6
stdlib/@python2/html/entities.pyi
Normal file
6
stdlib/@python2/html/entities.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Dict
|
||||
|
||||
name2codepoint: Dict[str, int]
|
||||
html5: Dict[str, str]
|
||||
codepoint2name: Dict[int, str]
|
||||
entitydefs: Dict[str, str]
|
||||
30
stdlib/@python2/html/parser.pyi
Normal file
30
stdlib/@python2/html/parser.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from _markupbase import ParserBase
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
class HTMLParser(ParserBase):
|
||||
def __init__(self, *, convert_charrefs: bool = ...) -> None: ...
|
||||
def feed(self, data: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def getpos(self) -> Tuple[int, int]: ...
|
||||
def get_starttag_text(self) -> Optional[str]: ...
|
||||
def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None: ...
|
||||
def handle_endtag(self, tag: str) -> None: ...
|
||||
def handle_startendtag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None: ...
|
||||
def handle_data(self, data: str) -> None: ...
|
||||
def handle_entityref(self, name: str) -> None: ...
|
||||
def handle_charref(self, name: str) -> None: ...
|
||||
def handle_comment(self, data: str) -> None: ...
|
||||
def handle_decl(self, decl: str) -> None: ...
|
||||
def handle_pi(self, data: str) -> None: ...
|
||||
def unknown_decl(self, data: str) -> None: ...
|
||||
CDATA_CONTENT_ELEMENTS: Tuple[str, ...]
|
||||
def check_for_whole_start_tag(self, i: int) -> int: ... # undocumented
|
||||
def clear_cdata_mode(self) -> None: ... # undocumented
|
||||
def goahead(self, end: bool) -> None: ... # undocumented
|
||||
def parse_bogus_comment(self, i: int, report: bool = ...) -> int: ... # undocumented
|
||||
def parse_endtag(self, i: int) -> int: ... # undocumented
|
||||
def parse_html_declaration(self, i: int) -> int: ... # undocumented
|
||||
def parse_pi(self, i: int) -> int: ... # undocumented
|
||||
def parse_starttag(self, i: int) -> int: ... # undocumented
|
||||
def set_cdata_mode(self, elem: str) -> None: ... # undocumented
|
||||
Reference in New Issue
Block a user