-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Usage message is displayed when not desired. #441
Comments
@JimBiardClimateAI Nice workaround with Workaround to make
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I build a class with methods that can be chained (they return
self
), I find that the "commands" help message is written out even when I provide commands with proper arguments and the commands are executed. Here is the codeIf I run this as
python fire_bug.py
, I get the help output I expect, which isIf I run this as
python fire_bug.py act 1
, I unexpectedly get the help outputfollowed by the output I expect, which is
If run this as
python fire_bug.py act 1 rest 9
, I again unexpectedly get the help outputfollowed by the output I expect, which is
If I add a
__str__
method to the class that returns"\b"
, I don't get the unexpected messages, but I also don't get a help message if I runpython fire_bug.py
.As a general observation, running
python fire_bug.py --help
does not produce useful output. The output isThe output I would expect would be the output I get when I run
python fire_bug.py
. I am aware that if I have an__init__
method with arguments that the information about those arguments will be displayed, but separating the two sets of information in this way is quite counterintuitive. Both sets of information should be provided when running with no command and when running with only a--help
argument.The text was updated successfully, but these errors were encountered: