Skip to content
Merged
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
12 changes: 11 additions & 1 deletion spec/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
add_module_names = False
napoleon_custom_sections = [('Returns', 'params_style')]

# Make autosummary show the signatures of functions in the tables using actual
# Python syntax. There's currently no supported way to do this, so we have to
# just patch out the function that processes the signatures. See
# https://github.com/sphinx-doc/sphinx/issues/10053.
import sphinx.ext.autosummary as autosummary_mod
if hasattr(autosummary_mod, '_module'):
# It's a sphinx deprecated module wrapper object
autosummary_mod = autosummary_mod._module
autosummary_mod.mangle_signature = lambda sig, max_chars=30: sig

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down Expand Up @@ -162,4 +172,4 @@ def process_signature(app, what, name, obj, options, signature, return_annotatio
return signature, return_annotation

def setup(app):
app.connect("autodoc-process-signature", process_signature)
app.connect("autodoc-process-signature", process_signature)