We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_is_annotated_type
1 parent fc5f3c5 commit d97d145Copy full SHA for d97d145
hamilton/htypes.py
@@ -99,7 +99,7 @@ def get_type_as_string(type_: Type) -> Optional[str]:
99
:return: string representation of the type. An empty string if everything fails.
100
"""
101
102
- if typing.get_origin(type_) is Annotated: # differs from typing_inspect.get_origin
+ if _is_annotated_type(type_):
103
type_string = get_type_as_string(typing.get_args(type_)[0])
104
elif getattr(type_, "__name__", None):
105
type_string = type_.__name__
0 commit comments