mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
Tagging and token seapration fix
This commit is contained in:
parent
bb018baed4
commit
c408475c28
4 changed files with 10 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
3.2.2 - 2020-06-10
|
||||
3.2.0 - 2020-06-10
|
||||
==================
|
||||
|
||||
### Features
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue