After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 363227 - python: missing output for instance variables defined in a function that has a doc string
python: missing output for instance variables defined in a function that has ...
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2006-10-18 19:58 UTC by Jason Ferrara
Modified: 2012-11-18 11:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (2.28 KB, application/x-compressed-tar)
2006-10-18 20:05 UTC, Jason Ferrara
  Details
Proposed Patch (489 bytes, patch)
2006-10-20 03:17 UTC, Jason Ferrara
none Details | Review

Description Jason Ferrara 2006-10-18 19:58:59 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.
Comment 1 Jason Ferrara 2006-10-18 20:05:29 UTC
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.
Comment 2 Jason Ferrara 2006-10-20 03:17:15 UTC
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.
Comment 3 Dimitri van Heesch 2006-10-22 09:53:33 UTC
Hi Jason,

Your patch make sense. I'll include it in the next update. Thanks!
Comment 4 Dimitri van Heesch 2006-11-10 19:36:22 UTC
Patch is now in the official release.