diff --git a/.strict-typing b/.strict-typing index 91d91103c91..5b4721d7e6e 100644 --- a/.strict-typing +++ b/.strict-typing @@ -407,6 +407,7 @@ homeassistant.components.person.* homeassistant.components.pi_hole.* homeassistant.components.ping.* homeassistant.components.plugwise.* +homeassistant.components.pooldose.* homeassistant.components.portainer.* homeassistant.components.powerfox.* homeassistant.components.powerwall.* diff --git a/homeassistant/components/pooldose/entity.py b/homeassistant/components/pooldose/entity.py index 4965700ce1b..013e28751c3 100644 --- a/homeassistant/components/pooldose/entity.py +++ b/homeassistant/components/pooldose/entity.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import Literal +from collections.abc import Callable, Coroutine +from typing import Any, Literal from pooldose.type_definitions import DeviceInfoDict, ValueDict @@ -80,7 +81,10 @@ class PooldoseEntity(CoordinatorEntity[PooldoseCoordinator]): return platform_data.get(self.entity_description.key) async def _async_perform_write( - self, api_call, key: str, value: bool | str | float + self, + api_call: Callable[[str, Any], Coroutine[Any, Any, bool]], + key: str, + value: bool | str | float, ) -> None: """Perform a write call to the API with unified error handling. diff --git a/homeassistant/components/pooldose/manifest.json b/homeassistant/components/pooldose/manifest.json index e9baf0d7c03..87610c605c2 100644 --- a/homeassistant/components/pooldose/manifest.json +++ b/homeassistant/components/pooldose/manifest.json @@ -11,6 +11,6 @@ "documentation": "https://www.home-assistant.io/integrations/pooldose", "integration_type": "device", "iot_class": "local_polling", - "quality_scale": "gold", + "quality_scale": "platinum", "requirements": ["python-pooldose==0.8.2"] } diff --git a/homeassistant/components/pooldose/quality_scale.yaml b/homeassistant/components/pooldose/quality_scale.yaml index ac73f452036..3de73acc596 100644 --- a/homeassistant/components/pooldose/quality_scale.yaml +++ b/homeassistant/components/pooldose/quality_scale.yaml @@ -71,4 +71,4 @@ rules: # Platinum async-dependency: done inject-websession: done - strict-typing: todo + strict-typing: done diff --git a/mypy.ini b/mypy.ini index e21f8fd44c3..35f9cbd7a05 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3826,6 +3826,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.pooldose.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.portainer.*] check_untyped_defs = true disallow_incomplete_defs = true