Python sphinx 避免水泥配置的Sphinx格式错误

Python sphinx 避免水泥配置的Sphinx格式错误,python-sphinx,cement,Python Sphinx,Cement,我们使用Sphinx格式化Python文档,并使用cement配置CLI。不幸的是,Sphinx从concement配置中生成了大量无意义的输出 我找不到任何Sphinx指令或命令行选项来忽略它不应该格式化的水泥配置。我们正在使用sphinx2.2.0,以及sphinxapidoc选项-f-P-o 例如,Sphinx将此Python格式化 class BaseController(cement.Controller): """ Base controller for command li

我们使用
Sphinx
格式化Python文档,并使用
cement
配置CLI。不幸的是,
Sphinx
concement
配置中生成了大量无意义的输出

我找不到任何Sphinx指令或命令行选项来忽略它不应该格式化的水泥配置。我们正在使用
sphinx2.2.0
,以及
sphinxapidoc
选项
-f-P-o

例如,Sphinx将此Python格式化

class BaseController(cement.Controller):
    """ Base controller for command line application """

    class Meta:
        label = 'base'
        description = "Command line utilities for managing whole-cell model definitions"
        help = "Command line utilities for managing whole-cell model definitions"
        arguments = [
            (['-v', '--version'], dict(action='version', version=wc_lang.__version__)),
        ]
在本文件中

文档不应显示
Meta
类的内容。Python是否可以通过
Sphinx
指令进行注释来实现这一点

文档不应该显示元类的内容

我假设您有一个
automodule
指令(由sphinx apidoc生成),看起来像这样:

.. automodule:: wc_lang.__main__
   :members:
   :undoc-members:
   :show-inheritance:
嵌套的
Meta
类不包含docstring,因此由于
:undoc members:
选项,它被包括在内。sphinx apidoc添加了此选项


要从文档中排除
Meta
,请删除
:undoc成员:
。另一种方法是添加
:排除成员:Meta

该“嘈杂的文档”链接不起作用。@mzjn:谢谢您让我知道;固定了Dropbox链接上的
?raw=1
后缀。我对水泥一无所知。到底什么是“坏的”、“荒谬的”或“吵闹的”?您从水泥文档中获得的输出与此类似:。此答案有帮助吗?