这是从sphinx doc中删除软件包和/或模块名称的任何方法?
示例:如果在模块foo.bar中存在名为waa的函数,则为第一个代码
.. automodule:: foo.bar
:members:
会产生
foo.bar.waa()
我想输出
waa()
您可以更改add_module_names
到False
该文件中conf.py
:
# 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()
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句