mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-26 06:30:06 -05:00
Fix PEP8 issues with latest pycodestyle (#6636)
This commit is contained in:
1 parent
2aea5b41ad
commit
a1c7265c41
12 files changed
+18
-18
No files matched your search
@@ -663,7 +663,7 @@ def tables(params):
|
||||
params.get('tid', None))
|
||||
|
||||
if not status:
|
||||
tables = tables.json if type(tables) == Response else tables
|
||||
tables = tables.json if isinstance(tables, Response) else tables
|
||||
socketio.emit('tables_failed', tables,
|
||||
namespace=SOCKETIO_NAMESPACE,
|
||||
to=request.sid)
|
||||
|
||||
@@ -446,8 +446,8 @@ def compare_database(params):
|
||||
params['target_sid'])
|
||||
if not status:
|
||||
socketio.emit('compare_database_failed',
|
||||
error_msg.json if type(
|
||||
error_msg) == Response else error_msg,
|
||||
error_msg.json if isinstance(
|
||||
error_msg, Response) else error_msg,
|
||||
namespace=SOCKETIO_NAMESPACE, to=request.sid)
|
||||
return error_msg
|
||||
|
||||
@@ -585,8 +585,8 @@ def compare_schema(params):
|
||||
params['target_sid'])
|
||||
if not status:
|
||||
socketio.emit('compare_schema_failed',
|
||||
error_msg.json if type(
|
||||
error_msg) == Response else error_msg,
|
||||
error_msg.json if isinstance(
|
||||
error_msg, Response) else error_msg,
|
||||
namespace=SOCKETIO_NAMESPACE, to=request.sid)
|
||||
return error_msg
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ def validate_user(data):
|
||||
if 'auth_source' in data and data['auth_source'] != "":
|
||||
new_data['auth_source'] = data['auth_source']
|
||||
|
||||
if 'locked' in data and type(data['locked']) == bool:
|
||||
if 'locked' in data and isinstance(data['locked'], bool):
|
||||
new_data['locked'] = data['locked']
|
||||
if data['locked']:
|
||||
new_data['login_attempts'] = config.MAX_LOGIN_ATTEMPTS
|
||||
|
||||
Reference in new issue
Block a user