Update stubs

This commit is contained in:
Trinh Anh Ngoc
2022-10-16 23:38:29 +07:00
parent a68b036dbf
commit adcc6c8de0

View File

@@ -1,15 +1,13 @@
from email.message import Message
from re import Pattern
from typing import FrozenSet, Literal
from typing import Collection, FrozenSet, Literal
from lxml.etree import _Element
from lxml.html import clean
from markupsafe import Markup
tags_to_kill: list[str]
tags_to_remove: list[str]
allowed_tags: FrozenSet
safe_attrs: FrozenSet
SANITIZE_TAGS: dict[str, Collection[str]]
class _Cleaner(clean.Cleaner):
_style_re: Pattern
@@ -27,10 +25,13 @@ def html_sanitize(src: str, silent: bool = ..., sanitize_tags: bool = ..., sanit
URL_REGEX: str
TEXT_URL_REGEX: str
HTML_TAG_URL_REGEX: str
HTML_TAGS_REGEX: Pattern
HTML_NEWLINES_REGEX: Pattern
def validate_url(url: str) -> str: ...
def is_html_empty(html_content: str) -> bool: ...
def html_keep_url(text: str) -> str: ...
def html_to_inner_content(html: str) -> str: ...
def html2plaintext(html: str, body_id: str | None = ..., encoding: str = ...) -> str: ...
def plaintext2html(text: str, container_tag: str = ...) -> Markup: ...
def append_content_to_html(html: str, content: str, plaintext: bool = ..., preserve: bool = ..., container_tag: str = ...) -> Markup: ...
@@ -45,7 +46,7 @@ def generate_tracking_message_id(res_id: str) -> str: ...
def email_split_tuples(text: str) -> list[str]: ...
def email_split(text: str) -> list[str]: ...
def email_split_and_format(text: str) -> list[str]: ...
def email_normalize(text: str) -> str | Literal[False]: ...
def email_normalize(text: str, strict: bool = ...) -> str | Literal[False]: ...
def email_domain_extract(email: str) -> str | Literal[False]: ...
def email_domain_normalize(domain: str) -> str | Literal[False]: ...
def url_domain_extract(url: str) -> str | Literal[False]: ...