diff --git a/homeassistant/components/http/auth.py b/homeassistant/components/http/auth.py index 702eb7c8adde..6188a2be73e2 100644 --- a/homeassistant/components/http/auth.py +++ b/homeassistant/components/http/auth.py @@ -23,14 +23,13 @@ from homeassistant.auth import jwt_wrapper from homeassistant.auth.const import GROUP_ID_READ_ONLY from homeassistant.components import websocket_api from homeassistant.core import HomeAssistant, callback -from homeassistant.helpers.http import current_request +from homeassistant.helpers.http import KEY_AUTHENTICATED, current_request from homeassistant.helpers.json import json_bytes from homeassistant.helpers.storage import Store from .auth_util import async_user_not_allowed_do_auth from .const import ( DATA_SUPERVISOR_USER, - KEY_AUTHENTICATED, KEY_HASS_REFRESH_TOKEN_ID, KEY_HASS_USER, is_supervisor_unix_socket_request, diff --git a/homeassistant/components/http/ban.py b/homeassistant/components/http/ban.py index 01462c42bcb4..a09078f692cb 100644 --- a/homeassistant/components/http/ban.py +++ b/homeassistant/components/http/ban.py @@ -26,10 +26,10 @@ from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import config_validation as cv from homeassistant.helpers.hassio import get_supervisor_ip, is_hassio +from homeassistant.helpers.http import KEY_HASS, HomeAssistantView from homeassistant.util import dt as dt_util, yaml as yaml_util -from .const import KEY_HASS, is_supervisor_unix_socket_request -from .view import HomeAssistantView +from .const import is_supervisor_unix_socket_request _LOGGER: Final = logging.getLogger(__name__) diff --git a/homeassistant/components/http/data_validator.py b/homeassistant/components/http/data_validator.py index 20c41b015e05..bbd9988fd351 100644 --- a/homeassistant/components/http/data_validator.py +++ b/homeassistant/components/http/data_validator.py @@ -9,10 +9,9 @@ from typing import Any, Concatenate from aiohttp import web import probatio +from homeassistant.helpers.http import HomeAssistantView from homeassistant.helpers.typing import VolDictType -from .view import HomeAssistantView - _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/http/decorators.py b/homeassistant/components/http/decorators.py index 9eca097acb30..b392a6e4a459 100644 --- a/homeassistant/components/http/decorators.py +++ b/homeassistant/components/http/decorators.py @@ -8,8 +8,7 @@ from aiohttp.web import Request, Response, StreamResponse from homeassistant.auth.models import User from homeassistant.exceptions import Unauthorized - -from .view import HomeAssistantView +from homeassistant.helpers.http import HomeAssistantView type _ResponseType = Response | StreamResponse type _FuncType[_T, **_P, _R] = Callable[