diff --git a/ogs6py/classes/build_tree.py b/ogs6py/classes/build_tree.py index 6a73ab8..83d4b36 100644 --- a/ogs6py/classes/build_tree.py +++ b/ogs6py/classes/build_tree.py @@ -7,15 +7,8 @@ """ -from typing import TypeAlias - from lxml import etree as ET -OptionalETElement: TypeAlias = ( - ET.Element -) # ToDo this should be Optional[ET.Element] - - # pylint: disable=C0103, R0902, R0914, R0913 class BuildTree: """helper class to create a nested dictionary @@ -71,7 +64,7 @@ def get_child_tag( tag: str, attr: dict[str, str] | None = None, attr_val: str | None = None, - ) -> OptionalETElement: + ) -> ET.Element: """ search for child tag based on tag and possible attributes """ @@ -88,7 +81,7 @@ def get_child_tag( @classmethod def get_child_tag_for_type( cls, parent: ET.Element, tag: str, subtagval: str, subtag: str = "type" - ) -> OptionalETElement: + ) -> ET.Element: """ search for child tag based on subtag type """