mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +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":
|
def __getitem__(self, item: str) -> "Stage":
|
||||||
"""Get a stage by its addressing attribute."""
|
"""Get a stage by its addressing attribute."""
|
||||||
for stage in self.stages:
|
for stage in self:
|
||||||
if stage.addressing == item:
|
if stage.addressing == item:
|
||||||
return stage
|
return stage
|
||||||
raise KeyError(f"{item} - available stages are {self.stages}")
|
raise KeyError(f"{item} - available stages are {self.stages}")
|
||||||
|
|||||||
Reference in New Issue
Block a user