oro*_*ome 5 python documentation-generation python-sphinx
我有一些模块级变量具有很长且无趣的值,我想从自动生成的文档中排除这些值。有没有办法做到这一点?
例如,在我的 Python 源代码中,我有类似的东西
#:This is a variable with a log value.
long_variable = "Some really long value that is not really of interest and just kind of gets in the way of reading and understanding what's going on."
Run Code Online (Sandbox Code Playgroud)
在我的 Sphinx 源中,我有
.. automodule:: the_module
:members:
Run Code Online (Sandbox Code Playgroud)
我希望文档省略变量值。
如何省略 Sphinx 上的变量值?有没有办法在 Python 源代码中为特定变量执行此操作;我可以在 Sphinx 源代码中为整个模块或单个变量执行此操作吗?