Improve storage helper typing (#94929)

This commit is contained in:
Erik Montnemery 2023-06-20 22:50:10 +02:00 committed by GitHub
parent 3b8feab699
commit d2d6389742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,11 +34,11 @@ _T = TypeVar("_T", bound=Mapping[str, Any] | Sequence[Any])
async def async_migrator(
hass: HomeAssistant,
old_path: str,
store: Store,
store: Store[_T],
*,
old_conf_load_func: Callable | None = None,
old_conf_migrate_func: Callable | None = None,
) -> Any:
) -> _T | None:
"""Migrate old data to a store and then load data.
async def old_conf_migrate_func(old_data)