From 23a140aa3011555e9bf5ab56c4efa886352ea6bc Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 8 Mar 2016 11:31:21 -0800 Subject: [PATCH 1/3] Improve help text Add choices to --color help text. Fix typo in --allow-unstaged-config. --- pre_commit/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre_commit/main.py b/pre_commit/main.py index 7092a5a8..0e092667 100644 --- a/pre_commit/main.py +++ b/pre_commit/main.py @@ -79,7 +79,7 @@ def main(argv=None): run_parser.add_argument('hook', nargs='?', help='A single hook-id to run') run_parser.add_argument( '--color', default='auto', type=color.use_color, - help='Whether to use color in output. Defaults to `auto`', + help='Whether to use color in output. Choices are `always`, `never`, or `auto`. Defaults to `auto`.', ) run_parser.add_argument( '--no-stash', default=False, action='store_true', @@ -98,7 +98,7 @@ def main(argv=None): ) run_parser.add_argument( '--allow-unstaged-config', default=False, action='store_true', - help='Allow an unstaged config to be present. Note that this will' + help='Allow an unstaged config to be present. Note that this will ' 'be stashed before parsing unless --no-stash is specified' ) run_parser.add_argument( From e0f1a343196fd8fb7ef945a3aa8e89731cf74ab7 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 8 Mar 2016 15:51:28 -0800 Subject: [PATCH 2/3] Style: fixed line length --- pre_commit/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pre_commit/main.py b/pre_commit/main.py index 0e092667..1aafefd8 100644 --- a/pre_commit/main.py +++ b/pre_commit/main.py @@ -79,7 +79,8 @@ def main(argv=None): run_parser.add_argument('hook', nargs='?', help='A single hook-id to run') run_parser.add_argument( '--color', default='auto', type=color.use_color, - help='Whether to use color in output. Choices are `always`, `never`, or `auto`. Defaults to `auto`.', + help='Whether to use color in output. Choices are `always`, `never`' + ', or `auto`. Defaults to `auto`.', ) run_parser.add_argument( '--no-stash', default=False, action='store_true', From 4bb2bfea52cb8ac9155dbc199d78b1df6629be07 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 8 Mar 2016 15:52:34 -0800 Subject: [PATCH 3/3] Add periods to help texts for all run commands. --- pre_commit/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pre_commit/main.py b/pre_commit/main.py index 1aafefd8..58aeea32 100644 --- a/pre_commit/main.py +++ b/pre_commit/main.py @@ -91,20 +91,20 @@ def main(argv=None): ) run_parser.add_argument( '--origin', '-o', - help='The origin branch\'s commit_id when using `git push`', + help='The origin branch\'s commit_id when using `git push`.', ) run_parser.add_argument( '--source', '-s', - help='The remote branch\'s commit_id when using `git push`', + help='The remote branch\'s commit_id when using `git push`.', ) run_parser.add_argument( '--allow-unstaged-config', default=False, action='store_true', help='Allow an unstaged config to be present. Note that this will ' - 'be stashed before parsing unless --no-stash is specified' + 'be stashed before parsing unless --no-stash is specified.' ) run_parser.add_argument( '--hook-stage', choices=('commit', 'push'), default='commit', - help='The stage during which the hook is fired e.g. commit or push', + help='The stage during which the hook is fired e.g. commit or push.', ) run_mutex_group = run_parser.add_mutually_exclusive_group(required=False) run_mutex_group.add_argument(