Import Callable from collections.abc (4) (#56778)

pull/56806/head
Marc Mueller 2021-09-29 16:15:36 +02:00 committed by GitHub
parent 19685ecff0
commit 364767ff22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 50 additions and 32 deletions

View File

@ -1,8 +1,8 @@
"""Support for Daikin AC sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Callable
from pydaikin.daikin_base import Appliance

View File

@ -1,8 +1,8 @@
"""Code to handle a DenonAVR receiver."""
from __future__ import annotations
from collections.abc import Callable
import logging
from typing import Callable
from denonavr import DenonAVR

View File

@ -2,11 +2,11 @@
from __future__ import annotations
import asyncio
from collections.abc import Coroutine, Sequence
from collections.abc import Callable, Coroutine, Sequence
from datetime import timedelta
import hashlib
from types import ModuleType
from typing import Any, Callable, Final, final
from typing import Any, Final, final
import attr
import voluptuous as vol

View File

@ -1,8 +1,9 @@
"""Code to handle a Dynalite bridge."""
from __future__ import annotations
from collections.abc import Callable
from types import MappingProxyType
from typing import Any, Callable
from typing import Any
from dynalite_devices_lib.dynalite_devices import (
CONF_AREA as dyn_CONF_AREA,

View File

@ -1,7 +1,8 @@
"""Support for the Dynalite devices as entities."""
from __future__ import annotations
from typing import Any, Callable
from collections.abc import Callable
from typing import Any
from homeassistant.components.dynalite.bridge import DynaliteBridge
from homeassistant.config_entries import ConfigEntry

View File

@ -1,8 +1,9 @@
"""Models for the Forecast.Solar integration."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any, Callable
from typing import Any
from forecast_solar.models import Estimate

View File

@ -1,7 +1,8 @@
"""This platform allows several media players to be grouped into one media player."""
from __future__ import annotations
from typing import Any, Callable
from collections.abc import Callable
from typing import Any
import voluptuous as vol

View File

@ -1,9 +1,9 @@
"""Utility functions to combine state attributes from multiple entities."""
from __future__ import annotations
from collections.abc import Iterator
from collections.abc import Callable, Iterator
from itertools import groupby
from typing import Any, Callable
from typing import Any
from homeassistant.core import State

View File

@ -1,9 +1,9 @@
"""Support for IoTaWatt Energy monitor."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
import logging
from typing import Callable
from iotawattpy.sensor import Sensor

View File

@ -2,10 +2,10 @@
from __future__ import annotations
import asyncio
from collections.abc import Awaitable
from collections.abc import Awaitable, Callable
from datetime import timedelta
from functools import partial
from typing import Any, Callable, Dict, cast
from typing import Any, Dict, cast
from pyiqvia import Client
from pyiqvia.errors import IQVIAError

View File

@ -1,8 +1,9 @@
"""Support for KNX/IP covers."""
from __future__ import annotations
from collections.abc import Callable
from datetime import datetime
from typing import Any, Callable
from typing import Any
from xknx import XKNX
from xknx.devices import Cover as XknxCover, Device as XknxDevice

View File

@ -1,7 +1,7 @@
"""Exposures to KNX bus."""
from __future__ import annotations
from typing import Callable
from collections.abc import Callable
from xknx import XKNX
from xknx.devices import DateTime, ExposeSensor

View File

@ -1,7 +1,10 @@
"""Support for Honeywell Lyric sensor platform."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import Callable, cast
from typing import cast
from aiolyric.objects.device import LyricDevice
from aiolyric.objects.location import LyricLocation

View File

@ -1,7 +1,10 @@
"""Helper to handle a set of topics to subscribe to."""
from __future__ import annotations
from collections import deque
from collections.abc import Callable
from functools import wraps
from typing import Any, Callable
from typing import Any
from homeassistant.core import HomeAssistant

View File

@ -1,8 +1,9 @@
"""Provides device automations for MQTT."""
from __future__ import annotations
from collections.abc import Callable
import logging
from typing import Any, Callable
from typing import Any
import attr
import voluptuous as vol

View File

@ -2,9 +2,9 @@
from __future__ import annotations
from abc import abstractmethod
from collections.abc import Callable
import json
import logging
from typing import Callable
import voluptuous as vol

View File

@ -1,7 +1,8 @@
"""Helper to handle a set of topics to subscribe to."""
from __future__ import annotations
from typing import Any, Callable
from collections.abc import Callable
from typing import Any
import attr

View File

@ -1,9 +1,10 @@
"""Support for Google Nest SDM Cameras."""
from __future__ import annotations
from collections.abc import Callable
import datetime
import logging
from typing import Any, Callable
from typing import Any
from google_nest_sdm.camera_traits import (
CameraEventImageTrait,

View File

@ -2,9 +2,9 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from contextlib import suppress
import datetime as dt
from typing import Callable
from httpx import RemoteProtocolError, TransportError
from onvif import ONVIFCamera, ONVIFService

View File

@ -2,11 +2,11 @@
from __future__ import annotations
from collections import defaultdict
from collections.abc import Callable
import datetime
import itertools
import logging
import math
from typing import Callable
from homeassistant.components.recorder import history, statistics
from homeassistant.components.recorder.models import (

View File

@ -1,8 +1,8 @@
"""Support for System Bridge binary sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Callable
from systembridge import Bridge

View File

@ -2,9 +2,9 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from datetime import timedelta
import logging
from typing import Callable
from systembridge import Bridge
from systembridge.exceptions import (

View File

@ -1,9 +1,10 @@
"""Support for System Bridge sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import Callable, Final, cast
from typing import Final, cast
from systembridge import Bridge

View File

@ -1,8 +1,9 @@
"""Support for Tasmota binary sensors."""
from __future__ import annotations
from collections.abc import Callable
from datetime import datetime
from typing import Any, Callable
from typing import Any
from hatasmota import switch as tasmota_switch
from hatasmota.entity import TasmotaEntity as HATasmotaEntity

View File

@ -1,8 +1,9 @@
"""Provides device automations for Tasmota."""
from __future__ import annotations
from collections.abc import Callable
import logging
from typing import Any, Callable
from typing import Any
import attr
from hatasmota.models import DiscoveryHashType

View File

@ -1,7 +1,9 @@
"""Support for representing current time of the day as binary sensors."""
from __future__ import annotations
from collections.abc import Callable
from datetime import datetime, timedelta
import logging
from typing import Callable
import voluptuous as vol

View File

@ -1,10 +1,9 @@
"""Webhooks for Home Assistant."""
from __future__ import annotations
from collections.abc import Awaitable
from collections.abc import Awaitable, Callable
import logging
import secrets
from typing import Callable
from aiohttp.web import Request, Response
import voluptuous as vol

View File

@ -2,7 +2,7 @@
from __future__ import annotations
import asyncio
from typing import Callable
from collections.abc import Callable
from wled import WLED, Device as WLEDDevice, WLEDConnectionClosed, WLEDError