Added flake_name:str argument everywhere, nix fmt doesn't complain anymore

This commit is contained in:
Qubasa
2023-10-14 14:57:36 +02:00
parent fdcd7ad1d9
commit 32e60f5adc
28 changed files with 365 additions and 206 deletions

View File

@@ -7,7 +7,7 @@ from pydantic import AnyUrl
from pydantic.tools import parse_obj_as
from ..async_cmd import CmdOut, run, runforcli
from ..dirs import clan_flake_dir
from ..dirs import clan_flakes_dir
from ..nix import nix_command, nix_shell
DEFAULT_URL: AnyUrl = parse_obj_as(
@@ -54,7 +54,7 @@ async def create_flake(directory: Path, url: AnyUrl) -> Dict[str, CmdOut]:
def create_flake_command(args: argparse.Namespace) -> None:
flake_dir = clan_flake_dir() / args.name
flake_dir = clan_flakes_dir() / args.name
runforcli(create_flake, flake_dir, DEFAULT_URL)

View File

@@ -2,13 +2,13 @@ import argparse
import logging
import os
from ..dirs import clan_flake_dir
from ..dirs import clan_flakes_dir
log = logging.getLogger(__name__)
def list_flakes() -> list[str]:
path = clan_flake_dir()
path = clan_flakes_dir()
log.debug(f"Listing machines in {path}")
if not path.exists():
return []