从SPHINX函数中删除包和模块名称 [英] Remove package and module name from sphinx function
本文介绍了从SPHINX函数中删除包和模块名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以从Shinx文档中删除包和/或模块名称?
示例:如果在模块foo.bar内存在一个名为waa的函数,则第一个代码
.. automodule:: foo.bar
:members:
将生成
foo.bar.waa()
我想输出
waa()
推荐答案
您可以将文件conf.py
中的add_module_names
更改为False
:
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = False
则foo.bar.my_function()
将显示为my_function()
。
这篇关于从SPHINX函数中删除包和模块名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文