aboutsummaryrefslogtreecommitdiff
path: root/scripts/batch_assign_data_to_default_admin.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-07-17 14:34:17 -0500
committerFrederick Muriuki Muriithi2024-07-17 14:34:17 -0500
commit2e6f8a5d6bde0bd8fdfb9217b352ea2914ba592f (patch)
treef23f0a9495a2a25fca0f90bbcd3969734fc0d379 /scripts/batch_assign_data_to_default_admin.py
parent2aa4d3f683733899edd58831ed6c413349167725 (diff)
downloadgn-auth-2e6f8a5d6bde0bd8fdfb9217b352ea2914ba592f.tar.gz
Fix linting issues
Diffstat (limited to 'scripts/batch_assign_data_to_default_admin.py')
-rw-r--r--scripts/batch_assign_data_to_default_admin.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/batch_assign_data_to_default_admin.py b/scripts/batch_assign_data_to_default_admin.py
index 1f6c9c9..3df123d 100644
--- a/scripts/batch_assign_data_to_default_admin.py
+++ b/scripts/batch_assign_data_to_default_admin.py
@@ -7,9 +7,8 @@ import logging
from pathlib import Path
import click
-from MySQLdb.cursors import DictCursor
from pymonad.maybe import Just, Maybe, Nothing
-from pymonad.tools import curry, monad_from_none_or_value
+from pymonad.tools import monad_from_none_or_value
from gn_auth.auth.db import mariadb as biodb
from gn_auth.auth.db import sqlite3 as authdb
@@ -50,7 +49,6 @@ def resource_owner(conn: authdb.DbConnection) -> Maybe:
User.from_sqlite3_row)
-
def assign_data(authconn: authdb.DbConnection, bioconn, group: Group):
"""Do actual data assignments."""
try:
@@ -58,10 +56,10 @@ def assign_data(authconn: authdb.DbConnection, bioconn, group: Group):
assign_data_to_resource(authconn, bioconn, resource, group)
return 1
- except Exception as _exc:
+ except Exception as _exc:# pylint: disable=[broad-except]
logging.error("Failed to assign some data!", exc_info=True)
return 1
-
+
if __name__ == "__main__":
@click.command()
@@ -86,4 +84,4 @@ if __name__ == "__main__":
logging.error("There is no such SQLite3 database file.")
return 1
- sys.exit(run())
+ sys.exit(run()) # pylint: disable=[no-value-for-parameter]