massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / html5lib / html5lib / serializer.pyi
1 from typing import Any, overload
2
3 def htmlentityreplace_errors(exc: Exception) -> tuple[str | bytes, int]: ...
4 @overload
5 def serialize(input, tree: str = ..., encoding: None = ..., **serializer_opts) -> str: ...
6 @overload
7 def serialize(input, tree: str, encoding: str, **serializer_opts) -> bytes: ...
8 @overload
9 def serialize(input, *, encoding: str, **serializer_opts) -> bytes: ...
10
11 class HTMLSerializer:
12     quote_attr_values: str
13     quote_char: 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
20     escape_rcdata: bool
21     resolve_entities: bool
22     alphabetical_attributes: bool
23     inject_meta_charset: bool
24     strip_whitespace: bool
25     sanitize: bool
26     options: Any
27     errors: Any
28     strict: bool
29     def __init__(self, **kwargs) -> None: ...
30     def encode(self, string): ...
31     def encodeStrict(self, string): ...
32     encoding: Any
33     def serialize(self, treewalker, encoding: Any | None = ...) -> None: ...
34     def render(self, treewalker, encoding: Any | None = ...): ...
35     def serializeError(self, data: str = ...) -> None: ...
36
37 class SerializeError(Exception): ...