Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 16 lines (10 sloc) 0.345 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import re
import inspect


_internal_mark_re = re.compile(r'^\s*:internal:\s*$(?m)')


def skip_member(app, what, name, obj, skip, options):
    docstring = inspect.getdoc(obj)
    if skip:
        return True
    return _internal_mark_re.search(docstring or '') is not None


def setup(app):
    app.connect('autodoc-skip-member', skip_member)
Something went wrong with that request. Please try again.