当我在启用sphinx的情况下运行make html时,函数的docstring并不是实际的docstring。
我在我的conf.py文件中配置了路径
import os
import sys
sys.path.insert(0, os.path.abspath("../../")) # Where the module is located自动文档的输出:

实际的docstring:

我的.rst文件的内容:
Subreddit
=========================================
.. autoclass:: redditeasy.Subreddit
:members:autodoc的输出是过时的。我多次更改了docstring,但是autodoc只是继续使用旧版本。
我多次清除缓存和卸载autodoc,但它们都没有做任何事情。这一切为什么要发生?如何更新文档字符串?
发布于 2022-03-06 12:07:07
我解决了这个问题。这是一个“没有模块找到”的错误。
https://stackoverflow.com/questions/71285188
复制相似问题