mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Adjust targets type hint in notify platform (#90062)
This commit is contained in:
parent
a036e31495
commit
3058cc8d56
@ -2,7 +2,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from collections.abc import Callable, Coroutine
|
from collections.abc import Callable, Coroutine, Mapping
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from typing import Any, Protocol, cast
|
from typing import Any, Protocol, cast
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ class BaseNotificationService:
|
|||||||
registered_targets: dict[str, Any]
|
registered_targets: dict[str, Any]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def targets(self) -> dict[str, Any] | None:
|
def targets(self) -> Mapping[str, Any] | None:
|
||||||
"""Return a dictionary of registered targets."""
|
"""Return a dictionary of registered targets."""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -2035,7 +2035,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
matches=[
|
matches=[
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="targets",
|
function_name="targets",
|
||||||
return_type=["dict[str, Any]", None],
|
return_type=["Mapping[str, Any]", None],
|
||||||
),
|
),
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="send_message",
|
function_name="send_message",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user