clan-cli: Use machine object everywhere instead of name + flake

This commit is contained in:
Qubasa
2025-05-09 13:13:14 +02:00
parent 9867b6a894
commit 2682581c09
20 changed files with 128 additions and 124 deletions

View File

@@ -10,6 +10,7 @@ from .errors import ClanError
if TYPE_CHECKING:
from clan_cli.flake import Flake
from clan_cli.machines.machines import Machine
log = logging.getLogger(__name__)
@@ -144,8 +145,8 @@ def machines_dir(flake: "Flake") -> Path:
return Path(store_path) / "machines"
def specific_machine_dir(flake: "Flake", machine: str) -> Path:
return machines_dir(flake) / machine
def specific_machine_dir(machine: "Machine") -> Path:
return machines_dir(machine.flake) / machine.name
def module_root() -> Path: