1 from collections.abc import Container, Iterable, MutableMapping
2 from typing import Any, Pattern, Protocol
4 from .html5lib_shim import Filter
6 _Attrs = MutableMapping[Any, str]
8 class _Callback(Protocol):
9 def __call__(self, attrs: _Attrs, new: bool = ...) -> _Attrs: ...
11 DEFAULT_CALLBACKS: list[_Callback]
15 def build_url_re(tlds: Iterable[str] = ..., protocols: Iterable[str] = ...) -> Pattern[str]: ...
18 PROTO_RE: Pattern[str]
20 def build_email_re(tlds: Iterable[str] = ...) -> Pattern[str]: ...
22 EMAIL_RE: Pattern[str]
27 callbacks: Iterable[_Callback] = ...,
28 skip_tags: Container[str] | None = ...,
29 parse_email: bool = ...,
30 url_re: Pattern[str] = ...,
31 email_re: Pattern[str] = ...,
32 recognized_tags: Container[str] | None = ...,
34 def linkify(self, text: str) -> str: ...
36 class LinkifyFilter(Filter):
38 skip_tags: Container[str]
43 self, source, callbacks=..., skip_tags: Container[str] | None = ..., parse_email: bool = ..., url_re=..., email_re=...
45 def __getattr__(self, item: str) -> Any: ... # incomplete