diff options
Diffstat (limited to 'uploader/phenotypes/models.py')
-rw-r--r-- | uploader/phenotypes/models.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/uploader/phenotypes/models.py b/uploader/phenotypes/models.py index b30f624..e40155f 100644 --- a/uploader/phenotypes/models.py +++ b/uploader/phenotypes/models.py @@ -321,10 +321,12 @@ def __pre_process_phenotype_data__(row): } -def create_new_phenotypes(conn: mdb.Connection, - population_id: int, - publication_id: int, - phenotypes: Iterable[dict]) -> tuple[dict, ...]: +def create_new_phenotypes(# pylint: disable=[too-many-locals] + conn: mdb.Connection, + population_id: int, + publication_id: int, + phenotypes: Iterable[dict] +) -> tuple[dict, ...]: """Add entirely new phenotypes to the database. WARNING: Not thread-safe.""" _phenos = tuple() with conn.cursor(cursorclass=DictCursor) as cursor: @@ -393,7 +395,7 @@ def create_new_phenotypes(conn: mdb.Connection, for row in cursor.fetchall()) if len(existing) > 0: # Narrow this exception, perhaps? - raise Exception( + raise Exception(# pylint: disable=[broad-exception-raised] "Found already existing phenotypes with the following " "'Pre-publication abbreviations':\n\t" "\n\t".join(f"* {item}" for item in existing)) |