From d6c1a22be1306f79f67dc5dafc90d7e097b2bb9c Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Wed, 3 Apr 2024 14:47:14 +0300 Subject: [PATCH] lint: Enable flake8-unused-arguments Signed-off-by: Jussi Kukkonen --- pyproject.toml | 1 + tests/test_api.py | 2 +- tests/test_updater_ng.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fef07b41..533b68a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,6 +83,7 @@ line-length=80 [tool.ruff.lint] select = [ "A", # flake8-builtins + "ARG", # flake8-unused-arguments "B", # flake8-bugbear "BLE", # flake8-blind-except "C4", # flake8-comprehensions diff --git a/tests/test_api.py b/tests/test_api.py index 39c513dc..c5ac69c5 100755 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -255,7 +255,7 @@ def from_priv_key_uri( def public_key(self) -> Key: raise RuntimeError("Not a real signer") - def sign(self, payload: bytes) -> Signature: + def sign(self, _payload: bytes) -> Signature: raise RuntimeError("signing failed") failing_signer = FailingSigner() diff --git a/tests/test_updater_ng.py b/tests/test_updater_ng.py index 6f077bf1..90acf88b 100644 --- a/tests/test_updater_ng.py +++ b/tests/test_updater_ng.py @@ -281,7 +281,7 @@ def test_length_hash_mismatch(self) -> None: def test_updating_root(self) -> None: # Bump root version, resign and refresh - self._modify_repository_root(lambda root: None, bump_version=True) + self._modify_repository_root(lambda _: None, bump_version=True) self.updater.refresh() self.assertEqual(self.updater._trusted_set.root.version, 2)