From 2edc839c2369c16fed17d35623bf7a94afd2ef8f Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 8 Aug 2022 14:11:34 +0100 Subject: [PATCH] Switch to f-strings --- synapse/storage/database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/storage/database.py b/synapse/storage/database.py index 70b5601a12..6266385ad2 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py @@ -2242,10 +2242,10 @@ class DatabasePool: table: The name of the table to delete all rows from. """ if isinstance(txn.database_engine, PostgresEngine): - sql = "TRUNCATE %s" % table + sql = f"TRUNCATE {table}" else: # SQLite does not support the TRUNCATE command - sql = "DELETE FROM %s" % table + sql = f"DELETE FROM {table}" txn.execute(sql)