From 9bf5ad98e508690efd334806885b6d1666bee602 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 24 Nov 2023 09:49:19 +0200 Subject: XML formatter script - simplify the default declaration --- scripts/code_tools/fix_xml_indentations.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'scripts') 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 ( - '' - if rm_space else - '' - ) - ) + xml_decl = (xml_decl if (xml_decl and not rewrite_decl) + else '') try: with io.open(file_path, 'wb') as file: -- cgit v1.2.3