Skip to content

Commit

Permalink
[Tools] Improve tool help formatting (#68)
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Balke <[email protected]>

Topic: tools_help_formatting
  • Loading branch information
gbalke authored Sep 26, 2022
1 parent ce4ab3c commit f552a7f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bd_tools/src/bd_tools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ def get_tools():
def parser_args(tools):
parser = argparse.ArgumentParser(description="BetzDrive Tools Package")
parser.add_argument(
"tool", type=str, choices=tools, help="Name of the tool to use."
"tool",
type=str,
choices=tools,
help="Tool from the following: %(choices)s",
metavar="tool",
)
return parser.parse_args()
return parser


def action(args):
Expand Down Expand Up @@ -51,7 +55,7 @@ def main():
cache_args = sys.argv[2:]
sys.argv = sys.argv[:2]

args = parser_args(get_tools())
args = parser_args(get_tools()).parse_args()

sys.argv.extend(cache_args)

Expand Down

0 comments on commit f552a7f

Please sign in to comment.