mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 14:01:56 +08:00
initial commit
This commit is contained in:
51
django/test/html.pyi
Normal file
51
django/test/html.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
from typing import (
|
||||
List,
|
||||
Optional,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
def normalize_whitespace(string: str) -> str: ...
|
||||
|
||||
|
||||
def parse_html(html: str) -> Element: ...
|
||||
|
||||
|
||||
class Element:
|
||||
def __contains__(self, element: Element) -> bool: ...
|
||||
def __eq__(self, element: Union[str, Element]) -> bool: ...
|
||||
def __getitem__(self, key: int) -> Union[str, Element]: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str],
|
||||
attributes: Union[Tuple, List[Tuple[str, None]], List[Tuple[str, str]], List[Union[Tuple[str, str], Tuple[str, None]]]]
|
||||
) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def _count(self, element: Union[str, Element], count: bool = ...) -> int: ...
|
||||
def append(self, element: Union[str, Element]) -> None: ...
|
||||
def count(self, element: Element) -> int: ...
|
||||
def finalize(self) -> None: ...
|
||||
|
||||
|
||||
class Parser:
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def current(self) -> Element: ...
|
||||
def handle_charref(self, name: str) -> None: ...
|
||||
def handle_data(self, data: str) -> None: ...
|
||||
def handle_endtag(self, tag: str) -> None: ...
|
||||
def handle_entityref(self, name: str) -> None: ...
|
||||
def handle_startendtag(self, tag: str, attrs: List[Tuple[str, str]]) -> None: ...
|
||||
def handle_starttag(
|
||||
self,
|
||||
tag: str,
|
||||
attrs: Union[List[Union[Tuple[str, str], Tuple[str, None]]], List[Tuple[str, str]]]
|
||||
) -> None: ...
|
||||
|
||||
|
||||
class RootElement:
|
||||
def __init__(self) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
Reference in New Issue
Block a user