Add xmltodict (#7472)

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
This commit is contained in:
Andrej Shadura
2022-03-11 12:19:51 +01:00
committed by GitHub
parent 9c50fe7b64
commit a5ddf0bf0d
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1 @@
version = "0.12.*"

View File

@@ -0,0 +1,33 @@
from _typeshed import SupportsRead, SupportsWrite
from collections import OrderedDict
from typing import Any, Mapping, overload
class ParsingInterrupted(Exception): ...
def parse(
xml_input: str | bytes | SupportsRead[bytes],
encoding: str | None = ...,
expat: Any = ...,
process_namespaces: bool = ...,
namespace_separator: str = ...,
disable_entities: bool = ...,
**kwargs: Any,
) -> OrderedDict[str, Any]: ...
@overload
def unparse(
input_dict: Mapping[str, Any],
output: SupportsWrite[bytes] | SupportsWrite[str],
encoding: str = ...,
full_document: bool = ...,
short_empty_elements: bool = ...,
**kwargs: Any,
) -> None: ...
@overload
def unparse(
input_dict: Mapping[str, Any],
output: None = ...,
encoding: str = ...,
full_document: bool = ...,
short_empty_elements: bool = ...,
**kwargs: Any,
) -> str: ...