Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure __init__ functions are displayed in docs #477

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make sure __init__ functions are displayed in docs
By default autodocs only show class docstrings and hide __init__
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autoclass_content
https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options

Make sure docstrings added to __init__ functions show up in the docs
  • Loading branch information
jogo committed Feb 3, 2023
commit e7161f5fbea1ba8c5a8069bb28558da4e9623e87
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
import subprocess
import sys

sys.path.insert(0, os.path.abspath(".."))

Expand Down Expand Up @@ -355,6 +355,12 @@
intersphinx_mapping = {"https://docs.python.org/": None}


# autodoc include __init__
autodoc_default_options = {
"special-members": "__init__",
}


# Automate building apidoc when building with readthedocs
apidoc_module_dir = os.path.join("..", "pymemcache")
apidoc_output_dir = "apidoc"
Expand Down