From 0b07792d38e83ee36a942b80fefb7de81778aa9f Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 10 Sep 2024 10:44:07 +0300 Subject: Replace format-string with f-strings. * gn3/api/llm.py (delete_records): Using format-strings causes pylint to error out. Signed-off-by: Munyoki Kilyungi --- gn3/api/llm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gn3/api/llm.py b/gn3/api/llm.py index f6642c9..358ef77 100644 --- a/gn3/api/llm.py +++ b/gn3/api/llm.py @@ -143,8 +143,8 @@ def delete_records(): db.connection(current_app.config["LLM_DB_PATH"]) as conn): task_ids = list(request.json.values()) cursor = conn.cursor() - query = """DELETE FROM history - WHERE task_id IN ({}) - and user_id=?""".format(",".join("?" * len(task_ids))) + query = f""" +DELETE FROM history WHERE task_id IN ({', '.join('?' * len(task_ids))}) AND user_id=? + """ cursor.execute(query, (*task_ids, str(token.user.user_id),)) return jsonify({}) -- cgit v1.2.3