From 52f7390fc0168ce45223cf63e6e031252137b1cd Mon Sep 17 00:00:00 2001 From: patman15 <14628713+patman15@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:30:23 +0100 Subject: [PATCH] fixed ruff --- pyproject.toml | 3 +++ scripts/extract_gateway3_homekey.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 404daa0..451ebb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,3 +14,6 @@ testpaths = [ "tests", ] asyncio_mode = "auto" + +[tool.ruff.lint] +ignore = ["T201"] # ignore for script diff --git a/scripts/extract_gateway3_homekey.py b/scripts/extract_gateway3_homekey.py index ff5058b..049586d 100644 --- a/scripts/extract_gateway3_homekey.py +++ b/scripts/extract_gateway3_homekey.py @@ -1,4 +1,4 @@ -"""Extract PowerView homekey from a G3 PowerView Gateway""" +"""Extract PowerView homekey from a G3 PowerView Gateway.""" import base64 import json @@ -55,7 +55,7 @@ def get_shade_key(hub: str, ble_name) -> bytes: result: dict = json.loads(shades_exec_resp.content) if result.get("err") != 0 or len(result.get("responses", [])) != 1: - raise IOError("Error when attempting GetShadeKey") + raise OSError("Error when attempting GetShadeKey") response: Final[bytes] = bytes.fromhex(result["responses"][0]["hex"]) dec_resp: Final[dict[str, Any]] = decode_response(response) if dec_resp["errorCode"] != 0: