diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb45976f1..cc2dd2137 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/scripts/check-rst.py b/scripts/check-rst.py deleted file mode 100644 index b7aeccc07..000000000 --- a/scripts/check-rst.py +++ /dev/null @@ -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]*.*") - ) -)