@@ -30,12 +30,13 @@ def _iterdump(connection):
30
30
schema_res = cu .execute (q )
31
31
sqlite_sequence = []
32
32
for table_name , type , sql in schema_res .fetchall ():
33
- if table_name == "sqlite_sequence" :
34
- sqlite_sequence = ["DELETE FROM \" sqlite_sequence\" " ]
35
- rows = cu .execute ("SELECT * FROM \" sqlite_sequence\" ;" ).fetchall ()
36
- sqlite_sequence .extend (["INSERT INTO \" sqlite_sequence\" VALUES('{0}',{1})"
37
- .format (row [0 ], row [1 ]) for row in rows ])
38
- continue
33
+ if table_name == 'sqlite_sequence' :
34
+ rows = cu .execute ('SELECT * FROM "sqlite_sequence";' ).fetchall ()
35
+ sqlite_sequence = ['DELETE FROM "sqlite_sequence"' ]
36
+ sqlite_sequence += [
37
+ f'INSERT INTO "sqlite_sequence" VALUES(\' { row [0 ]} \' ,{ row [1 ]} )'
38
+ for row in rows
39
+ ]
39
40
elif table_name == 'sqlite_stat1' :
40
41
yield ('ANALYZE "sqlite_master";' )
41
42
elif table_name .startswith ('sqlite_' ):
@@ -72,8 +73,9 @@ def _iterdump(connection):
72
73
for name , type , sql in schema_res .fetchall ():
73
74
yield ('{0};' .format (sql ))
74
75
75
- # Yield statements concerning the sqlite_sequence table at the end of the transaction: (bpo-34828)
76
+ # gh-79009: Yield statements concerning the sqlite_sequence table at the
77
+ # end of the transaction.
76
78
for row in sqlite_sequence :
77
- yield (" {0};" .format (row ))
79
+ yield (' {0};' .format (row ))
78
80
79
81
yield ('COMMIT;' )
0 commit comments