From 918d23b8ea5c92dd7859b00eeb9554cd908143b5 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 4 Jul 2024 12:15:26 +0200 Subject: [PATCH] Minor tweaks to workflow author linting --- planemo/workflow_lint.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/planemo/workflow_lint.py b/planemo/workflow_lint.py index 57b5f6805..3b91b935b 100644 --- a/planemo/workflow_lint.py +++ b/planemo/workflow_lint.py @@ -211,11 +211,13 @@ def check_json_for_untyped_params(j): lint_context.warn("Workflow is not annotated.") # creator - if not len(workflow_dict.get("creator", [])) > 0: + creators = workflow_dict.get("creator", []) + if not len(creators) > 0: lint_context.warn("Workflow does not specify a creator.") else: - creators = workflow_dict.get("creator") if not isinstance(creators, list): + # Don't know if this can happen, if we implement schema validation on the Galaxy side + # this won't be needed. creators = [creators] for creator in creators: if creator.get("class", "").lower() == "person" and "identifier" in creator: