diff options
Diffstat (limited to 'docs/conf.py')
-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) |