trivial: Remove some rules from flake8 ignore list

Most of these were either unnecessary or trivial to resolve.

Change-Id: I2952e4906a511f6ffc6c53dc1c582464000e22de
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2020-03-31 11:04:38 +01:00
parent d57a5f39ed
commit ba9d4ca956
3 changed files with 8 additions and 26 deletions

26
tox.ini
View File

@ -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: Dont 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

View File

@ -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)

View File

@ -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",
)