forked from expo/troggle
Convert.format() to f-strings with flynt
This commit is contained in:
6
dump.py
6
dump.py
@@ -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;')
|
||||
Reference in New Issue
Block a user