Skip to content

Commit

Permalink
More typing?
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Aug 31, 2023
1 parent 7a1950b commit 235f27e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
8 changes: 6 additions & 2 deletions lib/galaxy/tool_shed/galaxy_install/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import threading
from typing import (
Any,
Dict,
Generic,
List,
Optional,
Expand All @@ -15,7 +16,10 @@
from galaxy.model.tool_shed_install import HasToolBox
from galaxy.security.idencoding import IdEncodingHelper
from galaxy.tool_shed.cache import ToolShedRepositoryCache
from galaxy.tool_util.data import ToolDataTableManager
from galaxy.tool_util.data import (
OutputDataset,
ToolDataTableManager,
)
from galaxy.tool_util.toolbox.base import AbstractToolBox

if TYPE_CHECKING:
Expand All @@ -29,7 +33,7 @@ class DataManagerInterface(Protocol):
def process_result(self, out_data):
...

def write_bundle(self, out) -> None:
def write_bundle(self, out: Dict[str, OutputDataset]) -> Dict[str, OutputDataset]:
...


Expand Down
9 changes: 6 additions & 3 deletions lib/galaxy/tool_shed/unittest_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
InstallationTarget,
)
from galaxy.tool_shed.util.repository_util import get_installed_repository
from galaxy.tool_util.data import ToolDataTableManager
from galaxy.tool_util.data import (
OutputDataset,
ToolDataTableManager,
)
from galaxy.tool_util.loader_directory import looks_like_a_tool
from galaxy.tool_util.toolbox.base import (
AbstractToolBox,
Expand Down Expand Up @@ -134,8 +137,8 @@ class DummyDataManager(DataManagerInterface):
def process_result(self, out_data):
return None

def write_bundle(self, out) -> None:
return None
def write_bundle(self, out) -> Dict[str, OutputDataset]:
return {}


class StandaloneDataManagers(DataManagersInterface):
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/data_manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def process_result(self, out_data: Dict[str, OutputDataset]) -> None:
def write_bundle(
self,
out_data: Dict[str, OutputDataset],
):
) -> Dict[str, OutputDataset]:
tool_data_tables = self.data_managers.app.tool_data_tables
return tool_data_tables.write_bundle(
out_data,
Expand Down

0 comments on commit 235f27e

Please sign in to comment.