Move to Zuul standard hacking rules

These seem as good as any.  Excluded vendored code.  Fix one small
line error.

Change-Id: I7208758ea131363f305863388d06a08a15304907
This commit is contained in:
Ian Wienand 2021-04-27 14:23:00 +10:00
parent 4557d573bd
commit ae571bfed8
2 changed files with 4 additions and 10 deletions

View File

@ -69,8 +69,7 @@ def safe_open(*args, **kwargs):
def _exists_rh_interface(name, distro): def _exists_rh_interface(name, distro):
file_to_check = _network_files(distro)['ifcfg'] + '-{name}'.format( file_to_check = _network_files(distro)['ifcfg'] + '-{name}'.format(
name=name name=name)
)
return os.path.exists(file_to_check) return os.path.exists(file_to_check)

11
tox.ini
View File

@ -30,13 +30,8 @@ basepython = python3
commands = python setup.py build_sphinx commands = python setup.py build_sphinx
[flake8] [flake8]
# Hacking ignored becaues its rules are too zealous and cause more
# grief than value.
# E123, E125 skipped as they are invalid PEP-8.
# W503 contradicts W504 which seems more preferred per
# https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
show-source = True show-source = True
ignore = E123,E125,W503,H # Per general Zuul projects
ignore = E124,E125,E129,E402,E741,W503,W504
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,glean/_vendor/*