Skip to content

Commit

Permalink
Remove debug logmessages
Browse files Browse the repository at this point in the history
  • Loading branch information
felixschndr committed May 29, 2024
1 parent 623d5e3 commit 46b78ca
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions source/ingredient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from logger_mixin import LoggerMixin


class Ingredient (LoggerMixin):
class Ingredient(LoggerMixin):
def __init__(self, ingredient_input: dict, ignored_ingredients: list[str]):
super().__init__()

Expand Down Expand Up @@ -36,20 +36,17 @@ def _parse_input_with_no_ingredient_amounts(self) -> None:

def _parse_input_with_ingredient_amounts(self) -> None:
self.log.debug("Parsing input with ingredient amount")
self.log.debug(f"Complete ingredient: {self.ingredient_input}")

food_name = self.ingredient_input["food"]["name"]
if food_name.lower() in self.ignored_ingredients:
raise IgnoredIngredient(f"Found ignored ingredient {food_name}")
self.food = food_name


quantity = self.ingredient_input.get("quantity", None)
if quantity:
self.specification += f"{str(quantity)} "

unit = self.ingredient_input.get("unit", None)
self.log.debug(f"Unit: {unit}")
if unit:
abbreviation = unit["abbreviation"]
name = unit["name"]
Expand All @@ -58,8 +55,6 @@ def _parse_input_with_ingredient_amounts(self) -> None:
elif name:
self.specification += name

self.log.debug(f"Specification afterwards: {self.specification}")

note = self.ingredient_input.get("note", None)
if note:
self.specification += f" ({note})"

0 comments on commit 46b78ca

Please sign in to comment.