From 7e2b72fa5e83ba58a00909b55ae1e92ad4721fb8 Mon Sep 17 00:00:00 2001 From: Thomas55555 <59625598+Thomas55555@users.noreply.github.com> Date: Wed, 23 Oct 2024 22:34:53 +0200 Subject: [PATCH] Fix get_time_zone annotations in dt_util (#129050) --- homeassistant/util/dt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/util/dt.py b/homeassistant/util/dt.py index 30cf7222f3a..ee2b6c762d8 100644 --- a/homeassistant/util/dt.py +++ b/homeassistant/util/dt.py @@ -95,7 +95,7 @@ def set_default_time_zone(time_zone: dt.tzinfo) -> None: get_default_time_zone.cache_clear() -def get_time_zone(time_zone_str: str) -> dt.tzinfo | None: +def get_time_zone(time_zone_str: str) -> zoneinfo.ZoneInfo | None: """Get time zone from string. Return None if unable to determine. Must be run in the executor if the ZoneInfo is not already @@ -107,7 +107,7 @@ def get_time_zone(time_zone_str: str) -> dt.tzinfo | None: return None -async def async_get_time_zone(time_zone_str: str) -> dt.tzinfo | None: +async def async_get_time_zone(time_zone_str: str) -> zoneinfo.ZoneInfo | None: """Get time zone from string. Return None if unable to determine. Async friendly.