From 055e9b8ffd57c51c01e3dbfec3fdebcab80e1232 Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Thu, 16 Jan 2025 00:28:09 -0700 Subject: [PATCH] improve docs config --- docs/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 8a22f4b..98058d3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,13 +26,13 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.napoleon', # must go **before** typehints below 'sphinx_autodoc_typehints', 'sphinx.ext.autosummary', 'sphinx.ext.extlinks', 'sphinx.ext.todo', 'sphinx.ext.ifconfig', 'sphinx.ext.intersphinx', - 'sphinx.ext.napoleon', 'enum_tools.autoenum', ] @@ -226,3 +226,9 @@ # If false, no module index is generated. # latex_use_modindex = True + +# For sphinx-autodoc-typehints +always_use_bars_union = True +typehints_defaults = 'comma' +typehints_use_signature = True +typehints_use_signature_return = True