Update ruff to 0.12.0 (#147106)

This commit is contained in:
Marc Mueller
2025-06-19 20:39:09 +02:00
committed by GitHub
parent 73d0d87705
commit 2c13c70e12
96 changed files with 291 additions and 427 deletions

View File

@@ -538,8 +538,7 @@ class Config:
def __init__(self, hass: HomeAssistant, config_dir: str) -> None:
"""Initialize a new config object."""
# pylint: disable-next=import-outside-toplevel
from .components.zone import DEFAULT_RADIUS
from .components.zone import DEFAULT_RADIUS # noqa: PLC0415
self.hass = hass
@@ -845,8 +844,7 @@ class Config:
) -> dict[str, Any]:
"""Migrate to the new version."""
# pylint: disable-next=import-outside-toplevel
from .components.zone import DEFAULT_RADIUS
from .components.zone import DEFAULT_RADIUS # noqa: PLC0415
data = old_data
if old_major_version == 1 and old_minor_version < 2:
@@ -863,8 +861,9 @@ class Config:
try:
owner = await self.hass.auth.async_get_owner()
if owner is not None:
# pylint: disable-next=import-outside-toplevel
from .components.frontend import storage as frontend_store
from .components.frontend import ( # noqa: PLC0415
storage as frontend_store,
)
owner_store = await frontend_store.async_user_store(
self.hass, owner.id