From ecdcf0f80c473a4e8ca5748470151ee7c68a5199 Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Tue, 2 Jul 2024 13:30:22 +0200 Subject: [PATCH] fix lint_args typing to different places --- planemo/tool_lint.py | 8 ++++++-- planemo/workflow_lint.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/planemo/tool_lint.py b/planemo/tool_lint.py index d6ccd509e..eea2ad7ff 100644 --- a/planemo/tool_lint.py +++ b/planemo/tool_lint.py @@ -1,5 +1,9 @@ from os.path import basename -from typing import TYPE_CHECKING +from typing import ( + Any, + Dict, + TYPE_CHECKING, +) from galaxy.tool_util.lint import lint_tool_source @@ -29,7 +33,7 @@ LINTING_TOOL_MESSAGE = "Linting tool %s" -def build_tool_lint_args(ctx: "PlanemoCliContext", **kwds): +def build_tool_lint_args(ctx: "PlanemoCliContext", **kwds) -> Dict[str, Any]: lint_args = build_lint_args(ctx, **kwds) extra_modules = _lint_extra_modules(**kwds) lint_args["extra_modules"] = extra_modules diff --git a/planemo/workflow_lint.py b/planemo/workflow_lint.py index c1f9df8c8..085a25fd7 100644 --- a/planemo/workflow_lint.py +++ b/planemo/workflow_lint.py @@ -129,7 +129,7 @@ def generate_dockstore_yaml(directory: str, publish: bool = True) -> str: def lint_workflow_artifacts_on_paths( - ctx: "PlanemoCliContext", paths: Iterable[str], lint_args: Dict[str, Union[str, List[str]]] + ctx: "PlanemoCliContext", paths: Iterable[str], lint_args: Dict[str, Any] ) -> int: report_level = lint_args["level"] lint_context = WorkflowLintContext(report_level, skip_types=lint_args["skip_types"]) @@ -143,7 +143,7 @@ def lint_workflow_artifacts_on_paths( def _lint_workflow_artifacts_on_path( - lint_context: WorkflowLintContext, path: str, lint_args: Dict[str, Union[str, List[str]]] + lint_context: WorkflowLintContext, path: str, lint_args: Dict[str, Any] ) -> None: if lint_args["iwc_grade"]: if not os.path.isdir(path):