Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

member variable with type annotation and not used anywhere of python class is missed #10827

Closed
zhangzq opened this issue Apr 25, 2024 · 4 comments
Labels
enhancement a request to enhance doxygen, not a bug Python

Comments

@zhangzq
Copy link

zhangzq commented Apr 25, 2024

Describe the bug

The member variable of python class is missed, if:

  1. with type annotation
  2. not appeared elsewhere.

Below is a short example. The a will show in public member of docs, but b is missed.

class Test:
    def __init__(self):
        ## first var
        self.a:int = 1

        ## second var
        self.b:int = 2

    def test(self):
        self.a = 3

To Reproduce

class Test:
    def __init__(self):
        ## first var
        self.a:int = 1

        ## second var
        self.b:int = 2

    def test(self):
        self.a = 3

with default doxyfile.

Expected behavior

The class has two public members, a and b, now b is missed.

Version
1.11.0 (74f8b41aead51679bf364056b4fd091cf828a7cf)

@albert-github albert-github added enhancement a request to enhance doxygen, not a bug Python labels Apr 25, 2024
@albert-github
Copy link
Collaborator

Not only b is missing but also the documentation from a as we get the warning:

test.py:13: warning: Member a (variable) of class test.Test is not documented.

Problem here is the "typing" which originally was missing in python and now is subsequently added.

albert-github added a commit to albert-github/doxygen that referenced this issue Apr 29, 2024
… anywhere of python class is missed

Handle type annotation for class variables
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #10834

doxygen added a commit that referenced this issue May 1, 2024
@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label May 4, 2024
@albert-github
Copy link
Collaborator

Code has been integrated and corrected in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@doxygen
Copy link
Owner

doxygen commented May 20, 2024

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.11.0.
Please verify if this is indeed the case. Reopen the
issue 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).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label May 20, 2024
@doxygen doxygen closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to enhance doxygen, not a bug Python
Projects
None yet
Development

No branches or pull requests

3 participants