Skip to content

Commit

Permalink
Add xmltodict (#7472)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrej Shadura <[email protected]>
  • Loading branch information
andrewshadura authored Mar 11, 2022
1 parent 9c50fe7 commit a5ddf0b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions stubs/xmltodict/METADATA.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "0.12.*"
33 changes: 33 additions & 0 deletions stubs/xmltodict/xmltodict.pyi
Original file line number Diff line number Diff line change
@@ -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: ...

0 comments on commit a5ddf0b

Please sign in to comment.