Problems with autodoc and explicitly specified instance attributes

前端 未结 1 1925
春和景丽
春和景丽 2021-01-20 00:40

I wrote a python class and I made the documentation with sphinx. For example, the class looks like :

class Aclass(object):
    \"\"\" my class \"\"\"

    de         


        
相关标签:
1条回答
  • 2021-01-20 01:17

    There is a bug report about this (created 2012-03-30; still open 2015-12-12): https://github.com/sphinx-doc/sphinx/issues/904.

    1. The problem with an explicit :members: list containing instance attributes was fixed in this commit (included in Sphinx 1.2b1).

    2. As mentioned in a comment (from Jon Waltman), there is an undocumented autoinstanceattribute directive.

      Using .. autoinstanceattribute:: aclass.Aclass.a does work (tested with Sphinx 1.1.3 and 1.2b1).

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