Skip to content

Commit 9b3d903

Browse files
authored
Update ElementTree.py
fixed lint error triling spaces unchanged default declaration to pass tests
1 parent 1f00810 commit 9b3d903

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/xml/etree/ElementTree.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ def iterfind(self, path, namespaces=None):
679679
def write(self, file_or_filename,
680680
encoding=None,
681681
xml_declaration=None,
682-
xml_declaration_definition='<?xml version="{version}" encoding="{encoding}"?>',
682+
xml_declaration_definition="<?xml version='{version}' encoding='{encoding}'?>",
683683
default_namespace=None,
684684
method=None, *,
685685
short_empty_elements=True):
@@ -700,7 +700,7 @@ def write(self, file_or_filename,
700700
singlequote where hardcoded here.
701701
to be rfc conform which allows doublequotes and
702702
singlequote for declaration. default value is
703-
switched to doublquotes here to stay on one format.
703+
untouched to pass tests.
704704
placeholders: {version}, {encoding}
705705
706706
*default_namespace* -- sets the default XML namespace (for "xmlns")
@@ -731,7 +731,7 @@ def write(self, file_or_filename,
731731
# version configuration is'nt necessary, can be overwritten
732732
# in declaration_definition at runtime
733733
data = {'version':'1.0', 'encoding': declared_encoding}
734-
write(xml_declaration_definition.format(**data)+"\n")
734+
write(xml_declaration_definition.format(**data)+"\n")
735735
if method == "text":
736736
_serialize_text(write, self._root)
737737
else:

0 commit comments

Comments
 (0)