diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09ac472..dc4582e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,7 @@ repos: rev: 3.8.2 # pick a git hash / tag to point to hooks: - id: flake8 + additional_dependencies: [flake8-click, flake8-bugbear] - repo: https://github.com/psf/black rev: 19.10b0 diff --git a/tox.ini b/tox.ini index 995fa25..1588b77 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,8 @@ envlist = py36, py37, py38, - flake8, - coverage + coverage, + pre-commit [testenv] deps = @@ -22,18 +22,14 @@ commands = pip install -e .[test] pytest --cov=hibpcli --cov=tests --cov-report term-missing --cov-report html -[testenv:flake8] -deps = - flake8 - flake8-click - flake8-bugbear -commands = - flake8 src tests setup.py - [flake8] max-line-length = 88 ignore = E231 # clashes with black +[testenv:pre-commit] +skip_install = true +deps = pre-commit +commands = pre-commit run --all-files --show-diff-on-failure [isort] known_third_party = click,hibpcli,httpx,pykeepass,pytest,setuptools