aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/batch_assign_data_to_default_admin.py10
-rw-r--r--scripts/link_inbredsets.py3
2 files changed, 6 insertions, 7 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]
diff --git a/scripts/link_inbredsets.py b/scripts/link_inbredsets.py
index ac9fa2b..5db7ea8 100644
--- a/scripts/link_inbredsets.py
+++ b/scripts/link_inbredsets.py
@@ -11,7 +11,8 @@ import gn_auth.auth.db.sqlite3 as authdb
from gn_auth.auth.db import mariadb as biodb
-from scripts.migrate_existing_data import sys_admins, admin_group, select_sys_admin
+from scripts.assign_data_to_default_admin import (
+ sys_admins, admin_group, select_sys_admin)
def linked_inbredsets(conn):
"""Fetch all inbredset groups that are linked to the auth system."""