-
Notifications
You must be signed in to change notification settings - Fork 99
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
Support multiple -v for verbosity #564
Conversation
4115bd6
to
aa66bcc
Compare
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.
Overall LGTM- I don't think you need to change anything for the stuff I pointed out, but something to think about, esp if we give runner the same treatment.
type=int, | ||
choices=[0, 1, 2, 3], | ||
action=CustomVerbosityAction, | ||
nargs='?', |
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.
nargs='?'
is potentially a big hammer here, since it can falsely trip when it's the last non-positional arg followed by a positional arg (and I can't recall offhand if you can "push" a token back for the next subparser). --
makes it work, but a lot of people don't understand that.
I think at least for builder, It's actually OK right now, since none of our existing command subparsers currently support trailing posargs, but just something to acknowledge (as well as perhaps a good reason to actually deprecate the numeric syntax?), and to make sure that an existing runner subparser doesn't have this problem.
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.
It should be cool for now b/c we don't have positional args, but I did add deprecating the old style in a new deprecation tracking issue #565.
(and bee-tee-dubs, THANK YOU) |
No description provided.