Just came across the global command_parser in cli.list-templates.py, which I had overlooked earlier (mypy is complaining).
This is to provide a better help message from the sub-parser rather than the parent parser, right @steve-bate ? Looking at the other commands, it appears to me that the parser that's being passed into run is actually not used for anything other than printing help messages... and chances are, those other commands could benefit from more specific messages, too.
What about we pass the sub-parser into all the run methods instead of the parent parser, and the we can do parser.print_help() without extra workarounds like the global in all the commands?
Yes, I think that's a good idea. However, I'm not sure we even need (or want) this command at this point. We really want a "--list-report-styles" command, right?
Just came across the global
command_parser
incli.list-templates.py
, which I had overlooked earlier (mypy
is complaining).This is to provide a better help message from the sub-parser rather than the parent parser, right @steve-bate ? Looking at the other commands, it appears to me that the
parser
that's being passed intorun
is actually not used for anything other than printing help messages... and chances are, those other commands could benefit from more specific messages, too.What about we pass the sub-parser into all the
run
methods instead of the parent parser, and the we can doparser.print_help()
without extra workarounds like the global in all the commands?