Skip to content

Commit 61cbb77

Browse files
authored
Remove unneeded cast in logbook rest api (home-assistant#123098)
1 parent bb31fc1 commit 61cbb77

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

homeassistant/components/logbook/rest_api.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from collections.abc import Callable
66
from datetime import timedelta
77
from http import HTTPStatus
8-
from typing import Any, cast
8+
from typing import Any
99

1010
from aiohttp import web
1111
import voluptuous as vol
@@ -109,13 +109,6 @@ async def get(
109109

110110
def json_events() -> web.Response:
111111
"""Fetch events and generate JSON."""
112-
return self.json(
113-
event_processor.get_events(
114-
start_day,
115-
end_day,
116-
)
117-
)
112+
return self.json(event_processor.get_events(start_day, end_day))
118113

119-
return cast(
120-
web.Response, await get_instance(hass).async_add_executor_job(json_events)
121-
)
114+
return await get_instance(hass).async_add_executor_job(json_events)

0 commit comments

Comments
 (0)