:inherited-members: does not work for attributes #480

Open
SimonSapin opened this Issue Apr 9, 2012 · 6 comments

4 participants

@SimonSapin

I am not sure if this is a bug in Sphinx, but stuff like the root_path and static_url_path attributes/properties from _PackageBoundObject end up not documented in the API page of the docs. api.rst just contains this:

.. autoclass:: Flask
   :members:
   :inherited-members:
@untitaker
The Pallets Projects member

I am not sure what you mean. The rst docs shouldn't contain any information, they have to be compiled with sphinx to be actually helpful.

@sigmavirus24

@SimonSapin is correct: In the docs, root_path and static_url_path don't appear.

The former should be there but I don't see it anywhere, the latter shouldn't be because it isn't properly documented in the class. This should ensure that the former be included since that one is properly documented. The latter can probably be covered by adding documentation here or here

@untitaker
The Pallets Projects member

root_path is not documented in a way Sphinx can find it, i think. The #:-comment with the variable declaration is inside the __init__ method of _PackageBoundObject, not at the same level the methods are defined.

@untitaker
The Pallets Projects member

I just tried to add a new attribute to _PackageBoundObject and it seemed that Sphinx just ignored it. When adding the same to Flask, it works. Maybe something in conf.py that prevents Sphinx from documenting inherited members.

@untitaker
The Pallets Projects member

I filed an issue about this in sphinx' bugtracker, since it occured to me in a completely unrelated project.

@jeffwidman
The Pallets Projects member

Sphinx moved their issue tracker to GitHub and marked the above linked issue as a duplicate, so the new link to the upstream issue is sphinx-doc/sphinx#741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment