Fix zuul builds with dependencies and pep8 rules

This updates hacking to 3.2 thereby removing the pyflakes
dependency. In addition pep8 rules W503 is disabled in
favor of the more recent W504.

Co-authored-by: limin.lc <limin.lc@inspur.com>
Change-Id: Id274b1b577b12a7dc1e659949b08b05ddfc661e8
This commit is contained in:
Dantali0n 2021-06-30 16:54:09 +02:00
parent f5913409a5
commit f66397a3cc
4 changed files with 6 additions and 10 deletions

View File

@ -2,11 +2,7 @@
# 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.12.0 # Apache-2.0
# remove this pyflakes from here once you bump the
# hacking to 3.2.0 or above. hacking 3.2.0 takes
# care of pyflakes version compatibilty.
pyflakes>=2.1.1
hacking>=3.2.,<3.3 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
@ -20,5 +16,5 @@ openstackdocstheme>=2.2.1 # Apache-2.0
reno>=3.1.0 # Apache-2.0
# bandit
bandit>=1.1.0 # Apache-2.0
bandit>=1.6.0 # Apache-2.0

View File

@ -55,7 +55,7 @@ commands = oslo_debug_helper {posargs}
[flake8]
show-source=True
ignore= H105,E123,E226,N320,H202
ignore= H105,E123,E226,N320,H202,W503
builtins= _
enable-extensions = H106,H203
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,demo/,releasenotes

View File

@ -61,7 +61,7 @@ def execute(cmd, fail_ok=False, merge_stderr=False):
class TestCase(testtools.TestCase):
delimiter_line = re.compile('^\+\-[\+\-]+\-\+$')
delimiter_line = re.compile(r'^\+\-[\+\-]+\-\+$')
api_version = 1.0

View File

@ -106,8 +106,8 @@ class BaseInfraOptimScenarioTest(manager.ScenarioTest):
for service in cls.get_compute_nodes_setup()
if service['state'] == 'up')
return (
len(available_hypervisors) == len(available_services) and
len(hypervisors) >= 2)
len(available_hypervisors) == len(available_services)
and len(hypervisors) >= 2)
except Exception as exc:
LOG.exception(exc)
return False