From 153d4d8385fa8c39ea0f491b4b5bb0da7da43575 Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Fri, 21 Apr 2023 12:15:07 -0700 Subject: Upgrade to latest hacking - v6 Required minor changes to existing files to comply with new flake rules. Change-Id: Ia0bff27ab4a7ec98c533ea66357a3c0529026102 --- ironic/drivers/base.py | 2 +- ironic/drivers/modules/drac/raid.py | 2 +- ironic/hacking/checks.py | 2 +- tox.ini | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ironic/drivers/base.py b/ironic/drivers/base.py index bdd017b91..69764263e 100644 --- a/ironic/drivers/base.py +++ b/ironic/drivers/base.py @@ -1662,7 +1662,7 @@ class NetworkInterface(BaseInterface): """ def need_power_on(self, task): - """Check if ironic node must be powered on before applying network changes + """Check if node must be powered on before applying network changes :param task: A TaskManager instance. :returns: Boolean. diff --git a/ironic/drivers/modules/drac/raid.py b/ironic/drivers/modules/drac/raid.py index 8bad02bba..404222f5d 100644 --- a/ironic/drivers/modules/drac/raid.py +++ b/ironic/drivers/modules/drac/raid.py @@ -1022,7 +1022,7 @@ def _commit_to_controllers(node, controllers, substep="completed"): # all realtime controllers all_realtime = all( (cntlr['is_reboot_required'] == optional) - and not(cntlr.get('is_ehba_mode')) + and not (cntlr.get('is_ehba_mode')) for cntlr in controllers) # check any controller with ehba mode diff --git a/ironic/hacking/checks.py b/ironic/hacking/checks.py index 6c5b49776..57a3cbfe8 100644 --- a/ironic/hacking/checks.py +++ b/ironic/hacking/checks.py @@ -51,4 +51,4 @@ def check_explicit_underscore_import(logical_line, filename): UNDERSCORE_IMPORT_FILES.append(filename) elif (translated_log.match(logical_line) or string_translation.match(logical_line)): - yield(0, "N323: Found use of _() without explicit import of _!") + yield (0, "N323: Found use of _() without explicit import of _!") diff --git a/tox.ini b/tox.ini index 1fa446d66..bd564415b 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,7 @@ commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/s [testenv:pep8] usedevelop = False deps= - hacking>=4.1.0,<5.0.0 # Apache-2.0 + hacking~=6.0.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 pycodestyle>=2.0.0,<3.0.0 # MIT flake8-import-order>=0.17.1 # LGPLv3 -- cgit v1.2.1