Skip to content

Commit 83cd9ba

Browse files
author
ZhengLin Li
committed
fix: fix according to pylint: consider-using-f-string
1 parent 6d6660a commit 83cd9ba

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

bugs.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,13 @@ def export_database():
134134
seq = 0
135135
for statement in bug_entry['test']:
136136
if not (statement.startswith('--') or statement == ''):
137-
cursor.execute('INSERT INTO BUG_TEST_CASES'
138-
'(id, STATEMENT, POSITION) '
139-
'VALUES(%d, "%s", %d)'
140-
% (rid, statement.replace('"', '""'), seq))
137+
statement_replaced = statement.replace('"', '""')
138+
command = (
139+
f"INSERT INTO BUG_TEST_CASES"
140+
f"(id, STATEMENT, POSITION)"
141+
f"VALUES({rid}, \"{statement_replaced}\", {seq})"
142+
)
143+
cursor.execute(command)
141144
seq += 1
142145
conn.commit()
143146

0 commit comments

Comments
 (0)