Unverified Commit 1c8fbbb9 authored by Nicola Soranzo's avatar Nicola Soranzo
Browse files

Fix mypy issues

```
test/unit/tool_util/test_parsing.py:954: error: Argument 1 to "get_tool_source" has incompatible type "Traversable"; expected "str | PathLike[str] | None"  [arg-type]
        tool_source = get_tool_source(tool_path)
                                      ^~~~~~~~~
test/unit/tool_util/test_parsing.py:960: error: Argument 1 to "get_tool_source" has incompatible type "Traversable"; expected "str | PathLike[str] | None"  [arg-type]
        tool_source = get_tool_source(tool_path)
                                      ^~~~~~~~~
```
parent 18feca95
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -20,7 +20,10 @@ from galaxy.tool_util.parser.output_models import (
)
from galaxy.tool_util.unittest_utils import functional_test_tool_path
from galaxy.util import galaxy_directory
from galaxy.util.resources import resource_path
from galaxy.util.resources import (
    as_file,
    resource_path,
)
from galaxy.util.unittest import TestCase

TOOL_XML_1 = """
@@ -950,13 +953,13 @@ class TestCollectionCatGroupTag(FunctionalTestToolTestCase):


def test_old_invalid_citation_dont_cause_failure_to_load():
    tool_path = resource_path(__name__, "invalid_citation.xml")
    with as_file(resource_path(__name__, "invalid_citation.xml")) as tool_path:
        tool_source = get_tool_source(tool_path)
    assert tool_source.parse_citations() == []


def test_invalid_citation_not_allowed_in_modern_tools():
    tool_path = resource_path(__name__, "invalid_citation_24.2.xml")
    with as_file(resource_path(__name__, "invalid_citation_24.2.xml")) as tool_path:
        tool_source = get_tool_source(tool_path)
    exc = None
    try: