enable ASYNC, DTZ, YTT and EM lints
This commit is contained in:
@@ -50,9 +50,8 @@ def inspect_flake(flake_url: str | Path, machine_name: str) -> FlakeConfig:
|
||||
# Check if the machine exists
|
||||
machines: list[str] = list_nixos_machines(flake_url)
|
||||
if machine_name not in machines:
|
||||
raise ClanError(
|
||||
f"Machine {machine_name} not found in {flake_url}. Available machines: {', '.join(machines)}"
|
||||
)
|
||||
msg = f"Machine {machine_name} not found in {flake_url}. Available machines: {', '.join(machines)}"
|
||||
raise ClanError(msg)
|
||||
|
||||
machine = Machine(machine_name, FlakeId(str(flake_url)))
|
||||
vm = inspect_vm(machine)
|
||||
|
||||
@@ -27,8 +27,9 @@ def show_clan_meta(uri: str | Path) -> Meta:
|
||||
proc = run_no_stdout(cmd)
|
||||
res = proc.stdout.strip()
|
||||
except ClanCmdError as e:
|
||||
msg = "Evaluation failed on meta attribute"
|
||||
raise ClanError(
|
||||
"Evaluation failed on meta attribute",
|
||||
msg,
|
||||
location=f"show_clan {uri}",
|
||||
description=str(e.cmd),
|
||||
) from e
|
||||
@@ -45,8 +46,9 @@ def show_clan_meta(uri: str | Path) -> Meta:
|
||||
icon_path = meta_icon
|
||||
elif scheme in [""]:
|
||||
if Path(meta_icon).is_absolute():
|
||||
msg = "Invalid absolute path"
|
||||
raise ClanError(
|
||||
"Invalid absolute path",
|
||||
msg,
|
||||
location=f"show_clan {uri}",
|
||||
description="Icon path must be a URL or a relative path.",
|
||||
)
|
||||
@@ -54,8 +56,9 @@ def show_clan_meta(uri: str | Path) -> Meta:
|
||||
else:
|
||||
icon_path = str((Path(uri) / meta_icon).resolve())
|
||||
else:
|
||||
msg = "Invalid schema"
|
||||
raise ClanError(
|
||||
"Invalid schema",
|
||||
msg,
|
||||
location=f"show_clan {uri}",
|
||||
description="Icon path must be a URL or a relative path.",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user