mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +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.anthemav.*
|
||||
homeassistant.components.apcupsd.*
|
||||
homeassistant.components.apprise.*
|
||||
homeassistant.components.aqualogic.*
|
||||
homeassistant.components.aseko_pool_live.*
|
||||
homeassistant.components.assist_pipeline.*
|
||||
|
@ -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
|
||||
|
10
mypy.ini
10
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user