sphinx.ext.autodoc: Keeping names of constants in signature

You probably have to override the signature by hand in the reST file. It’s hard to come up with a better answer. Autodoc imports the modules it documents, so all module-level code (including default function arguments) is executed. See also these similar questions: here and here. Update: I just realized that there is another option. You can override the signature … Read more