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

Add choices list #111

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Add choices list #111

merged 2 commits into from
Jul 8, 2024

Conversation

lovejia2022
Copy link
Contributor

@lovejia2022 lovejia2022 commented Jun 28, 2024

If we add a "choices" list to a mask task flag, and if flag value is not one of the choices, this task will fail.

Which issue does this fix?

This is discussed in issue #91.

I don't add filepath and dirpath in this PR, I think this might need more discussion.

Describe the solution

Before pass arguments to scripts, I check if this flag value shows in the choices list.

Set type to "enum" and add a "choices" list. If flag value is not one of
the choices, this task will fail.
@jacobdeichert
Copy link
Owner

Thanks for the PR! I plan on finding time this week to review 👍

@lovejia2022
Copy link
Contributor Author

I find out that we do not really need a enum type, choices is enough. 🤔

Only choices list is needed if you want to check flag value.
@lovejia2022 lovejia2022 changed the title Add enum flag Add choices list Jul 2, 2024
Copy link
Owner

@jacobdeichert jacobdeichert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Glad you removed the enum type, just the choices is perfect 👍

@jacobdeichert jacobdeichert merged commit 45c1bb9 into jacobdeichert:master Jul 8, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

3 participants