mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
index: make collect_targets public
This commit is contained in:
committed by
Peter Rowlands (변기호)
parent
74a13a4d9a
commit
f1bd47ce0e
+3
-3
@@ -166,7 +166,7 @@ class Index:
|
||||
)
|
||||
)
|
||||
|
||||
def _collect_targets(
|
||||
def collect_targets(
|
||||
self, targets: Optional["TargetType"], **kwargs: Any
|
||||
) -> List["StageInfo"]:
|
||||
from itertools import chain
|
||||
@@ -214,7 +214,7 @@ class Index:
|
||||
"""
|
||||
stage_infos = [
|
||||
stage_info
|
||||
for stage_info in self._collect_targets(targets, **kwargs)
|
||||
for stage_info in self.collect_targets(targets, **kwargs)
|
||||
if not stage_filter or stage_filter(stage_info.stage)
|
||||
]
|
||||
return IndexView(self, stage_infos, outs_filter=outs_filter)
|
||||
@@ -310,7 +310,7 @@ class Index:
|
||||
from collections import defaultdict
|
||||
|
||||
used: "ObjectContainer" = defaultdict(set)
|
||||
pairs = self._collect_targets(
|
||||
pairs = self.collect_targets(
|
||||
targets, recursive=recursive, with_deps=with_deps
|
||||
)
|
||||
for stage, filter_info in pairs:
|
||||
|
||||
Reference in New Issue
Block a user