File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,8 @@ def to_xml(self) -> str:
126
126
build_xml_element (root , self .to_dict ())
127
127
128
128
xml_string = ET .tostring (
129
- root ,
130
- encoding = "utf-8" ,
131
- xml_declaration = False ,
132
- method = "xml"
133
- ).decode ("utf-8" )
129
+ root , encoding = "utf-8" , xml_declaration = False , method = "xml"
130
+ ).decode ("utf-8" )
134
131
135
132
parsed_xml = xml .dom .minidom .parseString (xml_string )
136
133
pretty_xml = parsed_xml .toprettyxml (indent = " " * 4 )
@@ -284,11 +281,7 @@ def to_xml_file(
284
281
tree = ET .ElementTree (root )
285
282
286
283
# Generate the XML string
287
- xml_str = ET .tostring (
288
- root ,
289
- encoding = "utf-8" ,
290
- method = "xml"
291
- ).decode ("utf-8" )
284
+ xml_str = ET .tostring (root , encoding = "utf-8" , method = "xml" ).decode ("utf-8" )
292
285
293
286
# Create a pretty-formatted XML string using minidom
294
287
parsed_xml = xml .dom .minidom .parseString (xml_str )
@@ -300,7 +293,6 @@ def to_xml_file(
300
293
301
294
return filename
302
295
303
-
304
296
@classmethod
305
297
def from_file (cls , filename : str ) -> "Base" :
306
298
"""
You can’t perform that action at this time.
0 commit comments