diff --git a/neutron_tempest_plugin/api/base.py b/neutron_tempest_plugin/api/base.py index 1b022117..77bf5e8b 100644 --- a/neutron_tempest_plugin/api/base.py +++ b/neutron_tempest_plugin/api/base.py @@ -478,7 +478,7 @@ class BaseNetworkTest(test.BaseTestCase): """ if not cls.try_reserve_subnet_cidr(addr, **ipnetwork_kwargs): - raise ValueError('Subnet CIDR already reserved: %r'.format( + raise ValueError('Subnet CIDR already reserved: {0!r}'.format( addr)) @classmethod diff --git a/neutron_tempest_plugin/bgpvpn/scenario/manager.py b/neutron_tempest_plugin/bgpvpn/scenario/manager.py index 8a5f9f2c..4ff1c0d4 100644 --- a/neutron_tempest_plugin/bgpvpn/scenario/manager.py +++ b/neutron_tempest_plugin/bgpvpn/scenario/manager.py @@ -462,8 +462,8 @@ class NetworkScenarioTest(ScenarioTest): port_map = [(p["id"], fxip["ip_address"]) for p in ports for fxip in p["fixed_ips"] - if netutils.is_valid_ipv4(fxip["ip_address"]) - and p['status'] in p_status] + if netutils.is_valid_ipv4(fxip["ip_address"]) and + p['status'] in p_status] inactive = [p for p in ports if p['status'] != 'ACTIVE'] if inactive: LOG.warning("Instance has ports that are not ACTIVE: %s", inactive) diff --git a/neutron_tempest_plugin/common/ip.py b/neutron_tempest_plugin/common/ip.py index a286d6bc..83cd3d9b 100644 --- a/neutron_tempest_plugin/common/ip.py +++ b/neutron_tempest_plugin/common/ip.py @@ -295,7 +295,7 @@ def get_port_device_name(addresses, port): for address in list_ip_addresses(addresses=addresses, port=port): return address.device.name - msg = "Port %r fixed IPs not found on server.".format(port['id']) + msg = "Port {0!r} fixed IPs not found on server.".format(port['id']) raise ValueError(msg) diff --git a/test-requirements.txt b/test-requirements.txt index 6cbe9472..bf1c6266 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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.12.0 # Apache-2.0 +hacking>=3.2.0,<3.3.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 flake8-import-order==0.12 # LGPLv3 diff --git a/tox.ini b/tox.ini index 760cc47c..eecd16e1 100644 --- a/tox.ini +++ b/tox.ini @@ -53,7 +53,8 @@ commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs} # E128 continuation line under-indented for visual indent # E129 visually indented line with same indent as next logical line # N530 direct neutron imports not allowed -ignore = E126,E128,E129,N530 +# W504 line break after binary operator +ignore = E126,E128,E129,N530,W504 # H106: Don't put vim configuration in source files # H203: Use assertIs(Not)None to check for None # H204: Use assert(Not)Equal to check for equality