Use f-strings in place of .format()

Code transformed like so:

    pip install flynt
    flynt .
    black .
This commit is contained in:
Simon Willison 2020-11-15 15:24:22 -08:00 committed by GitHub
commit 30e64c8d3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 213 additions and 277 deletions

View file

@ -47,7 +47,7 @@ def inspect_tables(conn, database_metadata):
try:
count = conn.execute(
"select count(*) from {}".format(escape_sqlite(table))
f"select count(*) from {escape_sqlite(table)}"
).fetchone()[0]
except sqlite3.OperationalError:
# This can happen when running against a FTS virtual table