如何解决自定义模块名称不显示与自动分类
我正在使用 {
"sap.ui": {
"fullWidth": true
}
}
构建文档,并且我的 .rst 文件之一具有以下内容:
sphinx
构建成功,但请查看附加的屏幕截图:
问题在于 ############
Internal API
############
.. autoclass:: Individual::Individual
:noindex:
:special-members:
:exclude-members: __weakref__
:member-order: bysource
:members:
.. autoclass:: exceptions::Error
:noindex:
:special-members:
:exclude-members: __weakref__
:member-order: bysource
:members:
.. autoclass:: exceptions::IncorrectValueError
:noindex:
:special-members:
:exclude-members: __weakref__
:member-order: bysource
:members:
类正确地以 Individual
模块名称作为前缀,而位于 exceptions.py 中的后两个类则没有。为什么会发生这种情况,我该如何解决?
编辑:我在下面添加了 Individual
的内容(没有不必要的部分):
conf.py
以及import os
import sys
import sphinx_rtd_theme
sys.path.insert(0,os.path.abspath('../moranpycess'))
extensions = [
'sphinx.ext.napoleon','sphinx_rtd_theme','recommonmark',]
templates_path = ['_templates']
exclude_patterns = ['_build','Thumbs.db','.DS_Store']
html_theme = 'sphinx_rtd_theme'
html_show_sourcelink = False
html_static_path = ['_static']
的内容
exceptions.py
解决方法
这确实是 sphinx
中保留名称的特例:
https://github.com/sphinx-doc/sphinx/issues/9280
它将在新版本中修复。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。