diff --git a/homeassistant/components/ring/__init__.py b/homeassistant/components/ring/__init__.py index 242b4cb8ba0..5d834976370 100644 --- a/homeassistant/components/ring/__init__.py +++ b/homeassistant/components/ring/__init__.py @@ -2,10 +2,12 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from datetime import timedelta from functools import partial import logging from pathlib import Path +from typing import Any from oauthlib.oauth2 import AccessDeniedError import requests @@ -162,7 +164,7 @@ class GlobalDataUpdater: self.ring = ring self.update_method = update_method self.update_interval = update_interval - self.listeners = [] + self.listeners: list[Callable[[], None]] = [] self._unsub_interval = None @callback @@ -225,7 +227,7 @@ class DeviceDataUpdater: data_type: str, config_entry_id: str, ring: Ring, - update_method: str, + update_method: Callable[[Ring], Any], update_interval: timedelta, ) -> None: """Initialize device data updater.""" @@ -235,7 +237,7 @@ class DeviceDataUpdater: self.ring = ring self.update_method = update_method self.update_interval = update_interval - self.devices = {} + self.devices: dict = {} self._unsub_interval = None async def async_track_device(self, device, update_callback): diff --git a/mypy.ini b/mypy.ini index e0edd5c006c..5707d701f6f 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2161,9 +2161,6 @@ ignore_errors = true [mypy-homeassistant.components.profiler.*] ignore_errors = true -[mypy-homeassistant.components.ring.*] -ignore_errors = true - [mypy-homeassistant.components.solaredge.*] ignore_errors = true diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 3e7b252310c..7fc5e161923 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -62,7 +62,6 @@ IGNORED_MODULES: Final[list[str]] = [ "homeassistant.components.philips_js.*", "homeassistant.components.plex.*", "homeassistant.components.profiler.*", - "homeassistant.components.ring.*", "homeassistant.components.solaredge.*", "homeassistant.components.sonos.*", "homeassistant.components.spotify.*",