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
|
python: python3
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.4.0
|
rev: v4.4.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
@ -16,13 +16,18 @@ repos:
|
|||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
files: .*\.(yaml|yml)$
|
files: .*\.(yaml|yml)$
|
||||||
exclude: '^.zuul.yaml'
|
exclude: '^zuul.d/.*$'
|
||||||
|
- repo: https://github.com/PyCQA/doc8
|
||||||
|
rev: v1.1.1
|
||||||
|
hooks:
|
||||||
|
- id: doc8
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
name: flake8
|
name: flake8
|
||||||
additional_dependencies:
|
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
|
language: python
|
||||||
entry: flake8
|
entry: flake8
|
||||||
files: '^.*\.py$'
|
files: '^.*\.py$'
|
||||||
|
9
tox.ini
9
tox.ini
@ -58,14 +58,9 @@ commands =
|
|||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps =
|
deps =
|
||||||
hacking>=3.1.0,<4.0.0 # Apache-2.0
|
pre-commit
|
||||||
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
|
|
||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
pre-commit run --all-files --show-diff-on-failure
|
||||||
doc8 doc/source README.rst
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
Reference in New Issue
Block a user