Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sphinx_immaterial/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,14 @@ def _config_inited(
+ "The sphinx.ext.napoleon extension may be used instead for NumPy-style docstring support."
)

# Enable the legacy (``Documenter``) autodoc implementation
# for all users of the theme
config.autodoc_use_legacy_class_based = True


def setup(app: Sphinx):
app.connect("config-inited", _config_inited)
# Run before sphinx.ext.autodoc._register_directives()
app.connect("config-inited", _config_inited, priority=50)

app.setup_extension("sphinx_immaterial.css_and_javascript_bundles")
app.setup_extension("sphinx_immaterial.external_resource_cache")
Expand Down
4 changes: 4 additions & 0 deletions sphinx_immaterial/apidoc/python/type_param_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ def stringify_annotation(
for module in [
"sphinx.util.typing",
"sphinx.ext.autodoc",
"sphinx.ext.autodoc._dynamic._loader",
"sphinx.ext.autodoc._dynamic._type_annotations",
"sphinx.ext.autodoc._legacy_class_based._documenters",
"sphinx.ext.autodoc._generate",
"sphinx.ext.autodoc.typehints",
"sphinx.util.inspect",
"sphinx.ext.napoleon.docstring",
Expand Down