Remove redundant parentheses (except openstack.common)

Change-Id: I594234648a37d283559a0365969a7fe3609079f8
This commit is contained in:
Dina Belova
2014-12-10 12:56:47 +03:00
parent 27a810146b
commit 5df9d3c3c4
3 changed files with 9 additions and 9 deletions

View File

@@ -48,7 +48,7 @@ def _discover_auth_versions(session, auth_url):
raise exc.CommandError('Unable to determine the Keystone '
'version to authenticate with '
'using the given auth_url.')
return (v2_auth_url, v3_auth_url)
return v2_auth_url, v3_auth_url
def _get_keystone_session(**kwargs):

View File

@@ -51,7 +51,7 @@ class UserManager(base.Manager):
def list(self, **kwargs):
s = kwargs.get('source')
if s:
path = '/sources/%s/users' % (s)
path = '/sources/%s/users' % s
else:
path = '/users'
return self._list('/v1%s' % path, 'users')
@@ -100,17 +100,17 @@ class ResourceManager(base.Manager):
opts_path = _get_opt_path(['start_timestamp', 'end_timestamp'],
**kwargs)
if u:
path = '/users/%s/resources' % (u)
path = '/users/%s/resources' % u
elif s:
path = '/sources/%s/resources' % (s)
path = '/sources/%s/resources' % s
elif p:
path = '/projects/%s/resources' % (p)
path = '/projects/%s/resources' % p
else:
path = '/resources'
if opts_path:
path = '/v1%s?%s' % (path, opts_path)
else:
path = '/v1%s' % (path)
path = '/v1%s' % path
return self._list(path, 'resources')
@@ -152,7 +152,7 @@ class SampleManager(base.Manager):
if opts_path:
path = '/v1%s?%s' % (path, opts_path)
else:
path = '/v1%s' % (path)
path = '/v1%s' % path
return self._list(path, 'events')
@@ -186,5 +186,5 @@ class MeterManager(base.Manager):
if opts_path:
path = '/v1%s?%s' % (path, opts_path)
else:
path = '/v1%s' % (path)
path = '/v1%s' % path
return self._list(path, 'meters')

View File

@@ -99,7 +99,7 @@ def cli_to_array(cli_query):
if not len(value):
_value_error('value')
return (field, operator, value)
return field, operator, value
def split_by_data_type(query_value):
frags = DATA_TYPE_RE.match(query_value)