mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Add Apprise to strict typing (#105575)
This commit is contained in:
parent
32147dbdd9
commit
09b07c071b
@ -63,6 +63,7 @@ homeassistant.components.analytics.*
|
|||||||
homeassistant.components.anova.*
|
homeassistant.components.anova.*
|
||||||
homeassistant.components.anthemav.*
|
homeassistant.components.anthemav.*
|
||||||
homeassistant.components.apcupsd.*
|
homeassistant.components.apcupsd.*
|
||||||
|
homeassistant.components.apprise.*
|
||||||
homeassistant.components.aqualogic.*
|
homeassistant.components.aqualogic.*
|
||||||
homeassistant.components.aseko_pool_live.*
|
homeassistant.components.aseko_pool_live.*
|
||||||
homeassistant.components.assist_pipeline.*
|
homeassistant.components.assist_pipeline.*
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import apprise
|
import apprise
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -61,11 +62,11 @@ def get_service(
|
|||||||
class AppriseNotificationService(BaseNotificationService):
|
class AppriseNotificationService(BaseNotificationService):
|
||||||
"""Implement the notification service for Apprise."""
|
"""Implement the notification service for Apprise."""
|
||||||
|
|
||||||
def __init__(self, a_obj):
|
def __init__(self, a_obj: apprise.Apprise) -> None:
|
||||||
"""Initialize the service."""
|
"""Initialize the service."""
|
||||||
self.apprise = a_obj
|
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.
|
"""Send a message to a specified target.
|
||||||
|
|
||||||
If no target/tags are specified, then services are notified as is
|
If no target/tags are specified, then services are notified as is
|
||||||
|
10
mypy.ini
10
mypy.ini
@ -390,6 +390,16 @@ disallow_untyped_defs = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unreachable = 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.*]
|
[mypy-homeassistant.components.aqualogic.*]
|
||||||
check_untyped_defs = true
|
check_untyped_defs = true
|
||||||
disallow_incomplete_defs = true
|
disallow_incomplete_defs = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user