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 641036 - python script with #!/usr/bin/python are not documented correctly
python script with #!/usr/bin/python are not documented correctly
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.2-SVN
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-01-31 15:13 UTC by pascal.couteau
Modified: 2015-12-30 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example of issue (108.69 KB, application/zip)
2011-02-11 10:09 UTC, pascal.couteau
Details

Description pascal.couteau 2011-01-31 15:13:48 UTC
If you add #!/usr/bin/python at the beginning of your python script, the functions are not documented.

Take the documentation example:

"""@package docstring
Documentation for this module.

More details.
"""

def func():
    """Documentation for a function.

    More details.
    """
    pass

class PyClass:
    """Documentation for a class.

    More details.
    """
   
    def __init__(self):
        """The constructor."""
        self._memVar = 0;
   
    def PyMethod(self):
        """Documentation for a method."""
        pass

This example works and the "def func" function is documented. Now just add #!/usr/bin/python ....now the "def func" function is not documented and there's no "package" mention in the documentation.

This is certainly a side effect of the first # in #!/usr...
Comment 1 Dimitri van Heesch 2011-02-08 20:55:52 UTC
Hi Pascal,

I failed to reproduce this with the example you described, i.e. adding the #!/usr/bin/python did not make any difference. Can you please attach a self-contained example (source+config file in a tar or zip) that allows me to reproduce the problem?
Comment 2 pascal.couteau 2011-02-11 10:09:13 UTC
Created attachment 180641 [details]
Example of issue

Hi,

You can find in the zip files:

2 python scripts used to generate the html documentation
 - html_ok is generated with example.py
 - html is generated with example_issue.py

I have generated the documentation with doxygen v1.7.3 on windows host with the doxyfile.txt file provided. 

Warning: You have just to change the INPUT = to generate the required documentation.

Br,
Pascal.
Comment 3 Dimitri van Heesch 2012-11-18 11:08:08 UTC
Changed version 'latest' to '1.8.2-SVN' so I can remove 'latest' as an option as it is a moving target.
Comment 4 albert 2015-12-25 18:44:09 UTC
I've just pushed a proposed patch to github (pull request 427)
Comment 5 albert 2015-12-26 18:50:49 UTC
Changes have been integrated in github master version
Comment 6 Dimitri van Heesch 2015-12-30 10:20:20 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.11. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information 
that you think can be relevant (preferably in the form of a self-contained example).