ARG001: fix

This commit is contained in:
Jörg Thalheim
2025-08-20 21:58:33 +02:00
parent 4986fe30c3
commit 04457b1272
19 changed files with 46 additions and 54 deletions

View File

@@ -112,7 +112,7 @@ def list_system_services_mdns() -> DNSInfo:
return data
def mdns_command(args: argparse.Namespace) -> None:
def mdns_command(_args: argparse.Namespace) -> None:
dns_info = list_system_services_mdns()
for name, info in dns_info.services.items():
print(f"Hostname: {name} - ip: {info.ip}")

View File

@@ -329,7 +329,7 @@ if __name__ == "__main__":
def concatenate(a: str, b: str) -> str:
time.sleep(1)
msg = "Hello World"
msg = a + b
raise ClanError(msg)
with runtime:

View File

@@ -39,10 +39,10 @@ def offline_template(tmp_path_factory: Any, offline_session_flake_hook: Any) ->
def patch_clan_template(monkeypatch: Any, offline_template: Path) -> None:
@contextmanager
def fake_clan_template(
flake: Flake,
template_ident: str,
_flake: Flake,
template_ident: str, # noqa: ARG001
dst_dir: Path,
post_process: Callable[[Path], None] | None = None,
post_process: Callable[[Path], None] | None = None, # noqa: ARG001
) -> Iterator[Path]:
# Just yield static destination directory without any processing
shutil.copytree(offline_template, dst_dir, dirs_exist_ok=True, symlinks=True)
@@ -54,7 +54,7 @@ def patch_clan_template(monkeypatch: Any, offline_template: Path) -> None:
@pytest.fixture()
def clan_flake(
tmp_path: Path,
patch_clan_template: Any,
patch_clan_template: Any, # noqa: ARG001
) -> Callable[[Clan | None, str | None], Flake]:
def factory(clan: Clan | None = None, raw: str | None = None) -> Flake:
# TODO: Make more options configurable

View File

@@ -35,7 +35,7 @@ class ClassSource:
def import_with_source[T](
module_name: str,
class_name: str,
base_class: type[T],
_base_class: type[T],
*args: Any,
**kwargs: Any,
) -> T:

View File

@@ -3,7 +3,7 @@ from pathlib import Path
from clan_lib.ssh.create import create_secret_key_nixos_anywhere
def test_clan_generate_sshkeys(temporary_home: Path) -> None:
def test_clan_generate_sshkeys(temporary_home: Path) -> None: # noqa: ARG001
keypair = create_secret_key_nixos_anywhere()
assert keypair.private.exists()

View File

@@ -107,7 +107,7 @@ def fix_flake_inputs(clan_dir: Path, clan_core_dir: Path) -> None:
@pytest.mark.with_core
@pytest.mark.skipif(sys.platform == "darwin", reason="sshd fails to start on darwin")
def test_clan_create_api(
temporary_home: Path,
temporary_home: Path, # noqa: ARG001
test_lib_root: Path,
clan_core: Path,
hosts: list[Remote],