diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f3b33089..bb45976f1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,3 +19,11 @@ repos: rev: v1.2.0 hooks: - id: pyupgrade +- repo: local + hooks: + - id: rst + name: rst + entry: python scripts/check-rst.py + language: python + additional_dependencies: [pygments, restructuredtext_lint] + python_version: python3.6 diff --git a/.travis.yml b/.travis.yml index 0c6aa629f..a8e6a1815 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ env: # coveralls is not listed in tox's envlist, but should run in travis - TOXENV=coveralls # note: please use "tox --listenvs" to populate the build matrix below - - TOXENV=linting + # please remove the linting env in all cases - TOXENV=py27 - TOXENV=py34 - TOXENV=py36 diff --git a/tox.ini b/tox.ini index 981945265..2d0fee99c 100644 --- a/tox.ini +++ b/tox.ini @@ -38,15 +38,9 @@ commands = [testenv:linting] skipsdist = True usedevelop = True -basepython = python2.7 -deps = - flake8 - # pygments required by rst-lint - pygments - restructuredtext_lint -commands = - flake8 pytest.py _pytest testing setup.py pytest.py - {envpython} scripts/check-rst.py +basepython = python3.6 +deps = pre-commit +commands = pre-commit run --all-files [testenv:py27-xdist] deps =