Improve help messages
Help messages are in normally fully sentences starting with a capital letter, some of the help messages follow this but not all. Adjust all so that help messages look consistent. Also, improve wording of --help text. Change-Id: Ia22ccc42d71a4c9d7085303939dae9948ba52418
This commit is contained in:
parent
3473869011
commit
784f6d6d3d
@ -148,14 +148,14 @@ class App(object):
|
||||
action='store_const',
|
||||
dest='verbose_level',
|
||||
const=0,
|
||||
help='suppress output except warnings and errors',
|
||||
help='Suppress output except warnings and errors.',
|
||||
)
|
||||
if self.deferred_help:
|
||||
parser.add_argument(
|
||||
'-h', '--help',
|
||||
dest='deferred_help',
|
||||
action='store_true',
|
||||
help="show this help message and exit",
|
||||
help="Show help message and exit.",
|
||||
)
|
||||
else:
|
||||
parser.add_argument(
|
||||
@ -163,13 +163,13 @@ class App(object):
|
||||
action=HelpAction,
|
||||
nargs=0,
|
||||
default=self, # tricky
|
||||
help="show this help message and exit",
|
||||
help="Show this help message and exit.",
|
||||
)
|
||||
parser.add_argument(
|
||||
'--debug',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='show tracebacks on errors',
|
||||
help='Show tracebacks on errors.',
|
||||
)
|
||||
return parser
|
||||
|
||||
|
@ -202,7 +202,7 @@ def test_build_option_parser_conflicting_option_should_throw():
|
||||
parser.add_argument(
|
||||
'-h', '--help',
|
||||
default=self, # tricky
|
||||
help="show this help message and exit",
|
||||
help="Show help message and exit.",
|
||||
)
|
||||
|
||||
# TODO: tests should really use unittest2.
|
||||
@ -232,7 +232,7 @@ def test_option_parser_conflicting_option_custom_arguments_should_not_throw():
|
||||
parser.add_argument(
|
||||
'-h', '--help',
|
||||
default=self, # tricky
|
||||
help="show this help message and exit",
|
||||
help="Show this help message and exit.",
|
||||
)
|
||||
|
||||
MyApp()
|
||||
|
@ -48,7 +48,7 @@ To obtain instructions for a built-in or application command, use the
|
||||
A simple command that prints a message.
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-h, --help Show help message and exit.
|
||||
|
||||
The commands can be run, including options and arguments, as on the
|
||||
regular command line:
|
||||
|
Loading…
x
Reference in New Issue
Block a user