mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
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:
committed by
Paulus Schoutsen
parent
2dc90be94f
commit
2f0eb07624
@ -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:
|
||||
|
Reference in New Issue
Block a user