Add image_processing setup type hints (#63290)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-03 15:14:57 +01:00 committed by GitHub
parent 061ce0c187
commit ca366e6f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 143 additions and 26 deletions

View file

@ -1,4 +1,6 @@
"""Support for the DOODS service."""
from __future__ import annotations
import io
import logging
import os
@ -17,9 +19,11 @@ from homeassistant.components.image_processing import (
ImageProcessingEntity,
)
from homeassistant.const import CONF_COVERS, CONF_TIMEOUT, CONF_URL
from homeassistant.core import split_entity_id
from homeassistant.core import HomeAssistant, split_entity_id
from homeassistant.helpers import template
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from homeassistant.util.pil import draw_box
_LOGGER = logging.getLogger(__name__)
@ -73,7 +77,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
)
def setup_platform(hass, config, add_entities, discovery_info=None):
def setup_platform(
hass: HomeAssistant,
config: ConfigType,
add_entities: AddEntitiesCallback,
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Set up the Doods client."""
url = config[CONF_URL]
auth_key = config[CONF_AUTH_KEY]