summaryrefslogtreecommitdiff
path: root/coverage/parser.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-11-20 07:23:10 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-11-20 07:23:10 -0500
commit4108517952e9b96658d30dcb87ca098abbe14a14 (patch)
treee2058c53f36ad5971a88447e8359c1f24500fc8a /coverage/parser.py
parent0ff7f6e35dee95d01e70715226c2653041c1e174 (diff)
downloadpython-coveragepy-git-4108517952e9b96658d30dcb87ca098abbe14a14.tar.gz
Denis Otkidach puts a fine point on it.
Diffstat (limited to 'coverage/parser.py')
-rw-r--r--coverage/parser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/coverage/parser.py b/coverage/parser.py
index de0e0c7f..4878bdb5 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -111,7 +111,9 @@ class CodeParser(object):
excluding = True
elif toktype == token.STRING and prev_toktype == token.INDENT:
# Strings that are first on an indented line are docstrings.
- # (a trick from trace.py in the stdlib.)
+ # (a trick from trace.py in the stdlib.) This works for
+ # 99.9999% of cases. For the rest (!) see:
+ # http://stackoverflow.com/questions/1769332/x/1769794#1769794
for i in range(slineno, elineno+1):
self.docstrings.add(i)
elif toktype == token.NEWLINE: