在autodoc中排除模块docstring

在autodoc中排除模块docstring,第1张

在autodoc中排除模块docstring

以下内容添加到 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。



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5618210.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存