Convert.format() to f-strings with flynt

This commit is contained in:
Philip Sargent
2022-11-23 10:48:39 +00:00
parent 45a640dfe9
commit b06d1dae42
14 changed files with 69 additions and 69 deletions

View File

@@ -46,11 +46,11 @@ def _iterdump(connection):
# qtable,
# sql.replace("''")))
else:
yield('{0};'.format(sql))
yield(f'{sql};')
# Build the insert statement for each row of the current table
table_name_ident = table_name.replace('"', '""')
res = cu.execute('PRAGMA table_info("{0}")'.format(table_name_ident))
res = cu.execute(f'PRAGMA table_info("{table_name_ident}")')
column_names = [str(table_info[1]) for table_info in res.fetchall()]
q = """SELECT 'INSERT INTO "{0}" VALUES({1})' FROM "{0}";""".format(
table_name_ident,
@@ -68,6 +68,6 @@ def _iterdump(connection):
"""
schema_res = cu.execute(q)
for name, type, sql in schema_res.fetchall():
yield('{0};'.format(sql))
yield(f'{sql};')
yield('COMMIT;')