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

@@ -291,7 +291,7 @@ def _get_custom_components(hass: HomeAssistant) -> dict[str, Integration]:
return {}
try:
import custom_components # pylint: disable=import-outside-toplevel
import custom_components # noqa: PLC0415
except ImportError:
return {}
@@ -1392,7 +1392,7 @@ async def async_get_integrations(
# Now the rest use resolve_from_root
if needed:
from . import components # pylint: disable=import-outside-toplevel
from . import components # noqa: PLC0415
integrations = await hass.async_add_executor_job(
_resolve_integrations_from_root, hass, components, needed
@@ -1728,7 +1728,7 @@ def _async_mount_config_dir(hass: HomeAssistant) -> None:
sys.path.insert(0, hass.config.config_dir)
with suppress(ImportError):
import custom_components # pylint: disable=import-outside-toplevel # noqa: F401
import custom_components # noqa: F401, PLC0415
sys.path.remove(hass.config.config_dir)
sys.path_importer_cache.pop(hass.config.config_dir, None)