Merge "Fix remaining PEP8 (E***) and PyFlakes (F***) issues"

This commit is contained in:
Jenkins
2014-04-17 16:55:33 +00:00
committed by Gerrit Code Review
6 changed files with 30 additions and 32 deletions

View File

@@ -79,21 +79,21 @@ def generate_test_data():
'endpoints': [
{
'region': 'RegionOne',
'adminURL': 'http://nova-admin.localhost:8774/v2.0/%s' \
% (tenant_dict_1['id']),
'internalURL': 'http://nova-internal.localhost:8774/v2.0/%s' \
% (tenant_dict_1['id']),
'publicURL': 'http://nova-public.localhost:8774/v2.0/%s' \
% (tenant_dict_1['id'])
'adminURL': ('http://nova-admin.localhost:8774/v2.0/%s'
% (tenant_dict_1['id'])),
'internalURL': ('http://nova-internal.localhost:8774/v2.0/%s'
% (tenant_dict_1['id'])),
'publicURL': ('http://nova-public.localhost:8774/v2.0/%s'
% (tenant_dict_1['id']))
},
{
'region': 'RegionTwo',
'adminURL': 'http://nova2-admin.localhost:8774/v2.0/%s' \
% (tenant_dict_1['id']),
'internalURL': 'http://nova2-internal.localhost:8774/v2.0/%s' \
% (tenant_dict_1['id']),
'publicURL': 'http://nova2-public.localhost:8774/v2.0/%s' \
% (tenant_dict_1['id'])
'adminURL': ('http://nova2-admin.localhost:8774/v2.0/%s'
% (tenant_dict_1['id'])),
'internalURL': ('http://nova2-internal.localhost:8774/v2.0/%s'
% (tenant_dict_1['id'])),
'publicURL': ('http://nova2-public.localhost:8774/v2.0/%s'
% (tenant_dict_1['id']))
}
]
}

View File

@@ -128,43 +128,43 @@ def generate_test_data():
'id': uuid.uuid4().hex,
'endpoints': [
{
'url': 'http://nova-admin.localhost:8774/v2.0/%s' \
% (project_dict_1['id']),
'url': ('http://nova-admin.localhost:8774/v2.0/%s'
% (project_dict_1['id'])),
'region': 'RegionOne',
'interface': 'admin',
'id': uuid.uuid4().hex,
},
{
'url': 'http://nova-internal.localhost:8774/v2.0/%s' \
% (project_dict_1['id']),
'url': ('http://nova-internal.localhost:8774/v2.0/%s'
% (project_dict_1['id'])),
'region': 'RegionOne',
'interface': 'internal',
'id': uuid.uuid4().hex
},
{
'url': 'http://nova-public.localhost:8774/v2.0/%s' \
% (project_dict_1['id']),
'url': ('http://nova-public.localhost:8774/v2.0/%s'
% (project_dict_1['id'])),
'region': 'RegionOne',
'interface': 'public',
'id': uuid.uuid4().hex
},
{
'url': 'http://nova2-admin.localhost:8774/v2.0/%s' \
% (project_dict_1['id']),
'url': ('http://nova2-admin.localhost:8774/v2.0/%s'
% (project_dict_1['id'])),
'region': 'RegionTwo',
'interface': 'admin',
'id': uuid.uuid4().hex,
},
{
'url': 'http://nova2-internal.localhost:8774/v2.0/%s' \
% (project_dict_1['id']),
'url': ('http://nova2-internal.localhost:8774/v2.0/%s'
% (project_dict_1['id'])),
'region': 'RegionTwo',
'interface': 'internal',
'id': uuid.uuid4().hex
},
{
'url': 'http://nova2-public.localhost:8774/v2.0/%s' \
% (project_dict_1['id']),
'url': ('http://nova2-public.localhost:8774/v2.0/%s'
% (project_dict_1['id'])),
'region': 'RegionTwo',
'interface': 'public',
'id': uuid.uuid4().hex

View File

@@ -49,5 +49,6 @@ OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'domain'
# NOTE(saschpe): The openstack_auth.user.Token object isn't JSON-serializable ATM
# NOTE(saschpe): The openstack_auth.user.Token object isn't
# JSON-serializable ATM
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'

View File

@@ -934,7 +934,8 @@ class OpenStackAuthTestsV3(test.TestCase):
unscoped = self.data.unscoped_access_info
self.mox.StubOutWithMock(self.ks_client_module, "Client")
self.mox.StubOutWithMock(self.keystone_client_unscoped.projects, "list")
self.mox.StubOutWithMock(self.keystone_client_unscoped.projects,
"list")
self.ks_client_module.Client(user_id=user.id,
auth_url=settings.OPENSTACK_KEYSTONE_URL,

View File

@@ -122,7 +122,7 @@ def delete_token(endpoint, token_id):
# FIXME: KS-client does not have delete token available
# Need to add this later when it is exposed.
pass
except keystone_exceptions.ClientException as e:
except keystone_exceptions.ClientException:
LOG.info('Could not delete token')

View File

@@ -36,10 +36,6 @@ downloadcache = ~/cache/pip
[flake8]
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py
# F401 '<smth>' imported but unused
# F403 'from <smth> import *' used; unable to detect undefined names
# F841 local variable '<smth>' is assigned to but never used
# F999 syntax error in doctest
# H201 no 'except:' at least use 'except Exception:'
# H302 import only modules.'from optparse import make_option' does not import a module
# H303 No wildcard (*) import.
@@ -47,4 +43,4 @@ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,p
# H4xx docstrings
# H701 empty localization string
# H702 Formatting operation should be outside of localization method call
ignore = E501,E502,F403,F841,F999,H201,H301,H306,H302,H303,H304,H4,H701,H702,H803
ignore = H201,H301,H306,H302,H303,H304,H4,H701,H702,H803