mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-25 10:03:11 -05:00
* switch to ruff * add ruff * run ruff --fix * update ruff * resolve ruff errors * drop isort from CI * fix decorator order
15 lines
423 B
Python
15 lines
423 B
Python
from collections.abc import Callable
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class MigrationAlias(BaseModel):
|
|
"""A datatype used by MigrationBase to pre-process a recipe dictionary to rewrite
|
|
the alias key in the dictionary, if it exists, to the key. If set a `func` attribute
|
|
will be called on the value before assigning the value to the new key
|
|
"""
|
|
|
|
key: str
|
|
alias: str
|
|
func: Callable | None = None
|