Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"stubs/tqdm",
"stubs/vobject",
"stubs/workalendar",
"stubs/xmltodict",
],
"typeCheckingMode": "strict",
// TODO: Complete incomplete stubs
Expand Down
2 changes: 1 addition & 1 deletion stubs/xmltodict/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "0.15.*"
version = "1.0.*"
upstream_repository = "https://github.com/martinblech/xmltodict"
73 changes: 55 additions & 18 deletions stubs/xmltodict/xmltodict.pyi
Original file line number Diff line number Diff line change
@@ -1,38 +1,75 @@
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite
from _typeshed import Incomplete, ReadableBuffer, SupportsRead, SupportsWrite
from collections import OrderedDict
from collections.abc import Mapping
from types import GeneratorType
from typing import Any, overload
from typing import Any, Final, overload

__license__: str
__author__: Final[str]
__version__: Final[str]
__license__: Final[str]

class ParsingInterrupted(Exception): ...

def parse(
xml_input: str | ReadableBuffer | SupportsRead[bytes] | GeneratorType[ReadableBuffer, Any, Any],
encoding: str | None = ...,
encoding: str | None = None,
expat: Any = ...,
process_namespaces: bool = ...,
namespace_separator: str = ...,
disable_entities: bool = ...,
process_comments: bool = ...,
**kwargs: Any,
process_namespaces: bool = False,
namespace_separator: str = ":",
disable_entities: bool = True,
process_comments: bool = False,
*,
item_depth: int = 0,
item_callback=...,
xml_attribs: bool = True,
attr_prefix="@",
cdata_key="#text",
force_cdata: bool | Incomplete = False,
cdata_separator="",
postprocessor=None,
dict_constructor: type = ...,
strip_whitespace: bool = True,
namespaces=None,
force_list: bool | Incomplete = None,
comment_key: str = "#comment",
) -> 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,
encoding: str = "utf-8",
full_document: bool = True,
short_empty_elements: bool = False,
comment_key: str = "#comment",
*,
attr_prefix: str = "@",
cdata_key="#text",
depth: int = 0,
preprocessor=None,
pretty: bool = False,
newl: str = "\n",
indent: str | int = "\t",
namespace_separator: str = ":",
namespaces=None,
expand_iter=None,
) -> None: ...
@overload
def unparse(
input_dict: Mapping[str, Any],
output: None = ...,
encoding: str = ...,
full_document: bool = ...,
short_empty_elements: bool = ...,
**kwargs: Any,
output: None = None,
encoding: str = "utf-8",
full_document: bool = True,
short_empty_elements: bool = False,
comment_key: str = "#comment",
*,
attr_prefix: str = "@",
cdata_key="#text",
depth: int = 0,
preprocessor=None,
pretty: bool = False,
newl: str = "\n",
indent: str | int = "\t",
namespace_separator: str = ":",
namespaces=None,
expand_iter=None,
) -> str: ...
Loading