Remove useless TypeVars (#117687)
parent
97a4101900
commit
10dfa91e54
|
@ -6,7 +6,7 @@ import asyncio
|
|||
from collections.abc import Awaitable, Callable
|
||||
import functools
|
||||
import logging
|
||||
from typing import TYPE_CHECKING, Any, Final, TypeVar
|
||||
from typing import TYPE_CHECKING, Any, Final
|
||||
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import callback
|
||||
|
@ -29,7 +29,6 @@ ATTR_IN_CLUSTERS: Final[str] = "input_clusters"
|
|||
ATTR_OUT_CLUSTERS: Final[str] = "output_clusters"
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
CALLABLE_T = TypeVar("CALLABLE_T", bound=Callable)
|
||||
|
||||
|
||||
class Endpoint:
|
||||
|
@ -209,7 +208,7 @@ class Endpoint:
|
|||
def async_new_entity(
|
||||
self,
|
||||
platform: Platform,
|
||||
entity_class: CALLABLE_T,
|
||||
entity_class: type,
|
||||
unique_id: str,
|
||||
cluster_handlers: list[ClusterHandler],
|
||||
**kwargs: Any,
|
||||
|
|
|
@ -583,7 +583,7 @@ def slug(value: Any) -> str:
|
|||
|
||||
|
||||
def schema_with_slug_keys(
|
||||
value_schema: _T | Callable, *, slug_validator: Callable[[Any], str] = slug
|
||||
value_schema: dict | Callable, *, slug_validator: Callable[[Any], str] = slug
|
||||
) -> Callable:
|
||||
"""Ensure dicts have slugs as keys.
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ from homeassistant.components.bluetooth import (
|
|||
BluetoothServiceInfoBleak,
|
||||
)
|
||||
from homeassistant.components.bluetooth.active_update_coordinator import (
|
||||
_T,
|
||||
ActiveBluetoothDataUpdateCoordinator,
|
||||
)
|
||||
from homeassistant.core import CoreState, HomeAssistant
|
||||
|
@ -68,7 +67,7 @@ class MyCoordinator(ActiveBluetoothDataUpdateCoordinator[dict[str, Any]]):
|
|||
needs_poll_method: Callable[[BluetoothServiceInfoBleak, float | None], bool],
|
||||
poll_method: Callable[
|
||||
[BluetoothServiceInfoBleak],
|
||||
Coroutine[Any, Any, _T],
|
||||
Coroutine[Any, Any, dict[str, Any]],
|
||||
]
|
||||
| None = None,
|
||||
poll_debouncer: Debouncer[Coroutine[Any, Any, None]] | None = None,
|
||||
|
|
Loading…
Reference in New Issue