mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
Update dvc/repo/index.py
Co-authored-by: Saugat Pachhai <[email protected]>
This commit is contained in:
committed by
Saugat Pachhai
co-authored by
Saugat Pachhai
parent
65d935e5c7
commit
7804e6550e
+1
-1
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user