Skip to content

Commit f948518

Browse files
committed
Ensure the arguments to the entrypoint are used correctly
Prior to this, arguments for build were passed into Converter instead of into build Fixes #26
1 parent e0e0f6b commit f948518

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ Limitations
137137
Changelog
138138
---------
139139

140+
1.7.6 - TBD
141+
* Fixed the ``dict2xml.dict2xml`` entry point to distribute options
142+
correctly
143+
140144
1.7.5 - 13 February 2024
141145
* Introduced the ``data_sorter`` option
142146

dict2xml/__init__.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@
33
from .version import VERSION
44

55

6-
def dict2xml(data, *args, **kwargs):
6+
def dict2xml(
7+
data,
8+
wrap=None,
9+
indent=" ",
10+
newlines=True,
11+
iterables_repeat_wrap=True,
12+
closed_tags_for=None,
13+
data_sorter=None,
14+
):
715
"""Return an XML string of a Python dict object."""
8-
return Converter(*args, **kwargs).build(data)
16+
return Converter(wrap=wrap, indent=indent, newlines=newlines).build(
17+
data,
18+
iterables_repeat_wrap=iterables_repeat_wrap,
19+
closed_tags_for=closed_tags_for,
20+
data_sorter=data_sorter,
21+
)
922

1023

1124
__all__ = ["dict2xml", "Converter", "Node", "VERSION", "DataSorter"]

0 commit comments

Comments
 (0)