Sphinx autodoc incorrectly assigning value 'None' to class attributes, when Traits are used

强颜欢笑 提交于 2019-12-13 01:06:18

问题


I'm seeing Python class attributes incorrectly assigned the value, None, in Sphinx autodoc generated documentation, when Traits are used.

I have a simple test case with instructions for observing the error, here:
https://github.com/capn-freako/SphinxTest

It shows that:

  1. When object is used as the superclass, and int is the class attribute's type, the generated documentation is as expected.
  2. When HasTraits is used as the superclass and Int is the class attribute's type, the generated documentation is incorrect.

来源:https://stackoverflow.com/questions/47932680/sphinx-autodoc-incorrectly-assigning-value-none-to-class-attributes-when-trai

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!