在 sphinx 自动类输出中排除 __init__ 参数

Luk*_*thy 2 python python-sphinx

sphinx autoclass 指令生成的输出将 __init__ 的参数添加到类名的末尾。有什么办法告诉sphinx排除它们吗?我需要记录不应显式构造的类,因此 __init__ 参数是应从文档中省略的内部实现细节

Luk*_*thy 6

要回答我自己的问题,请将 () 添加到类名中,例如

.. autoclass:: MyClass()
Run Code Online (Sandbox Code Playgroud)