Skip to content

Commit 606aa19

Browse files
committed
Use DataItemSourceType, fix linting
1 parent 6e23e9d commit 606aa19

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/galaxy/managers/history_graph.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
HistoryGraphResponse,
4444
TruncationInfo,
4545
)
46+
from galaxy.schema.schema import DataItemSourceType
4647
from galaxy.security.idencoding import IdEncodingHelper
4748
from galaxy.structured_app import MinimalManagerApp
4849
from galaxy.tool_util.toolbox import AbstractToolBox
@@ -413,9 +414,9 @@ def visit(path, key, value):
413414
parent = parent[step]
414415
if isinstance(parent, dict):
415416
src = parent.get("src")
416-
if src == "hda":
417+
if src == DataItemSourceType.hda:
417418
refs.add(("dataset", value))
418-
elif src == "hdca":
419+
elif src == DataItemSourceType.hdca:
419420
refs.add(("collection", value))
420421
return key, value
421422

test/unit/app/managers/test_HistoryGraphBuilder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def set_up_managers(self):
3535
self.hda_manager = self.app[HDAManager]
3636
self.history_manager = self.app[HistoryManager]
3737
self.collection_manager = self.app[DatasetCollectionManager]
38-
self.app._toolbox = None # type: ignore[assignment]
38+
self.app._toolbox = None
3939
self.history_graph_manager = self.app[HistoryGraphManager]
4040

4141
def _build_graph(
@@ -1177,7 +1177,7 @@ def set_up_managers(self):
11771177
self.hda_manager = self.app[HDAManager]
11781178
self.history_manager = self.app[HistoryManager]
11791179
self.collection_manager = self.app[DatasetCollectionManager]
1180-
self.app._toolbox = None # type: ignore[assignment]
1180+
self.app._toolbox = None
11811181
self.history_graph_manager = self.app[HistoryGraphManager]
11821182

11831183
def _build_graph(self, history, **kwargs):

0 commit comments

Comments
 (0)