Merge "Improve help messages"

This commit is contained in:
Jenkins 2015-08-17 18:30:43 +00:00 committed by Gerrit Code Review
commit 57650f6950
3 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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()

View File

@ -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: