aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uploader/phenotypes/views.py16
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(),