Added new type FlakeName

This commit is contained in:
2023-10-14 15:17:58 +02:00
parent 718f647774
commit 6def19b4c8
17 changed files with 97 additions and 72 deletions

View File

@@ -5,14 +5,15 @@ from typing import Callable
from ..dirs import specific_flake_dir
from ..errors import ClanError
from ..flakes.types import FlakeName
def get_sops_folder(flake_name: str) -> Path:
def get_sops_folder(flake_name: FlakeName) -> Path:
return specific_flake_dir(flake_name) / "sops"
def gen_sops_subfolder(subdir: str) -> Callable[[str], Path]:
def folder(flake_name: str) -> Path:
def gen_sops_subfolder(subdir: str) -> Callable[[FlakeName], Path]:
def folder(flake_name: FlakeName) -> Path:
return specific_flake_dir(flake_name) / "sops" / subdir
return folder