Skip to content

Use autodoc_preserve_defaults = True #170

Closed
@dhalbert

Description

@dhalbert
Contributor

As of Sphinx 4, there is a new option we can add to conf.py. I am a little confused about whether "will be integrated into autodoc core" means it will be on by default in the future. But it came in handy in a new library I am working on.

This is not high priority, but it's good to know about.

https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_preserve_defaults

autodoc_preserve_defaults
If True, the default argument values of functions will be not evaluated on generating document. It preserves them as is in the source code.

New in version 4.0: Added as an experimental feature. This will be integrated into autodoc core in the future.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @dhalbert@tekktrik

    Issue actions

      Use autodoc_preserve_defaults = True · Issue #170 · adafruit/cookiecutter-adafruit-circuitpython