Skip to content

Commit

Permalink
try source_path() instead of _source_path
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Dec 19, 2023
1 parent 62adedb commit 555fe5f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/galaxy/tool_util/linters/cwl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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'")
Expand All @@ -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.")
Expand All @@ -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}].")
Expand Down

0 comments on commit 555fe5f

Please sign in to comment.