Files
bot-bottle/bot_bottle/backend/macos_container/bottle_cleanup_plan.py
T
didericis-codex 4abad499b6
lint / lint (push) Successful in 1m54s
test / unit (pull_request) Successful in 35s
test / integration (pull_request) Successful in 20s
feat: add macos container backend scaffold
2026-06-10 18:14:17 +00:00

28 lines
790 B
Python

"""Cleanup plan for the macOS Apple Container backend."""
from __future__ import annotations
from dataclasses import dataclass
from ...log import info
from .. import BottleCleanupPlan
@dataclass(frozen=True)
class MacosContainerBottleCleanupPlan(BottleCleanupPlan):
containers: tuple[str, ...] = ()
networks: tuple[str, ...] = ()
def print(self) -> None:
if not self.containers and not self.networks:
info("macos-container cleanup: nothing to remove")
return
for name in self.containers:
info(f"macos-container container: {name}")
for name in self.networks:
info(f"macos-container network: {name}")
@property
def empty(self) -> bool:
return not self.containers and not self.networks