:synopsis: not working in Sphinx automodule(简介:在Sphinx自动模块中不工作)
本文介绍了简介:在Sphinx自动模块中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Sphinx,我真的很喜欢它,但它不能提取模块概要。没有错误或任何事情,只是简单的..。没什么。这是我尝试自动创建文档的模块:
# vim: set fileencoding=utf-8 :
"""
.. module:: CONF
:synopsis: Configuration module, tells where data files are.
.. moduleauthor:: Mr Anderson <mr@matrix.com>
"""
这是REST索引文件中的Sphinx指令:
.. automodule:: CONF
:synopsis:
我从狮身人面像那里得到了各种各样的其他奇妙的东西,所以它对我来说通常不是坏的。我得到的唯一可疑的东西是:SEVERE: Duplicate ID: "module-CONF"
。一些谷歌搜索让我相信这个错误是相当"正常"的?
推荐答案
遵循Bonlenfum的解决方案,下面是一个(甚至更简洁)的示例,它打印模块索引和文档字符串中的模块指令:
"""
.. module:: CONF
:synopsis: written in module index..................................newlines are
automatically handled (still, mind the spacing)
:platform: Windows
.. moduleauthor:: Mr Anderson <mr@matrix.com>
:synopsis: this is written in the docstrings..........................newlines are handled
automatically handled (mind spacing) or I can force newlines with
a newline character.
"""
我添加了"..."添加空格,以使行足够长,使狮身人面像可以自动在换行符上继续。模块作者仅显示在单据字符串中(不显示索引)。
这在Sphinx 1.2和read the docs主题中运行良好
这篇关于简介:在Sphinx自动模块中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:简介:在Sphinx自动模块中不工作


基础教程推荐
猜你喜欢
- 合并具有多索引的两个数据帧 2022-01-01
- 将 YAML 文件转换为 python dict 2022-01-01
- 如何在Python中绘制多元函数? 2022-01-01
- 症状类型错误:无法确定关系的真值 2022-01-01
- 如何在 Python 中检测文件是否为二进制(非文本)文 2022-01-01
- 哪些 Python 包提供独立的事件系统? 2022-01-01
- 使用Python匹配Stata加权xtil命令的确定方法? 2022-01-01
- 使 Python 脚本在 Windows 上运行而不指定“.py";延期 2022-01-01
- 使用 Google App Engine (Python) 将文件上传到 Google Cloud Storage 2022-01-01
- Python 的 List 是如何实现的? 2022-01-01