diff --git a/tempest/hacking/checks.py b/tempest/hacking/checks.py index a72675e61e..2c40cb1871 100644 --- a/tempest/hacking/checks.py +++ b/tempest/hacking/checks.py @@ -15,7 +15,7 @@ import os import re -import pep8 +import pycodestyle PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron', @@ -69,7 +69,7 @@ def scenario_tests_need_service_tags(physical_line, filename, def no_setup_teardown_class_for_tests(physical_line, filename): - if pep8.noqa(physical_line): + if pycodestyle.noqa(physical_line): return if 'tempest/test.py' in filename or 'tempest/lib/' in filename: @@ -164,7 +164,7 @@ def _common_service_clients_check(logical_line, physical_line, filename, if not METHOD.match(physical_line): return False - if pep8.noqa(physical_line): + if pycodestyle.noqa(physical_line): return False return True @@ -287,7 +287,7 @@ def dont_put_admin_tests_on_nonadmin_path(logical_line, physical_line, if 'tempest/api/' not in filename: return - if pep8.noqa(physical_line): + if pycodestyle.noqa(physical_line): return if not re.match(r'class .*Test.*\(.*Admin.*\):', logical_line): diff --git a/test-requirements.txt b/test-requirements.txt index e33f2079d4..196387cb75 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ # 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!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 mock>=2.0.0 # BSD coverage!=4.4,>=4.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index befa991b0d..d61a7fe77b 100644 --- a/tox.ini +++ b/tox.ini @@ -186,7 +186,8 @@ import_exceptions = tempest.services # E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/ # E123 skipped because it is ignored by default in the default pep8 # E129 skipped because it is too limiting when combined with other rules -ignore = E125,E123,E129 +# W504 skipped because it is overeager and unnecessary +ignore = E125,E123,E129,W504 show-source = True exclude = .git,.venv,.tox,dist,doc,*egg,build enable-extensions = H106,H203,H904