Use pre-commit for 'pep8' tox target, bump versions
We want to bump the versions of hacking, but doing so requires changes in two places: '.pre-commit-config.yaml' and 'tox.ini'. This is silly: we can simply use tox to handle pre-commit and leave all other dependencies to pre-commit. Do this, migrating doc8 to pre-commit and bumping the other dependencies in the process. Change-Id: I26fa07145129d3ef9cb17693427ed70e55dbaaf5 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
6baf11f606
commit
9325626769
@ -4,7 +4,7 @@ default_language_version:
|
||||
python: python3
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.4.0
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: mixed-line-ending
|
||||
@ -16,13 +16,18 @@ repos:
|
||||
- id: debug-statements
|
||||
- id: check-yaml
|
||||
files: .*\.(yaml|yml)$
|
||||
exclude: '^.zuul.yaml'
|
||||
exclude: '^zuul.d/.*$'
|
||||
- repo: https://github.com/PyCQA/doc8
|
||||
rev: v1.1.1
|
||||
hooks:
|
||||
- id: doc8
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: flake8
|
||||
name: flake8
|
||||
additional_dependencies:
|
||||
- hacking>=3.0.1,<3.1.0
|
||||
- hacking>=6.0.1,<6.1.0
|
||||
- flake8-import-order>=0.18.2,<0.19.0
|
||||
language: python
|
||||
entry: flake8
|
||||
files: '^.*\.py$'
|
||||
|
9
tox.ini
9
tox.ini
@ -58,14 +58,9 @@ commands =
|
||||
|
||||
[testenv:pep8]
|
||||
deps =
|
||||
hacking>=3.1.0,<4.0.0 # Apache-2.0
|
||||
flake8-import-order>=0.17.1 # LGPLv3
|
||||
pycodestyle>=2.0.0,<2.7.0 # MIT
|
||||
Pygments>=2.2.0 # BSD
|
||||
doc8>=0.8.0 # Apache 2.0
|
||||
pre-commit
|
||||
commands =
|
||||
flake8 {posargs}
|
||||
doc8 doc/source README.rst
|
||||
pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
|
Loading…
Reference in New Issue
Block a user