Bump hacking to 3.0.0

The new version enables a lot of standard flake8 checks, so a few
fixes are required. W503 is disabled as it conflicts with W504
and the latter seems to be preferred nowadays.

Change-Id: Ic1efc86ec41daf6fadb4cebb8a73b4dd158f880a
This commit is contained in:
Riccardo Pittau 2020-03-30 15:36:12 +02:00
parent 41ea6a6b25
commit a789257e9e
4 changed files with 7 additions and 5 deletions

View File

@ -12,7 +12,7 @@ extras==1.0.0
fixtures==3.0.0
flake8==2.5.5
future==0.16.0
hacking==0.12.0
hacking==3.0.0
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10

View File

@ -2,7 +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,<0.14,>=0.12.0 # Apache-2.0
hacking>=3.0.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0

View File

@ -55,7 +55,9 @@ commands =
commands = oslo_debug_helper {posargs}
[flake8]
ignore = E129
# [E129] Visually indented line with same indent as next logical line.
# [W503] Line break occurred before a binary operator. Conflicts with W504.
ignore = E129,W503
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
max-complexity=17

View File

@ -97,8 +97,8 @@ class VirtualBMCManager(object):
except Exception:
currently_enabled = False
if (lets_enable is not None and
lets_enable != currently_enabled):
if (lets_enable is not None
and lets_enable != currently_enabled):
config.update(active=lets_enable)
self._store_config(**config)
currently_enabled = lets_enable