mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Drop Python 3.12 support (#135589)
This commit is contained in:
parent
fa96168488
commit
60bdc13c94
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
@ -41,8 +41,8 @@ env:
|
|||||||
UV_CACHE_VERSION: 1
|
UV_CACHE_VERSION: 1
|
||||||
MYPY_CACHE_VERSION: 9
|
MYPY_CACHE_VERSION: 9
|
||||||
HA_SHORT_VERSION: "2025.2"
|
HA_SHORT_VERSION: "2025.2"
|
||||||
DEFAULT_PYTHON: "3.12"
|
DEFAULT_PYTHON: "3.13"
|
||||||
ALL_PYTHON_VERSIONS: "['3.12', '3.13']"
|
ALL_PYTHON_VERSIONS: "['3.13']"
|
||||||
# 10.3 is the oldest supported version
|
# 10.3 is the oldest supported version
|
||||||
# - 10.3.32 is the version currently shipped with Synology (as of 17 Feb 2022)
|
# - 10.3.32 is the version currently shipped with Synology (as of 17 Feb 2022)
|
||||||
# 10.6 is the current long-term-support
|
# 10.6 is the current long-term-support
|
||||||
|
2
.github/workflows/translations.yml
vendored
2
.github/workflows/translations.yml
vendored
@ -10,7 +10,7 @@ on:
|
|||||||
- "**strings.json"
|
- "**strings.json"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DEFAULT_PYTHON: "3.12"
|
DEFAULT_PYTHON: "3.13"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upload:
|
upload:
|
||||||
|
2
.github/workflows/wheels.yml
vendored
2
.github/workflows/wheels.yml
vendored
@ -17,7 +17,7 @@ on:
|
|||||||
- "script/gen_requirements_all.py"
|
- "script/gen_requirements_all.py"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DEFAULT_PYTHON: "3.12"
|
DEFAULT_PYTHON: "3.13"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref_name}}
|
group: ${{ github.workflow }}-${{ github.ref_name}}
|
||||||
|
@ -4,9 +4,8 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import types
|
import types
|
||||||
from typing import Any, Generic
|
from typing import Any, Generic, TypeVar
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from voluptuous.humanize import humanize_error
|
from voluptuous.humanize import humanize_error
|
||||||
|
|
||||||
|
@ -5,9 +5,8 @@ from __future__ import annotations
|
|||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
import logging
|
import logging
|
||||||
import types
|
import types
|
||||||
from typing import Any, Generic
|
from typing import Any, Generic, TypeVar
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from voluptuous.humanize import humanize_error
|
from voluptuous.humanize import humanize_error
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import telnetlib # pylint: disable=deprecated-module
|
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
|
import telnetlib # pylint: disable=deprecated-module
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.device_tracker import (
|
from homeassistant.components.device_tracker import (
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
"""Assist pipeline Websocket API."""
|
"""Assist pipeline Websocket API."""
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
# Suppressing disable=deprecated-module is needed for Python 3.11
|
|
||||||
import audioop # pylint: disable=deprecated-module
|
|
||||||
import base64
|
import base64
|
||||||
from collections.abc import AsyncGenerator, Callable
|
from collections.abc import AsyncGenerator, Callable
|
||||||
import contextlib
|
import contextlib
|
||||||
@ -11,6 +8,8 @@ import logging
|
|||||||
import math
|
import math
|
||||||
from typing import Any, Final
|
from typing import Any, Final
|
||||||
|
|
||||||
|
# Suppressing disable=deprecated-module is needed for Python 3.11
|
||||||
|
import audioop # pylint: disable=deprecated-module
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import conversation, stt, tts, websocket_api
|
from homeassistant.components import conversation, stt, tts, websocket_api
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any, TypeVar
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
|
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
|
||||||
from homeassistant.helpers.update_coordinator import (
|
from homeassistant.helpers.update_coordinator import (
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
from typing import Generic
|
from typing import Generic, TypeVar
|
||||||
|
|
||||||
import broadlink as blk
|
import broadlink as blk
|
||||||
from broadlink.exceptions import (
|
from broadlink.exceptions import (
|
||||||
@ -13,7 +13,6 @@ from broadlink.exceptions import (
|
|||||||
ConnectionClosedError,
|
ConnectionClosedError,
|
||||||
NetworkTimeoutError,
|
NetworkTimeoutError,
|
||||||
)
|
)
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
@ -5,11 +5,10 @@ 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 TYPE_CHECKING, Any, Generic
|
from typing import TYPE_CHECKING, Any, Generic, TypeVar
|
||||||
|
|
||||||
import broadlink as blk
|
import broadlink as blk
|
||||||
from broadlink.exceptions import AuthorizationError, BroadlinkException
|
from broadlink.exceptions import AuthorizationError, BroadlinkException
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import telnetlib # pylint: disable=deprecated-module
|
|
||||||
|
|
||||||
|
import telnetlib # pylint: disable=deprecated-module
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.media_player import (
|
from homeassistant.components.media_player import (
|
||||||
|
@ -5,9 +5,9 @@ from __future__ import annotations
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
from telnetlib import Telnet # pylint: disable=deprecated-module
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from telnetlib import Telnet # pylint: disable=deprecated-module
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
|
@ -4,8 +4,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import sys
|
from typing import TYPE_CHECKING, Final
|
||||||
from typing import Final
|
|
||||||
|
|
||||||
from aiohttp.hdrs import CACHE_CONTROL, CONTENT_TYPE
|
from aiohttp.hdrs import CACHE_CONTROL, CONTENT_TYPE
|
||||||
from aiohttp.web import FileResponse, Request, StreamResponse
|
from aiohttp.web import FileResponse, Request, StreamResponse
|
||||||
@ -18,14 +17,12 @@ CACHE_HEADER = f"public, max-age={CACHE_TIME}"
|
|||||||
CACHE_HEADERS: Mapping[str, str] = {CACHE_CONTROL: CACHE_HEADER}
|
CACHE_HEADERS: Mapping[str, str] = {CACHE_CONTROL: CACHE_HEADER}
|
||||||
RESPONSE_CACHE: LRU[tuple[str, Path], tuple[Path, str]] = LRU(512)
|
RESPONSE_CACHE: LRU[tuple[str, Path], tuple[Path, str]] = LRU(512)
|
||||||
|
|
||||||
if sys.version_info >= (3, 13):
|
if TYPE_CHECKING:
|
||||||
# guess_type is soft-deprecated in 3.13
|
# mypy uses Python 3.12 syntax for type checking
|
||||||
# for paths and should only be used for
|
# once it uses Python 3.13, this can be removed
|
||||||
# URLs. guess_file_type should be used
|
|
||||||
# for paths instead.
|
|
||||||
_GUESSER = CONTENT_TYPES.guess_file_type
|
|
||||||
else:
|
|
||||||
_GUESSER = CONTENT_TYPES.guess_type
|
_GUESSER = CONTENT_TYPES.guess_type
|
||||||
|
else:
|
||||||
|
_GUESSER = CONTENT_TYPES.guess_file_type
|
||||||
|
|
||||||
|
|
||||||
class CachingStaticResource(StaticResource):
|
class CachingStaticResource(StaticResource):
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import telnetlib # pylint: disable=deprecated-module
|
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
|
import telnetlib # pylint: disable=deprecated-module
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.media_player import (
|
from homeassistant.components.media_player import (
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from collections.abc import Awaitable, Callable, Coroutine
|
from collections.abc import Awaitable, Callable, Coroutine
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Concatenate, Generic, cast
|
from typing import Any, Concatenate, Generic, TypeVar, cast
|
||||||
|
|
||||||
from ring_doorbell import (
|
from ring_doorbell import (
|
||||||
AuthenticationError,
|
AuthenticationError,
|
||||||
@ -11,7 +11,6 @@ from ring_doorbell import (
|
|||||||
RingGeneric,
|
RingGeneric,
|
||||||
RingTimeout,
|
RingTimeout,
|
||||||
)
|
)
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
from homeassistant.components.automation import automations_with_entity
|
from homeassistant.components.automation import automations_with_entity
|
||||||
from homeassistant.components.script import scripts_with_entity
|
from homeassistant.components.script import scripts_with_entity
|
||||||
|
@ -4,9 +4,9 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
import telnetlib # pylint: disable=deprecated-module
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
import telnetlib # pylint: disable=deprecated-module
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.switch import (
|
from homeassistant.components.switch import (
|
||||||
|
@ -4,8 +4,8 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import telnetlib # pylint: disable=deprecated-module
|
|
||||||
|
|
||||||
|
import telnetlib # pylint: disable=deprecated-module
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.device_tracker import (
|
from homeassistant.components.device_tracker import (
|
||||||
|
@ -8,10 +8,19 @@ from contextlib import suppress
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Final, Generic, Literal, Required, TypedDict, cast, final
|
from typing import (
|
||||||
|
Any,
|
||||||
|
Final,
|
||||||
|
Generic,
|
||||||
|
Literal,
|
||||||
|
Required,
|
||||||
|
TypedDict,
|
||||||
|
TypeVar,
|
||||||
|
cast,
|
||||||
|
final,
|
||||||
|
)
|
||||||
|
|
||||||
from propcache import cached_property
|
from propcache import cached_property
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
@ -22,11 +22,10 @@ from functools import cache
|
|||||||
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, Generic, Self, cast
|
from typing import TYPE_CHECKING, Any, Generic, Self, TypeVar, cast
|
||||||
|
|
||||||
from async_interrupt import interrupt
|
from async_interrupt import interrupt
|
||||||
from propcache import cached_property
|
from propcache import cached_property
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from . import data_entry_flow, loader
|
from . import data_entry_flow, loader
|
||||||
|
@ -28,10 +28,10 @@ MINOR_VERSION: Final = 2
|
|||||||
PATCH_VERSION: Final = "0.dev0"
|
PATCH_VERSION: Final = "0.dev0"
|
||||||
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||||
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
|
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
|
||||||
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 12, 0)
|
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 13, 0)
|
||||||
REQUIRED_NEXT_PYTHON_VER: Final[tuple[int, int, int]] = (3, 13, 0)
|
REQUIRED_NEXT_PYTHON_VER: Final[tuple[int, int, int]] = (3, 13, 0)
|
||||||
# Truthy date string triggers showing related deprecation warning messages.
|
# Truthy date string triggers showing related deprecation warning messages.
|
||||||
REQUIRED_NEXT_PYTHON_HA_RELEASE: Final = "2025.2"
|
REQUIRED_NEXT_PYTHON_HA_RELEASE: Final = ""
|
||||||
|
|
||||||
# Format for platform files
|
# Format for platform files
|
||||||
PLATFORM_FORMAT: Final = "{platform}.{domain}"
|
PLATFORM_FORMAT: Final = "{platform}.{domain}"
|
||||||
|
@ -36,12 +36,12 @@ from typing import (
|
|||||||
NotRequired,
|
NotRequired,
|
||||||
Self,
|
Self,
|
||||||
TypedDict,
|
TypedDict,
|
||||||
|
TypeVar,
|
||||||
cast,
|
cast,
|
||||||
overload,
|
overload,
|
||||||
)
|
)
|
||||||
|
|
||||||
from propcache import cached_property, under_cached_property
|
from propcache import cached_property, under_cached_property
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from . import util
|
from . import util
|
||||||
|
@ -12,9 +12,8 @@ from dataclasses import dataclass
|
|||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
import logging
|
import logging
|
||||||
from types import MappingProxyType
|
from types import MappingProxyType
|
||||||
from typing import Any, Generic, Required, TypedDict, cast
|
from typing import Any, Generic, Required, TypedDict, TypeVar, cast
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from .core import HomeAssistant, callback
|
from .core import HomeAssistant, callback
|
||||||
|
@ -11,9 +11,8 @@ from hashlib import md5
|
|||||||
from itertools import groupby
|
from itertools import groupby
|
||||||
import logging
|
import logging
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
from typing import Any, Generic, TypedDict
|
from typing import Any, Generic, TypedDict, TypeVar
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from voluptuous.humanize import humanize_error
|
from voluptuous.humanize import humanize_error
|
||||||
|
|
||||||
|
@ -3,10 +3,9 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any, Generic
|
from typing import Any, Generic, TypeVar
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
import voluptuous_serialize
|
import voluptuous_serialize
|
||||||
|
|
||||||
|
@ -7,9 +7,7 @@ from collections.abc import Callable, Iterable
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
from typing import Any, Generic
|
from typing import Any, Generic, TypeVar
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
from homeassistant import config as conf_util
|
from homeassistant import config as conf_util
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
@ -9,13 +9,12 @@ from datetime import datetime, timedelta
|
|||||||
import logging
|
import logging
|
||||||
from random import randint
|
from random import randint
|
||||||
from time import monotonic
|
from time import monotonic
|
||||||
from typing import Any, Generic, Protocol
|
from typing import Any, Generic, Protocol, TypeVar
|
||||||
import urllib.error
|
import urllib.error
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
from propcache import cached_property
|
from propcache import cached_property
|
||||||
import requests
|
import requests
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||||
|
@ -6,9 +6,7 @@ Custom for type checking. See stub file.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from typing import Any, Generic
|
from typing import Any, Generic, TypeVar
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
_DataT = TypeVar("_DataT", bound=Mapping[str, Any], default=Mapping[str, Any])
|
_DataT = TypeVar("_DataT", bound=Mapping[str, Any], default=Mapping[str, Any])
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
# ruff: noqa: PYI021 # Allow docstrings
|
# ruff: noqa: PYI021 # Allow docstrings
|
||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from typing import Any, Generic
|
from typing import Any, Generic, TypeVar
|
||||||
|
|
||||||
from typing_extensions import TypeVar
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"EventType",
|
"EventType",
|
||||||
|
@ -18,11 +18,10 @@ classifiers = [
|
|||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"License :: OSI Approved :: Apache Software License",
|
"License :: OSI Approved :: Apache Software License",
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Programming Language :: Python :: 3.12",
|
|
||||||
"Programming Language :: Python :: 3.13",
|
"Programming Language :: Python :: 3.13",
|
||||||
"Topic :: Home Automation",
|
"Topic :: Home Automation",
|
||||||
]
|
]
|
||||||
requires-python = ">=3.12.0"
|
requires-python = ">=3.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aiodns==3.2.0",
|
"aiodns==3.2.0",
|
||||||
# Integrations may depend on hassio integration without listing it to
|
# Integrations may depend on hassio integration without listing it to
|
||||||
@ -104,7 +103,7 @@ include-package-data = true
|
|||||||
include = ["homeassistant*"]
|
include = ["homeassistant*"]
|
||||||
|
|
||||||
[tool.pylint.MAIN]
|
[tool.pylint.MAIN]
|
||||||
py-version = "3.12"
|
py-version = "3.13"
|
||||||
# Use a conservative default here; 2 should speed up most setups and not hurt
|
# Use a conservative default here; 2 should speed up most setups and not hurt
|
||||||
# any too bad. Override on command line as appropriate.
|
# any too bad. Override on command line as appropriate.
|
||||||
jobs = 2
|
jobs = 2
|
||||||
|
@ -9,8 +9,6 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
from homeassistant.const import REQUIRED_PYTHON_VER
|
|
||||||
|
|
||||||
from .model import Config, Integration
|
from .model import Config, Integration
|
||||||
|
|
||||||
# Component modules which should set no_implicit_reexport = true.
|
# Component modules which should set no_implicit_reexport = true.
|
||||||
@ -31,7 +29,18 @@ HEADER: Final = """
|
|||||||
""".lstrip()
|
""".lstrip()
|
||||||
|
|
||||||
GENERAL_SETTINGS: Final[dict[str, str]] = {
|
GENERAL_SETTINGS: Final[dict[str, str]] = {
|
||||||
"python_version": ".".join(str(x) for x in REQUIRED_PYTHON_VER[:2]),
|
# We use @dataclass_transform in all our EntityDescriptions, causing
|
||||||
|
# `__replace__` to be already synthesized by mypy, causing **every** use of
|
||||||
|
# our entity descriptions to fail:
|
||||||
|
#
|
||||||
|
# error: Signature of "__replace__" incompatible with supertype "EntityDescription"
|
||||||
|
#
|
||||||
|
# Until this is fixed in mypy, we keep mypy locked on to Python 3.12 as we
|
||||||
|
# have done for the past few releases.
|
||||||
|
#
|
||||||
|
# Ref: https://github.com/python/mypy/issues/18216
|
||||||
|
# "python_version": ".".join(str(x) for x in REQUIRED_PYTHON_VER[:2]),
|
||||||
|
"python_version": "3.12",
|
||||||
"platform": "linux",
|
"platform": "linux",
|
||||||
"plugins": ", ".join( # noqa: FLY002
|
"plugins": ", ".join( # noqa: FLY002
|
||||||
[
|
[
|
||||||
|
@ -25,13 +25,12 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
import time
|
import time
|
||||||
from types import FrameType, ModuleType
|
from types import FrameType, ModuleType
|
||||||
from typing import Any, Literal, NoReturn
|
from typing import Any, Literal, NoReturn, TypeVar
|
||||||
from unittest.mock import AsyncMock, Mock, patch
|
from unittest.mock import AsyncMock, Mock, patch
|
||||||
|
|
||||||
from aiohttp.test_utils import unused_port as get_test_instance_port # noqa: F401
|
from aiohttp.test_utils import unused_port as get_test_instance_port # noqa: F401
|
||||||
import pytest
|
import pytest
|
||||||
from syrupy import SnapshotAssertion
|
from syrupy import SnapshotAssertion
|
||||||
from typing_extensions import TypeVar
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import auth, bootstrap, config_entries, loader
|
from homeassistant import auth, bootstrap, config_entries, loader
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Fixtures for Homee integration tests."""
|
"""Fixtures for Homee integration tests."""
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import Generator
|
|
||||||
|
|
||||||
from homeassistant.components.homee.const import DOMAIN
|
from homeassistant.components.homee.const import DOMAIN
|
||||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
|
||||||
|
Loading…
x
Reference in New Issue
Block a user