mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Improve storage helper typing (#94929)
This commit is contained in:
parent
3b8feab699
commit
d2d6389742
@ -34,11 +34,11 @@ _T = TypeVar("_T", bound=Mapping[str, Any] | Sequence[Any])
|
|||||||
async def async_migrator(
|
async def async_migrator(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
old_path: str,
|
old_path: str,
|
||||||
store: Store,
|
store: Store[_T],
|
||||||
*,
|
*,
|
||||||
old_conf_load_func: Callable | None = None,
|
old_conf_load_func: Callable | None = None,
|
||||||
old_conf_migrate_func: Callable | None = None,
|
old_conf_migrate_func: Callable | None = None,
|
||||||
) -> Any:
|
) -> _T | None:
|
||||||
"""Migrate old data to a store and then load data.
|
"""Migrate old data to a store and then load data.
|
||||||
|
|
||||||
async def old_conf_migrate_func(old_data)
|
async def old_conf_migrate_func(old_data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user