Skip to content

Commit

Permalink
include __init__ in autodoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelleas committed Jun 4, 2020
1 parent 1a0ea7c commit e708c7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()))]
Expand Down

0 comments on commit e708c7b

Please sign in to comment.