Skip to content

Commit

Permalink
added case for ellipsis in typing object to coerce
Browse files Browse the repository at this point in the history
  • Loading branch information
adsouza authored and tclose committed Feb 25, 2024
1 parent 0faac56 commit 050ac3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pydra/utils/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ def check_tuple(tp_args, pattern_args):
for arg in tp_args:
expand_and_check(arg, pattern_args[0])
return
elif tp_args[-1] is Ellipsis:
for pattern_arg in pattern_args:
expand_and_check(tp_args[0], pattern_arg)
return

Check warning on line 455 in pydra/utils/typing.py

View check run for this annotation

Codecov / codecov/patch

pydra/utils/typing.py#L454-L455

Added lines #L454 - L455 were not covered by tests
if len(tp_args) != len(pattern_args):
raise TypeError(
f"Wrong number of type arguments in tuple {tp_args} compared to pattern "
Expand Down

0 comments on commit 050ac3c

Please sign in to comment.