From 8bd26f6b05fad72998ce455c028764983d7f489a Mon Sep 17 00:00:00 2001 From: joergbuchwald Date: Fri, 23 Aug 2024 13:41:41 +0200 Subject: [PATCH] remove TypeAlias --- ogs6py/classes/build_tree.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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 """