Open
Conversation
|
Findings
Missing tests / edge cases
If you want, I can suggest a small patch to keep the on/off acceptance while preserving Click’s validation behavior. |
df1f6a1 to
a3632ef
Compare
Accept on/off values for --use-keyring, keeping true/false, as well as treating "reset" as special. The motivation is uniformity in the interface. The only loss is that click does not display the value choices in the helpdoc, but they are already listed in the description. Here we also change the description to suggest on/off, while continuing to silently accept true/false. The reason for the change is that --ssl-mode came first, and --ssl-mode takes on/off.
a3632ef to
79f58a4
Compare
Contributor
|
Similar comment to the ssl_mode one, the naming of I think setting clear expectations in the command/option is the most important anyway, so if it's true/false, then the option should be bool, and that is clear to the user. If it's not true/false, and has a set of values like ssl_mode (on/off/auto), then choice is preferred to enforce that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Accept on/off values for
--use-keyring, keeping true/false, as well as treating "reset" as special.The motivation is uniformity in the interface.
The only loss is that click does not display the value choices in the helpdoc, but they are already listed in the description.
Here we also change the description to suggest on/off, while continuing to silently accept true/false. The reason for the change is that
--ssl-modecame first, and--ssl-modetakes on/off.See #1606 for more on the motivation.
Checklist
changelog.mdfile.AUTHORSfile (or it's already there).