-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow --select
and --exclude
multiple times
#7169
Changes from 5 commits
846e991
2824f4a
4097afd
9da6e1a
f872a0d
cefd964
33c6cc4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Breaking Changes | ||
body: Allow `--select` and `--exclude` multiple times | ||
time: 2023-03-14T16:15:05.81741-06:00 | ||
custom: | ||
Author: dbeatty10 | ||
Issue: "7158" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,12 @@ | |
) | ||
|
||
exclude = click.option( | ||
"--exclude", envvar=None, type=tuple, cls=MultiOption, help="Specify the nodes to exclude." | ||
"--exclude", | ||
envvar=None, | ||
type=tuple, | ||
cls=MultiOption, | ||
multiple=True, | ||
help="Specify the nodes to exclude.", | ||
) | ||
|
||
fail_fast = click.option( | ||
|
@@ -178,7 +183,7 @@ | |
"Space-delimited listing of node properties to include as custom keys for JSON output " | ||
"(e.g. `--output json --output-keys name resource_type description`)" | ||
), | ||
type=list, | ||
type=tuple, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ContextWhen I left this as But when I updated it to Although it is not enforced, there is a comment here that says:
SuggestionTo avoid unforeseen issues in the future, maybe we should enforce that the configured
One option for enforcing this within the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I implemented this suggestion in 33c6cc4 |
||
cls=MultiOption, | ||
default=[], | ||
) | ||
|
@@ -314,6 +319,7 @@ | |
"envvar": None, | ||
"help": "Specify the nodes to include.", | ||
"cls": MultiOption, | ||
"multiple": True, | ||
"type": tuple, | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why, but the value can be
None
. We only want to flatten it when it has a non-None value.