Migrate legacy typehints in core to PEP-526 (#26403)

* Migrate legacy typehints in core to PEP-526

* Fix one type
This commit is contained in:
Franck Nijhof 2019-09-04 05:36:04 +02:00 committed by Paulus Schoutsen
parent 2dc90be94f
commit 2f0eb07624
45 changed files with 221 additions and 263 deletions

View file

@ -68,14 +68,14 @@ def get_location_astral_event_next(
mod = -1
while True:
try:
next_dt = (
next_dt: datetime.datetime = (
getattr(location, event)(
dt_util.as_local(utc_point_in_time).date()
+ datetime.timedelta(days=mod),
local=False,
)
+ offset
) # type: datetime.datetime
)
if next_dt > utc_point_in_time:
return next_dt
except AstralError: