diff options
author | 2022-02-21 20:28:12 +0400 | |
---|---|---|
committer | 2022-02-21 21:04:50 +0400 | |
commit | fef4c75210fbf812279cc73457abe42bbe8fd983 (patch) | |
tree | 3882cedd54a89f9e1fef3f1ae1d35d5211da6c7f /docs | |
parent | Merge branch 'main' into port-utilities (diff) |
Revert Breaking Doc Changes
A previous commit tried to utilize the default autodoc option
configuration to make the doc generation more streamlined and organized,
but they seem to not work well.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/docs/conf.py b/docs/conf.py index e2801e2c..23feab31 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,6 +7,7 @@ from pathlib import Path import git import tomli +from sphinx.application import Sphinx from docs import utils @@ -87,6 +88,8 @@ html_js_files = [ "changelog.js", ] +utils.cleanup() + def skip(*args) -> bool: """Things that should be skipped by the autodoc generation.""" @@ -100,6 +103,11 @@ def skip(*args) -> bool: return would_skip +def setup(app: Sphinx) -> None: + """Add extra hook-based autodoc configuration.""" + app.connect("autodoc-skip-member", skip) + + # -- Extension configuration ------------------------------------------------- # -- Options for todo extension ---------------------------------------------- @@ -131,16 +139,5 @@ intersphinx_mapping = { } -# -- Options for the autodoc extension --------------------------------------- -utils.cleanup() -autodoc_default_options = { - "members": True, - "special-members": True, - "show-inheritance": True, - "imported-members": False, - "exclude-members": "__weakref__" -} - - # -- Options for the linkcode extension -------------------------------------- linkcode_resolve = functools.partial(utils.linkcode_resolve, SOURCE_FILE_LINK) |