From c49580e3aeb3f8c89632f23f4ecc67f45433c8e1 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:35:41 +0200 Subject: [PATCH] Todo Improved literal string inference --- homeassistant/components/nws/weather.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/nws/weather.py b/homeassistant/components/nws/weather.py index 3c7393aa1842bf..57487bf920460d 100644 --- a/homeassistant/components/nws/weather.py +++ b/homeassistant/components/nws/weather.py @@ -178,6 +178,7 @@ async def async_added_to_hass(self) -> None: if (coordinator := self.forecast_coordinators[forecast_type]) is None: continue if TYPE_CHECKING: + # TODO Literal inference forecast_type = cast(Literal["twice_daily", "hourly"], forecast_type) self.unsub_forecast[forecast_type] = coordinator.async_add_listener( partial(self._handle_forecast_update, forecast_type)