diff --git a/fastkml/kml.py b/fastkml/kml.py index cf43c804..771aa8d8 100644 --- a/fastkml/kml.py +++ b/fastkml/kml.py @@ -84,7 +84,7 @@ 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"): + elif hasattr(config.etree, "LXML_VERSION"): # type: ignore[attr-defined] root = config.etree.Element( # type: ignore[attr-defined] f"{self.ns}kml", nsmap={None: self.ns[1:-1]},