Skip to content

Commit b67c725

Browse files
adsouzatclose
authored andcommitted
added case for ellipsis in typing object to coerce
1 parent e4a2a09 commit b67c725

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
@@ -421,6 +421,10 @@ def check_tuple(tp_args, pattern_args):
421421
for arg in tp_args:
422422
expand_and_check(arg, pattern_args[0])
423423
return
424+
elif tp_args[-1] is Ellipsis:
425+
for pattern_arg in pattern_args:
426+
expand_and_check(tp_args[0], pattern_arg)
427+
return
424428
if len(tp_args) != len(pattern_args):
425429
raise TypeError(
426430
f"Wrong number of type arguments in tuple {tp_args} compared to pattern "

0 commit comments

Comments
 (0)