(self, stage)
| 370 | self._lockfile.remove() |
| 371 | |
| 372 | def remove_stage(self, stage): |
| 373 | self._check_if_parametrized(stage, "remove") |
| 374 | self._lockfile.remove_stage(stage) |
| 375 | if not self.exists(): |
| 376 | return |
| 377 | |
| 378 | d, _ = self._load_yaml(round_trip=True) |
| 379 | if stage.name not in d.get("stages", {}): |
| 380 | return |
| 381 | |
| 382 | logger.debug("Removing '%s' from '%s'", stage.name, self.path) |
| 383 | del d["stages"][stage.name] |
| 384 | |
| 385 | if d["stages"]: |
| 386 | dump_yaml(self.path, d) |
| 387 | else: |
| 388 | super().remove() |
| 389 | |
| 390 | def merge(self, ancestor, other, allowed=None): |
| 391 | raise NotImplementedError |
nothing calls this directly
no test coverage detected