Skip to content

Commit

Permalink
Improved type annotation assignment logic, fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Sep 5, 2023
1 parent db3c8b6 commit 1ee0eae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/groundlight/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def wrapper(*args, **kwargs):
for name, annotation in method.__annotations__.items():
if get_origin(annotation) is Union:
if str in annotation.__args__:
new_annotation = str
wrapper.__annotations__[name] = new_annotation
wrapper.__annotations__[name] = str
else:
wrapper.__annotations__[name] = annotation

return wrapper

Expand Down

0 comments on commit 1ee0eae

Please sign in to comment.