From ecc7f641cec1b2b43cffaaff1a1eaea8aa1c7873 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Nov 2026 19:33:19 +0000 Subject: [PATCH] docs: load sphinx_click before sphinx_autodoc_typehints With Sphinx 9.1, "from sphinx.ext.autodoc import mock" returns the mock module instead of the function once sphinx_autodoc_typehints has been imported, so sphinx_click failed with "'module' object is not callable" and the CLI page was empty. Loading sphinx_click first keeps the function (see sphinx-doc/sphinx#14333). AI-Level: 7 AI-Model: Claude Sonnet 5.5 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01CUNZAXTg3vthj5KZYCgf3m --- docs/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index a8dcf962..53cea74d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,8 +47,11 @@ "sphinx.ext.napoleon", # 3rd party "myst_parser", - "sphinx_autodoc_typehints", + # must stay before sphinx_autodoc_typehints: once the latter is imported, + # "from sphinx.ext.autodoc import mock" gives sphinx_click the module and not the + # function (https://github.com/sphinx-doc/sphinx/issues/14333) "sphinx_click", + "sphinx_autodoc_typehints", "sphinx_copybutton", "sphinx_design", "sphinxcontrib.mermaid",