From c408475c28aa1ac9460a0e5a27c83ef05176992c Mon Sep 17 00:00:00 2001 From: Manu Raghavan Date: Wed, 10 Jun 2020 15:59:34 +0530 Subject: [PATCH] Tagging and token seapration fix --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 2 +- pre_commit_hooks/no_commit_keywords.py | 10 +++++++--- setup.cfg | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c819881..b4614a7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.2 + rev: v3.2.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a8ff5a..b6fee0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -3.2.2 - 2020-06-10 +3.2.0 - 2020-06-10 ================== ### Features diff --git a/pre_commit_hooks/no_commit_keywords.py b/pre_commit_hooks/no_commit_keywords.py index c59ea50..6a471a9 100644 --- a/pre_commit_hooks/no_commit_keywords.py +++ b/pre_commit_hooks/no_commit_keywords.py @@ -25,15 +25,19 @@ def main(argv: Optional[Sequence[str]] = None) -> int: parser.add_argument( '--tokens', help=( - 'The set of tokens, separated by space, used to block commits ' - 'if present. For example, "nocommit NOCOMMIT"' + 'The set of tokens, separated by comma, used to block commits ' + 'if present. For example, "nocommit,NOCOMMIT"' ), ) parser.add_argument('filenames', nargs='*', help='Filenames to fix') args = parser.parse_args(argv) return_code = 0 - tokens = args.tokens or ["nocommit"] + if args.tokens: + tokens = args.tokens.split(",") + else: + # default value + tokens = ["nocommit"] for filename in args.filenames: _, extension = os.path.splitext(filename.lower()) diff --git a/setup.cfg b/setup.cfg index da2d3d0..5ee977b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pre_commit_hooks -version = 3.2.2 +version = 3.2.0 description = Some out-of-the-box hooks for pre-commit. long_description = file: README.md long_description_content_type = text/markdown