Commit 8a5e501
Add Sphinx autodoc configuration for constructor documentation (#538)
Summary:
Pull Request resolved: #538
Configure Sphinx autodoc to include constructor documentation in generated API docs, which currently not being generated as:
This ensures that `__init__` methods and other special members are properly documented, addressing the issue where Python binding constructors were not appearing in the Sphinx-generated documentation.
The configuration adds:
- `'special-members': '__init__'` to include constructors
- `'show-inheritance': True'` to display class hierarchy
- `'members': True'` to include all class members
- `'undoc-members': True'` to include members without explicit docstrings
This complements the existing Python binding argument name fixes and ensures constructors are visible in the documentation even when detailed docstrings are not present in the pybind11 bindings.
Sphinx doc: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options
Reviewed By: cdtwigg
Differential Revision: D81549409
fbshipit-source-id: 59b6f20dae1e640acc2d156c132d0b9d038dad3c1 parent e7f85e3 commit 8a5e501
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
0 commit comments