Skip to content

Commit 050ac3c

Browse files
adsouzatclose
authored andcommitted
added case for ellipsis in typing object to coerce
1 parent 0faac56 commit 050ac3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pydra/utils/typing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@ def check_tuple(tp_args, pattern_args):
449449
for arg in tp_args:
450450
expand_and_check(arg, pattern_args[0])
451451
return
452+
elif tp_args[-1] is Ellipsis:
453+
for pattern_arg in pattern_args:
454+
expand_and_check(tp_args[0], pattern_arg)
455+
return
452456
if len(tp_args) != len(pattern_args):
453457
raise TypeError(
454458
f"Wrong number of type arguments in tuple {tp_args} compared to pattern "

0 commit comments

Comments
 (0)