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
This includes a structure with purpose-based modules and a standard
mechanism for adding more subcommands.
When adding a new subcommand, one has to wire the `invoke_cli_app()`
and `populate_argument_parser()` from their new module into the
mappings defined in `_cli_subcommands.py` and `_cli_parsing.py`
respectively. This is the only integration point necessary.
`populate_argument_parser()` accepts a subparser instance of
`argparse.ArgumentParser()` that a new subcommand would need to attach
new arguments into. It does not need to return anything. And the
`invoke_cli_app()` hook is called with an instance of
`argparse.Namespace()` with all the arguments parsed and pre-processed.
This function is supposed to have the main check logic and return an
instance of `._structs.ReturnCode()` or `int`.
0 commit comments