|
def _flip_callback(ctx: click.Context, opt: click.Option, value: Optional[str]) -> Sequence[str]: |
|
length = len(ctx.params["input_dataset"].channels()) |
|
if value is None: |
|
value = (False,) * length |
|
else: |
|
value = tuple(bool(s) for s in value.split(",")) |
|
if len(value) != length: |
|
raise ValueError("-fl --flips must have length equal to number of channels.") |
|
return value |
It should validate with the number of selected channels and not the actual number of channels.
dexp/dexp/cli/dexp_commands/deskew.py
Lines 17 to 25 in 6f05363
It should validate with the number of selected channels and not the actual number of channels.