From 63716e43976a930c2a4759293d2c301dbe93cd73 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 31 Jul 2025 17:43:42 +0200 Subject: [PATCH] removed debug code --- cookbook/helper/ingredient_parser.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/cookbook/helper/ingredient_parser.py b/cookbook/helper/ingredient_parser.py index a99efb421..595782b00 100644 --- a/cookbook/helper/ingredient_parser.py +++ b/cookbook/helper/ingredient_parser.py @@ -176,7 +176,6 @@ class IngredientParser: # if something like this is detected move it to the beginning so the parser can handle it if len(ingredient) < 1000 and re.search(r'^([^\W\d_])+(.)*[1-9](\d)*\s*([^\W\d_])+', ingredient): match = re.search(r'[1-9](\d)*\s*([^\W\d_])+', ingredient) - print(f'reording from {ingredient} to {ingredient[match.start():match.end()] + " " + ingredient.replace(ingredient[match.start():match.end()], "")}') ingredient = ingredient[match.start():match.end()] + ' ' + ingredient.replace(ingredient[match.start():match.end()], '') # if the string contains parenthesis early on remove it and place it at the end @@ -284,6 +283,4 @@ class IngredientParser: if len(food.strip()) == 0: raise ValueError(f'Error parsing string {ingredient}, food cannot be empty') - print(f'parsed {ingredient} to {amount} - {unit} - {food} - {note}') - return amount, unit, food, note[:Ingredient._meta.get_field('note').max_length].strip()