Enable basic type checking in demo init (#66218)
* Enable basic type checking in demo init * Remove from mypy ignore list
This commit is contained in:
parent
e90143e5c9
commit
f17d66228c
3 changed files with 8 additions and 12 deletions
|
@ -3,7 +3,7 @@ import asyncio
|
|||
import datetime
|
||||
from random import random
|
||||
|
||||
from homeassistant import bootstrap, config_entries
|
||||
from homeassistant import config_entries, setup
|
||||
from homeassistant.components import persistent_notification
|
||||
from homeassistant.components.recorder.statistics import (
|
||||
async_add_external_statistics,
|
||||
|
@ -83,11 +83,11 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
if not hass.config.longitude:
|
||||
hass.config.longitude = 117.22743
|
||||
|
||||
tasks = [bootstrap.async_setup_component(hass, "sun", config)]
|
||||
tasks = [setup.async_setup_component(hass, "sun", config)]
|
||||
|
||||
# Set up input select
|
||||
tasks.append(
|
||||
bootstrap.async_setup_component(
|
||||
setup.async_setup_component(
|
||||
hass,
|
||||
"input_select",
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
|
||||
# Set up input boolean
|
||||
tasks.append(
|
||||
bootstrap.async_setup_component(
|
||||
setup.async_setup_component(
|
||||
hass,
|
||||
"input_boolean",
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
|
||||
# Set up input button
|
||||
tasks.append(
|
||||
bootstrap.async_setup_component(
|
||||
setup.async_setup_component(
|
||||
hass,
|
||||
"input_button",
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
|
||||
# Set up input number
|
||||
tasks.append(
|
||||
bootstrap.async_setup_component(
|
||||
setup.async_setup_component(
|
||||
hass,
|
||||
"input_number",
|
||||
{
|
||||
|
@ -280,7 +280,7 @@ async def finish_setup(hass, config):
|
|||
lights = sorted(hass.states.async_entity_ids("light"))
|
||||
|
||||
# Set up scripts
|
||||
await bootstrap.async_setup_component(
|
||||
await setup.async_setup_component(
|
||||
hass,
|
||||
"script",
|
||||
{
|
||||
|
@ -309,7 +309,7 @@ async def finish_setup(hass, config):
|
|||
)
|
||||
|
||||
# Set up scenes
|
||||
await bootstrap.async_setup_component(
|
||||
await setup.async_setup_component(
|
||||
hass,
|
||||
"scene",
|
||||
{
|
||||
|
|
3
mypy.ini
3
mypy.ini
|
@ -2196,9 +2196,6 @@ ignore_errors = true
|
|||
[mypy-homeassistant.components.deconz.switch]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.demo]
|
||||
ignore_errors = true
|
||||
|
||||
[mypy-homeassistant.components.demo.fan]
|
||||
ignore_errors = true
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||
"homeassistant.components.deconz.services",
|
||||
"homeassistant.components.deconz.siren",
|
||||
"homeassistant.components.deconz.switch",
|
||||
"homeassistant.components.demo",
|
||||
"homeassistant.components.demo.fan",
|
||||
"homeassistant.components.demo.light",
|
||||
"homeassistant.components.demo.number",
|
||||
|
|
Loading…
Add table
Reference in a new issue