From 57f8c2795856df2721a5c218747d879d9e71f20d Mon Sep 17 00:00:00 2001 From: dgw Date: Sat, 11 Nov 2023 18:17:45 -0600 Subject: [PATCH] docs: make autodoc preserve default arguments without evaluating them This is a supposedly "experimental" option that was added in Sphinx 4.0, but here we are using Sphinx 7.1.x and it still hasn't been added to autodoc core as planned. Turning it on fixes the display of default parameters values like `tools.memories._NO_DEFAULT` in function/method signatures. Admittedly, I have not checked through the entire documentation set again after enabling this, but it seems unlikely that there are ever cases where we want the evaluated value to display instead of how it's passed in the source code. --- docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index fc70cb3c8..602f3407e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -125,6 +125,7 @@ 'ModeDetails': 'sopel.irc.modes.ModeDetails', 'PrivilegeDetails': 'sopel.irc.modes.PrivilegeDetails', } +autodoc_preserve_defaults = True # -- Options for HTML output ---------------------------------------------------