Skip to content

Commit ad11ea5

Browse files
committed
check for conflicting arg positions in shell builder takes account of xor subsets
1 parent 9ccce57 commit ad11ea5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pydra/compose/base/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def _check_arg_refs(
604604
type_ = inputs[field_name].type
605605
if not is_truthy_falsy(type_):
606606
raise ValueError(
607-
f"Fields included in a 'xor' ({field_name!r}) must be an optional type or a"
607+
f"Fields included in a 'xor' ({field_name!r}) must be an optional type or a "
608608
f"truthy/falsy type, not type {type_}"
609609
)
610610

pydra/compose/shell/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def remaining_positions(
571571
if multiple_positions := {
572572
k: [f"{a.name}({a.position})" for a in v]
573573
for k, v in positions.items()
574-
if len(v) > 1 and frozenset(a.name for a in v) not in xor
574+
if len(v) > 1 and not any(x.issuperset(a.name for a in v) for x in xor)
575575
}:
576576
raise ValueError(
577577
f"Multiple fields have the overlapping positions: {multiple_positions}"

0 commit comments

Comments
 (0)