Adjust targets type hint in notify platform (#90062)
This commit is contained in:
parent
a036e31495
commit
3058cc8d56
2 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Callable, Coroutine
|
||||
from collections.abc import Callable, Coroutine, Mapping
|
||||
from functools import partial
|
||||
from typing import Any, Protocol, cast
|
||||
|
||||
|
@ -221,7 +221,7 @@ class BaseNotificationService:
|
|||
registered_targets: dict[str, Any]
|
||||
|
||||
@property
|
||||
def targets(self) -> dict[str, Any] | None:
|
||||
def targets(self) -> Mapping[str, Any] | None:
|
||||
"""Return a dictionary of registered targets."""
|
||||
return None
|
||||
|
||||
|
|
|
@ -2035,7 +2035,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||
matches=[
|
||||
TypeHintMatch(
|
||||
function_name="targets",
|
||||
return_type=["dict[str, Any]", None],
|
||||
return_type=["Mapping[str, Any]", None],
|
||||
),
|
||||
TypeHintMatch(
|
||||
function_name="send_message",
|
||||
|
|
Loading…
Add table
Reference in a new issue