mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Add xmltodict (#7472)
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
This commit is contained in:
1
stubs/xmltodict/METADATA.toml
Normal file
1
stubs/xmltodict/METADATA.toml
Normal file
@@ -0,0 +1 @@
|
||||
version = "0.12.*"
|
||||
33
stubs/xmltodict/xmltodict.pyi
Normal file
33
stubs/xmltodict/xmltodict.pyi
Normal 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: ...
|
||||
Reference in New Issue
Block a user