From ec7135a72f7df480c993e39e9affb4b714295577 Mon Sep 17 00:00:00 2001 From: Jules Dejaeghere Date: Sat, 10 May 2025 23:14:14 +0200 Subject: [PATCH] Linting --- custom_components/irm_kmi/sensor.py | 2 +- tests/test_weather.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/irm_kmi/sensor.py b/custom_components/irm_kmi/sensor.py index 6bc75f3..2d6e9ac 100644 --- a/custom_components/irm_kmi/sensor.py +++ b/custom_components/irm_kmi/sensor.py @@ -75,7 +75,7 @@ class IrmKmiNextWarning(CoordinatorEntity, SensorEntity): self._attr_unique_id = f"{entry.entry_id}-next-warning" self.entity_id = sensor.ENTITY_ID_FORMAT.format(f"{str(entry.title).lower()}_next_warning") self._attr_device_info = coordinator.shared_device_info - self._attr_translation_key = f"next_warning" + self._attr_translation_key = "next_warning" @property def native_value(self) -> datetime | None: diff --git a/tests/test_weather.py b/tests/test_weather.py index e4a58ec..0f47996 100644 --- a/tests/test_weather.py +++ b/tests/test_weather.py @@ -79,7 +79,7 @@ async def test_radar_forecast_service( result_service: Dict[str, List[Forecast]] = weather.get_forecasts_radar_service(False) - l = [ + forecast = [ RadarForecast(datetime="2023-12-26T17:00:00+01:00", native_precipitation=0, might_rain=False, rain_forecast_max=0, rain_forecast_min=0, unit='mm/10min'), RadarForecast(datetime="2023-12-26T17:10:00+01:00", native_precipitation=0, might_rain=False, @@ -104,8 +104,8 @@ async def test_radar_forecast_service( rain_forecast_max=0, rain_forecast_min=0, unit='mm/10min') ] - assert result_service == {'forecast': l[5:]} + assert result_service == {'forecast': forecast[5:]} result_service: Dict[str, List[Forecast]] = weather.get_forecasts_radar_service(True) - assert result_service == {'forecast': l} + assert result_service == {'forecast': forecast}