问题
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:
- When
objectis used as the superclass, andintis the class attribute's type, the generated documentation is as expected. - When
HasTraitsis used as the superclass andIntis 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