Skip to content

Commit

Permalink
fix test and linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Dec 9, 2022
1 parent eca4444 commit b2949d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 1 addition & 6 deletions lib/galaxy/tool_util/linters/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
_prepare_argument,
)
from galaxy.util import string_as_bool
from ._util import (
get_code,
is_datasource,
is_valid_cheetah_placeholder,
)

FILTER_TYPES = [
"data_meta",
Expand Down Expand Up @@ -590,7 +585,7 @@ def lint_inputs_used(tool_xml, lint_ctx):
try:
code, template_code, filter_code, label_code, action_code = get_code(tool_xml)
except ParseError as pe:
lint_ctx.error(f"Invalid cheetah found {pe}", node=tool_node)
lint_ctx.error(f"Invalid cheetah found{pe}", node=tool_node)
return

inputs = tool_xml.findall("./inputs//param")
Expand Down
12 changes: 5 additions & 7 deletions test/unit/tool_util/test_tool_linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,7 @@
<tool>
<command>
#if $param
this is unfinished if
</command>
this is unfinished if</command>
<inputs>
<param name="param" type="boolean"/>
</inputs>
Expand Down Expand Up @@ -1546,18 +1545,17 @@ def test_inputs_used_parameter_syntax_error(lint_ctx):
assert not lint_ctx.info_messages
assert not lint_ctx.valid_messages
assert not lint_ctx.warn_messages
assert """Invalid cheetah found
assert """Invalid cheetah found
Some #directives are missing their corresponding #end ___ tag: if
Line 5, column 4
Line 4, column 33
Line|Cheetah Code
----|-------------------------------------------------------------
2 |
3 | #if $param
4 | this is unfinished if
5 |
^
4 | this is unfinished if
^
""" in lint_ctx.error_messages


Expand Down

0 comments on commit b2949d8

Please sign in to comment.