summaryrefslogtreecommitdiff
path: root/coverage/jsonreport.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-09 16:41:59 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-09 16:41:59 -0400
commit498b1484e466588a22cef520095f1fd0ed8b8ff8 (patch)
tree84979ae5f419d8632ba898d8464dc142778e9f1c /coverage/jsonreport.py
parent4d55ada1bdca638b0fd12e887fb0faaa574dee8d (diff)
downloadpython-coveragepy-git-498b1484e466588a22cef520095f1fd0ed8b8ff8.tar.gz
fix: contexts_by_lineno now returns a true dict
Diffstat (limited to 'coverage/jsonreport.py')
-rw-r--r--coverage/jsonreport.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/coverage/jsonreport.py b/coverage/jsonreport.py
index b22ab10b..daebca11 100644
--- a/coverage/jsonreport.py
+++ b/coverage/jsonreport.py
@@ -88,12 +88,10 @@ class JsonReporter:
'executed_lines': sorted(analysis.executed),
'summary': summary,
'missing_lines': sorted(analysis.missing),
- 'excluded_lines': sorted(analysis.excluded)
+ 'excluded_lines': sorted(analysis.excluded),
}
if self.config.json_show_contexts:
- reported_file['contexts'] = analysis.data.contexts_by_lineno(
- analysis.filename,
- )
+ reported_file['contexts'] = analysis.data.contexts_by_lineno(analysis.filename)
if coverage_data.has_arcs():
reported_file['summary'].update({
'num_branches': nums.n_branches,