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

Autodoc does not emit documentation for imported data #6607

Closed
pavel-kirienko opened this issue Jul 26, 2019 · 3 comments
Closed

Autodoc does not emit documentation for imported data #6607

pavel-kirienko opened this issue Jul 26, 2019 · 3 comments

Comments

@pavel-kirienko
Copy link

This is my MWE: https://github.com/pavel-kirienko/sphinx-issues-mwe

Specifically, here is the definition where autodoc seems to be misbehaving (please ignore the other documented issues, they are being discussed over at #6574):

https://github.com/pavel-kirienko/sphinx-issues-mwe/blob/07de46b31dccdc478b8380a34c84ed347ef9a9f7/sphinx_demo/_internal.py#L1-L2

The generated documentation does not include the data entity: https://sphinx-issues-mwe.readthedocs.io/en/latest/

@pavel-kirienko
Copy link
Author

Same issue with undocumented dataclass attributes.

@tk0miya
Copy link
Member

tk0miya commented Aug 2, 2019

autodoc seeks assign statements to detect variables. In this case, sphinx_demo/__init__.py does not contains any assign statements. So DATA_ENTITY is not detected.
On the other hand, you can document it if you're trying to document sphinx_demo._internal package. If you have good idea to detect it expectedly, please send a pull request :-)

Same issue with undocumented dataclass attributes.

Please file another issue please. One problem per one issue is better to us.

@tk0miya tk0miya changed the title Autodoc does not emit documentation for data Autodoc does not emit documentation for imported data Aug 2, 2019
@tk0miya
Copy link
Member

tk0miya commented Apr 26, 2020

I noticed this is a dup of #6495. So I'm closing this now. Please follow #6495.
Thanks,

@tk0miya tk0miya closed this as completed Apr 26, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants