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

1from collections.abc import Callable 

2 

3from pydantic import BaseModel 

4 

5 

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 """ 

11 

12 key: str 

13 alias: str 

14 func: Callable | None = None