Improve type hints in cloud (#87263)

This commit is contained in:
epenet 2023-02-03 17:10:25 +01:00 committed by GitHub
parent ad039b5ffc
commit b03f4fa1d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
import asyncio
from http import HTTPStatus
import logging
from typing import Any
from hass_nabucasa import Cloud, cloud_api
from hass_nabucasa.google_report_state import ErrorResponse
@ -9,7 +10,13 @@ from hass_nabucasa.google_report_state import ErrorResponse
from homeassistant.components.google_assistant import DOMAIN as GOOGLE_DOMAIN
from homeassistant.components.google_assistant.helpers import AbstractConfig
from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES
from homeassistant.core import CoreState, Event, callback, split_entity_id
from homeassistant.core import (
CoreState,
Event,
HomeAssistant,
callback,
split_entity_id,
)
from homeassistant.helpers import device_registry as dr, entity_registry as er, start
from homeassistant.setup import async_setup_component
@ -28,8 +35,13 @@ class CloudGoogleConfig(AbstractConfig):
"""HA Cloud Configuration for Google Assistant."""
def __init__(
self, hass, config, cloud_user: str, prefs: CloudPreferences, cloud: Cloud
):
self,
hass: HomeAssistant,
config: dict[str, Any],
cloud_user: str,
prefs: CloudPreferences,
cloud: Cloud,
) -> None:
"""Initialize the Google config."""
super().__init__(hass)
self._config = config