Python Sphinx Autosummary: Automated listing of member functions

后端 未结 3 1045
忘了有多久
忘了有多久 2020-12-09 17:46

How can I tell the autosummary extension not to only list a single class but also all the class\' members?

If I use:

.. autosummary::

    MyClass
         


        
3条回答
  •  庸人自扰
    2020-12-09 18:15

    You have to type out the class members as well

    .. autosummary::
    
        MyClass
        MyClass.doA
        MyClass.doB
    

    I like to split it up with titles or rubrics like

    .. rubric:: Classes
    
    .. autosummary::
    
        MyClass
    
    
    .. rubric:: MyClass Members
    
    .. autosummary::
    
        MyClass.doA
        MyClass.doB
    

提交回复
热议问题