From 19f931fc3598dd5b9f4665d08c864107352596b3 Mon Sep 17 00:00:00 2001 From: Alex <52292902+alexrudd2@users.noreply.github.com> Date: Tue, 25 Apr 2023 00:39:49 -0500 Subject: [PATCH] Enable remaining HomeAssistant rules in ruff (#1514) --- ruff.toml | 5 ++++- test/test_factory.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ruff.toml b/ruff.toml index b45fe0da7..26106c025 100644 --- a/ruff.toml +++ b/ruff.toml @@ -14,6 +14,9 @@ ignore = [ ] line-length = 120 select = [ + "B007", # Loop control variable {name} not used within loop body + "B014", # Exception handler with duplicate exception + "C", # complexity "D", # docstrings "E", # pycodestyle errors "W", # pycodestyle warnings @@ -31,8 +34,8 @@ select = [ "PLC", # pylint "PGH", # pygrep-hooks # "TRY", # tryceratops + "TRY004", # Prefer TypeError exception for invalid type # "B", # bandit - "C", # complexity ] [pydocstyle] convention = "pep257" diff --git a/test/test_factory.py b/test/test_factory.py index af8c6de6b..87a965e2c 100644 --- a/test/test_factory.py +++ b/test/test_factory.py @@ -121,7 +121,7 @@ def test_request_lookup(self): def test_response_working(self): """Test a working response factory decoders""" - for func, msg in self.response: + for _func, msg in self.response: self.client.decode(msg) def test_response_errors(self): @@ -134,7 +134,7 @@ def test_response_errors(self): def test_requests_working(self): """Test a working request factory decoders""" - for func, msg in self.request: + for _func, msg in self.request: self.server.decode(msg) def test_client_factory_fails(self):