Include specific special-methods in sphinx

前端 未结 5 2086
南旧
南旧 2021-02-12 15:43

I have a bunch of classes which use \"special-methods\":

class Foo(object):
   \"Foo docstring\"

   attr1 = \"Attribute!\" #: first attribute
   attr2 = \"Anoth         


        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-12 15:54

    You can add:

    :special-members:
    :exclude-members: __dict__,__weakref__
    

    To the .rst file in order to show special members, except __dict__ and __weakref__

提交回复
热议问题