eric7/DebugClients/Python/coverage/sqldata.py

branch
eric7
changeset 8527
2bd1325d727e
parent 8312
800c432b34c8
child 8775
0802ae193343
--- a/eric7/DebugClients/Python/coverage/sqldata.py	Fri Aug 20 19:56:17 2021 +0200
+++ b/eric7/DebugClients/Python/coverage/sqldata.py	Sat Aug 21 14:21:44 2021 +0200
@@ -486,9 +486,9 @@
         assert lines or arcs
         assert not (lines and arcs)
         if lines and self._has_arcs:
-            raise CoverageException("Can't add lines to existing arc data")
+            raise CoverageException("Can't add line measurements to existing branch data")
         if arcs and self._has_lines:
-            raise CoverageException("Can't add arcs to existing line data")
+            raise CoverageException("Can't add branch measurements to existing line data")
         if not self._has_arcs and not self._has_lines:
             self._has_lines = lines
             self._has_arcs = arcs
@@ -784,7 +784,7 @@
         """
         self._start_using()
         with self._connect() as con:
-            contexts = set(row[0] for row in con.execute("select distinct(context) from context"))
+            contexts = {row[0] for row in con.execute("select distinct(context) from context")}
         return contexts
 
     def file_tracer(self, filename):
@@ -857,7 +857,7 @@
             arcs = self.arcs(filename)
             if arcs is not None:
                 all_lines = itertools.chain.from_iterable(arcs)
-                return list(set(l for l in all_lines if l > 0))
+                return list({l for l in all_lines if l > 0})
 
         with self._connect() as con:
             file_id = self._file_id(filename)

eric ide

mercurial