get rid of pydantic in cli

This commit is contained in:
Jörg Thalheim
2023-11-21 11:36:50 +01:00
committed by Mic92
parent f9b3fe0765
commit 7afaaf8c5a
10 changed files with 11 additions and 264 deletions

View File

@@ -1,16 +1,16 @@
import argparse
import asyncio
import json
from dataclasses import dataclass
from pathlib import Path
from pydantic import AnyUrl, BaseModel
from ..async_cmd import run
from ..nix import nix_config, nix_eval
class VmConfig(BaseModel):
flake_url: AnyUrl | Path
@dataclass
class VmConfig:
flake_url: str | Path
flake_attr: str
cores: int
@@ -18,7 +18,7 @@ class VmConfig(BaseModel):
graphics: bool
async def inspect_vm(flake_url: AnyUrl | Path, flake_attr: str) -> VmConfig:
async def inspect_vm(flake_url: str | Path, flake_attr: str) -> VmConfig:
config = nix_config()
system = config["system"]