clan-cli: Refactor ssh classes to dataclasses

This commit is contained in:
Qubasa
2024-11-25 19:47:17 +01:00
parent e16990e493
commit b9154fddd2
7 changed files with 116 additions and 167 deletions

View File

@@ -18,7 +18,7 @@ class ConfigItem:
@pytest.fixture(scope="session")
def nix_config() -> dict[str, ConfigItem]:
proc = subprocess.run(
["nix", "show-config", "--json"], check=True, stdout=subprocess.PIPE
["nix", "config", "show", "--json"], check=True, stdout=subprocess.PIPE
)
data = json.loads(proc.stdout)
return {name: ConfigItem(**c) for name, c in data.items()}