Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Jun 7, 2024
1 parent 27ef18c commit 4d36900
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions custom_components/mealie/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ async def async_get_meal_plans_today(self, group_id: str) -> dict:
return await self.api_wrapper("get", "/api/groups/mealplans/today", data=params)

def async_get_recipe_image_url(self, recipe_id: str) -> str:
"""Construct a url for the recipe image"""
"""Construct a url for the recipe image."""
return self.http_normalize_slashes(f"/api/media/recipes/{recipe_id}/images/min-original.webp")

def async_get_recipe_url(self, recipe_slug: str) -> str:
"""Construct a url for the recipe"""
"""Construct a url for the recipe."""
return self.http_normalize_slashes(f"/g/home/r/{recipe_slug}")

async def api_wrapper(self, method: str, service: str, data: dict = {}) -> any:
Expand Down
8 changes: 4 additions & 4 deletions custom_components/mealie/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def todays_breakfast_image(self) -> str | None:
self.last_breakfast_image = url
self.last_breakfast_image_update = dt_util.now()
return url
if self.last_breakfast_image != None:
if self.last_breakfast_image is not None:
self.last_breakfast_image = None
self.last_breakfast_image_update = None
return None
Expand All @@ -122,7 +122,7 @@ def todays_lunch_image(self) -> str | None:
self.last_lunch_image = url
self.last_lunch_image_update = dt_util.now()
return url
if self.last_lunch_image != None:
if self.last_lunch_image is not None:
self.last_lunch_image = None
self.last_lunch_image_update = None
return None
Expand All @@ -138,7 +138,7 @@ def todays_dinner_image(self) -> str | None:
self.last_dinner_image = url
self.last_dinner_image_update = dt_util.now()
return url
if self.last_dinner_image != None:
if self.last_dinner_image is not None:
self.last_dinner_image = None
self.last_dinner_image_update = None
return None
Expand All @@ -154,7 +154,7 @@ def todays_side_image(self) -> str | None:
self.last_side_image = url
self.last_side_image_update = dt_util.now()
return url
if self.last_side_image != None:
if self.last_side_image is not None:
self.last_side_image = None
self.last_side_image_update = None
return None
Expand Down

0 comments on commit 4d36900

Please sign in to comment.