Fix some pep8 warnings
Fix some pep8 warnings found running under python3.5.
Also removed some ignore directives that were carried
over from the neutron tree, and exclude some additional
directories.
Trivialfix
Change-Id: I96f53d3d142352f0d2c7cc641391019b476b0724
diff --git a/neutron_tempest_plugin/api/test_dhcp_ipv6.py b/neutron_tempest_plugin/api/test_dhcp_ipv6.py
index 3a7db96..69b4ea0 100644
--- a/neutron_tempest_plugin/api/test_dhcp_ipv6.py
+++ b/neutron_tempest_plugin/api/test_dhcp_ipv6.py
@@ -50,8 +50,8 @@
def _remove_from_list_by_index(self, things_list, elem):
for index, i in enumerate(things_list):
if i['id'] == elem['id']:
- break
- del things_list[index]
+ del things_list[index]
+ return
def _clean_network(self):
body = self.client.list_ports()
diff --git a/neutron_tempest_plugin/api/test_qos.py b/neutron_tempest_plugin/api/test_qos.py
index ba7aad8..d31eab8 100644
--- a/neutron_tempest_plugin/api/test_qos.py
+++ b/neutron_tempest_plugin/api/test_qos.py
@@ -585,7 +585,7 @@
class QosBandwidthLimitRuleWithDirectionTestJSON(
- QosBandwidthLimitRuleTestJSON):
+ QosBandwidthLimitRuleTestJSON):
required_extensions = (
QosBandwidthLimitRuleTestJSON.required_extensions +
diff --git a/neutron_tempest_plugin/api/test_timestamp.py b/neutron_tempest_plugin/api/test_timestamp.py
index 4d2d32a..769d7cc 100644
--- a/neutron_tempest_plugin/api/test_timestamp.py
+++ b/neutron_tempest_plugin/api/test_timestamp.py
@@ -27,7 +27,7 @@
required_extensions = ["standard-attr-timestamp"]
- ## attributes for subnetpool
+ # attributes for subnetpool
min_prefixlen = '28'
max_prefixlen = '31'
_ip_version = 4
diff --git a/tox.ini b/tox.ini
index c16664d..06eda94 100644
--- a/tox.ini
+++ b/tox.ini
@@ -44,14 +44,11 @@
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# N530 direct neutron imports not allowed
-# TODO(ihrachys) figure out what to do with N534 and N536
-# N534 Untranslated exception message
-# N536 Use assertIsNone rather than assertEqual to check for None values
-ignore = E125,E126,E128,E129,E265,H404,H405,N530,N534,N536
+ignore = E125,E126,E128,E129,E265,H404,H405,N530
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H904: Delay string interpolations at logging calls
-enable-extensions=H106,H203,H904
+enable-extensions = H106,H203,H904
show-source = true
-exclude = ./.*,build,dist,doc
+exclude = ./.*,build,dist,doc,*egg*,releasenotes
import-order-style = pep8