Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[bc]* (#57989)

This commit is contained in:
Ville Skyttä 2021-10-22 20:43:40 +03:00 committed by GitHub
parent ab7a34fc71
commit 73d192b3f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 169 additions and 182 deletions

View file

@ -2,6 +2,7 @@
from __future__ import annotations
import asyncio
from http import HTTPStatus
import logging
from pathlib import Path
from typing import Any
@ -14,7 +15,6 @@ from homeassistant.components.alexa import (
smart_home as alexa_sh,
)
from homeassistant.components.google_assistant import const as gc, smart_home as ga
from homeassistant.const import HTTP_OK
from homeassistant.core import Context, HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_call_later
@ -210,7 +210,7 @@ class CloudClient(Interface):
break
if found is None:
return {"status": HTTP_OK}
return {"status": HTTPStatus.OK}
request = MockRequest(
content=payload["body"].encode("utf-8"),