--- a/DebugClients/Python3/coverage/annotate.py Fri Apr 04 22:57:07 2014 +0200 +++ b/DebugClients/Python3/coverage/annotate.py Thu Apr 10 23:02:20 2014 +0200 @@ -2,6 +2,7 @@ import os, re +from .backward import sorted # pylint: disable=W0622 from .report import Reporter class AnnotateReporter(Reporter): @@ -26,16 +27,20 @@ """ - def __init__(self, coverage, ignore_errors=False): - super(AnnotateReporter, self).__init__(coverage, ignore_errors) + def __init__(self, coverage, config): + super(AnnotateReporter, self).__init__(coverage, config) self.directory = None blank_re = re.compile(r"\s*(#|$)") else_re = re.compile(r"\s*else\s*:\s*(#|$)") - def report(self, morfs, directory=None, omit_prefixes=None): - """Run the report.""" - self.report_files(self.annotate_file, morfs, directory, omit_prefixes) + def report(self, morfs, directory=None): + """Run the report. + + See `coverage.report()` for arguments. + + """ + self.report_files(self.annotate_file, morfs, directory) def annotate_file(self, cu, analysis): """Annotate a single file. @@ -55,9 +60,9 @@ dest_file = filename + ",cover" dest = open(dest_file, 'w') - statements = analysis.statements - missing = analysis.missing - excluded = analysis.excluded + statements = sorted(analysis.statements) + missing = sorted(analysis.missing) + excluded = sorted(analysis.excluded) lineno = 0 i = 0 @@ -94,4 +99,4 @@ dest.write('! ') dest.write(line) source.close() - dest.close() \ No newline at end of file + dest.close()