diff --git a/tox.ini b/tox.ini index 6d96849f..2cfe1ab5 100644 --- a/tox.ini +++ b/tox.ini @@ -61,30 +61,14 @@ commands = # E123, E125 skipped as they are invalid PEP-8. # Following checks are ignored on purpose. # -# E251 unexpected spaces around keyword / parameter equals -# reason: no improvement in readability -# -# E265 block comment should start with '# ' -# reason: no improvement in readability -# -# H904 wrap long lines in parentheses instead of a backslash -# reason: removed in hacking (https://review.opendev.org/#/c/101701/) -# -# H404 skipped on purpose per jay pipes discussion. -# +# H404, H405 skipped on purpose per jay pipes discussion. # W504 line break after binary operator -# -# Due to the upgrade to hacking 0.9.2 the following checking are -# ignored on purpose for the moment and should be re-enabled. -# H106: Don’t put vim configuration in source files -# H203: Use assertIs(Not)None to check for None - show-source = True -ignore = E123,E125,E126,E127,E128,E251,E265,H302,H405,H904,H404,W504 -enable-extensions=H106,H203 +ignore = E123,E125,E126,E127,E128,H404,H405,W504 +enable-extensions = H106,H203 builtins = _ -exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build -max-complexity=30 +exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build +max-complexity = 30 [hacking] import_exceptions = os_vif.i18n diff --git a/vif_plug_linux_bridge/tests/unit/test_linux_net.py b/vif_plug_linux_bridge/tests/unit/test_linux_net.py index 6daed382..648ae9b9 100644 --- a/vif_plug_linux_bridge/tests/unit/test_linux_net.py +++ b/vif_plug_linux_bridge/tests/unit/test_linux_net.py @@ -130,7 +130,7 @@ class LinuxNetTest(testtools.TestCase): calls = [mock.call('fake-interface', 1500), mock.call('fake-bridge', 1500)] mock_set_mtu.assert_has_calls(calls) - calls = [mock.call('fake-bridge', state = 'up'), + calls = [mock.call('fake-bridge', state='up'), mock.call('fake-interface', master='fake-bridge', state='up', check_exit_code=[0, 2, 254])] mock_ip_set.assert_has_calls(calls) diff --git a/vif_plug_ovs/ovs.py b/vif_plug_ovs/ovs.py index 9516f79f..180bc4c2 100644 --- a/vif_plug_ovs/ovs.py +++ b/vif_plug_ovs/ovs.py @@ -100,14 +100,12 @@ class OvsPlugin(plugin.PluginBase): def describe(self): pp_ovs = objects.host_info.HostPortProfileInfo( - profile_object_name= - objects.vif.VIFPortProfileOpenVSwitch.__name__, + profile_object_name=objects.vif.VIFPortProfileOpenVSwitch.__name__, # noqa min_version="1.0", max_version="1.0", ) pp_ovs_representor = objects.host_info.HostPortProfileInfo( - profile_object_name= - objects.vif.VIFPortProfileOVSRepresentor.__name__, + profile_object_name=objects.vif.VIFPortProfileOVSRepresentor.__name__, # noqa min_version="1.0", max_version="1.0", )