diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-03-08 06:20:27 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-03-08 06:20:27 -0500 |
commit | 8cc4ffa19dd13d8433878aab3458f6c7572e74b5 (patch) | |
tree | 91bcc5715a213e333674f0d0543ffaa8e757c7d2 /coverage/parser.py | |
parent | 95c3003ddc3c3e11203c8b8b54dace4f197b1c4c (diff) | |
download | python-coveragepy-git-8cc4ffa19dd13d8433878aab3458f6c7572e74b5.tar.gz |
Hacked-in Mako support.
Diffstat (limited to 'coverage/parser.py')
-rw-r--r-- | coverage/parser.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/parser.py b/coverage/parser.py index de6590aa..88f6f29e 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -13,7 +13,7 @@ from coverage.misc import CoverageException, NoSource, NotPython class CodeParser(object): """Parse code to find executable lines, excluded lines, etc.""" - def __init__(self, text=None, filename=None, exclude=None): + def __init__(self, cu, text=None, filename=None, exclude=None): """ Source can be provided as `text`, the text itself, or `filename`, from which the text will be read. Excluded lines are those that match @@ -161,6 +161,9 @@ class CodeParser(object): if not empty: self.statement_starts.update(self.byte_parser._find_statements()) + def translate_lines(self, lines): + return lines + def first_line(self, line): """Return the first line number of the statement including `line`.""" rng = self.multiline.get(line) |