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