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
I would like to build objects that I can instantiate and call directly from a CLI. But I want to have a base class, that I can inherit from for other classes to add new arguments. Here is a minimal example:
I can use this file to do python3 myfile.py --name foo --number 10 and this prints me in my terminal foo + 10. But, I would like to display the help of the CLI in a terminal, and when I do that, only the parameters of class B are displayed, and not the one from class A:
$ python3 myfile.py
NAME
myfile.py
SYNOPSIS
myfile.py --number=NUMBER <flags>
ARGUMENTS
NUMBER
FLAGS
Flags are accepted.
Do you know if I can bring slight modifications to my program so that the help displayed looks like:
$ python3 myfile.py
NAME
myfile.py
SYNOPSIS
myfile.py --number=NUMBER --name=NAME <flags>
ARGUMENTS
NUMBER
NAME
FLAGS
Flags are accepted.
Thanks !
The text was updated successfully, but these errors were encountered:
I would like to build objects that I can instantiate and call directly from a CLI. But I want to have a base class, that I can inherit from for other classes to add new arguments. Here is a minimal example:
I can use this file to do
python3 myfile.py --name foo --number 10
and this prints me in my terminalfoo + 10
. But, I would like to display the help of the CLI in a terminal, and when I do that, only the parameters of class B are displayed, and not the one from class A:Do you know if I can bring slight modifications to my program so that the help displayed looks like:
Thanks !
The text was updated successfully, but these errors were encountered: