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

Undocumented instance attributes are ignored even with "undoc-members" selected #451

Closed
hanetar opened this issue Jun 10, 2024 · 1 comment
Labels

Comments

@hanetar
Copy link

hanetar commented Jun 10, 2024

I've found that undocumented instance attributes, e.g.:

class Test:
    def __init__(self):
        self.found : bool = False

are always left out of the documentation, regardless of the "undoc-members" setting in autoapi_options. They are not even sent for evaluation via the autoapi-skip-member callback. I don't think this is expected behavior.

As far as I can tell, this is due to line 216 in the parse_functiondef() method of the Parser class in "_parser.py":

result.extend(data for data in child_data if data["doc"])

IMO, the condition should be removed so that all parsed members are passed through to the filtering via autoapi_options and autoapi-skip-member, allowing the user to keep the undocumented ones as well.

@sachahu1
Copy link

@hanetar I think this is a duplicate of #448 and #441. You might want to have a look at #448 To see if that solves your issue. Otherwise I've also tried to implement a fix in #453.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants