diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-22 08:10:32 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-22 08:10:32 -0500 |
commit | 995debcded55817348cc640cac8ea07ca12bd57c (patch) | |
tree | 8adc20ab1e5acf92abcb1cb62d16ffc011b0cb22 /coverage/annotate.py | |
parent | 73cb722150e74d123df152ff1b40e55972ccbafb (diff) | |
download | python-coveragepy-git-995debcded55817348cc640cac8ea07ca12bd57c.tar.gz |
Remove every last trace of CodeUnit, and bring me a glass of vodka
Diffstat (limited to 'coverage/annotate.py')
-rw-r--r-- | coverage/annotate.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/coverage/annotate.py b/coverage/annotate.py index 3487feb6..b77df4ec 100644 --- a/coverage/annotate.py +++ b/coverage/annotate.py @@ -41,10 +41,10 @@ class AnnotateReporter(Reporter): """ self.report_files(self.annotate_file, morfs, directory) - def annotate_file(self, cu, analysis): + def annotate_file(self, fr, analysis): """Annotate a single file. - `cu` is the CodeUnit for the file to annotate. + `fr` is the FileReporter for the file to annotate. """ statements = sorted(analysis.statements) @@ -52,18 +52,18 @@ class AnnotateReporter(Reporter): excluded = sorted(analysis.excluded) if self.directory: - dest_file = os.path.join(self.directory, cu.flat_rootname()) + dest_file = os.path.join(self.directory, fr.flat_rootname()) if dest_file.endswith("_py"): dest_file = dest_file[:-3] + ".py" dest_file += ",cover" else: - dest_file = cu.filename + ",cover" + dest_file = fr.filename + ",cover" with open(dest_file, 'w') as dest: i = 0 j = 0 covered = True - source = cu.source() + source = fr.source() for lineno, line in enumerate(source.splitlines(True), start=1): while i < len(statements) and statements[i] < lineno: i += 1 |