You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running this script without arguments shows the available commands - OK:
NAME
fire-bug.py
SYNOPSIS
fire-bug.py COMMAND
COMMANDS
COMMAND is one of the following:
start
stop
version
But the more common (and usually safe) thing to do when a user is being introduced a new command, is to run it with a --help. However, Fire doesn't behave the same for this argument:
INFO: Showing help with the command 'fire-bug.py -- --help'.
NAME
fire-bug.py
SYNOPSIS
fire-bug.py -
Unless you use --verbose as well. Why is that? This is not trivial for a user to guess, and only reading the docs here led me to this conclusion. Plus, the docs don't mention how to make a class method a "public" method...
The text was updated successfully, but these errors were encountered:
Quick solution: If you call Fire(Example()) instead of Fire(Example) I think you'll get the behavior you want.
The reason this happens is that when you call Fire(Example) and run --help it's giving you help for the class Example, not for an instance of the class. By contrast, when you run without arguments the first thing that happens is the class gets instantiated, and so the final component is an instance of Example(), and then help is shown for that.
I agree this isn't so intuitive and can be improved.
Here's a MWE:
Running this script without arguments shows the available commands - OK:
But the more common (and usually safe) thing to do when a user is being introduced a new command, is to run it with a
--help
. However,Fire
doesn't behave the same for this argument:Unless you use
--verbose
as well. Why is that? This is not trivial for a user to guess, and only reading the docs here led me to this conclusion. Plus, the docs don't mention how to make a class method a "public" method...The text was updated successfully, but these errors were encountered: