west: main: tweak external command help
The current output looks kind of silly. Tweak it and add a TODO comment for further noncritical improvements. Signed-off-by: Marti Bolivar <marti@foundries.io>
This commit is contained in:
parent
2908ede7a7
commit
0d39b6b77a
|
@ -140,10 +140,20 @@ class WestArgumentParser(argparse.ArgumentParser):
|
|||
self.format_command(append, command, width)
|
||||
append('')
|
||||
|
||||
# TODO we may want to be more aggressive about loading
|
||||
# command modules by default: the current implementation
|
||||
# prevents us from formatting one-line help here.
|
||||
#
|
||||
# Perhaps a commands.external_paranoid that if set, uses
|
||||
# thunks, and otherwise just loads the modules and
|
||||
# provides help for each command.
|
||||
#
|
||||
# This has its own wrinkle: we can't let a failed
|
||||
# import break the built-in commands.
|
||||
if self.west_externals:
|
||||
for path, specs in self.west_externals.items():
|
||||
append('commands from project {} at path "{}":'.
|
||||
format(specs[0].project.name, path))
|
||||
append('commands from project at "{}":'.
|
||||
format(path))
|
||||
for spec in specs:
|
||||
self.format_external_spec(append, spec, width)
|
||||
append('')
|
||||
|
|
Loading…
Reference in New Issue