From 57695c3c1b0c16deeac156f67728d7aedd7d8dce Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Wed, 13 Dec 2023 18:14:34 +0100 Subject: [PATCH] remove InputsSelectOptionTextMissing --- lib/galaxy/tool_util/linters/inputs.py | 19 ------------------- test/unit/tool_util/test_tool_linters.py | 3 +-- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/lib/galaxy/tool_util/linters/inputs.py b/lib/galaxy/tool_util/linters/inputs.py index 5b58ab7e6c0f..55b8a20343dd 100644 --- a/lib/galaxy/tool_util/linters/inputs.py +++ b/lib/galaxy/tool_util/linters/inputs.py @@ -579,25 +579,6 @@ def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): lint_ctx.error(f"Select parameter [{param_name}] has option without value", node=param) -class InputsSelectOptionTextMissing(Linter): - """ - Lint for select option tags without value - """ - - @classmethod - def lint(cls, tool_source: "ToolSource", lint_ctx: "LintContext"): - tool_xml = getattr(tool_source, "xml_tree", None) - if not tool_xml: - return - for param, param_name, param_type in _iter_param_type(tool_xml): - if param_type != "select": - continue - select_options = param.findall("./option") - if any(option.text is None for option in select_options): - lint_ctx.warn(f"Select parameter [{param_name}] has option without text", node=param) - - - class InputsSelectOptionDuplicateValue(Linter): """ Lint for select option with same value diff --git a/test/unit/tool_util/test_tool_linters.py b/test/unit/tool_util/test_tool_linters.py index 2c746756f76d..ad19f96139f8 100644 --- a/test/unit/tool_util/test_tool_linters.py +++ b/test/unit/tool_util/test_tool_linters.py @@ -1371,14 +1371,13 @@ def test_inputs_select_option_definitions(lint_ctx): in lint_ctx.error_messages ) assert "Select parameter [select_noval_notext] has option without value" in lint_ctx.error_messages - assert "Select parameter [select_noval_notext] has option without text" in lint_ctx.warn_messages assert ( "Select parameter [select_meta_file_key_incomp] 'meta_file_key' is only compatible with 'from_dataset'." in lint_ctx.error_messages ) assert len(lint_ctx.info_messages) == 1 assert not lint_ctx.valid_messages - assert len(lint_ctx.warn_messages) == 1 + assert not lint_ctx.warn_messages assert len(lint_ctx.error_messages) == 7