diff --git a/.strict-typing b/.strict-typing index ab4cc944ea1..ce1491b33eb 100644 --- a/.strict-typing +++ b/.strict-typing @@ -63,6 +63,7 @@ homeassistant.components.analytics.* homeassistant.components.anova.* homeassistant.components.anthemav.* homeassistant.components.apcupsd.* +homeassistant.components.apprise.* homeassistant.components.aqualogic.* homeassistant.components.aseko_pool_live.* homeassistant.components.assist_pipeline.* diff --git a/homeassistant/components/apprise/notify.py b/homeassistant/components/apprise/notify.py index b215f93aeb1..e4b350c4da8 100644 --- a/homeassistant/components/apprise/notify.py +++ b/homeassistant/components/apprise/notify.py @@ -2,6 +2,7 @@ from __future__ import annotations import logging +from typing import Any import apprise import voluptuous as vol @@ -61,11 +62,11 @@ def get_service( class AppriseNotificationService(BaseNotificationService): """Implement the notification service for Apprise.""" - def __init__(self, a_obj): + def __init__(self, a_obj: apprise.Apprise) -> None: """Initialize the service.""" self.apprise = a_obj - def send_message(self, message="", **kwargs): + def send_message(self, message: str = "", **kwargs: Any) -> None: """Send a message to a specified target. If no target/tags are specified, then services are notified as is diff --git a/mypy.ini b/mypy.ini index 3e882d15812..df774c3a167 100644 --- a/mypy.ini +++ b/mypy.ini @@ -390,6 +390,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.apprise.*] +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.aqualogic.*] check_untyped_defs = true disallow_incomplete_defs = true