Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
priority = CallableDataDocumenter.priority + 0.1
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 = ' '
class NoDataAttributeDocumenter(CallableAttributeDocumenter):
"""AttributeDocumenter that prevents the displaying of large data"""
#: slightly higher priority as the one of the CallableAttributeDocumenter
priority = CallableAttributeDocumenter.priority + 0.1
def __init__(self, *args, **kwargs):
super(NoDataAttributeDocumenter, 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 = ' '
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