Import names from typing instead of typing_extensions [3.11] (#97065)
This commit is contained in:
parent
7c55dbdb17
commit
77f38e33e5
45 changed files with 45 additions and 94 deletions
|
@ -2,9 +2,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
|
|
||||||
class StrEnum(str, Enum):
|
class StrEnum(str, Enum):
|
||||||
|
|
|
@ -3,9 +3,7 @@ from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from types import GenericAlias
|
from types import GenericAlias
|
||||||
from typing import Any, Generic, TypeVar, overload
|
from typing import Any, Generic, Self, TypeVar, overload
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
_T = TypeVar("_T")
|
_T = TypeVar("_T")
|
||||||
_R = TypeVar("_R")
|
_R = TypeVar("_R")
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from typing import cast
|
from typing import Self, cast
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
|
@ -4,9 +4,7 @@ from __future__ import annotations
|
||||||
from dataclasses import asdict, dataclass
|
from dataclasses import asdict, dataclass
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, final
|
from typing import Any, Self, final
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.backports.enum import StrEnum
|
from homeassistant.backports.enum import StrEnum
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
|
|
@ -4,9 +4,7 @@ from __future__ import annotations
|
||||||
import asyncio
|
import asyncio
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, TypedDict
|
from typing import Any, NotRequired, TypedDict
|
||||||
|
|
||||||
from typing_extensions import NotRequired
|
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import cast
|
from typing import Self, cast
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.button import SERVICE_PRESS, ButtonEntity
|
from homeassistant.components.button import SERVICE_PRESS, ButtonEntity
|
||||||
|
|
|
@ -3,9 +3,8 @@ from __future__ import annotations
|
||||||
|
|
||||||
import datetime as py_datetime
|
import datetime as py_datetime
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -3,8 +3,8 @@ from __future__ import annotations
|
||||||
|
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, cast
|
from typing import Any, Self, cast
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.select import (
|
from homeassistant.components.select import (
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -4,9 +4,8 @@ from __future__ import annotations
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from decimal import Decimal, DecimalException, InvalidOperation
|
from decimal import Decimal, DecimalException, InvalidOperation
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Final
|
from typing import Any, Final, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
|
|
|
@ -8,9 +8,8 @@ from datetime import timedelta
|
||||||
from enum import IntFlag
|
from enum import IntFlag
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from typing import Any, cast, final
|
from typing import Any, Self, cast, final
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.backports.enum import StrEnum
|
from homeassistant.backports.enum import StrEnum
|
||||||
|
|
|
@ -12,14 +12,13 @@ import hashlib
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
import logging
|
import logging
|
||||||
import secrets
|
import secrets
|
||||||
from typing import Any, Final, TypedDict, final
|
from typing import Any, Final, Required, TypedDict, final
|
||||||
from urllib.parse import quote, urlparse
|
from urllib.parse import quote, urlparse
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from aiohttp.hdrs import CACHE_CONTROL, CONTENT_TYPE
|
from aiohttp.hdrs import CACHE_CONTROL, CONTENT_TYPE
|
||||||
from aiohttp.typedefs import LooseHeaders
|
from aiohttp.typedefs import LooseHeaders
|
||||||
import async_timeout
|
import async_timeout
|
||||||
from typing_extensions import Required
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from yarl import URL
|
from yarl import URL
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,9 @@ from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
from random import randrange
|
from random import randrange
|
||||||
from types import MappingProxyType
|
from types import MappingProxyType
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
import metno
|
import metno
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -8,10 +8,10 @@ from queue import Queue
|
||||||
import re
|
import re
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
from typing import Self
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from minio import Minio
|
from minio import Minio
|
||||||
from typing_extensions import Self
|
|
||||||
from urllib3.exceptions import HTTPError
|
from urllib3.exceptions import HTTPError
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -8,9 +8,8 @@ from datetime import timedelta
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
from math import ceil, floor
|
from math import ceil, floor
|
||||||
from typing import Any, final
|
from typing import Any, Self, final
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
|
|
@ -5,7 +5,7 @@ from collections.abc import Callable
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from typing import Any, cast
|
from typing import Any, Self, cast
|
||||||
|
|
||||||
import ciso8601
|
import ciso8601
|
||||||
from fnv_hash_fast import fnv1a_32
|
from fnv_hash_fast import fnv1a_32
|
||||||
|
@ -33,7 +33,6 @@ from sqlalchemy.engine.interfaces import Dialect
|
||||||
from sqlalchemy.ext.compiler import compiles
|
from sqlalchemy.ext.compiler import compiles
|
||||||
from sqlalchemy.orm import DeclarativeBase, Mapped, aliased, mapped_column, relationship
|
from sqlalchemy.orm import DeclarativeBase, Mapped, aliased, mapped_column, relationship
|
||||||
from sqlalchemy.types import TypeDecorator
|
from sqlalchemy.types import TypeDecorator
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
MAX_LENGTH_EVENT_EVENT_TYPE,
|
MAX_LENGTH_EVENT_EVENT_TYPE,
|
||||||
|
|
|
@ -11,9 +11,7 @@ import logging
|
||||||
from math import ceil, floor, log10
|
from math import ceil, floor, log10
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, Final, cast, final
|
from typing import Any, Final, Self, cast, final
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,10 @@ import datetime
|
||||||
from io import SEEK_END, BytesIO
|
from io import SEEK_END, BytesIO
|
||||||
import logging
|
import logging
|
||||||
from threading import Event
|
from threading import Event
|
||||||
from typing import Any, cast
|
from typing import Any, Self, cast
|
||||||
|
|
||||||
import attr
|
import attr
|
||||||
import av
|
import av
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,8 @@ from dataclasses import dataclass
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
|
|
|
@ -4,8 +4,8 @@ from __future__ import annotations
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -5,10 +5,9 @@ import base64
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import json
|
import json
|
||||||
import struct
|
import struct
|
||||||
from typing import Any, Literal, overload
|
from typing import Any, Literal, Self, overload
|
||||||
|
|
||||||
from tuya_iot import TuyaDevice, TuyaDeviceManager
|
from tuya_iot import TuyaDevice, TuyaDeviceManager
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
from homeassistant.helpers.entity import DeviceInfo, Entity
|
from homeassistant.helpers.entity import DeviceInfo, Entity
|
||||||
|
|
|
@ -5,10 +5,9 @@ from dataclasses import dataclass
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from decimal import Decimal, DecimalException, InvalidOperation
|
from decimal import Decimal, DecimalException, InvalidOperation
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
from croniter import croniter
|
from croniter import croniter
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
|
|
|
@ -7,9 +7,7 @@ from dataclasses import dataclass
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Final, Literal, TypedDict, final
|
from typing import Any, Final, Literal, Required, TypedDict, final
|
||||||
|
|
||||||
from typing_extensions import Required
|
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -7,12 +7,12 @@ import contextlib
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from ipaddress import IPv4Address
|
from ipaddress import IPv4Address
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Self
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import async_timeout
|
import async_timeout
|
||||||
from async_upnp_client.search import SsdpSearchListener
|
from async_upnp_client.search import SsdpSearchListener
|
||||||
from async_upnp_client.utils import CaseInsensitiveDict
|
from async_upnp_client.utils import CaseInsensitiveDict
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components import network, ssdp
|
from homeassistant.components import network, ssdp
|
||||||
|
|
|
@ -4,9 +4,8 @@ from __future__ import annotations
|
||||||
import abc
|
import abc
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import zigpy.exceptions
|
import zigpy.exceptions
|
||||||
from zigpy.zcl.foundation import Status
|
from zigpy.zcl.foundation import Status
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,8 @@ from enum import Enum
|
||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
from zigpy import types
|
from zigpy import types
|
||||||
import zigpy.device
|
import zigpy.device
|
||||||
import zigpy.exceptions
|
import zigpy.exceptions
|
||||||
|
|
|
@ -5,9 +5,7 @@ import asyncio
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.const import ATTR_NAME
|
from homeassistant.const import ATTR_NAME
|
||||||
from homeassistant.core import CALLBACK_TYPE, Event, callback
|
from homeassistant.core import CALLBACK_TYPE, Event, callback
|
||||||
|
|
|
@ -3,9 +3,8 @@ from __future__ import annotations
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import zigpy.exceptions
|
import zigpy.exceptions
|
||||||
from zigpy.zcl.foundation import Status
|
from zigpy.zcl.foundation import Status
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,8 @@ from __future__ import annotations
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
from zigpy import types
|
from zigpy import types
|
||||||
from zigpy.zcl.clusters.general import OnOff
|
from zigpy.zcl.clusters.general import OnOff
|
||||||
from zigpy.zcl.clusters.security import IasWd
|
from zigpy.zcl.clusters.security import IasWd
|
||||||
|
|
|
@ -5,9 +5,8 @@ import enum
|
||||||
import functools
|
import functools
|
||||||
import numbers
|
import numbers
|
||||||
import sys
|
import sys
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
from zigpy import types
|
from zigpy import types
|
||||||
|
|
||||||
from homeassistant.components.climate import HVACAction
|
from homeassistant.components.climate import HVACAction
|
||||||
|
|
|
@ -3,9 +3,8 @@ from __future__ import annotations
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import zigpy.exceptions
|
import zigpy.exceptions
|
||||||
from zigpy.zcl.clusters.general import OnOff
|
from zigpy.zcl.clusters.general import OnOff
|
||||||
from zigpy.zcl.foundation import Status
|
from zigpy.zcl.foundation import Status
|
||||||
|
|
|
@ -4,9 +4,8 @@ from __future__ import annotations
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
import logging
|
import logging
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
from typing import Any, cast
|
from typing import Any, Self, cast
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
|
|
|
@ -11,9 +11,7 @@ import functools
|
||||||
import logging
|
import logging
|
||||||
from random import randint
|
from random import randint
|
||||||
from types import MappingProxyType
|
from types import MappingProxyType
|
||||||
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
from typing import TYPE_CHECKING, Any, Self, TypeVar, cast
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from . import data_entry_flow, loader
|
from . import data_entry_flow, loader
|
||||||
from .backports.enum import StrEnum
|
from .backports.enum import StrEnum
|
||||||
|
|
|
@ -31,6 +31,7 @@ from typing import (
|
||||||
Any,
|
Any,
|
||||||
Generic,
|
Generic,
|
||||||
ParamSpec,
|
ParamSpec,
|
||||||
|
Self,
|
||||||
TypeVar,
|
TypeVar,
|
||||||
cast,
|
cast,
|
||||||
overload,
|
overload,
|
||||||
|
@ -38,7 +39,6 @@ from typing import (
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import async_timeout
|
import async_timeout
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
import yarl
|
import yarl
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,8 @@ import copy
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import logging
|
import logging
|
||||||
from types import MappingProxyType
|
from types import MappingProxyType
|
||||||
from typing import Any, TypedDict
|
from typing import Any, Required, TypedDict
|
||||||
|
|
||||||
from typing_extensions import Required
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from .backports.enum import StrEnum
|
from .backports.enum import StrEnum
|
||||||
|
|
|
@ -5,9 +5,8 @@ from collections import OrderedDict
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import NamedTuple
|
from typing import NamedTuple, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import loader
|
from homeassistant import loader
|
||||||
|
|
|
@ -3,10 +3,9 @@ from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
import sys
|
import sys
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.const import APPLICATION_NAME, EVENT_HOMEASSISTANT_CLOSE, __version__
|
from homeassistant.const import APPLICATION_NAME, EVENT_HOMEASSISTANT_CLOSE, __version__
|
||||||
from homeassistant.core import Event, HomeAssistant, callback
|
from homeassistant.core import Event, HomeAssistant, callback
|
||||||
|
|
|
@ -4,9 +4,7 @@ from __future__ import annotations
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, cast
|
from typing import Any, Self, cast
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.const import ATTR_RESTORED, EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import ATTR_RESTORED, EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.core import HomeAssistant, State, callback, valid_entity_id
|
from homeassistant.core import HomeAssistant, State, callback, valid_entity_id
|
||||||
|
|
|
@ -4,10 +4,9 @@ from __future__ import annotations
|
||||||
from collections.abc import Callable, Mapping, Sequence
|
from collections.abc import Callable, Mapping, Sequence
|
||||||
from enum import IntFlag
|
from enum import IntFlag
|
||||||
from functools import cache
|
from functools import cache
|
||||||
from typing import Any, Generic, Literal, TypedDict, TypeVar, cast
|
from typing import Any, Generic, Literal, Required, TypedDict, TypeVar, cast
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from typing_extensions import Required
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.backports.enum import StrEnum
|
from homeassistant.backports.enum import StrEnum
|
||||||
|
|
|
@ -8,9 +8,7 @@ from __future__ import annotations
|
||||||
import asyncio
|
import asyncio
|
||||||
import enum
|
import enum
|
||||||
from types import TracebackType
|
from types import TracebackType
|
||||||
from typing import Any
|
from typing import Any, Self
|
||||||
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from .async_ import run_callback_threadsafe
|
from .async_ import run_callback_threadsafe
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ from collections.abc import Callable
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from typing import Any, TypedDict, cast, overload
|
from typing import Any, Self, TypedDict, cast, overload
|
||||||
|
|
||||||
import ciso8601
|
import ciso8601
|
||||||
from fnv_hash_fast import fnv1a_32
|
from fnv_hash_fast import fnv1a_32
|
||||||
|
@ -34,7 +34,6 @@ from sqlalchemy import (
|
||||||
from sqlalchemy.dialects import mysql, oracle, postgresql, sqlite
|
from sqlalchemy.dialects import mysql, oracle, postgresql, sqlite
|
||||||
from sqlalchemy.orm import aliased, declarative_base, relationship
|
from sqlalchemy.orm import aliased, declarative_base, relationship
|
||||||
from sqlalchemy.orm.session import Session
|
from sqlalchemy.orm.session import Session
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.components.recorder.const import SupportedDialect
|
from homeassistant.components.recorder.const import SupportedDialect
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -9,7 +9,7 @@ from collections.abc import Callable
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from typing import Any, TypedDict, cast, overload
|
from typing import Any, Self, TypedDict, cast, overload
|
||||||
|
|
||||||
import ciso8601
|
import ciso8601
|
||||||
from fnv_hash_fast import fnv1a_32
|
from fnv_hash_fast import fnv1a_32
|
||||||
|
@ -34,7 +34,6 @@ from sqlalchemy import (
|
||||||
from sqlalchemy.dialects import mysql, oracle, postgresql, sqlite
|
from sqlalchemy.dialects import mysql, oracle, postgresql, sqlite
|
||||||
from sqlalchemy.orm import aliased, declarative_base, relationship
|
from sqlalchemy.orm import aliased, declarative_base, relationship
|
||||||
from sqlalchemy.orm.session import Session
|
from sqlalchemy.orm.session import Session
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
from homeassistant.components.recorder.const import SupportedDialect
|
from homeassistant.components.recorder.const import SupportedDialect
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue