mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 18:31:53 +08:00
Apply suggestions from code review
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
This commit is contained in:
co-authored by
Nicola Soranzo
parent
8c92cee846
commit
09269c19fa
@@ -169,10 +169,7 @@ class TestsCaseValidation(Linter):
|
||||
@classmethod
|
||||
def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"):
|
||||
profile = tool_source.parse_profile()
|
||||
if Version(profile) < Version("24.2"):
|
||||
report_foo = lint_ctx.warn
|
||||
else:
|
||||
report_foo = lint_ctx.error
|
||||
lint_log = lint_ctx.warn if Version(profile) < Version("24.2") else lint_ctx.error
|
||||
|
||||
try:
|
||||
validation_results = validate_test_cases_for_tool_source(tool_source, use_latest_profile=True)
|
||||
@@ -186,7 +183,7 @@ class TestsCaseValidation(Linter):
|
||||
error = validation_result.validation_error
|
||||
if error:
|
||||
error_str = _cleanup_pydantic_error(error)
|
||||
report_foo(
|
||||
lint_log(
|
||||
f"Test {test_idx}: failed to validate test parameters against inputs - tests won't run on a modern Galaxy tool profile version. Validation errors are [{error_str}]",
|
||||
linter=cls.name(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user