From 83760e6a01cd3fa16a17158bb1182ffebb00c5d7 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 2 Nov 2016 20:16:02 +0000 Subject: [PATCH] Don't skip __init__() methods when generating docs --- doc/source/conf.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index c9a9f23eb85..c861f391b9a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -43,9 +43,20 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sp # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -#configure default autodoc's action +# Configure default autodoc's action autodoc_default_flags = [ 'members', 'undoc-members', 'show-inheritance' ] + +def dont_skip_init(app, what, name, obj, skip, options): + if name == "__init__": + return False + return skip + + +def setup(app): + app.connect("autodoc-skip-member", dont_skip_init) + + # The suffix of source filenames. source_suffix = ['.rst', '.md']