-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expand file tree
/
Copy path__init__.pyi
More file actions
43 lines (38 loc) · 1.58 KB
/
__init__.pyi
File metadata and controls
43 lines (38 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import sys
from _typeshed import ReadableBuffer, StrPath, SupportsRead, _T_co
from collections.abc import Iterable
from typing import Final, Protocol, type_check_only
from typing_extensions import TypeAlias
from xml.sax._exceptions import (
SAXException as SAXException,
SAXNotRecognizedException as SAXNotRecognizedException,
SAXNotSupportedException as SAXNotSupportedException,
SAXParseException as SAXParseException,
SAXReaderNotAvailable as SAXReaderNotAvailable,
)
from xml.sax.handler import ContentHandler as ContentHandler, ErrorHandler as ErrorHandler
from xml.sax.xmlreader import InputSource as InputSource, XMLReader
@type_check_only
class _SupportsReadClose(SupportsRead[_T_co], Protocol[_T_co]):
def close(self) -> None: ...
_Source: TypeAlias = StrPath | _SupportsReadClose[bytes] | _SupportsReadClose[str]
default_parser_list: Final[list[str]]
def make_parser(parser_list: Iterable[str] = ()) -> XMLReader: ...
def parse(source: _Source, handler: ContentHandler, errorHandler: ErrorHandler = ...) -> None: ...
def parseString(string: ReadableBuffer | str, handler: ContentHandler, errorHandler: ErrorHandler | None = ...) -> None: ...
def _create_parser(parser_name: str) -> XMLReader: ...
if sys.version_info >= (3, 14):
__all__ = [
"ContentHandler",
"ErrorHandler",
"InputSource",
"SAXException",
"SAXNotRecognizedException",
"SAXNotSupportedException",
"SAXParseException",
"SAXReaderNotAvailable",
"default_parser_list",
"make_parser",
"parse",
"parseString",
]