diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3dd9b8d..7187380 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.1.0 + rev: v2.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -14,16 +14,16 @@ repos: - id: check-byte-order-marker - id: fix-encoding-pragma - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.7 + rev: 3.8.0 hooks: - id: flake8 exclude: ^identify/vendor/licenses\.py$ - repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v1.4.3 + rev: v1.5.2 hooks: - id: autopep8 - repo: https://github.com/asottile/reorder_python_imports - rev: v1.4.0 + rev: v2.3.0 hooks: - id: reorder-python-imports args: [ @@ -31,6 +31,6 @@ repos: '--add-import', 'from __future__ import unicode_literals', ] - repo: https://github.com/asottile/add-trailing-comma - rev: v1.0.0 + rev: v2.0.1 hooks: - id: add-trailing-comma diff --git a/.travis.yml b/.travis.yml index 0bf07c5..2f27068 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ matrix: python: 3.6 - env: TOXENV=pypy python: pypy + - env: TOXENV=pre-commit + python: 3.6 install: pip install coveralls tox script: tox after_success: coveralls diff --git a/tox.ini b/tox.ini index d222704..33cae3c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35,py36,pypy +envlist = py27,py35,py36,pypy,pre-commit tox_pip_extensions_ext_venv_update = true [testenv] @@ -9,8 +9,11 @@ commands = coverage erase coverage run -m pytest {posargs:tests} coverage report --fail-under 100 - pre-commit install -f --install-hooks - pre-commit run --all-files + +[testenv:pre-commit] +skip_install = true +deps = pre-commit +commands = pre-commit run --all-files --show-diff-on-failure [flake8] max-line-length = 119