Call rst-lint directly with pre-commit

This commit is contained in:
Anthony Sottile 2018-05-25 18:16:54 -07:00
parent 1d451c786d
commit 2a8463c745
2 changed files with 2 additions and 21 deletions

View File

@ -23,7 +23,8 @@ repos:
hooks:
- id: 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
additional_dependencies: [pygments, restructuredtext_lint]
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]*.*")
)
)