Use pre-commit for 'pep8' tox target
This avoids some duplication. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: Id3fb0770ce128b34777418da3d33cc63a61c06ea
This commit is contained in:
parent
a675490108
commit
b1c45a720e
@ -1,11 +1,5 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
|
|
||||||
# hacking should be first
|
|
||||||
hacking>=3.1.0,<3.2.0 # Apache-2.0
|
hacking>=3.1.0,<3.2.0 # Apache-2.0
|
||||||
|
|
||||||
bashate>=0.5.1 # Apache-2.0
|
|
||||||
coverage>=5.2.1 # Apache-2.0
|
coverage>=5.2.1 # Apache-2.0
|
||||||
ddt>=1.4.1 # MIT
|
ddt>=1.4.1 # MIT
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
|
24
tox.ini
24
tox.ini
@ -35,7 +35,7 @@ allowlist_externals = rm
|
|||||||
[testenv:newnote]
|
[testenv:newnote]
|
||||||
allowlist_externals = reno
|
allowlist_externals = reno
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands = reno new {posargs}
|
commands = reno new {posargs}
|
||||||
|
|
||||||
@ -43,27 +43,13 @@ commands = reno new {posargs}
|
|||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
deps =
|
||||||
|
pre-commit
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
{toxinidir}/tools/check_exec.py
|
{toxinidir}/tools/check_exec.py
|
||||||
{toxinidir}/tools/check_logging.sh
|
{toxinidir}/tools/check_logging.sh
|
||||||
|
|
||||||
# Let's gate pep8 under py3 by default because the py3 checks are stricter.
|
|
||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
pre-commit run --all-files --show-diff-on-failure
|
||||||
# Run bashate during pep8 runs to ensure violations are caught by
|
|
||||||
# the check and gate queues.
|
|
||||||
bashate -i E006,E042,E043 \
|
|
||||||
tools/enable-pre-commit-hook.sh \
|
|
||||||
contrib/ci/pre_test_hook.sh \
|
|
||||||
contrib/ci/post_test_hook.sh \
|
|
||||||
devstack/plugin.sh \
|
|
||||||
devstack/upgrade/from-mitaka/upgrade-manila \
|
|
||||||
devstack/upgrade/resources.sh \
|
|
||||||
devstack/upgrade/shutdown.sh \
|
|
||||||
devstack/upgrade/upgrade.sh \
|
|
||||||
tools/cover.sh \
|
|
||||||
tools/check_logging.sh \
|
|
||||||
tools/coding-checks.sh
|
|
||||||
{toxinidir}/tools/check_exec.py {toxinidir}/manila
|
{toxinidir}/tools/check_exec.py {toxinidir}/manila
|
||||||
{toxinidir}/tools/check_logging.sh {toxinidir}/manila
|
{toxinidir}/tools/check_logging.sh {toxinidir}/manila
|
||||||
|
|
||||||
@ -89,8 +75,6 @@ deps =
|
|||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
sphinx-build -W -b html doc/source doc/build/html
|
sphinx-build -W -b html doc/source doc/build/html
|
||||||
# Ignore D001 since we allow lines in excess of 79 characters.
|
|
||||||
doc8 --ignore D001 --ignore-path .tox --ignore-path doc/build --ignore-path manila.egg-info -e .txt -e .rst -e .inc
|
|
||||||
allowlist_externals = rm
|
allowlist_externals = rm
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
|
Loading…
Reference in New Issue
Block a user