1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 22:18:40 +00:00

ConfigType and async_setup/setup type hint improvements (#54739)

This commit is contained in:
Ville Skyttä
2021-08-18 14:22:05 +03:00
committed by GitHub
parent dcb2a211e5
commit 939fde0a50
63 changed files with 114 additions and 71 deletions

View File

@@ -1,17 +1,16 @@
"""The NEW_NAME integration."""
from __future__ import annotations
from typing import Any
import voluptuous as vol
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType
from .const import DOMAIN
CONFIG_SCHEMA = vol.Schema({vol.Optional(DOMAIN): {}}, extra=vol.ALLOW_EXTRA)
async def async_setup(hass: HomeAssistant, config: dict[str, Any]) -> bool:
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the NEW_NAME integration."""
return True