From b90b56dff1d6cafe9ebb58a6d52e7e50114303c0 Mon Sep 17 00:00:00 2001 From: rtmalikian Date: Sat, 20 Jun 2026 08:21:49 -0700 Subject: [PATCH] fix: include __init__ docstrings in Sphinx documentation output Set autoclass_content to 'both' so Sphinx renders both the class-level and __init__ docstrings. Also enable napoleon_include_init_with_doc so Napoleon-flavoured init docs appear in the generated HTML. Fixes #1144 Signed-off-by: rtmalikian --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 72d742b7b..ef6b39536 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -102,9 +102,10 @@ # Generate the API documentation when building autosummary_generate = True autodoc_member_order = "bysource" +autoclass_content = "both" # include both class and __init__ docstrings napoleon_google_docstring = True # for pytorch lightning napoleon_numpy_docstring = True -napoleon_include_init_with_doc = False +napoleon_include_init_with_doc = True napoleon_use_rtype = True # separate entry generally helps readability napoleon_use_param = True napoleon_custom_sections = [("Params", "Parameters")]