From b9cef3d0e4980e6d418ec15ccb3e22c74c339076 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 12 Nov 2024 10:41:34 -0500 Subject: [PATCH] Type fixes? --- lib/galaxy/tool_util/deps/mulled/mulled_hash.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tool_util/deps/mulled/mulled_hash.py b/lib/galaxy/tool_util/deps/mulled/mulled_hash.py index e0efe62e3879..e8e532cad228 100644 --- a/lib/galaxy/tool_util/deps/mulled/mulled_hash.py +++ b/lib/galaxy/tool_util/deps/mulled/mulled_hash.py @@ -10,17 +10,26 @@ mulled-hash samtools=1.3.1,bedtools=2.22 """ +from typing import ( + Callable, + Dict, + Iterable, +) from ._cli import arg_parser -from ..conda_util import hash_conda_packages +from ..conda_util import ( + CondaTarget, + hash_conda_packages, +) from .mulled_build import target_str_to_targets from .util import ( v1_image_name, v2_image_name, ) +HASH_FUNCTION = Callable[[Iterable[CondaTarget], ...], str] -IMAGE_FUNCS = { +IMAGE_FUNCS: Dict[str, HASH_FUNCTION] = { "conda": lambda x: f"mulled-v1-{hash_conda_packages(x)}", "v1": v1_image_name, "v2": v2_image_name,