Skip to content

Commit ea81718

Browse files
donbarbostapple-cisco
authored andcommitted
Merge from donBarbos:bump-xmltodict-1.0: [xmltodict] Update to 1.0.*
- Closes: #14710 - Add default values - Reveal kwargs - Add to stricter pyright exclude list
1 parent 53dbb53 commit ea81718

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

stubs/xmltodict/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "0.15.*"
1+
version = "1.0.*"
22
upstream_repository = "https://github.com/martinblech/xmltodict"

stubs/xmltodict/xmltodict.pyi

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite
22
from collections.abc import Callable, Container, Mapping
33
from types import GeneratorType
4-
from typing import Any, overload
4+
from typing import Any, Final, overload
55
from typing_extensions import TypeAlias
66

7-
__author__: str
8-
__version__: str
9-
__license__: str
7+
__author__: Final[str]
8+
__version__: Final[str]
9+
__license__: Final[str]
1010

1111
class ParsingInterrupted(Exception): ...
1212

@@ -27,7 +27,7 @@ class _DictSAXHandler:
2727
force_cdata: bool | Container[str] | Callable[[tuple[str, _AttrDict | None], str, str], bool]
2828
cdata_separator: str
2929
postprocessor: Callable[[list[tuple[str, _AttrDict | None]], str, _AttrValue], tuple[str, _AttrValue]] | None
30-
dict_constructor: type[dict[str, str]]
30+
dict_constructor: type
3131
strip_whitespace: bool
3232
namespace_separator: str
3333
namespaces: dict[str, str] | None
@@ -44,7 +44,7 @@ class _DictSAXHandler:
4444
force_cdata: bool | Container[str] | Callable[[tuple[str, _AttrDict | None], str, str], bool] = False,
4545
cdata_separator: str = "",
4646
postprocessor: Callable[[list[tuple[str, _AttrDict | None]], str, _AttrValue], tuple[str, _AttrValue]] | None = None,
47-
dict_constructor: type[dict[str, str]] = ...,
47+
dict_constructor: type = ...,
4848
strip_whitespace: bool = True,
4949
namespace_separator: str = ":",
5050
namespaces: dict[str, str] | None = None,
@@ -75,7 +75,7 @@ def parse(
7575
force_cdata: bool | Container[str] | Callable[[tuple[str, _AttrDict | None], str, str], bool] = False,
7676
cdata_separator: str = "",
7777
postprocessor: Callable[[list[tuple[str, _AttrDict | None]], str, _AttrValue], tuple[str, _AttrValue]] | None = None,
78-
dict_constructor: type[dict[str, str]] = ...,
78+
dict_constructor: type = ...,
7979
strip_whitespace: bool = True,
8080
namespaces: dict[str, str] | None = None,
8181
force_list: bool | Container[str] | Callable[[tuple[str, _AttrDict | None], str, str], bool] | None = None,
@@ -88,33 +88,35 @@ def unparse(
8888
encoding: str = "utf-8",
8989
full_document: bool = True,
9090
short_empty_elements: bool = False,
91+
comment_key: str = "#comment",
9192
*,
9293
attr_prefix: str = "@",
9394
cdata_key: str = "#text",
9495
depth: int = 0,
9596
preprocessor: Callable[[str, Any], tuple[str, Any]] | None = None,
9697
pretty: bool = False,
9798
newl: str = "\n",
98-
indent: str = "\t",
99+
indent: str | int = "\t",
99100
namespace_separator: str = ":",
100101
namespaces: Mapping[str, str] | None = None,
101102
expand_iter: str | None = None,
102103
) -> None: ...
103104
@overload
104105
def unparse(
105106
input_dict: Mapping[str, Any],
106-
output: None = ...,
107+
output: None = None,
107108
encoding: str = "utf-8",
108109
full_document: bool = True,
109110
short_empty_elements: bool = False,
111+
comment_key: str = "#comment",
110112
*,
111113
attr_prefix: str = "@",
112114
cdata_key: str = "#text",
113115
depth: int = 0,
114116
preprocessor: Callable[[str, Any], tuple[str, Any]] | None = None,
115117
pretty: bool = False,
116118
newl: str = "\n",
117-
indent: str = "\t",
119+
indent: str | int = "\t",
118120
namespace_separator: str = ":",
119121
namespaces: Mapping[str, str] | None = None,
120122
expand_iter: str | None = None,

0 commit comments

Comments
 (0)