diff options
-rw-r--r-- | coverage/cmdline.py | 15 | ||||
-rw-r--r-- | coverage/jsonreport.py | 5 |
2 files changed, 10 insertions, 10 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 002a8e44..efed9040 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -625,10 +625,10 @@ class CoverageScript: total = None if options.action == "report": total = self.coverage.report( + precision=options.precision, show_missing=options.show_missing, skip_covered=options.skip_covered, skip_empty=options.skip_empty, - precision=options.precision, sort=options.sort, **report_args ) @@ -637,27 +637,26 @@ class CoverageScript: elif options.action == "html": total = self.coverage.html_report( directory=options.directory, - title=options.title, + precision=options.precision, skip_covered=options.skip_covered, skip_empty=options.skip_empty, show_contexts=options.show_contexts, - precision=options.precision, + title=options.title, **report_args ) elif options.action == "xml": - outfile = options.outfile total = self.coverage.xml_report( - outfile=outfile, skip_empty=options.skip_empty, + outfile=options.outfile, + skip_empty=options.skip_empty, **report_args ) elif options.action == "json": - outfile = options.outfile total = self.coverage.json_report( - outfile=outfile, + outfile=options.outfile, pretty_print=options.pretty_print, show_contexts=options.show_contexts, **report_args - ) + ) else: # There are no other possible actions. raise AssertionError diff --git a/coverage/jsonreport.py b/coverage/jsonreport.py index c87bb0e7..75ba755d 100644 --- a/coverage/jsonreport.py +++ b/coverage/jsonreport.py @@ -2,6 +2,7 @@ # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Json reporting for coverage.py""" + import datetime import json import sys @@ -27,7 +28,7 @@ class JsonReporter: `morfs` is a list of modules or file names. - `outfile` is a file object to write the json to + `outfile` is a file object to write the json to. """ outfile = outfile or sys.stdout @@ -75,7 +76,7 @@ class JsonReporter: return self.total.n_statements and self.total.pc_covered def report_one_file(self, coverage_data, analysis): - """Extract the relevant report data for a single file""" + """Extract the relevant report data for a single file.""" nums = analysis.numbers self.total += nums summary = { |