Import Callable from collections.abc (3) (#56777)

This commit is contained in:
Marc Mueller 2021-09-29 16:19:06 +02:00 committed by GitHub
parent 364767ff22
commit d51487f82a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 85 additions and 61 deletions

View file

@ -1,8 +1,9 @@
"""Support for the Airly sensor service."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any, Callable, cast
from typing import Any, cast
from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,

View file

@ -1,9 +1,10 @@
"""Represent the AsusWrt router."""
from __future__ import annotations
from collections.abc import Callable
from datetime import datetime, timedelta
import logging
from typing import Any, Callable
from typing import Any
from aioasuswrt.asuswrt import AsusWrt

View file

@ -1,10 +1,11 @@
"""Support for August binary sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime, timedelta
import logging
from typing import Callable, cast
from typing import cast
from yalexs.activity import (
ACTION_DOORBELL_CALL_MISSED,

View file

@ -1,9 +1,10 @@
"""Support for August sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
import logging
from typing import Callable, Generic, TypeVar
from typing import Generic, TypeVar
from yalexs.activity import ActivityType
from yalexs.keypad import KeypadDetail

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 datetime, timedelta
import logging
from typing import Any, Callable, Final
from typing import Any, Final
import bluetooth # pylint: disable=import-error
from bt_proximity import BluetoothRSSI

View file

@ -1,7 +1,8 @@
"""Flow handler for Crownstone."""
from __future__ import annotations
from typing import Any, Callable
from collections.abc import Callable
from typing import Any
from crownstone_cloud import CrownstoneCloud
from crownstone_cloud.exceptions import (

View file

@ -1,7 +1,6 @@
"""Subscriber for devolo home control API publisher."""
from collections.abc import Callable
import logging
from typing import Callable
_LOGGER = logging.getLogger(__name__)

View file

@ -3,8 +3,8 @@ from __future__ import annotations
import asyncio
from collections import Counter
from collections.abc import Awaitable
from typing import Callable, Literal, Optional, TypedDict, Union, cast
from collections.abc import Awaitable, Callable
from typing import Literal, Optional, TypedDict, Union, cast
import voluptuous as vol

View file

@ -2,8 +2,9 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from dataclasses import dataclass, field
from typing import Any, Callable, cast
from typing import Any, cast
from aioesphomeapi import (
COMPONENT_TYPE_TO_INFO,

View file

@ -1,10 +1,10 @@
"""The Fjäråskupan integration."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from datetime import timedelta
import logging
from typing import Callable
from bleak import BleakScanner
from bleak.backends.device import BLEDevice

View file

@ -1,8 +1,8 @@
"""Support for sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Callable
from fjaraskupan import Device, State

View file

@ -1,12 +1,12 @@
"""Support for AVM FRITZ!Box classes."""
from __future__ import annotations
from collections.abc import ValuesView
from collections.abc import Callable, ValuesView
from dataclasses import dataclass, field
from datetime import datetime, timedelta
import logging
from types import MappingProxyType
from typing import Any, Callable, TypedDict
from typing import Any, TypedDict
from fritzconnection import FritzConnection
from fritzconnection.core.exceptions import (

View file

@ -1,9 +1,10 @@
"""AVM FRITZ!Box binary sensors."""
from __future__ import annotations
from collections.abc import Callable
import datetime
import logging
from typing import Callable, TypedDict
from typing import TypedDict
from fritzconnection.core.exceptions import (
FritzActionError,

View file

@ -1,8 +1,8 @@
"""Type definitions for GIOS integration."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Callable
from homeassistant.components.sensor import SensorEntityDescription

View file

@ -1,10 +1,10 @@
"""Common code for GogoGate2 component."""
from __future__ import annotations
from collections.abc import Awaitable, Mapping
from collections.abc import Awaitable, Callable, Mapping
from datetime import timedelta
import logging
from typing import Any, Callable, NamedTuple
from typing import Any, NamedTuple
from ismartgate import AbstractGateApi, GogoGate2Api, ISmartGateApi
from ismartgate.common import AbstractDoor, get_door_by_id

View file

@ -1,11 +1,12 @@
"""Support for GTFS (Google/General Transport Format Schema)."""
from __future__ import annotations
from collections.abc import Callable
import datetime
import logging
import os
import threading
from typing import Any, Callable
from typing import Any
import pygtfs
from sqlalchemy.sql import text

View file

@ -2,9 +2,9 @@
from __future__ import annotations
import asyncio
from collections.abc import Awaitable
from collections.abc import Awaitable, Callable
from datetime import timedelta
from typing import Any, Callable, Dict, cast
from typing import Any, Dict, cast
from aioguardian import Client
from aioguardian.errors import GuardianError

View file

@ -2,9 +2,10 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from contextlib import suppress
import logging
from typing import Any, Callable, cast
from typing import Any, cast
from awesomeversion import AwesomeVersion
from hyperion import client, const as hyperion_const

View file

@ -1,11 +1,11 @@
"""Support for Hyperion-NG remotes."""
from __future__ import annotations
from collections.abc import Mapping, Sequence
from collections.abc import Callable, Mapping, Sequence
import functools
import logging
from types import MappingProxyType
from typing import Any, Callable
from typing import Any
from hyperion import client, const

View file

@ -1,9 +1,10 @@
"""Platform for Kostal Plenticore sensors."""
from __future__ import annotations
from collections.abc import Callable
from datetime import timedelta
import logging
from typing import Any, Callable
from typing import Any
from homeassistant.components.sensor import ATTR_STATE_CLASS, SensorEntity
from homeassistant.config_entries import ConfigEntry

View file

@ -1,8 +1,9 @@
"""Constants for the kraken integration."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Callable, Dict, TypedDict
from typing import Dict, TypedDict
from homeassistant.components.sensor import SensorEntityDescription
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator

View file

@ -1,8 +1,8 @@
"""Support for LCN devices."""
from __future__ import annotations
from collections.abc import Callable
import logging
from typing import Callable
import pypck

View file

@ -1,5 +1,5 @@
"""Trigger an automation when a LiteJet switch is released."""
from typing import Callable
from collections.abc import Callable
import voluptuous as vol

View file

@ -1,8 +1,9 @@
"""Support for MelCloud device sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any, Callable
from typing import Any
from pymelcloud import DEVICE_TYPE_ATA, DEVICE_TYPE_ATW
from pymelcloud.atw_device import Zone

View file

@ -2,10 +2,11 @@
from __future__ import annotations
from abc import abstractmethod
from collections.abc import Callable
from datetime import datetime, timedelta
import logging
import struct
from typing import Any, Callable, cast
from typing import Any, cast
from homeassistant.const import (
CONF_ADDRESS,

View file

@ -3,8 +3,9 @@ from __future__ import annotations
import asyncio
from collections import namedtuple
from collections.abc import Callable
import logging
from typing import Any, Callable
from typing import Any
from pymodbus.client.sync import (
BaseModbusClient,

View file

@ -1,10 +1,9 @@
"""The National Weather Service integration."""
from __future__ import annotations
from collections.abc import Awaitable
from collections.abc import Awaitable, Callable
import datetime
import logging
from typing import Callable
from pynws import SimpleNWS

View file

@ -2,9 +2,10 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from datetime import timedelta
import logging
from typing import Any, Callable
from typing import Any
from haphilipsjs import ConnectionFailure, PhilipsTV

View file

@ -2,9 +2,10 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from dataclasses import dataclass
import logging
from typing import Any, Callable, Final, cast
from typing import Any, Final, cast
from aioshelly.block_device import Block
import async_timeout

View file

@ -1,7 +1,7 @@
"""Describe Shelly logbook events."""
from __future__ import annotations
from typing import Callable
from collections.abc import Callable
from homeassistant.const import ATTR_DEVICE_ID
from homeassistant.core import HomeAssistant, callback

View file

@ -1,11 +1,11 @@
"""Support for Sensirion SHT31 temperature and humidity sensor."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from datetime import timedelta
import logging
import math
from typing import Callable
from Adafruit_SHT31 import SHT31
import voluptuous as vol

View file

@ -2,8 +2,8 @@
from __future__ import annotations
import asyncio
from collections.abc import Awaitable
from typing import Callable, cast
from collections.abc import Awaitable, Callable
from typing import cast
from uuid import UUID
from simplipy import get_api

View file

@ -1,8 +1,9 @@
"""StarLine Account."""
from __future__ import annotations
from collections.abc import Callable
from datetime import datetime, timedelta
from typing import Any, Callable
from typing import Any
from starline import StarlineApi, StarlineDevice

View file

@ -1,7 +1,7 @@
"""StarLine base entity."""
from __future__ import annotations
from typing import Callable
from collections.abc import Callable
from homeassistant.helpers.entity import Entity

View file

@ -2,12 +2,12 @@
from __future__ import annotations
from collections import defaultdict, deque
from collections.abc import Generator, Iterator, Mapping
from collections.abc import Callable, Generator, Iterator, Mapping
import datetime
from io import BytesIO
import logging
from threading import Event
from typing import Any, Callable, cast
from typing import Any, cast
import av

View file

@ -2,8 +2,9 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
import logging
from typing import Any, Callable
from typing import Any
from aioswitcher.bridge import SwitcherBase, SwitcherBridge

View file

@ -2,11 +2,10 @@
from __future__ import annotations
import asyncio
from collections.abc import Awaitable
from collections.abc import Awaitable, Callable
import dataclasses
from datetime import datetime
import logging
from typing import Callable
import aiohttp
import async_timeout

View file

@ -2,8 +2,8 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
import logging
from typing import Callable
from homeassistant import config as conf_util
from homeassistant.const import (

View file

@ -1,8 +1,9 @@
"""TemplateEntity utility class."""
from __future__ import annotations
from collections.abc import Callable
import logging
from typing import Any, Callable
from typing import Any
import voluptuous as vol

View file

@ -1,9 +1,10 @@
"""Base class for IKEA TRADFRI."""
from __future__ import annotations
from collections.abc import Callable
from functools import wraps
import logging
from typing import Any, Callable
from typing import Any
from pytradfri.command import Command
from pytradfri.device import Device

View file

@ -1,7 +1,8 @@
"""Support for IKEA Tradfri covers."""
from __future__ import annotations
from typing import Any, Callable, cast
from collections.abc import Callable
from typing import Any, cast
from pytradfri.command import Command

View file

@ -1,7 +1,8 @@
"""Support for IKEA Tradfri lights."""
from __future__ import annotations
from typing import Any, Callable, cast
from collections.abc import Callable
from typing import Any, cast
from pytradfri.command import Command

View file

@ -1,7 +1,8 @@
"""Support for IKEA Tradfri sensors."""
from __future__ import annotations
from typing import Any, Callable, cast
from collections.abc import Callable
from typing import Any, cast
from pytradfri.command import Command

View file

@ -1,7 +1,8 @@
"""Support for IKEA Tradfri switches."""
from __future__ import annotations
from typing import Any, Callable, cast
from collections.abc import Callable
from typing import Any, cast
from pytradfri.command import Command

View file

@ -1,10 +1,11 @@
"""The ViCare integration."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
import enum
import logging
from typing import Callable, Generic, TypeVar
from typing import Generic, TypeVar
from PyViCare.PyViCareDevice import Device
from PyViCare.PyViCareFuelCell import FuelCell

View file

@ -2,8 +2,8 @@
from __future__ import annotations
import asyncio
from collections.abc import Hashable
from typing import TYPE_CHECKING, Any, Callable
from collections.abc import Callable, Hashable
from typing import TYPE_CHECKING, Any
import voluptuous as vol

View file

@ -2,8 +2,9 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from functools import wraps
from typing import Any, Callable
from typing import Any
import voluptuous as vol

View file

@ -2,13 +2,14 @@
from __future__ import annotations
import asyncio
from collections.abc import Callable
from dataclasses import dataclass
import datetime
from datetime import timedelta
from enum import Enum, IntEnum
import logging
import re
from typing import Any, Callable, Dict
from typing import Any, Dict
from aiohttp.web import Response
import requests

View file

@ -1,9 +1,9 @@
"""Support for Xiaomi Miio binary sensors."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from enum import Enum
from typing import Callable
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,