From 90c6ebf79dfae2be75383eaaa1050dba4d0674f7 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Sat, 30 Dec 2023 02:30:02 +0100 Subject: [PATCH] Ignore this else suggestion --- src/omnikinverter/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/omnikinverter/models.py b/src/omnikinverter/models.py index f53355c5..f3bb98c5 100644 --- a/src/omnikinverter/models.py +++ b/src/omnikinverter/models.py @@ -114,7 +114,7 @@ def get_value(search_key: str) -> Any: if search_key in ["webdata_today_e", "webdata_total_e"]: return float(match) return match - return None + return None # noqa: TRY300 except AttributeError as exception: msg = "Your inverter has no data source from a html file." raise OmnikInverterWrongSourceError(msg) from exception @@ -173,7 +173,7 @@ def get_value(position: int) -> Any: energy_value = float(matches[position]) / 10 return energy_value return matches[position].replace(" ", "") - return None + return None # noqa: TRY300 except AttributeError as exception: msg = "Your inverter has no data source from a javascript file." raise OmnikInverterWrongSourceError(msg) from exception