我在一个 python 文件中有多个类(准确地说是 sqlalchemy 类)。我正在尝试使用 sphinx 包记录一些类。
我在某些类下放置了一些文档字符串,但最后列出了所有类,包括和不包括文档字符串。
我正在使用 autodoc:
Contents:
.. toctree::
:maxdepth: 3
.. automodule:: blog.models
:members:
我可以指定要包含哪些类的唯一方法是这样的:
.. automodule:: blog.models
:members: SomeClass, SomeClass2, .., SomeClass1001
有没有办法只添加带有文档字符串的类、函数?