Skip to content

Commit 8fa992e

Browse files
committed
tests: Fix mypy errors for _is_timestamp_close_to_now
1 parent 7c41b41 commit 8fa992e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/component/_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
from datetime import timezone
66

77
from hightime import datetime as ht_datetime
8+
from nitypes.time.typing import AnyDateTime
89

910

10-
def _is_timestamp_close_to_now(timestamp: ht_datetime, tolerance_seconds: float = 1.0) -> bool:
11+
def _is_timestamp_close_to_now(timestamp: AnyDateTime, tolerance_seconds: float = 1.0) -> bool:
1112
current_time = ht_datetime.now(timezone.utc)
1213
time_diff = abs((timestamp - current_time).total_seconds())
1314
return time_diff <= tolerance_seconds

0 commit comments

Comments
 (0)