|
1 |
| -from typing import List, Tuple, Optional, Callable, Any, Protocol, Union, Dict, Text |
2 |
| - |
3 |
| -import pyexpat.errors as errors |
4 |
| -import pyexpat.model as model |
5 |
| - |
6 |
| -EXPAT_VERSION: str # undocumented |
7 |
| -version_info: Tuple[int, int, int] # undocumented |
8 |
| -native_encoding: str # undocumented |
9 |
| -features: List[Tuple[str, int]] # undocumented |
10 |
| - |
11 |
| -class ExpatError(Exception): |
12 |
| - code: int |
13 |
| - lineno: int |
14 |
| - offset: int |
15 |
| - |
16 |
| -error = ExpatError |
17 |
| - |
18 |
| -class _Reader(Protocol): |
19 |
| - def read(self, length: int) -> bytes: ... |
20 |
| - |
21 |
| -XML_PARAM_ENTITY_PARSING_NEVER: int |
22 |
| -XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: int |
23 |
| -XML_PARAM_ENTITY_PARSING_ALWAYS: int |
24 |
| - |
25 |
| -_Model = Tuple[int, int, Optional[str], tuple] |
26 |
| - |
27 |
| -class XMLParserType(object): |
28 |
| - def Parse(self, data: Union[Text, bytes], isfinal: bool = ...) -> int: ... |
29 |
| - def ParseFile(self, file: _Reader) -> int: ... |
30 |
| - def SetBase(self, base: Text) -> None: ... |
31 |
| - def GetBase(self) -> Optional[str]: ... |
32 |
| - def GetInputContext(self) -> Optional[bytes]: ... |
33 |
| - def ExternalEntityParserCreate(self, context: Optional[Text], encoding: Text = ...) -> XMLParserType: ... |
34 |
| - def SetParamEntityParsing(self, flag: int) -> int: ... |
35 |
| - def UseForeignDTD(self, flag: bool = ...) -> None: ... |
36 |
| - buffer_size: int |
37 |
| - buffer_text: bool |
38 |
| - buffer_used: int |
39 |
| - namespace_prefixes: bool # undocumented |
40 |
| - ordered_attributes: bool |
41 |
| - specified_attributes: bool |
42 |
| - ErrorByteIndex: int |
43 |
| - ErrorCode: int |
44 |
| - ErrorColumnNumber: int |
45 |
| - ErrorLineNumber: int |
46 |
| - CurrentByteIndex: int |
47 |
| - CurrentColumnNumber: int |
48 |
| - CurrentLineNumber: int |
49 |
| - XmlDeclHandler: Optional[Callable[[str, Optional[str], int], Any]] |
50 |
| - StartDoctypeDeclHandler: Optional[Callable[[str, Optional[str], Optional[str], bool], Any]] |
51 |
| - EndDoctypeDeclHandler: Optional[Callable[[], Any]] |
52 |
| - ElementDeclHandler: Optional[Callable[[str, _Model], Any]] |
53 |
| - AttlistDeclHandler: Optional[Callable[[str, str, str, Optional[str], bool], Any]] |
54 |
| - StartElementHandler: Optional[Union[ |
55 |
| - Callable[[str, Dict[str, str]], Any], |
56 |
| - Callable[[str, List[str]], Any], |
57 |
| - Callable[[str, Union[Dict[str, str]], List[str]], Any]]] |
58 |
| - EndElementHandler: Optional[Callable[[str], Any]] |
59 |
| - ProcessingInstructionHandler: Optional[Callable[[str, str], Any]] |
60 |
| - CharacterDataHandler: Optional[Callable[[str], Any]] |
61 |
| - UnparsedEntityDeclHandler: Optional[Callable[[str, Optional[str], str, Optional[str], str], Any]] |
62 |
| - EntityDeclHandler: Optional[Callable[[str, bool, Optional[str], Optional[str], str, Optional[str], Optional[str]], Any]] |
63 |
| - NotationDeclHandler: Optional[Callable[[str, Optional[str], str, Optional[str]], Any]] |
64 |
| - StartNamespaceDeclHandler: Optional[Callable[[str, str], Any]] |
65 |
| - EndNamespaceDeclHandler: Optional[Callable[[str], Any]] |
66 |
| - CommentHandler: Optional[Callable[[str], Any]] |
67 |
| - StartCdataSectionHandler: Optional[Callable[[], Any]] |
68 |
| - EndCdataSectionHandler: Optional[Callable[[], Any]] |
69 |
| - DefaultHandler: Optional[Callable[[str], Any]] |
70 |
| - DefaultHandlerExpand: Optional[Callable[[str], Any]] |
71 |
| - NotStandaloneHandler: Optional[Callable[[], int]] |
72 |
| - ExternalEntityRefHandler: Optional[Callable[[str, Optional[str], Optional[str], Optional[str]], int]] |
73 |
| - |
74 |
| -def ErrorString(errno: int) -> str: ... |
75 |
| -def ParserCreate(encoding: Optional[Text] = ..., namespace_separator: Optional[Text] = ...) -> XMLParserType: ... |
| 1 | +from pyexpat import * |
0 commit comments