Skip to content

deskew command flip tuple length bug #130

@JoOkuma

Description

@JoOkuma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions