Skip to content

Commit 215669f

Browse files
committed
fix: type issue found by ty
1 parent f91fa24 commit 215669f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

json2xml/dicttoxml.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def dict2xml_str(
263263
"""
264264
ids: list[str] = [] # initialize list of unique ids
265265
", ".join(str(key) for key in item)
266+
subtree = "" # Initialize subtree with default empty string
266267

267268
if attr_type:
268269
attr["type"] = get_xml_type(item)
@@ -306,6 +307,7 @@ def list2xml_str(
306307
if attr_type:
307308
attr["type"] = get_xml_type(item)
308309
flat = False
310+
subtree = "" # Initialize subtree with default empty string
309311
if item_name.endswith("@flat"):
310312
item_name = item_name[0:-5]
311313
flat = True

0 commit comments

Comments
 (0)