Enforce our configuration defaults for autodoc.

Review Request #12515 — Created Aug. 8, 2022 and submitted — Latest diff uploaded

Information

beanbag-docutils
master

Reviewers

This listens to when configuration is being initialized and sets our own
defaults, helping to enforce a consistent style across our documentation
and to reduce the work needed to set things up.

The defaults turn off the Numpy and Google docstring parsers, set
standard autodoc class ordering and flags, and ensure our own type
hinting is used.

It sets some autodoc defaults that we end up setting in each codebase,
and normalizes autodoc_excludes.

If a codebase needs to, it can opt out of these defaults by setting
use_beanbag_autodoc_defaults=False.

It registers unicode as a type that maps to str when building
against a Python 3 intersphinx or against the unicode function when
building against a Python 2 intersphinx.

And finally, it returns version information for the extension so that
any new versions will cause a doc rebuild.

Unit tests pass.

Tested these with a couple codebases, and the default options removed
from the codebase's conf.py. Didn't see any regressions.

Commits

Files

    Loading...