From b1c45a720e850ee99f04f8f01bab518162c1bac0 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 1 Jun 2023 12:22:24 +0100 Subject: [PATCH] Use pre-commit for 'pep8' tox target This avoids some duplication. Signed-off-by: Stephen Finucane Change-Id: Id3fb0770ce128b34777418da3d33cc63a61c06ea --- test-requirements.txt | 6 ------ tox.ini | 24 ++++-------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 434c9b7d6c..82020f504a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 -bashate>=0.5.1 # Apache-2.0 coverage>=5.2.1 # Apache-2.0 ddt>=1.4.1 # MIT fixtures>=3.0.0 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index ea75e41aa7..dab5bd7d29 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ allowlist_externals = rm [testenv:newnote] allowlist_externals = reno 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 commands = reno new {posargs} @@ -43,27 +43,13 @@ commands = reno new {posargs} commands = oslo_debug_helper {posargs} [testenv:pep8] +deps = + pre-commit allowlist_externals = {toxinidir}/tools/check_exec.py {toxinidir}/tools/check_logging.sh - -# Let's gate pep8 under py3 by default because the py3 checks are stricter. commands = - flake8 {posargs} - # 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 + pre-commit run --all-files --show-diff-on-failure {toxinidir}/tools/check_exec.py {toxinidir}/manila {toxinidir}/tools/check_logging.sh {toxinidir}/manila @@ -89,8 +75,6 @@ deps = commands = rm -rf doc/build 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 [testenv:pdf-docs]