GNOME Bugzilla – Bug 363227
python: missing output for instance variables defined in a function that has a doc string
Last modified: 2012-11-18 11:11:58 UTC
Doxygen 1.5.0 (and 1.4.7) fails to generate documentation for instance variables that are defined in a function that has a docstring. Given the python source... class MyClass(object): def func1(self): ## a variable self.myvar1 = 2 ## another variable self.myvar2 = 1 def func2(self): """! @brief a function""" ## yet another variable self.myvar3 = 1 ## and one more self.myvar4 = 1 def func3(self): ## and still another self.myvar5 = 2.3 doxygen produces... Public Member Functions def func1 def func2 a function def func3 Public Attributes myvar1 a variable myvar2 another variable myvar5 and still another Notice myvar3 and myvar4 are missing.
Created attachment 74973 [details] testcase To run this test under 1.5.0, you need the patch from http://bugzilla.gnome.org/show_bug.cgi?id=363067 otherwise doxygen will crash. The bug can be demonstrated in 1.4.7 without the patch.
Created attachment 75053 [details] [review] Proposed Patch I believe this fixes the problem. The parser was leaving out the opening quotes for comment blocks when building the program text for entries for functions, so later when the function body is parsed only the trailing quotes are seen so most of the function body ends up looking like a comment.
Hi Jason, Your patch make sense. I'll include it in the next update. Thanks!
Patch is now in the official release.