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/list.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'subcmds/list.py') diff --git a/subcmds/list.py b/subcmds/list.py index 5cbc0c22..68bcd5e0 100644 --- a/subcmds/list.py +++ b/subcmds/list.py @@ -36,22 +36,22 @@ This is similar to running: repo forall -c 'echo "$REPO_PATH : $REPO_PROJECT"'. def _Options(self, p): p.add_option('-r', '--regex', dest='regex', action='store_true', - help="Filter the project list based on regex or wildcard matching of strings") + help='filter the project list based on regex or wildcard matching of strings') p.add_option('-g', '--groups', dest='groups', - help="Filter the project list based on the groups the project is in") + help='filter the project list based on the groups the project is in') p.add_option('-a', '--all', action='store_true', - help='Show projects regardless of checkout state') + help='show projects regardless of checkout state') p.add_option('-f', '--fullpath', dest='fullpath', action='store_true', - help="Display the full work tree path instead of the relative path") + help='display the full work tree path instead of the relative path') p.add_option('-n', '--name-only', dest='name_only', action='store_true', - help="Display only the name of the repository") + help='display only the name of the repository') p.add_option('-p', '--path-only', dest='path_only', action='store_true', - help="Display only the path of the repository") + help='display only the path of the repository') def ValidateOptions(self, opt, args): if opt.fullpath and opt.name_only: -- cgit v1.2.3-54-g00ecf