Merge pull request #3512 from asottile/rst_via_pre_commit

Call rst-lint directly with pre-commit
This commit is contained in:
Ronny Pfannschmidt 2018-05-26 08:09:11 +02:00 committed by GitHub
commit ee6c54904b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 21 deletions

View File

@ -23,7 +23,8 @@ repos:
hooks: hooks:
- id: rst - id: rst
name: rst name: rst
entry: python scripts/check-rst.py entry: rst-lint --encoding utf-8
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|changelog/.*)$
language: python language: python
additional_dependencies: [pygments, restructuredtext_lint] additional_dependencies: [pygments, restructuredtext_lint]
python_version: python3.6 python_version: python3.6

View File

@ -1,20 +0,0 @@
from __future__ import print_function
import subprocess
import glob
import sys
sys.exit(
subprocess.call(
[
"rst-lint",
"--encoding",
"utf-8",
"CHANGELOG.rst",
"HOWTORELEASE.rst",
"README.rst",
]
+ glob.glob("changelog/[0-9]*.*")
)
)