Bump hacking to 1.1.0
hacking 1.0+ adds a couple of additional checks that are helpful as part of the transition to Python 3. However, hacking 1.1.0 incorporated flake8 2.6.x, which transitioned from pep8 to pycodestyle. Tempest provides some hacking extensions and these use pep8 imports. As things stand, projects that wish to use these hacking extensions must either constrain themselves to the same older hacking versions or install pep8 manually. Neither of these approaches is particularly attractive so instead transition to hacking 1.1.0 ourselves. This has the benefit of giving us the additional checks for Python 3. Change-Id: I09e3d2461366bb439bcb817149ce807a232acfbb
This commit is contained in:
parent
ea2d907756
commit
fc42cc6be7
@ -15,7 +15,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import pep8
|
import pycodestyle
|
||||||
|
|
||||||
|
|
||||||
PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron',
|
PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron',
|
||||||
@ -66,7 +66,7 @@ def scenario_tests_need_service_tags(physical_line, filename,
|
|||||||
|
|
||||||
def no_setup_teardown_class_for_tests(physical_line, filename):
|
def no_setup_teardown_class_for_tests(physical_line, filename):
|
||||||
|
|
||||||
if pep8.noqa(physical_line):
|
if pycodestyle.noqa(physical_line):
|
||||||
return
|
return
|
||||||
|
|
||||||
if 'tempest/test.py' in filename or 'tempest/lib/' in filename:
|
if 'tempest/test.py' in filename or 'tempest/lib/' in filename:
|
||||||
@ -161,7 +161,7 @@ def _common_service_clients_check(logical_line, physical_line, filename,
|
|||||||
if not METHOD.match(physical_line):
|
if not METHOD.match(physical_line):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if pep8.noqa(physical_line):
|
if pycodestyle.noqa(physical_line):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
@ -284,7 +284,7 @@ def dont_put_admin_tests_on_nonadmin_path(logical_line, physical_line,
|
|||||||
if 'tempest/api/' not in filename:
|
if 'tempest/api/' not in filename:
|
||||||
return
|
return
|
||||||
|
|
||||||
if pep8.noqa(physical_line):
|
if pycodestyle.noqa(physical_line):
|
||||||
return
|
return
|
||||||
|
|
||||||
if not re.match(r'class .*Test.*\(.*Admin.*\):', logical_line):
|
if not re.match(r'class .*Test.*\(.*Admin.*\):', logical_line):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# 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
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# 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
|
mock>=2.0.0 # BSD
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
|
3
tox.ini
3
tox.ini
@ -176,7 +176,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/
|
# 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
|
# E123 skipped because it is ignored by default in the default pep8
|
||||||
# E129 skipped because it is too limiting when combined with other rules
|
# 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
|
show-source = True
|
||||||
exclude = .git,.venv,.tox,dist,doc,*egg,build
|
exclude = .git,.venv,.tox,dist,doc,*egg,build
|
||||||
enable-extensions = H106,H203,H904
|
enable-extensions = H106,H203,H904
|
||||||
|
Loading…
Reference in New Issue
Block a user