summaryrefslogtreecommitdiff
path: root/scripts/code_tools
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-24 09:49:19 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-24 09:49:19 +0200
commit9bf5ad98e508690efd334806885b6d1666bee602 (patch)
tree884c2d2966132f3d91f062832b5a3ba522d229da /scripts/code_tools
parent6e63fe32efd4336995720f43de4ba7110f69c09f (diff)
XML formatter script - simplify the default declaration
Diffstat (limited to 'scripts/code_tools')
-rw-r--r--scripts/code_tools/fix_xml_indentations.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/code_tools/fix_xml_indentations.py b/scripts/code_tools/fix_xml_indentations.py
index c0661dd975..019f6db23c 100644
--- a/scripts/code_tools/fix_xml_indentations.py
+++ b/scripts/code_tools/fix_xml_indentations.py
@@ -72,13 +72,8 @@ def save_xml(tree, file_path, xml_decl, indent_text=False, indent_tab=False, rm_
if rm_space:
xml_string = xml_string.replace(' />', '/>')
- xml_decl = (
- xml_decl if (xml_decl and not rewrite_decl) else (
- '<?xml version="1.0" encoding="utf-8" standalone="yes"?>'
- if rm_space else
- '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>'
- )
- )
+ xml_decl = (xml_decl if (xml_decl and not rewrite_decl)
+ else '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>')
try:
with io.open(file_path, 'wb') as file: