Skip to content
Snippets Groups Projects
Commit 7d71a053 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[doc] Remove private member sphinx patch

parent 60d7768c
No related branches found
No related tags found
No related merge requests found
Pipeline #38782 passed
...@@ -231,23 +231,3 @@ autodoc_default_flags = [ ...@@ -231,23 +231,3 @@ autodoc_default_flags = [
# Adds simplejson, pyzmq links # Adds simplejson, pyzmq links
#intersphinx_mapping['http://simplejson.readthedocs.io/en/stable/'] = None #intersphinx_mapping['http://simplejson.readthedocs.io/en/stable/'] = None
#intersphinx_mapping['http://pyzmq.readthedocs.io/en/stable/'] = None #intersphinx_mapping['http://pyzmq.readthedocs.io/en/stable/'] = None
# We want to remove all private (i.e. _. or __.__) members
# that are not in the list of accepted functions
accepted_private_functions = ['__array__']
def member_function_test(app, what, name, obj, skip, options):
# test if we have a private function
if len(name) > 1 and name[0] == '_':
# test if this private function should be allowed
if name not in accepted_private_functions:
# omit privat functions that are not in the list of accepted private functions
return skip
else:
# test if the method is documented
if not hasattr(obj, '__doc__') or not obj.__doc__:
return skip
return False
def setup(app):
app.connect('autodoc-skip-member', member_function_test)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment