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