Update typing - collections.abc (2) (#63934)

This commit is contained in:
Marc Mueller 2022-01-12 09:04:37 +01:00 committed by GitHub
parent eafece3651
commit 67c35652f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 23 additions and 16 deletions

View File

@ -1,8 +1,9 @@
"""Allow to set up simple automation rules via the config file."""
from __future__ import annotations
from collections.abc import Awaitable, Callable
import logging
from typing import Any, Awaitable, Callable, TypedDict, cast
from typing import Any, TypedDict, cast
import voluptuous as vol
from voluptuous.humanize import humanize_error

View File

@ -4,7 +4,7 @@ from __future__ import annotations
import asyncio
import base64
import collections
from collections.abc import Iterable, Mapping
from collections.abc import Awaitable, Callable, Iterable, Mapping
from contextlib import suppress
from dataclasses import dataclass
from datetime import datetime, timedelta
@ -14,7 +14,7 @@ import inspect
import logging
import os
from random import SystemRandom
from typing import Awaitable, Callable, Final, Optional, cast, final
from typing import Final, Optional, cast, final
from aiohttp import web
import async_timeout

View File

@ -1,10 +1,10 @@
"""Config flow for DLNA DMR."""
from __future__ import annotations
from collections.abc import Callable
from collections.abc import Callable, Mapping
import logging
from pprint import pformat
from typing import Any, Mapping, Optional, cast
from typing import Any, Optional, cast
from urllib.parse import urlparse
from async_upnp_client.client import UpnpError

View File

@ -1,7 +1,8 @@
"""Types for the energy platform."""
from __future__ import annotations
from typing import Awaitable, Callable, TypedDict
from collections.abc import Awaitable, Callable
from typing import TypedDict
from homeassistant.core import HomeAssistant

View File

@ -3,11 +3,12 @@ from __future__ import annotations
import asyncio
from collections import defaultdict
from collections.abc import Awaitable, Callable
from datetime import datetime, timedelta
import functools
from itertools import chain
from types import ModuleType
from typing import Any, Awaitable, Callable, cast
from typing import Any, cast
import voluptuous as vol

View File

@ -1,11 +1,12 @@
"""Support for esphome devices."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass, field
import functools
import logging
import math
from typing import Any, Callable, Generic, NamedTuple, TypeVar, cast, overload
from typing import Any, Generic, NamedTuple, TypeVar, cast, overload
from aioesphomeapi import (
APIClient,

View File

@ -3,6 +3,7 @@ from __future__ import annotations
from ast import literal_eval
import asyncio
from collections.abc import Awaitable, Callable
from dataclasses import dataclass
import datetime as dt
from functools import lru_cache, partial, wraps
@ -12,7 +13,7 @@ import logging
from operator import attrgetter
import ssl
import time
from typing import Any, Awaitable, Callable, Union, cast
from typing import Any, Union, cast
import uuid
import attr

View File

@ -1,8 +1,9 @@
"""Modesl used by multiple MQTT modules."""
from __future__ import annotations
from collections.abc import Awaitable, Callable
import datetime as dt
from typing import Awaitable, Callable, Union
from typing import Union
import attr

View File

@ -1,7 +1,7 @@
"""The pvpc_hourly_pricing integration to collect Spain official electric prices."""
from collections.abc import Mapping
from datetime import datetime, timedelta
import logging
from typing import Mapping
from aiopvpc import DEFAULT_POWER_KW, TARIFFS, PVPCData
import voluptuous as vol

View File

@ -2,13 +2,13 @@
from __future__ import annotations
import asyncio
from collections.abc import Awaitable, Mapping
from collections.abc import Awaitable, Callable, Mapping
from dataclasses import dataclass, field
from datetime import timedelta
from enum import Enum
from ipaddress import IPv4Address, IPv6Address
import logging
from typing import Any, Callable
from typing import Any
from async_upnp_client.aiohttp import AiohttpSessionRequester
from async_upnp_client.const import DeviceOrServiceType, SsdpHeaders, SsdpSource

View File

@ -1,8 +1,8 @@
"""Support for Tasmota device discovery."""
from __future__ import annotations
from collections.abc import Awaitable, Callable
import logging
from typing import Awaitable, Callable
from hatasmota.discovery import (
TasmotaDiscovery,

View File

@ -2,16 +2,17 @@
from __future__ import annotations
import asyncio
from collections.abc import Awaitable, Callable
from concurrent import futures
from functools import partial
import json
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Final
from typing import TYPE_CHECKING, Any, Final
from homeassistant.core import HomeAssistant
from homeassistant.helpers.json import JSONEncoder
if TYPE_CHECKING:
from .connection import ActiveConnection
from .connection import ActiveConnection # noqa: F401
WebSocketCommandHandler = Callable[