From 058e19fed017425c77f36dfbfbf067109b0381ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Santos?= Date: Wed, 22 Jan 2020 21:30:12 +0000 Subject: [PATCH] pipeline: show: outs: eliminate extra nodes in DAG --- dvc/command/pipeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dvc/command/pipeline.py b/dvc/command/pipeline.py index cbec6abf3..ed806bc4a 100644 --- a/dvc/command/pipeline.py +++ b/dvc/command/pipeline.py @@ -36,8 +36,8 @@ class CmdPipelineShow(CmdBase): from dvc.stage import Stage from dvc.repo.graph import get_pipeline - stage = Stage.load(self.repo, target) - G = get_pipeline(self.repo.pipelines, stage) + target_stage = Stage.load(self.repo, target) + G = get_pipeline(self.repo.pipelines, target_stage) nodes = [] for stage in G: @@ -52,7 +52,7 @@ class CmdPipelineShow(CmdBase): nodes.append(stage.relpath) edges = [] - for from_stage, to_stage in G.edges(): + for from_stage, to_stage in networkx.dfs_edges(G, target_stage): if commands: if to_stage.cmd is None: continue