Remove harmony from mypy ignore list (#74425)

This commit is contained in:
epenet 2022-07-04 20:39:14 +02:00 committed by GitHub
parent b3fec4c401
commit 1536936177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 16 deletions

View File

@ -3,6 +3,7 @@ from __future__ import annotations
import asyncio import asyncio
import logging import logging
from typing import Any
from urllib.parse import urlparse from urllib.parse import urlparse
from aioharmony.hubconnector_websocket import HubConnector from aioharmony.hubconnector_websocket import HubConnector
@ -57,7 +58,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
def __init__(self) -> None: def __init__(self) -> None:
"""Initialize the Harmony config flow.""" """Initialize the Harmony config flow."""
self.harmony_config = {} self.harmony_config: dict[str, Any] = {}
async def async_step_user(self, user_input=None): async def async_step_user(self, user_input=None):
"""Handle the initial step.""" """Handle the initial step."""

View File

@ -21,13 +21,14 @@ _LOGGER = logging.getLogger(__name__)
class HarmonyData(HarmonySubscriberMixin): class HarmonyData(HarmonySubscriberMixin):
"""HarmonyData registers for Harmony hub updates.""" """HarmonyData registers for Harmony hub updates."""
def __init__(self, hass, address: str, name: str, unique_id: str): _client: HarmonyClient
def __init__(self, hass, address: str, name: str, unique_id: str | None) -> None:
"""Initialize a data object.""" """Initialize a data object."""
super().__init__(hass) super().__init__(hass)
self._name = name self._name = name
self._unique_id = unique_id self._unique_id = unique_id
self._available = False self._available = False
self._client = None
self._address = address self._address = address
@property @property
@ -99,7 +100,7 @@ class HarmonyData(HarmonySubscriberMixin):
configuration_url="https://www.logitech.com/en-us/my-account", configuration_url="https://www.logitech.com/en-us/my-account",
) )
async def connect(self) -> bool: async def connect(self) -> None:
"""Connect to the Harmony Hub.""" """Connect to the Harmony Hub."""
_LOGGER.debug("%s: Connecting", self._name) _LOGGER.debug("%s: Connecting", self._name)

View File

@ -2674,15 +2674,6 @@ ignore_errors = true
[mypy-homeassistant.components.google_assistant.trait] [mypy-homeassistant.components.google_assistant.trait]
ignore_errors = true ignore_errors = true
[mypy-homeassistant.components.harmony]
ignore_errors = true
[mypy-homeassistant.components.harmony.config_flow]
ignore_errors = true
[mypy-homeassistant.components.harmony.data]
ignore_errors = true
[mypy-homeassistant.components.hassio] [mypy-homeassistant.components.hassio]
ignore_errors = true ignore_errors = true

View File

@ -33,9 +33,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.google_assistant.http", "homeassistant.components.google_assistant.http",
"homeassistant.components.google_assistant.report_state", "homeassistant.components.google_assistant.report_state",
"homeassistant.components.google_assistant.trait", "homeassistant.components.google_assistant.trait",
"homeassistant.components.harmony",
"homeassistant.components.harmony.config_flow",
"homeassistant.components.harmony.data",
"homeassistant.components.hassio", "homeassistant.components.hassio",
"homeassistant.components.hassio.auth", "homeassistant.components.hassio.auth",
"homeassistant.components.hassio.binary_sensor", "homeassistant.components.hassio.binary_sensor",