【发布时间】:2022-06-18 20:56:31
【问题描述】:
我正在使用 sphinx 来自动记录一个类。构造函数看起来像这样:
from PyQt6.QtCore import QEasingCurve
class MyClass:
def __init__(animationType=QEasingCurve.Type.OutCubic):
# constructor function
当我为这个类生成文档时,animationType 参数记录如下:
我不希望它像这样只指定一半的路径。我想让它说animationType=PyQt6.QtCore.Qt.QEasingCurve.Type。我该怎么做?
这是我的 reStructuredText 源文件的样子:
MyClass
=======
.. automodule:: MyModule.MyClass
:members:
:undoc-members:
:show-inheritance:
【问题讨论】:
标签: python python-sphinx restructuredtext autodoc