Skip to content

Commit

Permalink
remove TypeAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
joergbuchwald committed Aug 23, 2024
1 parent b8c9113 commit 8bd26f6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions ogs6py/classes/build_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
"""
Expand All @@ -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
"""
Expand Down

0 comments on commit 8bd26f6

Please sign in to comment.