From de07217c836c0763886258f9b2da712d876b16f0 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Mon, 1 Jul 2024 13:51:46 +0200 Subject: [PATCH] fix: [backend] Potential python issue with unpatched bracket in f-string --- exercise.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercise.py b/exercise.py index e861dff..2ff8e05 100644 --- a/exercise.py +++ b/exercise.py @@ -43,14 +43,14 @@ def is_validate_exercises(exercises: list) -> bool: for exercise in exercises: e_uuid = exercise['exercise']['uuid'] if e_uuid in exercises_uuid: - print(f'Duplicated UUID {e_uuid}. ({exercise['exercise']['name']}, {exercise_by_uuid[e_uuid]['exercise']['name']})') + print(f"Duplicated UUID {e_uuid}. ({exercise['exercise']['name']}, {exercise_by_uuid[e_uuid]['exercise']['name']})") return False exercises_uuid.add(e_uuid) exercise_by_uuid[e_uuid] = exercise for inject in exercise['injects']: t_uuid = inject['uuid'] if t_uuid in tasks_uuid: - print(f'Duplicated UUID {t_uuid}. ({inject['name']}, {task_by_uuid[t_uuid]['name']})') + print(f"Duplicated UUID {t_uuid}. ({inject['name']}, {task_by_uuid[t_uuid]['name']})") return False tasks_uuid.add(t_uuid) task_by_uuid[t_uuid] = inject @@ -263,7 +263,7 @@ def check_inject(user_id: int, inject: dict, data: dict, context: dict) -> bool: if not success: return False mark_task_completed(user_id, inject['exercise_uuid'], inject['uuid']) - print(f'Task success: {inject['uuid']}') + print(f"Task success: {inject['uuid']}") return True @@ -388,9 +388,9 @@ def check_active_tasks(user_id: int, data: dict, context: dict) -> bool: for task_uuid in available_tasks: inject = db.INJECT_BY_UUID[task_uuid] if inject['exercise_uuid'] not in db.SELECTED_EXERCISES: - print(f'exercise not active for this inject {inject['name']}') + print(f"exercise not active for this inject {inject['name']}") continue - print(f'checking: {inject['name']}') + print(f"checking: {inject['name']}") completed = check_inject(user_id, inject, data, context) if completed: succeeded_once = True