How do I document members in specific sections using Sphinx?

后端 未结 1 537
萌比男神i
萌比男神i 2021-01-07 10:40

I\'m struggling to figure out how to place the documentation for specific members of my Python class in specific sections of my Sphinx documentation, ideally while auto-docu

1条回答
  •  暖寄归人
    2021-01-07 11:04

    This works:

    .. currentmodule:: my.module
    
    .. automethod:: MyClass.funky
    

    You could skip .. currentmodule:: and do it like this:

    .. automethod:: my.module.MyClass.funky
    

    A third option:

    .. currentmodule:: my.module
    
    .. autoclass:: MyClass   
    
       .. automethod:: funky
    

    0 讨论(0)
提交回复
热议问题