mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-10 01:43:11 -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:
@@ -51,7 +51,7 @@ class InvalidDomainError(Exception):
|
||||
class RecipeDataService(BaseService):
|
||||
minifier: img.ABCMinifier
|
||||
|
||||
def __init__(self, recipe_id: UUID4, group_id: UUID4 = None) -> None:
|
||||
def __init__(self, recipe_id: UUID4, group_id: UUID4 | None = None) -> None:
|
||||
"""
|
||||
RecipeDataService is a service that consolidates the reading/writing actions related
|
||||
to assets, and images for a recipe.
|
||||
|
||||
@@ -84,7 +84,7 @@ class RecipeService(BaseService):
|
||||
self.logger.info(f"Recipe Directory Removed: {recipe.slug}")
|
||||
|
||||
@staticmethod
|
||||
def _recipe_creation_factory(user: PrivateUser, name: str, additional_attrs: dict = None) -> Recipe:
|
||||
def _recipe_creation_factory(user: PrivateUser, name: str, additional_attrs: dict | None = None) -> Recipe:
|
||||
"""
|
||||
The main creation point for recipes. The factor method returns an instance of the
|
||||
Recipe Schema class with the appropriate defaults set. Recipes should not be created
|
||||
|
||||
@@ -96,7 +96,7 @@ class TemplateService(BaseService):
|
||||
|
||||
return save_path
|
||||
|
||||
def _render_jinja2(self, recipe: Recipe, j2_template: str = None) -> Path:
|
||||
def _render_jinja2(self, recipe: Recipe, j2_template: str | None = None) -> Path:
|
||||
"""
|
||||
Renders a Jinja2 Template in a temporary directory and returns
|
||||
the path to the file.
|
||||
|
||||
Reference in New Issue
Block a user