Add mypy to elkm1. (#55964)

This commit is contained in:
jan iversen 2021-09-09 13:14:28 +02:00 committed by GitHub
parent 065e858a03
commit 9d2861afe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,11 @@
"""Support the ElkM1 Gold and ElkM1 EZ8 alarm/integration panels."""
from __future__ import annotations
import asyncio
import logging
import re
from types import MappingProxyType
from typing import Any
import async_timeout
import elkm1_lib as elkm1
@ -197,7 +201,7 @@ def _async_find_matching_config_entry(hass, prefix):
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Elk-M1 Control from a config entry."""
conf = entry.data
conf: MappingProxyType[str, Any] = entry.data
_LOGGER.debug("Setting up elkm1 %s", conf["host"])
@ -205,7 +209,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if conf[CONF_TEMPERATURE_UNIT] in (BARE_TEMP_CELSIUS, TEMP_CELSIUS):
temperature_unit = TEMP_CELSIUS
config = {"temperature_unit": temperature_unit}
config: dict[str, Any] = {"temperature_unit": temperature_unit}
if not conf[CONF_AUTO_CONFIGURE]:
# With elkm1-lib==0.7.16 and later auto configure is available

View File

@ -1315,9 +1315,6 @@ ignore_errors = true
[mypy-homeassistant.components.doorbird.*]
ignore_errors = true
[mypy-homeassistant.components.elkm1.*]
ignore_errors = true
[mypy-homeassistant.components.enphase_envoy.*]
ignore_errors = true

View File

@ -27,7 +27,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.dhcp.*",
"homeassistant.components.directv.*",
"homeassistant.components.doorbird.*",
"homeassistant.components.elkm1.*",
"homeassistant.components.enphase_envoy.*",
"homeassistant.components.entur_public_transport.*",
"homeassistant.components.evohome.*",