From 5ec37325a7ad117aace17e516b333634cf6d4481 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 8 Nov 2024 10:29:09 +0100 Subject: [PATCH] change to warn --- lib/galaxy/tool_util/linters/output.py | 2 +- test/unit/tool_util/test_tool_linters.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/tool_util/linters/output.py b/lib/galaxy/tool_util/linters/output.py index 6323865db868..e9ab7c4aaf4e 100644 --- a/lib/galaxy/tool_util/linters/output.py +++ b/lib/galaxy/tool_util/linters/output.py @@ -87,7 +87,7 @@ def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): try: ast.parse(filter.text, mode="eval") except Exception as e: - lint_ctx.error( + lint_ctx.warn( f"Filter '{filter.text}' is no valid expression: {str(e)}", linter=cls.name(), node=filter, diff --git a/test/unit/tool_util/test_tool_linters.py b/test/unit/tool_util/test_tool_linters.py index 2db8cca0abfd..fc99e74ed963 100644 --- a/test/unit/tool_util/test_tool_linters.py +++ b/test/unit/tool_util/test_tool_linters.py @@ -1753,16 +1753,16 @@ def test_outputs_filter_expression(lint_ctx): assert "2 outputs found." in lint_ctx.info_messages assert len(lint_ctx.info_messages) == 1 assert not lint_ctx.valid_messages - assert not lint_ctx.warn_messages assert ( "Filter 'another invalid condition' is no valid expression: invalid syntax (, line 1)" - in lint_ctx.error_messages + in lint_ctx.warn_messages ) assert ( "Filter 'another invalid condition' is no valid expression: invalid syntax (, line 1)" - in lint_ctx.error_messages + in lint_ctx.warn_messages ) - assert len(lint_ctx.error_messages) == 2 + assert len(lint_ctx.warn_messages) == 2 + assert not lint_ctx.error_messages def test_stdio_default_for_default_profile(lint_ctx):