From 7804e6550e2d5ebd8ce883683580b898aeab429c Mon Sep 17 00:00:00 2001 From: Fabian Zills <46721498+PythonFZ@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:48:33 +0200 Subject: [PATCH] Update dvc/repo/index.py Co-authored-by: Saugat Pachhai --- dvc/repo/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/repo/index.py b/dvc/repo/index.py index 0567d707b..f896c9375 100644 --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -93,7 +93,7 @@ class Index: def __getitem__(self, item: str) -> "Stage": """Get a stage by its addressing attribute.""" - for stage in self.stages: + for stage in self: if stage.addressing == item: return stage raise KeyError(f"{item} - available stages are {self.stages}")