[英]Exclude static members from documentation in Sphinx autodoc extension
I am using the Sphinx autodoc extension for documenting my Python project.我正在使用 Sphinx autodoc 扩展来记录我的 Python 项目。 I have the following in my docs for a class:我的文档中有以下内容:
.. automodule:: ClassName
:members:
:undoc-members:
:show-inheritance:
The class I am documenting has static members which I don't want to include in documentation.我正在记录的类具有我不想包含在文档中的静态成员。 Is there any way to do so?有什么办法吗?
See the documentation of the option :exclude-members:
under .. automodule::
for usage.有关用法,请参阅:exclude-members:
选项的文档,位于.. automodule::
下。
You need to add the option :exclude-members: member1, member2
您需要添加选项:exclude-members: member1, member2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.