ARG002/ARG005: fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user