(self, stages)
| 146 | |
| 147 | class CyclicGraphError(DvcException): |
| 148 | def __init__(self, stages): |
| 149 | assert isinstance(stages, list) |
| 150 | stage_part = "stage" if len(stages) == 1 else "stages" |
| 151 | msg = ( |
| 152 | "Same item(s) are defined as both a dependency and an output " |
| 153 | "in {stage_part}: {stage}." |
| 154 | ) |
| 155 | super().__init__( |
| 156 | msg.format( |
| 157 | stage_part=stage_part, |
| 158 | stage=", ".join(s.addressing for s in stages), |
| 159 | ) |
| 160 | ) |
| 161 | |
| 162 | |
| 163 | class ConfirmRemoveError(DvcException): |