Skip to content

Commit 62bc6a6

Browse files
committed
docs(conf): Suppress sphinx-autodoc-typehints forward reference warnings
why: Forward references in TYPE_CHECKING blocks cannot be resolved at doc build time, causing ~69 warnings that obscure other issues what: - Add suppress_warnings config to hide forward_reference warnings - These warnings are cosmetic - types like Self, Server, Session are used as string forward references to avoid circular imports
1 parent 143b42c commit 62bc6a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@
121121
# sphinx-autodoc-typehints
122122
always_document_param_types = True
123123

124+
# Suppress warnings for forward references that can't be resolved
125+
# (types in TYPE_CHECKING blocks used for circular import avoidance)
126+
suppress_warnings = [
127+
"sphinx_autodoc_typehints.forward_reference",
128+
]
129+
124130
# sphinx-copybutton
125131
copybutton_prompt_text = (
126132
r">>> |\.\.\. |> |\$ |\# | In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "

0 commit comments

Comments
 (0)