massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / pyexpat / __init__.pyi
1 import pyexpat.errors as errors
2 import pyexpat.model as model
3 from _typeshed import SupportsRead
4 from typing import Any, Callable, Optional, Tuple
5 from typing_extensions import final
6
7 EXPAT_VERSION: str  # undocumented
8 version_info: tuple[int, int, int]  # undocumented
9 native_encoding: str  # undocumented
10 features: list[tuple[str, int]]  # undocumented
11
12 class ExpatError(Exception):
13     code: int
14     lineno: int
15     offset: int
16
17 error = ExpatError
18
19 XML_PARAM_ENTITY_PARSING_NEVER: int
20 XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: int
21 XML_PARAM_ENTITY_PARSING_ALWAYS: int
22
23 _Model = Tuple[int, int, Optional[str], Tuple[Any, ...]]
24
25 @final
26 class XMLParserType(object):
27     def Parse(self, __data: str | bytes, __isfinal: bool = ...) -> int: ...
28     def ParseFile(self, __file: SupportsRead[bytes]) -> int: ...
29     def SetBase(self, __base: str) -> None: ...
30     def GetBase(self) -> str | None: ...
31     def GetInputContext(self) -> bytes | None: ...
32     def ExternalEntityParserCreate(self, __context: str | None, __encoding: str = ...) -> XMLParserType: ...
33     def SetParamEntityParsing(self, __flag: int) -> int: ...
34     def UseForeignDTD(self, __flag: bool = ...) -> None: ...
35     buffer_size: int
36     buffer_text: bool
37     buffer_used: int
38     namespace_prefixes: bool  # undocumented
39     ordered_attributes: bool
40     specified_attributes: bool
41     ErrorByteIndex: int
42     ErrorCode: int
43     ErrorColumnNumber: int
44     ErrorLineNumber: int
45     CurrentByteIndex: int
46     CurrentColumnNumber: int
47     CurrentLineNumber: int
48     XmlDeclHandler: Callable[[str, str | None, int], Any] | None
49     StartDoctypeDeclHandler: Callable[[str, str | None, str | None, bool], Any] | None
50     EndDoctypeDeclHandler: Callable[[], Any] | None
51     ElementDeclHandler: Callable[[str, _Model], Any] | None
52     AttlistDeclHandler: Callable[[str, str, str, str | None, bool], Any] | None
53     StartElementHandler: Callable[[str, dict[str, str]], Any] | Callable[[str, list[str]], Any] | Callable[
54         [str, dict[str, str], list[str]], Any
55     ] | None
56     EndElementHandler: Callable[[str], Any] | None
57     ProcessingInstructionHandler: Callable[[str, str], Any] | None
58     CharacterDataHandler: Callable[[str], Any] | None
59     UnparsedEntityDeclHandler: Callable[[str, str | None, str, str | None, str], Any] | None
60     EntityDeclHandler: Callable[[str, bool, str | None, str | None, str, str | None, str | None], Any] | None
61     NotationDeclHandler: Callable[[str, str | None, str, str | None], Any] | None
62     StartNamespaceDeclHandler: Callable[[str, str], Any] | None
63     EndNamespaceDeclHandler: Callable[[str], Any] | None
64     CommentHandler: Callable[[str], Any] | None
65     StartCdataSectionHandler: Callable[[], Any] | None
66     EndCdataSectionHandler: Callable[[], Any] | None
67     DefaultHandler: Callable[[str], Any] | None
68     DefaultHandlerExpand: Callable[[str], Any] | None
69     NotStandaloneHandler: Callable[[], int] | None
70     ExternalEntityRefHandler: Callable[[str, str | None, str | None, str | None], int] | None
71
72 def ErrorString(__code: int) -> str: ...
73
74 # intern is undocumented
75 def ParserCreate(
76     encoding: str | None = ..., namespace_separator: str | None = ..., intern: dict[str, Any] | None = ...
77 ) -> XMLParserType: ...