Skip to content

Commit

Permalink
remove InputsSelectOptionTextMissing
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Dec 13, 2023
1 parent e087a80 commit 57695c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
19 changes: 0 additions & 19 deletions lib/galaxy/tool_util/linters/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions test/unit/tool_util/test_tool_linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 57695c3

Please sign in to comment.