mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
* Revert "Add TypeVar defaults for DataUpdateCoordinator and EntityComponent (#95026)" This reverts commit 90f5b1c323102840b6dc553ae5d59cfc70715132. * Don't revert everything
This commit is contained in:
parent
239f5fe56b
commit
6033f39a0d
@ -1,9 +1,7 @@
|
||||
"""Passive update coordinator for the Bluetooth integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from typing_extensions import TypeVar
|
||||
from typing import TYPE_CHECKING, Any, TypeVar
|
||||
|
||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
|
||||
from homeassistant.helpers.update_coordinator import (
|
||||
@ -22,7 +20,6 @@ if TYPE_CHECKING:
|
||||
_PassiveBluetoothDataUpdateCoordinatorT = TypeVar(
|
||||
"_PassiveBluetoothDataUpdateCoordinatorT",
|
||||
bound="PassiveBluetoothDataUpdateCoordinator",
|
||||
default="PassiveBluetoothDataUpdateCoordinator",
|
||||
)
|
||||
|
||||
|
||||
|
@ -8,12 +8,11 @@ from datetime import datetime, timedelta
|
||||
import logging
|
||||
from random import randint
|
||||
from time import monotonic
|
||||
from typing import Any, Generic, Protocol
|
||||
from typing import Any, Generic, Protocol, TypeVar
|
||||
import urllib.error
|
||||
|
||||
import aiohttp
|
||||
import requests
|
||||
from typing_extensions import TypeVar
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||
@ -31,14 +30,12 @@ from .debounce import Debouncer
|
||||
REQUEST_REFRESH_DEFAULT_COOLDOWN = 10
|
||||
REQUEST_REFRESH_DEFAULT_IMMEDIATE = True
|
||||
|
||||
_DataT = TypeVar("_DataT", default=dict[str, Any])
|
||||
_DataT = TypeVar("_DataT")
|
||||
_BaseDataUpdateCoordinatorT = TypeVar(
|
||||
"_BaseDataUpdateCoordinatorT", bound="BaseDataUpdateCoordinatorProtocol"
|
||||
)
|
||||
_DataUpdateCoordinatorT = TypeVar(
|
||||
"_DataUpdateCoordinatorT",
|
||||
bound="DataUpdateCoordinator[Any]",
|
||||
default="DataUpdateCoordinator[dict[str, Any]]",
|
||||
"_DataUpdateCoordinatorT", bound="DataUpdateCoordinator[Any]"
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user