From c177f944d95c460803f8a894fd13d4901c3155fe Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 May 2021 08:06:36 -0400 Subject: subcmds: force consistent help text format We're inconsistent with help text as to whether it uses title case and whether it ends in a period. Add a test to enforce a standard, and use the style that Python optparse & argparse use themselves (e.g. with the --help option): always lowercase, and never trailing period. Change-Id: Ic1defae23daeac0ac9116aaf487427f50b34050d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305144 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- subcmds/forall.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'subcmds/forall.py') diff --git a/subcmds/forall.py b/subcmds/forall.py index 4a631fb7..0cf3b6a6 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -131,30 +131,30 @@ without iterating through the remaining projects. def _Options(self, p): p.add_option('-r', '--regex', dest='regex', action='store_true', - help="Execute the command only on projects matching regex or wildcard expression") + help='execute the command only on projects matching regex or wildcard expression') p.add_option('-i', '--inverse-regex', dest='inverse_regex', action='store_true', - help="Execute the command only on projects not matching regex or " - "wildcard expression") + help='execute the command only on projects not matching regex or ' + 'wildcard expression') p.add_option('-g', '--groups', dest='groups', - help="Execute the command only on projects matching the specified groups") + help='execute the command only on projects matching the specified groups') p.add_option('-c', '--command', - help='Command (and arguments) to execute', + help='command (and arguments) to execute', dest='command', action='callback', callback=self._cmd_option) p.add_option('-e', '--abort-on-errors', dest='abort_on_errors', action='store_true', - help='Abort if a command exits unsuccessfully') + help='abort if a command exits unsuccessfully') p.add_option('--ignore-missing', action='store_true', - help='Silently skip & do not exit non-zero due missing ' + help='silently skip & do not exit non-zero due missing ' 'checkouts') g = p.get_option_group('--quiet') g.add_option('-p', dest='project_header', action='store_true', - help='Show project headers before output') + help='show project headers before output') p.add_option('--interactive', action='store_true', help='force interactive usage') -- cgit v1.2.3-54-g00ecf