Tagging and token seapration fix

This commit is contained in:
Manu Raghavan 2020-06-10 15:59:34 +05:30
parent bb018baed4
commit c408475c28
4 changed files with 10 additions and 6 deletions

View file

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

View file

@ -1,4 +1,4 @@
3.2.2 - 2020-06-10
3.2.0 - 2020-06-10
==================
### Features

View file

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

View file

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