From f1bd47ce0eb28e438fc674555e3591b3a90c380c Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Thu, 1 Dec 2022 16:04:01 +0900 Subject: [PATCH] index: make collect_targets public --- dvc/repo/index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dvc/repo/index.py b/dvc/repo/index.py index cd5297928..61d5df8a0 100644 --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -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: