Sphinx autodoc incorrectly assigning value 'No

2019-08-02 02:46发布

问题:

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.