Coverage for opt/mealie/lib/python3.12/site-packages/mealie/services/migrations/utils/migration_alias.py: 100%
6 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 03:04 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 03:04 +0000
1from collections.abc import Callable
3from pydantic import BaseModel
6class MigrationAlias(BaseModel):
7 """A datatype used by MigrationBase to pre-process a recipe dictionary to rewrite
8 the alias key in the dictionary, if it exists, to the key. If set a `func` attribute
9 will be called on the value before assigning the value to the new key
10 """
12 key: str
13 alias: str
14 func: Callable | None = None