小编fab*_*ian的帖子

Sphinx:“警告:重复的对象描述”的原因是什么?

我收到多个警告,例如:

警告:pyfar.signal.TimeData.times 的重复对象描述,pyfar.classes_audio 中的其他实例,对其中之一使用 :noindex:

但想不通为什么?有人建议我可能在不同的第一个文件中两次包含同一个对象。但我认为情况并非如此。

我尝试根据原始包创建一个最小的工作示例(https://github.com/pyfar/pyfar/tree/develop/docs):

获取代码

git clone https://github.com/f-brinkmann/pyfar_sphinx_test.git pyfar_sphinx_test
cd pyfar_sphinx_test
Run Code Online (Sandbox Code Playgroud)

制作虚拟环境

conda create --name sphinx_test python<3.9
conda activate sphinx_test
pip install -r requirements_dev.txt
pip install -e .
Run Code Online (Sandbox Code Playgroud)

构建文档

cd docs
make clean
make html
Run Code Online (Sandbox Code Playgroud)

产量

Running Sphinx v3.5.3
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, …
Run Code Online (Sandbox Code Playgroud)

python python-sphinx autodoc sphinx-napoleon

6
推荐指数
1
解决办法
4620
查看次数

标签 统计

autodoc ×1

python ×1

python-sphinx ×1

sphinx-napoleon ×1