Skip to content

Commit 71c46da

Browse files
authored
Drop the private type hint (#535)
It was necessary for python<3.10, but we dropped support for that, so we can get rid of the ugly, non-public hint. Signed-off-by: liamhuber <[email protected]>
1 parent 4d242b6 commit 71c46da

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pyiron_workflow/type_hinting.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@ def valid_value(value, type_hint) -> bool:
2828

2929

3030
def type_hint_to_tuple(type_hint) -> tuple:
31-
if isinstance(
32-
type_hint,
33-
types.UnionType | typing._UnionGenericAlias, # type: ignore
34-
# mypy complains because it thinks typing._UnionGenericAlias doesn't exist
35-
# It definitely does, and we may be able to remove this once mypy catches up
36-
):
31+
if isinstance(type_hint, types.UnionType):
3732
return typing.get_args(type_hint)
38-
else:
39-
return (type_hint,)
33+
return (type_hint,)
4034

4135

4236
def type_hint_is_as_or_more_specific_than(hint, other) -> bool:

0 commit comments

Comments
 (0)