Clean up pep8 E502 violations
Updated pep8 version requirement to 1.3.3
Fixed E502 errors
All ignores are to be removed in the next sequence of patches
Change-Id: I71c013061fb88d7b8b31cfa3b83498999455d8db
diff --git a/tempest/tests/compute/test_authorization.py b/tempest/tests/compute/test_authorization.py
index afa60b3..b725b82 100644
--- a/tempest/tests/compute/test_authorization.py
+++ b/tempest/tests/compute/test_authorization.py
@@ -86,7 +86,7 @@
from_port = 22
to_port = 22
resp, cls.rule =\
- cls.security_client.create_security_group_rule(\
+ cls.security_client.create_security_group_rule(
parent_group_id,
ip_protocol, from_port,
to_port)
@@ -263,7 +263,7 @@
self.alt_security_client.base_url = self.security_client.base_url
resp = {}
resp['status'] = None
- resp, body = self.alt_security_client.create_security_group(\
+ resp, body = self.alt_security_client.create_security_group(
s_name,
s_description)
finally:
@@ -279,14 +279,13 @@
@attr(type='negative')
def test_get_security_group_of_alt_account_fails(self):
"""A GET request for another user's security group should fail"""
- self.alt_security_client.get_security_group(\
- self.security_group['id'])
+ self.alt_security_client.get_security_group(self.security_group['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
def test_delete_security_group_of_alt_account_fails(self):
"""A DELETE request for another user's security group should fail"""
- self.alt_security_client.delete_security_group(\
+ self.alt_security_client.delete_security_group(
self.security_group['id'])
@raises(exceptions.BadRequest)
@@ -308,7 +307,7 @@
resp = {}
resp['status'] = None
resp, body = \
- self.alt_security_client.create_security_group_rule(\
+ self.alt_security_client.create_security_group_rule(
parent_group_id,
ip_protocol, from_port,
to_port)
@@ -317,7 +316,7 @@
self.alt_security_client.base_url = self.saved_base_url
if resp['status'] != None:
resp, _ = \
- self.alt_security_client.delete_security_group_rule(\
+ self.alt_security_client.delete_security_group_rule(
body['id'])
self.fail("Create security group rule request should not "
"happen if the tenant id does not match the"
@@ -331,8 +330,7 @@
A DELETE request for another user's security group rule
should fail
"""
- self.alt_security_client.delete_security_group_rule(\
- self.rule['id'])
+ self.alt_security_client.delete_security_group_rule(self.rule['id'])
@raises(exceptions.NotFound)
@attr(type='negative')
@@ -379,7 +377,7 @@
except exceptions.NotFound:
pass
finally:
- resp, body = self.images_client.delete_image_metadata_item(\
+ resp, body = self.images_client.delete_image_metadata_item(
self.image['id'], 'meta1')
@attr(type='negative')
@@ -390,8 +388,8 @@
req_metadata)
try:
resp, body = \
- self.alt_client.delete_server_metadata_item(\
- self.server['id'], 'meta1')
+ self.alt_client.delete_server_metadata_item(self.server['id'],
+ 'meta1')
except exceptions.NotFound:
pass
finally:
@@ -406,8 +404,8 @@
req_metadata)
try:
resp, body = \
- self.alt_images_client.delete_image_metadata_item(\
- self.image['id'], 'meta1')
+ self.alt_images_client.delete_image_metadata_item(self.image['id'],
+ 'meta1')
except exceptions.NotFound:
pass
finally:
diff --git a/tempest/tests/compute/test_floating_ips_actions.py b/tempest/tests/compute/test_floating_ips_actions.py
index 2f7532b..90d5e35 100644
--- a/tempest/tests/compute/test_floating_ips_actions.py
+++ b/tempest/tests/compute/test_floating_ips_actions.py
@@ -187,7 +187,7 @@
#Make sure no longer associated with old server
try:
- self.client.disassociate_floating_ip_from_server(\
+ self.client.disassociate_floating_ip_from_server(
self.floating_ip,
self.server_id)
except exceptions.NotFound:
@@ -198,7 +198,7 @@
if (resp['status'] != None):
#Dissociation of the floating IP associated in this method
resp, _ = \
- self.client.disassociate_floating_ip_from_server(\
+ self.client.disassociate_floating_ip_from_server(
self.floating_ip,
self.new_server_id)
#Deletion of server created in this method
diff --git a/tools/test-requires b/tools/test-requires
index ecf7c3e..fa98918 100644
--- a/tools/test-requires
+++ b/tools/test-requires
@@ -1,4 +1,4 @@
-pep8>=0.5.0
+pep8==1.3.3
pylint==0.19
# Needed for whitebox testing
paramiko
diff --git a/tox.ini b/tox.ini
index c260fd8..5f957a1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,5 +14,5 @@
commands = nosetests {posargs}
[testenv:pep8]
-deps = pep8==1.1
-commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack,kong .
+deps = pep8==1.3.3
+commands = pep8 --ignore=E121,E122,E123,E124,E125,E126,E127,E128,E711 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack,kong .