From 0fc0ec467f3330c3e65715976f9c5eb0800b6355 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Sun, 17 Dec 2023 16:16:05 +0100 Subject: [PATCH] try source_path() instead of _source_path --- lib/galaxy/tool_util/linters/cwl.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/tool_util/linters/cwl.py b/lib/galaxy/tool_util/linters/cwl.py index 429a9570b8ba..e491fc2fdb57 100644 --- a/lib/galaxy/tool_util/linters/cwl.py +++ b/lib/galaxy/tool_util/linters/cwl.py @@ -14,7 +14,7 @@ class CWLValid(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): - raw_reference = schema_loader.raw_process_reference(tool_source._source_path) + raw_reference = schema_loader.raw_process_reference(tool_source.source_path()) try: schema_loader.process_definition(raw_reference) except Exception: @@ -25,7 +25,7 @@ def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): class CWLInValid(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): - raw_reference = schema_loader.raw_process_reference(tool_source._source_path) + raw_reference = schema_loader.raw_process_reference(tool_source.source_path()) try: schema_loader.process_definition(raw_reference) except Exception as e: @@ -35,7 +35,7 @@ def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): class CWLVersionMissing(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): - raw_reference = schema_loader.raw_process_reference(tool_source._source_path) + raw_reference = schema_loader.raw_process_reference(tool_source.source_path()) cwl_version = raw_reference.process_object.get("cwlVersion", None) if cwl_version is None: lint_ctx.error("CWL file does not contain a 'cwlVersion'") @@ -44,7 +44,7 @@ def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): class CWLVersionUnknown(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): - raw_reference = schema_loader.raw_process_reference(tool_source._source_path) + raw_reference = schema_loader.raw_process_reference(tool_source.source_path()) cwl_version = raw_reference.process_object.get("cwlVersion", None) if cwl_version not in ["v1.0"]: lint_ctx.warn(f"CWL version [{cwl_version}] is unknown, we recommend the v1.0 the stable release.") @@ -53,7 +53,7 @@ def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): class CWLVersionGood(Linter): @classmethod def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): - raw_reference = schema_loader.raw_process_reference(tool_source._source_path) + raw_reference = schema_loader.raw_process_reference(tool_source.source_path()) cwl_version = raw_reference.process_object.get("cwlVersion", None) if cwl_version in ["v1.0"]: lint_ctx.info(f"Modern CWL version [{cwl_version}].")