1 from typing import Any, overload
3 def htmlentityreplace_errors(exc: Exception) -> tuple[str | bytes, int]: ...
5 def serialize(input, tree: str = ..., encoding: None = ..., **serializer_opts) -> str: ...
7 def serialize(input, tree: str, encoding: str, **serializer_opts) -> bytes: ...
9 def serialize(input, *, encoding: str, **serializer_opts) -> bytes: ...
12 quote_attr_values: str
14 use_best_quote_char: bool
15 omit_optional_tags: bool
16 minimize_boolean_attributes: bool
17 use_trailing_solidus: bool
18 space_before_trailing_solidus: bool
19 escape_lt_in_attrs: bool
21 resolve_entities: bool
22 alphabetical_attributes: bool
23 inject_meta_charset: bool
24 strip_whitespace: bool
29 def __init__(self, **kwargs) -> None: ...
30 def encode(self, string): ...
31 def encodeStrict(self, string): ...
33 def serialize(self, treewalker, encoding: Any | None = ...) -> None: ...
34 def render(self, treewalker, encoding: Any | None = ...): ...
35 def serializeError(self, data: str = ...) -> None: ...
37 class SerializeError(Exception): ...