[metadata] Fix python styling of client API
@@ -72,7 +72,11 @@ def check_privileges(view_func):
if kwargs.get('db_tables'):
for db_table in kwargs['db_tables']:
- objects.append({'server': get_hive_sentry_provider(), 'db': _get_table_name(db_table)['database'], 'table': _get_table_name(db_table)['table']})
+ objects.append({
+ 'server': get_hive_sentry_provider(),
+ 'db': _get_table_name(db_table)['database'],
+ 'table': _get_table_name(db_table)['table']
+ })
else:
objects = [{'server': get_hive_sentry_provider()}]
if kwargs.get('database_name'):
@@ -82,7 +86,9 @@ def check_privileges(view_func):
filtered = list(checker.filter_objects(objects, action))
if len(filtered) != len(objects):
- raise MissingSentryPrivilegeException({'pre_filtering': objects, 'post_filtering': filtered, 'diff': len(objects) - len(filtered)})
+ raise MissingSentryPrivilegeException(
+ {'pre_filtering': objects, 'post_filtering': filtered, 'diff': len(objects) - len(filtered)}
+ )
return view_func(*args, **kwargs)
return wraps(view_func)(decorate)
@@ -253,7 +259,15 @@ class OptimizerClient(object):
def similar_queries(self, source_platform, query, page_size=100, startingToken=None):
if is_admin(self.user):
- return self._call('getSimilarQueries', {'tenant' : self._tenant_id, 'sourcePlatform': source_platform, 'query': query, 'pageSize': page_size, 'startingToken': startingToken})
+ return self._call(
+ 'getSimilarQueries', {
+ 'tenant': self._tenant_id,
+ 'sourcePlatform': source_platform,
+ 'query': query,
+ 'pageSize': page_size,
+ 'startingToken': startingToken
+ }
+ )
else:
raise PopupException(_('Call not supported'))
