1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

FileConfiguration uses executor for I/O (#5652)

* FileConfiguration uses executor for I/O

* Fix credentials tests

* Remove migrate_system_env as its very deprecated
This commit is contained in:
Mike Degatano
2025-02-26 13:11:11 -05:00
committed by GitHub
parent ae266e1692
commit 31193abb7b
48 changed files with 296 additions and 278 deletions

View File

@@ -10,7 +10,7 @@ from functools import partial
import logging
import os
from types import MappingProxyType
from typing import TYPE_CHECKING, Any, TypeVar
from typing import TYPE_CHECKING, Any, Self, TypeVar
import aiohttp
@@ -102,6 +102,11 @@ class CoreSys:
# Task factory attributes
self._set_task_context: list[Callable[[Context], Context]] = []
async def load_config(self) -> Self:
"""Load config in executor."""
await self.config.read_data()
return self
@property
def dev(self) -> bool:
"""Return True if we run dev mode."""