Skip to content

Commit cb647cd

Browse files
committed
refactor: remove unneeded code
1 parent f333880 commit cb647cd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

coverage/results.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,7 @@ def branch_stats(self):
146146
stats = {}
147147
for lnum in self._branch_lines():
148148
exits = self.exit_counts[lnum]
149-
try:
150-
missing = len(missing_arcs[lnum])
151-
except KeyError:
152-
missing = 0
149+
missing = len(missing_arcs[lnum])
153150
stats[lnum] = (exits, exits - missing)
154151
return stats
155152

@@ -265,7 +262,7 @@ def __radd__(self, other):
265262
# Implementing 0+Numbers allows us to sum() a list of Numbers.
266263
if other == 0:
267264
return self
268-
return NotImplemented
265+
return NotImplemented # pragma: not covered (we never call it this way)
269266

270267

271268
def _line_ranges(statements, lines):

0 commit comments

Comments
 (0)