mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Remove konnected from mypy ignore list (#75003)
This commit is contained in:
parent
ee4749b207
commit
06a4c226fd
@ -419,7 +419,7 @@ class KonnectedView(HomeAssistantView):
|
|||||||
resp = {}
|
resp = {}
|
||||||
if request.query.get(CONF_ZONE):
|
if request.query.get(CONF_ZONE):
|
||||||
resp[CONF_ZONE] = zone_num
|
resp[CONF_ZONE] = zone_num
|
||||||
else:
|
elif zone_num:
|
||||||
resp[CONF_PIN] = ZONE_TO_PIN[zone_num]
|
resp[CONF_PIN] = ZONE_TO_PIN[zone_num]
|
||||||
|
|
||||||
# Make sure entity is setup
|
# Make sure entity is setup
|
||||||
|
@ -6,6 +6,7 @@ import copy
|
|||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
from typing import Any
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -171,11 +172,11 @@ class KonnectedFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
VERSION = 1
|
VERSION = 1
|
||||||
|
|
||||||
# class variable to store/share discovered host information
|
# class variable to store/share discovered host information
|
||||||
discovered_hosts = {}
|
discovered_hosts: dict[str, dict[str, Any]] = {}
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
"""Initialize the Konnected flow."""
|
"""Initialize the Konnected flow."""
|
||||||
self.data = {}
|
self.data: dict[str, Any] = {}
|
||||||
self.options = OPTIONS_SCHEMA({CONF_IO: {}})
|
self.options = OPTIONS_SCHEMA({CONF_IO: {}})
|
||||||
|
|
||||||
async def async_gen_config(self, host, port):
|
async def async_gen_config(self, host, port):
|
||||||
@ -271,6 +272,7 @@ class KonnectedFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
_LOGGER.error("Malformed Konnected SSDP info")
|
_LOGGER.error("Malformed Konnected SSDP info")
|
||||||
else:
|
else:
|
||||||
# extract host/port from ssdp_location
|
# extract host/port from ssdp_location
|
||||||
|
assert discovery_info.ssdp_location
|
||||||
netloc = urlparse(discovery_info.ssdp_location).netloc.split(":")
|
netloc = urlparse(discovery_info.ssdp_location).netloc.split(":")
|
||||||
self._async_abort_entries_match(
|
self._async_abort_entries_match(
|
||||||
{CONF_HOST: netloc[0], CONF_PORT: int(netloc[1])}
|
{CONF_HOST: netloc[0], CONF_PORT: int(netloc[1])}
|
||||||
@ -392,10 +394,10 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|||||||
self.current_opt = self.entry.options or self.entry.data[CONF_DEFAULT_OPTIONS]
|
self.current_opt = self.entry.options or self.entry.data[CONF_DEFAULT_OPTIONS]
|
||||||
|
|
||||||
# as config proceeds we'll build up new options and then replace what's in the config entry
|
# as config proceeds we'll build up new options and then replace what's in the config entry
|
||||||
self.new_opt = {CONF_IO: {}}
|
self.new_opt: dict[str, dict[str, Any]] = {CONF_IO: {}}
|
||||||
self.active_cfg = None
|
self.active_cfg = None
|
||||||
self.io_cfg = {}
|
self.io_cfg: dict[str, Any] = {}
|
||||||
self.current_states = []
|
self.current_states: list[dict[str, Any]] = []
|
||||||
self.current_state = 1
|
self.current_state = 1
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
6
mypy.ini
6
mypy.ini
@ -2690,12 +2690,6 @@ ignore_errors = true
|
|||||||
[mypy-homeassistant.components.izone.climate]
|
[mypy-homeassistant.components.izone.climate]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
[mypy-homeassistant.components.konnected]
|
|
||||||
ignore_errors = true
|
|
||||||
|
|
||||||
[mypy-homeassistant.components.konnected.config_flow]
|
|
||||||
ignore_errors = true
|
|
||||||
|
|
||||||
[mypy-homeassistant.components.lovelace]
|
[mypy-homeassistant.components.lovelace]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
|
@ -31,8 +31,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
|||||||
"homeassistant.components.icloud.device_tracker",
|
"homeassistant.components.icloud.device_tracker",
|
||||||
"homeassistant.components.icloud.sensor",
|
"homeassistant.components.icloud.sensor",
|
||||||
"homeassistant.components.izone.climate",
|
"homeassistant.components.izone.climate",
|
||||||
"homeassistant.components.konnected",
|
|
||||||
"homeassistant.components.konnected.config_flow",
|
|
||||||
"homeassistant.components.lovelace",
|
"homeassistant.components.lovelace",
|
||||||
"homeassistant.components.lovelace.dashboard",
|
"homeassistant.components.lovelace.dashboard",
|
||||||
"homeassistant.components.lovelace.resources",
|
"homeassistant.components.lovelace.resources",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user