Skip to content

Commit a12fb29

Browse files
committed
docs(conf): Add sphinx-autodoc-typehints config, suppress forward ref warnings
- Add always_document_param_types = True for consistent parameter docs - Add typehints_use_rtype = False to embed return types inline - Suppress sphinx_autodoc_typehints.forward_reference warnings for types in TYPE_CHECKING blocks (used for circular import avoidance) This eliminates ~26 forward reference warnings from the docs build.
1 parent 712eee1 commit a12fb29

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@
119119
"member-order": "bysource",
120120
}
121121

122+
# sphinx-autodoc-typehints
123+
always_document_param_types = True
124+
typehints_use_rtype = False
125+
126+
# Suppress warnings for forward references that can't be resolved
127+
# (types in TYPE_CHECKING blocks used for circular import avoidance)
128+
suppress_warnings = [
129+
"sphinx_autodoc_typehints.forward_reference",
130+
]
131+
122132
# sphinxext.opengraph
123133
ogp_site_url = about["__docs__"]
124134
ogp_image = "_static/img/icons/icon-192x192.png"

0 commit comments

Comments
 (0)