ARG002/ARG005: fix

This commit is contained in:
Jörg Thalheim
2025-08-20 21:05:11 +02:00
parent 5233eb7fdb
commit 4986fe30c3
31 changed files with 67 additions and 22 deletions

View File

@@ -575,6 +575,7 @@ class LogManager:
The LogFile if found, None otherwise.
"""
del group_path # Unused but kept for API compatibility
log_files: list[LogFile] = []
# Recursively search for log files

View File

@@ -811,6 +811,7 @@ class TestLogFileSorting:
configured_log_manager: LogManager,
) -> None:
"""Test that list_log_days returns days sorted newest first."""
del configured_log_manager # Unused but kept for API compatibility
# Create log files on different days by manipulating the date
import tempfile

View File

@@ -128,7 +128,7 @@ def get_machine_fields_schema(machine: Machine) -> dict[str, FieldSchema]:
"""
inventory_store = InventoryStore(machine.flake)
write_info = inventory_store.get_writeability_of(f"machines.{machine.name}")
write_info = inventory_store.get_writeability()
field_names = retrieve_typed_field_names(InventoryMachine)

View File

@@ -215,11 +215,10 @@ class InventoryStore:
return WriteInfo(writeables, data_eval, data_disk)
def get_writeability_of(self, path: str) -> Any:
"""Get the writeability of a path in the inventory
def get_writeability(self) -> Any:
"""Get the writeability of the inventory
:param path: The path to check
:return: A dictionary with the writeability of the path
:return: A dictionary with the writeability of all paths
"""
write_info = self._write_info()
return write_info.writeables

View File

@@ -28,6 +28,7 @@ class MockFlake:
selector: str,
nix_options: list[str] | None = None,
) -> Any:
del nix_options # Unused but kept for API compatibility
nixpkgs = os.environ.get("NIXPKGS")
select = os.environ.get("NIX_SELECT")
clan_core_path = os.environ.get("CLAN_CORE_PATH")

View File

@@ -44,6 +44,7 @@ class LocalHost:
control_master: bool = True,
) -> CmdOut:
"""Run a command locally."""
del tty, verbose_ssh, control_master # Unused but kept for API compatibility
if opts is None:
opts = RunOpts()
@@ -99,6 +100,7 @@ class LocalHost:
control_master: bool = True,
) -> dict[str, str]:
"""LocalHost doesn't need SSH environment variables."""
del control_master # Unused but kept for API compatibility
if env is None:
env = {}
# Don't set NIX_SSHOPTS for localhost