From 4e7ebf2419893348dee1c38b2c33cafe5a92d23a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 20 Nov 2009 07:23:10 -0500 Subject: Denis Otkidach puts a fine point on it. --- coverage/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'coverage/parser.py') 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: -- cgit v1.2.1