Commmented redundat endpoints

This commit is contained in:
2025-01-17 10:25:26 +01:00
parent 5e169082fe
commit 1056f55887
2 changed files with 8 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ def formatHTML(source: str, prettify: bool) -> str:
return html.tostring(htmlDoc).decode().replace("\n", "").replace("> ", ">")
return etree.tostring(htmlDoc, encoding='unicode', pretty_print=True)
def formatXML(source: str, prettify: bool) -> str:
def formatXML(source: str) -> str:
"""Method used to format XML
:param source: XML to format
@@ -46,10 +46,7 @@ def formatXML(source: str, prettify: bool) -> str:
parser = etree.XMLParser(remove_blank_text=True)
xml = etree.parse(byte_input, parser=parser)
if prettify:
prolog += "\n"
return prolog + etree.tostring(xml, pretty_print=prettify).decode()
return prolog + etree.tostring(xml, pretty_print=False).decode()
def xpath(source: str, xpath: str) -> str: