diff options
author | Frederick Muriuki Muriithi | 2025-01-28 09:55:00 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-01-28 09:56:00 -0600 |
commit | cb57ff0e1b2fe997687c27b5e0b79d0b60ce981a (patch) | |
tree | 69189f942c46341e55c98913b9082b1f4e53a482 /uploader | |
parent | c85c95a384955cd1f950a337c6f120c3deed78e0 (diff) | |
download | gn-uploader-cb57ff0e1b2fe997687c27b5e0b79d0b60ce981a.tar.gz |
Fix type-checking issues.
Diffstat (limited to 'uploader')
-rw-r--r-- | uploader/phenotypes/views.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py index 9b2b38e..04264c2 100644 --- a/uploader/phenotypes/views.py +++ b/uploader/phenotypes/views.py @@ -3,6 +3,7 @@ import sys import uuid import json import datetime +from typing import Any from pathlib import Path from zipfile import ZipFile from functools import wraps, reduce @@ -549,11 +550,12 @@ def review_job_data( filetype: (by_type.get(filetype, tuple()) + ({"filename": item[0], **item[1]},)) } - metadata = reduce(__metadata_by_type__, - (jobs.job_files_metadata( - rconn, jobs.jobsnamespace(), job['jobid']) - if job else {}).items(), - {}) + metadata: dict[str, Any] = reduce( + __metadata_by_type__, + (jobs.job_files_metadata( + rconn, jobs.jobsnamespace(), job['jobid']) + if job else {}).items(), + {}) def __desc__(filetype): match filetype: @@ -712,8 +714,8 @@ def update_phenotype_data(conn, data: dict): "new": row[1]["new"] } for row in item) for item in ( - filter(lambda val: val[1]["changed?"], item.items()) - for item in reduce( + filter(lambda val: val[1]["changed?"], item.items())# type: ignore[arg-type] + for item in reduce(# type: ignore[var-annotated] __separate_items__, reduce(__organise_by_dataid_and_strainid__, data.items(), |