|
1 | | -from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite |
| 1 | +from _typeshed import Incomplete, ReadableBuffer, SupportsRead, SupportsWrite |
2 | 2 | from collections import OrderedDict |
3 | 3 | from collections.abc import Mapping |
4 | 4 | from types import GeneratorType |
5 | | -from typing import Any, overload |
| 5 | +from typing import Any, Final, overload |
6 | 6 |
|
7 | | -__license__: str |
| 7 | +__author__: Final[str] |
| 8 | +__version__: Final[str] |
| 9 | +__license__: Final[str] |
8 | 10 |
|
9 | 11 | class ParsingInterrupted(Exception): ... |
10 | 12 |
|
11 | 13 | def parse( |
12 | 14 | xml_input: str | ReadableBuffer | SupportsRead[bytes] | GeneratorType[ReadableBuffer, Any, Any], |
13 | | - encoding: str | None = ..., |
| 15 | + encoding: str | None = None, |
14 | 16 | expat: Any = ..., |
15 | | - process_namespaces: bool = ..., |
16 | | - namespace_separator: str = ..., |
17 | | - disable_entities: bool = ..., |
18 | | - process_comments: bool = ..., |
19 | | - **kwargs: Any, |
| 17 | + process_namespaces: bool = False, |
| 18 | + namespace_separator: str = ":", |
| 19 | + disable_entities: bool = True, |
| 20 | + process_comments: bool = False, |
| 21 | + *, |
| 22 | + item_depth: int = 0, |
| 23 | + item_callback=..., |
| 24 | + xml_attribs: bool = True, |
| 25 | + attr_prefix="@", |
| 26 | + cdata_key="#text", |
| 27 | + force_cdata: bool | Incomplete = False, |
| 28 | + cdata_separator="", |
| 29 | + postprocessor=None, |
| 30 | + dict_constructor: type = ..., |
| 31 | + strip_whitespace: bool = True, |
| 32 | + namespaces=None, |
| 33 | + force_list: bool | Incomplete = None, |
| 34 | + comment_key: str = "#comment", |
20 | 35 | ) -> OrderedDict[str, Any]: ... |
21 | 36 | @overload |
22 | 37 | def unparse( |
23 | 38 | input_dict: Mapping[str, Any], |
24 | 39 | output: SupportsWrite[bytes] | SupportsWrite[str], |
25 | | - encoding: str = ..., |
26 | | - full_document: bool = ..., |
27 | | - short_empty_elements: bool = ..., |
28 | | - **kwargs: Any, |
| 40 | + encoding: str = "utf-8", |
| 41 | + full_document: bool = True, |
| 42 | + short_empty_elements: bool = False, |
| 43 | + comment_key: str = "#comment", |
| 44 | + *, |
| 45 | + attr_prefix: str = "@", |
| 46 | + cdata_key="#text", |
| 47 | + depth: int = 0, |
| 48 | + preprocessor=None, |
| 49 | + pretty: bool = False, |
| 50 | + newl: str = "\n", |
| 51 | + indent: str | int = "\t", |
| 52 | + namespace_separator: str = ":", |
| 53 | + namespaces=None, |
| 54 | + expand_iter=None, |
29 | 55 | ) -> None: ... |
30 | 56 | @overload |
31 | 57 | def unparse( |
32 | 58 | input_dict: Mapping[str, Any], |
33 | | - output: None = ..., |
34 | | - encoding: str = ..., |
35 | | - full_document: bool = ..., |
36 | | - short_empty_elements: bool = ..., |
37 | | - **kwargs: Any, |
| 59 | + output: None = None, |
| 60 | + encoding: str = "utf-8", |
| 61 | + full_document: bool = True, |
| 62 | + short_empty_elements: bool = False, |
| 63 | + comment_key: str = "#comment", |
| 64 | + *, |
| 65 | + attr_prefix: str = "@", |
| 66 | + cdata_key="#text", |
| 67 | + depth: int = 0, |
| 68 | + preprocessor=None, |
| 69 | + pretty: bool = False, |
| 70 | + newl: str = "\n", |
| 71 | + indent: str | int = "\t", |
| 72 | + namespace_separator: str = ":", |
| 73 | + namespaces=None, |
| 74 | + expand_iter=None, |
38 | 75 | ) -> str: ... |
0 commit comments