diff --git a/lib/galaxy/tool_util/version_util.py b/lib/galaxy/tool_util/version_util.py new file mode 100644 index 000000000000..644d58297e4f --- /dev/null +++ b/lib/galaxy/tool_util/version_util.py @@ -0,0 +1,10 @@ +from typing import Union + +from packaging.version import Version + +from .version import LegacyVersion + +AnyVersionT = Union[LegacyVersion, Version] + + +__all__ = ["AnyVersionT"] diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index d9d503609f68..e340868f340f 100644 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -109,10 +109,8 @@ from galaxy.tool_util.verify.interactor import ToolTestDescription from galaxy.tool_util.verify.parse import parse_tool_test_descriptions from galaxy.tool_util.verify.test_data import TestDataNotFoundError -from galaxy.tool_util.version import ( - LegacyVersion, - parse_version, -) +from galaxy.tool_util.version import parse_version +from galaxy.tool_util.version_util import AnyVersionT from galaxy.tools import expressions from galaxy.tools.actions import ( DefaultToolAction, @@ -339,8 +337,8 @@ class safe_update(NamedTuple): - min_version: Union[LegacyVersion, Version] - current_version: Union[LegacyVersion, Version] + min_version: AnyVersionT + current_version: AnyVersionT # Tool updates that did not change parameters in a way that requires rebuilding workflows