documentation/extensions/autodoc_placeholder/__init__.py

27 lines
856 B
Python
Raw Permalink Normal View History

from docutils.parsers.rst import Directive, directives
class PlaceHolder(Directive):
""" Placeholder class for directives that must be skipped. """
has_content = True
def run(self):
return [] # Return an empty list of nodes
def setup(app):
directives.register_directive('automodule', PlaceHolder)
directives.register_directive('autoclass', PlaceHolder)
directives.register_directive('autoexception', PlaceHolder)
directives.register_directive('autofunction', PlaceHolder)
directives.register_directive('autodecorator', PlaceHolder)
directives.register_directive('autodata', PlaceHolder)
directives.register_directive('automethod', PlaceHolder)
directives.register_directive('autoattribute', PlaceHolder)
return {
2021-04-29 16:36:05 +07:00
'parallel_read_safe': False,
'parallel_write_safe': True
}