diff --git a/mscxyz/xml.py b/mscxyz/xml.py index 45724ba..1374f43 100644 --- a/mscxyz/xml.py +++ b/mscxyz/xml.py @@ -3,7 +3,7 @@ import typing from io import TextIOWrapper from pathlib import Path -from typing import Literal, Optional +from typing import Literal, Optional, Union import lxml import lxml.etree @@ -15,7 +15,7 @@ ListExtension = Literal["mscz", "mscx", "both"] -ElementLike = _Element | _ElementTree | None +ElementLike = Optional[Union[_Element, _ElementTree, None]] class Xml: