We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47c3958 commit 1c6ac97Copy full SHA for 1c6ac97
pydra/compose/base/field.py
@@ -229,7 +229,12 @@ def mandatory(self):
229
230
@requires.validator
231
def _requires_validator(self, _, value):
232
- if value and self.type not in (ty.Any, bool) and not is_optional(self.type):
+ if (
233
+ value
234
+ and self.type not in (ty.Any, bool)
235
+ and not is_optional(self.type)
236
+ and not issubclass(self.type, ty.Sequence)
237
+ ):
238
raise ValueError(
239
f"Fields with requirements must be of optional type (i.e. in union "
240
f"with None) or boolean, not type {self.type} ({self!r})"
0 commit comments