Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Dec 22, 2023
1 parent 51e21d0 commit 7434920
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions fastkml/kml.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,15 @@ def etree_element(
if not self.ns:
root = config.etree.Element(f"{self.ns}kml") # type: ignore[attr-defined]
root.set("xmlns", config.KMLNS[1:-1])
elif hasattr(config.etree, "LXML_VERSION"):
root = config.etree.Element( # type: ignore[attr-defined]
f"{self.ns}kml",
nsmap={None: self.ns[1:-1]},
)
else:
if hasattr(config.etree, "LXML_VERSION"):
root = config.etree.Element( # type: ignore[attr-defined]
f"{self.ns}kml",
nsmap={None: self.ns[1:-1]},
)
else:
root = config.etree.Element( # type: ignore[attr-defined]
f"{self.ns}kml",
)
root = config.etree.Element( # type: ignore[attr-defined]
f"{self.ns}kml",
)
xml_subelement_list(
obj=self,
element=root,
Expand Down

0 comments on commit 7434920

Please sign in to comment.