diff --git a/omics/cli/run_analyzer/__main__.py b/omics/cli/run_analyzer/__main__.py index bad504e..b3c0996 100755 --- a/omics/cli/run_analyzer/__main__.py +++ b/omics/cli/run_analyzer/__main__.py @@ -446,7 +446,7 @@ def get_timeline_event(res, resources): # Retrieve workflow runs & tasks runs = [] - resources = [] + resources: list[dict] if opts["--file"]: with open(opts["--file"]) as f: resources = json.load(f) @@ -459,7 +459,7 @@ def get_timeline_event(res, resources): if not runs: die("no matching workflow runs") - if len(runs) == 1 and opts[""]: + elif len(runs) == 1 and opts[""]: resources = get_run_resources(logs, runs[0]) if not resources: die("no workflow run resources") @@ -467,7 +467,7 @@ def get_timeline_event(res, resources): list_of_resources: list[list[dict]] = [] engine: str = None for run in runs: - resources: list[dict] = get_run_resources(logs, run) + resources = get_run_resources(logs, run) run_engine = utils.get_engine_from_id(id=run) if not engine: engine = run_engine diff --git a/omics/cli/run_analyzer/batch.py b/omics/cli/run_analyzer/batch.py index 20a6a52..ea7d139 100644 --- a/omics/cli/run_analyzer/batch.py +++ b/omics/cli/run_analyzer/batch.py @@ -42,7 +42,7 @@ def aggregate_and_print( # print hdrs print(",".join(hdrs), file=out) - task_names = sorted(task_names) + task_names = set(sorted(task_names)) for task_name in task_names: _aggregate_resources(run_resources_list, task_name, engine, out)