jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/420168 )
Change subject: [doc] connect 'autodoc-skip-member' hook ......................................................................
[doc] connect 'autodoc-skip-member' hook
- never skip class initializer method - always skip __dict__ and __weakref__ - always skip deprecated methods
Bug: T130625 Change-Id: I31603cd5bffbb9db71c079d3bc6c2aff35bb937c --- M docs/conf.py 1 file changed, 13 insertions(+), 0 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/docs/conf.py b/docs/conf.py index d416a40..9ead2b0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -284,9 +284,22 @@ lines[index] = ' ' + line.strip()
+def pywikibot_skip_members(app, what, name, obj, skip, options): + """Skip certain members from documentation.""" + inclusions = ('__init__', ) + exclusions = ('__dict__', '__weakref__',) + if name in inclusions: + return False + if obj.__doc__ is not None \ + and obj.__doc__.startswith(('DEPRECATED', 'Deprecated')): + return True + return skip or name in exclusions + + def setup(app): """Implicit Sphinx extension hook.""" app.connect('autodoc-process-docstring', pywikibot_script_docstring_fixups) + app.connect('autodoc-skip-member', pywikibot_skip_members)
pywikibot_env()
pywikibot-commits@lists.wikimedia.org