autodoc autmodule not picking up on reimported module-level constant variable
#8.547 geöffnet am 17. Dez. 2020
Repository-Metriken
- Stars
- (5.625 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 10T 11h) (11 gemergte PRs in 30 T)
Beschreibung
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
git clone https://github.com/DamSenViet/kle-py.git
cd kle-py
# checkout the commit with the issue
git checkout 26e6d7c1ba44c670c7213f1895c21afcc5a67c1c
# install/update egg the with dev dependencies
pip3 install -Ue .[dev]
./scripts/build-docs.sh && ./scripts/dev-docs.sh
Expected behavior
An imported constant variable, kle_dps should have been documented by automodule.
Your project https://github.com/DamSenViet/kle-py/tree/26e6d7c1ba44c670c7213f1895c21afcc5a67c1c
Screenshots If applicable, add screenshots to help explain your problem.
Environment info
- OS: Mac
- Python version: 3.9
- Sphinx version: 3.3.1
- Sphinx extensions: [sphinx.ext.autodoc, sphinx.ext.autodoc.typehints, sphinx.ext.autosummary, sphinx.ext.githubpages]
Additional context
For additional context, kle_dps is an imported module-level constant from another submodule, damsenviet.kle.utils (and is documented there).
Note that I included kle_dps in __all__ in both the damsenviet.kle.__init__.py and damsenviet.kle.utils.py.
However, kle_dps isn't in the API reference page for damsenviet.kle but does show up in damsenviet.kle.utils.
I expected the same behavior as documenting functions and classes.
I suspect that autodoc's automodule isn't picking up on an imported module-level constant. Even when I don't have an __all__ present in the files, automodule still fails to pick up on it.