summaryrefslogtreecommitdiff
path: root/coverage/results.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-01 14:04:02 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-05-01 16:24:37 -0400
commit775c14a764ff3fd32bcd25d91f4c0f635722ed50 (patch)
tree2f73d38468b11c4b5f9723265bb121352a13271f /coverage/results.py
parente96ef93d18831630687b6c026bed89a1f9149c90 (diff)
downloadpython-coveragepy-git-775c14a764ff3fd32bcd25d91f4c0f635722ed50.tar.gz
refactor: remove more unneeded backward.py shims
Gone are: - iitems - litems - iternext - to_bytes - to_string - binary_bytes - byte_to_int - bytes_to_ints - BUILTINS
Diffstat (limited to 'coverage/results.py')
-rw-r--r--coverage/results.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/coverage/results.py b/coverage/results.py
index 4916864d..35f79ded 100644
--- a/coverage/results.py
+++ b/coverage/results.py
@@ -5,7 +5,6 @@
import collections
-from coverage.backward import iitems
from coverage.debug import SimpleReprMixin
from coverage.misc import contract, CoverageException, nice_pair
@@ -32,8 +31,8 @@ class Analysis(object):
self.no_branch = self.file_reporter.no_branch_lines()
n_branches = self._total_branches()
mba = self.missing_branch_arcs()
- n_partial_branches = sum(len(v) for k,v in iitems(mba) if k not in self.missing)
- n_missing_branches = sum(len(v) for k,v in iitems(mba))
+ n_partial_branches = sum(len(v) for k,v in mba.items() if k not in self.missing)
+ n_missing_branches = sum(len(v) for k,v in mba.items())
else:
self._arc_possibilities = []
self.exit_counts = {}
@@ -59,7 +58,7 @@ class Analysis(object):
"""
if branches and self.has_arcs():
- arcs = iitems(self.missing_branch_arcs())
+ arcs = self.missing_branch_arcs().items()
else:
arcs = None
@@ -113,7 +112,7 @@ class Analysis(object):
def _branch_lines(self):
"""Returns a list of line numbers that have more than one exit."""
- return [l1 for l1,count in iitems(self.exit_counts) if count > 1]
+ return [l1 for l1,count in self.exit_counts.items() if count > 1]
def _total_branches(self):
"""How many total branches are there?"""