mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-29 13:27:09 -05:00
chore: mypy, ruff, extract, openapi, and recipes-scraper updates (#1968)
* bump ruff and mypy * mypy fixes * bump and fix openapi * drop debug statement * bump extruct * bump recipes-scrapers
This commit is contained in:
@@ -23,7 +23,7 @@ class BaseMixins:
|
||||
self.__init__(*args, **kwarg)
|
||||
|
||||
@classmethod
|
||||
def get_ref(cls, match_value: str, match_attr: str = None, session: Session = None):
|
||||
def get_ref(cls, match_value: str, match_attr: str | None = None, session: Session | None = None):
|
||||
match_attr = match_attr or cls.Config.get_attr # type: ignore
|
||||
|
||||
if match_value is None or session is None:
|
||||
|
||||
@@ -136,12 +136,12 @@ class RecipeModel(SqlAlchemyBase, BaseMixins):
|
||||
def __init__(
|
||||
self,
|
||||
session,
|
||||
assets: list = None,
|
||||
notes: list[dict] = None,
|
||||
nutrition: dict = None,
|
||||
recipe_ingredient: list[dict] = None,
|
||||
recipe_instructions: list[dict] = None,
|
||||
settings: dict = None,
|
||||
assets: list | None = None,
|
||||
notes: list[dict] | None = None,
|
||||
nutrition: dict | None = None,
|
||||
recipe_ingredient: list[dict] | None = None,
|
||||
recipe_instructions: list[dict] | None = None,
|
||||
settings: dict | None = None,
|
||||
**_,
|
||||
) -> None:
|
||||
self.nutrition = Nutrition(**nutrition) if nutrition else Nutrition()
|
||||
|
||||
@@ -71,7 +71,7 @@ class User(SqlAlchemyBase, BaseMixins):
|
||||
}
|
||||
|
||||
@auto_init()
|
||||
def __init__(self, session, full_name, password, group: str = None, **kwargs) -> None:
|
||||
def __init__(self, session, full_name, password, group: str | None = None, **kwargs) -> None:
|
||||
if group is None:
|
||||
settings = get_app_settings()
|
||||
group = settings.DEFAULT_GROUP
|
||||
|
||||
Reference in New Issue
Block a user