Clean up pep8 E121 violations
Fixed E121 errors. All other ignores are to be removed in the next sequence of patches. Change-Id: I5d3f490a1bfbe1945a23a7fc1f38d818c0650ff7
This commit is contained in:
parent
923b901f85
commit
ba3d3728d1
@ -342,8 +342,7 @@ def image_update(context, image_id, image_values, purge_props=False):
|
||||
prop['deleted'] = True
|
||||
|
||||
# add in any completly new properties
|
||||
image['properties'].extend([
|
||||
{'name': k, 'value': v, 'deleted': False}
|
||||
image['properties'].extend([{'name': k, 'value': v, 'deleted': False}
|
||||
for k, v in new_properties.items()])
|
||||
|
||||
image['updated_at'] = timeutils.utcnow()
|
||||
|
@ -133,8 +133,8 @@ class RegistryClient(BaseClient):
|
||||
if 'image' not in image_metadata.keys():
|
||||
image_metadata = dict(image=image_metadata)
|
||||
|
||||
image_metadata['image'] = self.encrypt_metadata(
|
||||
image_metadata['image'])
|
||||
encrypted_metadata = self.encrypt_metadata(image_metadata['image'])
|
||||
image_metadata['image'] = encrypted_metadata
|
||||
body = json.dumps(image_metadata)
|
||||
|
||||
res = self.do_request("POST", "/images", body=body, headers=headers)
|
||||
@ -150,8 +150,8 @@ class RegistryClient(BaseClient):
|
||||
if 'image' not in image_metadata.keys():
|
||||
image_metadata = dict(image=image_metadata)
|
||||
|
||||
image_metadata['image'] = self.encrypt_metadata(
|
||||
image_metadata['image'])
|
||||
encrypted_metadata = self.encrypt_metadata(image_metadata['image'])
|
||||
image_metadata['image'] = encrypted_metadata
|
||||
body = json.dumps(image_metadata)
|
||||
|
||||
headers = {
|
||||
|
@ -95,8 +95,9 @@ class TestSizeCheckedIter(unittest.TestCase):
|
||||
def test_too_few_chunks(self):
|
||||
resp = self._get_webob_response()
|
||||
meta = self._get_image_metadata()
|
||||
checked_image = glance.api.common.size_checked_iter(
|
||||
resp, meta, 6, ['AB', 'CD'], None)
|
||||
checked_image = glance.api.common.size_checked_iter(resp, meta, 6,
|
||||
['AB', 'CD'],
|
||||
None)
|
||||
|
||||
self.assertEqual('AB', checked_image.next())
|
||||
self.assertEqual('CD', checked_image.next())
|
||||
@ -105,8 +106,9 @@ class TestSizeCheckedIter(unittest.TestCase):
|
||||
def test_too_much_data(self):
|
||||
resp = self._get_webob_response()
|
||||
meta = self._get_image_metadata()
|
||||
checked_image = glance.api.common.size_checked_iter(
|
||||
resp, meta, 3, ['AB', 'CD'], None)
|
||||
checked_image = glance.api.common.size_checked_iter(resp, meta, 3,
|
||||
['AB', 'CD'],
|
||||
None)
|
||||
|
||||
self.assertEqual('AB', checked_image.next())
|
||||
self.assertEqual('CD', checked_image.next())
|
||||
@ -115,8 +117,9 @@ class TestSizeCheckedIter(unittest.TestCase):
|
||||
def test_too_little_data(self):
|
||||
resp = self._get_webob_response()
|
||||
meta = self._get_image_metadata()
|
||||
checked_image = glance.api.common.size_checked_iter(
|
||||
resp, meta, 6, ['AB', 'CD', 'E'], None)
|
||||
checked_image = glance.api.common.size_checked_iter(resp, meta, 6,
|
||||
['AB', 'CD', 'E'],
|
||||
None)
|
||||
|
||||
self.assertEqual('AB', checked_image.next())
|
||||
self.assertEqual('CD', checked_image.next())
|
||||
|
@ -3156,7 +3156,8 @@ class TestImageSerializer(base.IsolatedUnitTest):
|
||||
'size': 19,
|
||||
'owner': _gen_uuid(),
|
||||
'location': "file:///tmp/glance-tests/2",
|
||||
'properties': {}}
|
||||
'properties': {},
|
||||
}
|
||||
}
|
||||
|
||||
def test_meta(self):
|
||||
|
2
tox.ini
2
tox.ini
@ -18,7 +18,7 @@ downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:pep8]
|
||||
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 .
|
||||
commands = pep8 --ignore=E122,E123,E124,E125,E126,E127,E128,E711 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack .
|
||||
|
||||
[testenv:cover]
|
||||
setenv = NOSE_WITH_COVERAGE=1
|
||||
|
Loading…
Reference in New Issue
Block a user