Skip to content

Commit bd68698

Browse files
committed
Let AnyOf constraint report itemized causes on violation
If this is not desirable in a particular context, the error message template can be overwritten via a `WithDescription` wrapper.
1 parent 4460bbb commit bd68698

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datalad_next/constraints/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def __call__(self, value):
191191
self.raise_for(
192192
value,
193193
# plural OK, no sense in having 1 "alternative"
194-
'not any of {n_alternatives} alternatives',
194+
'not any of {n_alternatives} alternatives\n{__itemized_causes__}',
195195
# if any exception would be a ConstraintError
196196
# this would not be needed, because they
197197
# know the underlying constraint

0 commit comments

Comments
 (0)