Postponed evaluation of annotations in core (#46434)

* Postponed evaluation of annotations in core

* Remove unneeded future
This commit is contained in:
Franck Nijhof
2021-02-12 10:58:20 +01:00
committed by GitHub
parent 910c034613
commit 9b7c39d20b
18 changed files with 84 additions and 50 deletions

View File

@@ -1,4 +1,6 @@
"""Helpers for sun events."""
from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Optional, Union
@@ -17,7 +19,7 @@ DATA_LOCATION_CACHE = "astral_location_cache"
@callback
@bind_hass
def get_astral_location(hass: HomeAssistantType) -> "astral.Location":
def get_astral_location(hass: HomeAssistantType) -> astral.Location:
"""Get an astral location for the current Home Assistant configuration."""
from astral import Location # pylint: disable=import-outside-toplevel