Skip to content

Commit

Permalink
Adjust to recommended propcache.api import paths (home-assistant#136150)
Browse files Browse the repository at this point in the history
  • Loading branch information
scop authored Jan 21, 2025
1 parent 57b1747 commit 40eb8b9
Show file tree
Hide file tree
Showing 83 changed files with 93 additions and 87 deletions.
2 changes: 1 addition & 1 deletion homeassistant/auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import attr
from attr import Attribute
from attr.setters import validate
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.const import __version__
from homeassistant.data_entry_flow import FlowContext, FlowResult
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/airgradient/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from datetime import timedelta

from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components.update import UpdateDeviceClass, UpdateEntity
from homeassistant.core import HomeAssistant
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/alarm_control_panel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging
from typing import TYPE_CHECKING, Any, Final, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/automation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import logging
from typing import Any, Protocol, cast

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.components import websocket_api
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/backup/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path
from typing import Any, Protocol

from propcache import cached_property
from propcache.api import cached_property

from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/binary_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging
from typing import Literal, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/button/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging
from typing import final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/camera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from aiohttp import hdrs, web
import attr
from propcache import cached_property, under_cached_property
from propcache.api import cached_property, under_cached_property
import voluptuous as vol
from webrtc_models import RTCIceCandidateInit, RTCIceServer

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/climate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging
from typing import Any, Literal, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/cover/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import logging
from typing import Any, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/date/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from typing import final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/datetime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from typing import final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/device_tracker/config_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import asyncio
from typing import final

from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components import zone
from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/device_tracker/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from typing import Any, Final, Protocol, final

import attr
from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant import util
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/dlna_dms/dms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from async_upnp_client.exceptions import UpnpActionError, UpnpConnectionError, UpnpError
from async_upnp_client.profiles.dlna import ContentDirectoryErrorCode, DmsDevice
from didl_lite import didl_lite
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components import ssdp
from homeassistant.components.media_player import BrowseError, MediaClass
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/doorbird/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
DoorBirdScheduleEntryOutput,
DoorBirdScheduleEntrySchedule,
)
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.core import HomeAssistant
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/event/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
from typing import Any, Self, final

from propcache import cached_property
from propcache.api import cached_property

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/fan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import math
from typing import Any, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ffmpeg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from haffmpeg.core import HAFFmpeg
from haffmpeg.tools import IMAGE_JPEG, FFVersion, ImageFrame
from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.const import (
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/fints/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from fints.client import FinTS3PinTanClient
from fints.models import SEPAAccount
from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.components.sensor import (
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from aiohttp import hdrs, web, web_urldispatcher
import jinja2
from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol
from yarl import URL

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/geo_location/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from typing import Any, final

from propcache import cached_property
from propcache.api import cached_property

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit_controller/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
from aiohomekit.model.services import Service, ServicesTypes
from aiohomekit.utils import clamp_enum_to_char
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components.climate import (
ATTR_HVAC_MODE,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit_controller/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import Service, ServicesTypes
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components.cover import (
ATTR_POSITION,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit_controller/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import Service, ServicesTypes
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components.fan import (
DIRECTION_FORWARD,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit_controller/humidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import Service, ServicesTypes
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components.humidifier import (
DEFAULT_MAX_HUMIDITY,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit_controller/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import Service, ServicesTypes
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.components.light import (
ATTR_BRIGHTNESS,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/humidifier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging
from typing import Any, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from aiohttp import hdrs, web
import httpx
from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.components.http import KEY_AUTHENTICATED, KEY_HASS, HomeAssistantView
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/intent/timers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import time
from typing import Any

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.const import ATTR_DEVICE_ID, ATTR_ID, ATTR_NAME
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/knx/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing import Any, cast

from propcache import cached_property
from propcache.api import cached_property
from xknx import XKNX
from xknx.devices.light import ColorTemperatureType, Light as XknxLight, XYYColor

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lawn_mower/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from typing import final

from propcache import cached_property
from propcache.api import cached_property

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lifx/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from aiolifx.connection import LIFXConnection
from aiolifx_themes.themes import ThemeLibrary, ThemePainter
from awesomeversion import AwesomeVersion
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.const import (
SIGNAL_STRENGTH_DECIBELS,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/light/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os
from typing import Any, Final, Self, cast, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import re
from typing import TYPE_CHECKING, Any, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/logbook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Final, NamedTuple, cast

from propcache import cached_property
from propcache.api import cached_property
from sqlalchemy.engine.row import Row

from homeassistant.components.recorder.filters import Filters
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/matter/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from chip.clusters.Objects import ClusterAttributeDescriptor, NullValue
from matter_server.common.helpers.util import create_attribute_path
from matter_server.common.models import EventType, ServerInfoMessage
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.core import callback
from homeassistant.helpers.device_registry import DeviceInfo
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/media_player/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from aiohttp import web
from aiohttp.hdrs import CACHE_CONTROL, CONTENT_TYPE
from aiohttp.typedefs import LooseHeaders
from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol
from yarl import URL

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/nibe_heatpump/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from nibe.connection import Connection
from nibe.exceptions import CoilNotFoundException, ReadException
from nibe.heatpump import HeatPump, Series
from propcache import cached_property
from propcache.api import cached_property

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/notify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
from typing import Any, final, override

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

import homeassistant.components.persistent_notification as pn
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/number/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from math import ceil, floor
from typing import TYPE_CHECKING, Any, Self, final

from propcache import cached_property
from propcache.api import cached_property
import voluptuous as vol

from homeassistant.config_entries import ConfigEntry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from asyncio import sleep
from typing import Any, cast

from propcache import cached_property
from propcache.api import cached_property
from pyoverkiz.enums import OverkizCommand, OverkizCommandParam, OverkizState

from homeassistant.components.climate import (
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/recorder/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import time
from typing import TYPE_CHECKING, Any, cast

from propcache import cached_property
from propcache.api import cached_property
import psutil_home_assistant as ha_psutil
from sqlalchemy import create_engine, event as sqlalchemy_event, exc, select, update
from sqlalchemy.engine import Engine
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/recorder/models/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from typing import TYPE_CHECKING, Any

from propcache import cached_property
from propcache.api import cached_property
from sqlalchemy.engine.row import Row

from homeassistant.const import (
Expand Down
Loading

0 comments on commit 40eb8b9

Please sign in to comment.