Switch to f-strings

This commit is contained in:
Andrew Morgan 2022-08-08 14:11:34 +01:00
parent 90128dd355
commit 2edc839c23

View file

@ -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)