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
commit4e7ebf2419893348dee1c38b2c33cafe5a92d23a (patch)
treeaae1bee4f1c2c5e6b3f44c8d883fb6e1625d1b7c /coverage/parser.py
parent24fd1013f6d644ef3147d21e4048fdf8255d8cb5 (diff)
downloadpython-coveragepy-4e7ebf2419893348dee1c38b2c33cafe5a92d23a.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 de0e0c7..4878bdb 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: