Skip to content

Commit d97d145

Browse files
committed
Use existing _is_annotated_type
1 parent fc5f3c5 commit d97d145

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hamilton/htypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def get_type_as_string(type_: Type) -> Optional[str]:
9999
:return: string representation of the type. An empty string if everything fails.
100100
"""
101101

102-
if typing.get_origin(type_) is Annotated: # differs from typing_inspect.get_origin
102+
if _is_annotated_type(type_):
103103
type_string = get_type_as_string(typing.get_args(type_)[0])
104104
elif getattr(type_, "__name__", None):
105105
type_string = type_.__name__

0 commit comments

Comments
 (0)