How to use the autodocsumm.__init__.NoDataDataDocumenter function in autodocsumm

To help you get started, we’ve selected a few autodocsumm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Chilipp / autodocsumm / autodocsumm / __init__.py View on Github external
def __init__(self, *args, **kwargs):
        super(NoDataDataDocumenter, self).__init__(*args, **kwargs)
        fullname = '.'.join(self.name.rsplit('::', 1))
        if hasattr(self.env, 'config') and dont_document_data(
                self.env.config, fullname):
            self.options = Options(self.options)
            self.options.annotation = ' '
github Chilipp / autodocsumm / autodocsumm / __init__.py View on Github external
def setup(app):
    """setup function for using this module as a sphinx extension"""
    app.setup_extension('sphinx.ext.autosummary')
    app.setup_extension('sphinx.ext.autodoc')

    # make sure to allow inheritance when registering new documenters
    if sphinx_version < [1, 7]:
        registry = AutodocRegistry._registry
    else:
        registry = get_documenters(app)
    for cls in [AutoSummClassDocumenter, AutoSummModuleDocumenter,
                CallableAttributeDocumenter, NoDataDataDocumenter,
                NoDataAttributeDocumenter]:
        if not issubclass(registry.get(cls.objtype), cls):
            if sphinx_version >= [2, 2]:
                app.add_autodocumenter(cls, override=True)
            elif sphinx_version >= [0, 6]:
                app.add_autodocumenter(cls)
            else:
                app.add_documenter(cls)

    # directives
    if sphinx_version >= [1, 8]:
        app.add_directive('automodule', AutoSummDirective, override=True)
        app.add_directive('autoclass', AutoSummDirective, override=True)
    else:
        app.add_directive('automodule', AutoSummDirective)
        app.add_directive('autoclass', AutoSummDirective)