将以下内容添加到 conf.py中 :
def remove_module_docstring(app, what, name, obj, options, lines): if what == "module" and name == "yourmodule": del lines[:]def setup(app): app.connect("autodoc-process-docstring", remove_module_docstring)
此代码
yourmodule通过为autodoc-process-docstring事件提供处理程序来删除模块中的模块docstring。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)