diff --git a/docs/source/conf.py b/docs/source/conf.py index 66e7a5e..8a38a46 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,6 +7,16 @@ # Add path to module for autodoc sys.path.insert(0, os.path.abspath(f'../../{_tool}')) +# Include __init__ in autodoc +# Source: https://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method +def skip(app, what, name, obj, would_skip, options): + if name == "__init__": + return False + return would_skip + +def setup(app): + app.connect("autodoc-skip-member", skip) + extensions = ['sphinx.ext.autodoc'] html_css_files = ["https://cs50.readthedocs.io/_static/custom.css?" + str(round(time.time()))]