From 04c77d4d90d454974d161e0d9c0823cc9306a954 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 7 Sep 2014 21:17:19 +0200 Subject: [PATCH] Adjust formatting for arg descriptions --- scripts/generate_doc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/generate_doc.py b/scripts/generate_doc.py index fc72b5a79..5dd17f399 100755 --- a/scripts/generate_doc.py +++ b/scripts/generate_doc.py @@ -159,7 +159,8 @@ def _get_command_doc(name, cmd): output.append("==== positional arguments") for arg in cmd.pos_args: try: - output.append('* +{}+: {}'.format(arg, parser.arg_descs[arg])) + output.append("* +'{}'+: {}".format(arg, + parser.arg_descs[arg])) except KeyError as e: raise KeyError("No description for arg {} of command " "'{}'!".format(e, cmd.name)) @@ -169,7 +170,7 @@ def _get_command_doc(name, cmd): output.append("==== optional arguments") for arg, (long_flag, short_flag) in cmd.opt_args.items(): try: - output.append('* +{}+, +{}+: {}'.format( + output.append('* +*{}*+, +*{}*+: {}'.format( short_flag, long_flag, parser.arg_descs[arg])) except KeyError: raise KeyError("No description for arg {} of command "