summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-04-08 20:36:00 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-04-09 08:01:19 -0400
commit77009b45a8ce878e8739df5d49c62caa27ba6aa1 (patch)
tree623ac7bbd00531a77782315d6b913512936888d8 /coverage
parent10018dd90852d78cd2d04c4fb5874028d6ec2c51 (diff)
downloadpython-coveragepy-git-77009b45a8ce878e8739df5d49c62caa27ba6aa1.tar.gz
Oops, clean up some unused listcomps
Diffstat (limited to 'coverage')
-rw-r--r--coverage/sqldata.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/coverage/sqldata.py b/coverage/sqldata.py
index 09d647e5..5ae99c7e 100644
--- a/coverage/sqldata.py
+++ b/coverage/sqldata.py
@@ -438,27 +438,26 @@ class CoverageSqliteData(SimpleReprMixin):
# Prepare arc and line rows to be inserted by converting the file
# and context strings with integer ids. Then use the efficient
# `executemany()` to insert all rows at once.
- arc_rows = [
+ arc_rows = (
(file_ids[file], context_ids[context], fromno, tono)
for file, context, fromno, tono in arcs
- ]
- line_rows = [
+ )
+ line_rows = (
(file_ids[file], context_ids[context], lineno)
for file, context, lineno in lines
- ]
+ )
self._choose_lines_or_arcs(arcs=bool(arcs), lines=bool(lines))
conn.executemany(
'insert or ignore into arc '
'(file_id, context_id, fromno, tono) values (?, ?, ?, ?)',
- ((file_ids[file], context_ids[context], fromno, tono)
- for file, context, fromno, tono in arcs)
+ arc_rows
)
conn.executemany(
'insert or ignore into line '
'(file_id, context_id, lineno) values (?, ?, ?)',
- ((file_ids[file], context_ids[context], lineno) for file, context, lineno in lines)
+ line_rows
)
conn.executemany(
'insert or ignore into tracer (file_id, tracer) values (?, ?)',