Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deskew command flip tuple length bug #130

Open
JoOkuma opened this issue Aug 24, 2022 · 0 comments
Open

deskew command flip tuple length bug #130

JoOkuma opened this issue Aug 24, 2022 · 0 comments

Comments

@JoOkuma
Copy link
Member

JoOkuma commented Aug 24, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant