massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / beautifulsoup4 / bs4 / dammit.pyi
1 from collections.abc import Iterable, Iterator
2 from logging import Logger
3 from typing import Any, Tuple
4 from typing_extensions import Literal
5
6 chardet_type: Any
7
8 def chardet_dammit(s): ...
9
10 xml_encoding: str
11 html_meta: str
12 encoding_res: Any
13
14 class EntitySubstitution:
15     CHARACTER_TO_HTML_ENTITY: Any
16     HTML_ENTITY_TO_CHARACTER: Any
17     CHARACTER_TO_HTML_ENTITY_RE: Any
18     CHARACTER_TO_XML_ENTITY: Any
19     BARE_AMPERSAND_OR_BRACKET: Any
20     AMPERSAND_OR_BRACKET: Any
21     @classmethod
22     def quoted_attribute_value(cls, value): ...
23     @classmethod
24     def substitute_xml(cls, value, make_quoted_attribute: bool = ...): ...
25     @classmethod
26     def substitute_xml_containing_entities(cls, value, make_quoted_attribute: bool = ...): ...
27     @classmethod
28     def substitute_html(cls, s): ...
29
30 class EncodingDetector:
31     known_definite_encodings: list[str]
32     user_encodings: list[str]
33     exclude_encodings: set[str]
34     chardet_encoding: Any | None
35     is_html: bool
36     declared_encoding: str | None
37     markup: Any
38     sniffed_encoding: str | None
39     def __init__(
40         self,
41         markup,
42         known_definite_encodings: Iterable[str] | None = ...,
43         is_html: bool = ...,
44         exclude_encodings: list[str] | None = ...,
45         user_encodings: list[str] | None = ...,
46         override_encodings: list[str] | None = ...,
47     ) -> None: ...
48     @property
49     def encodings(self) -> Iterator[str]: ...
50     @classmethod
51     def strip_byte_order_mark(cls, data): ...
52     @classmethod
53     def find_declared_encoding(cls, markup, is_html: bool = ..., search_entire_document: bool = ...) -> str | None: ...
54
55 class UnicodeDammit:
56     CHARSET_ALIASES: dict[str, str]
57     ENCODINGS_WITH_SMART_QUOTES: list[str]
58     smart_quotes_to: Literal["ascii", "xml", "html"] | None
59     tried_encodings: list[tuple[str, str]]
60     contains_replacement_characters: bool
61     is_html: bool
62     log: Logger
63     detector: EncodingDetector
64     markup: Any
65     unicode_markup: str
66     original_encoding: Any | None
67     def __init__(
68         self,
69         markup,
70         known_definite_encodings: list[str] | None = ...,
71         smart_quotes_to: Literal["ascii", "xml", "html"] | None = ...,
72         is_html: bool = ...,
73         exclude_encodings: list[str] | None = ...,
74         user_encodings: list[str] | None = ...,
75         override_encodings: list[str] | None = ...,
76     ) -> None: ...
77     @property
78     def declared_html_encoding(self) -> str | None: ...
79     def find_codec(self, charset: str) -> str | None: ...
80     MS_CHARS: dict[bytes, str | Tuple[str, ...]]
81     MS_CHARS_TO_ASCII: dict[bytes, str]
82     WINDOWS_1252_TO_UTF8: dict[int, bytes]
83     MULTIBYTE_MARKERS_AND_SIZES: list[tuple[int, int, int]]
84     FIRST_MULTIBYTE_MARKER: int
85     LAST_MULTIBYTE_MARKER: int
86     @classmethod
87     def detwingle(cls, in_bytes: bytes, main_encoding: str = ..., embedded_encoding: str = ...) -> bytes: ...