Issues

Issue #344 open

autosummary -- does not understand module level datas/attributes

ciantic
created an issue

Let's take following code: {{{

!python

"""Submodule""" class SomeOther(object): """Some other class""" pass

ATTRIBUTE_OF_SUBMODULE = True """This is attribute of submodule, of type boolean"""

OTHER_ATTRIBUTE_OF_SUBMODULE = SomeOther() """This is other attribute of type :class:SomeClass"""

}}}

Now if I do autosummary for the module like this: {{{ .. automodule:: submodule

.. autosummary::

ATTRIBUTE_OF_SUBMODULE
OTHER_ATTRIBUTE_OF_SUBMODULE
SomeOther

}}}

Autosummary table contains incorrect entries for attributes/datas of module:

{{{ ATTRIBUTE_OF_SUBMODULE bool(x) -> bool OTHER_ATTRIBUTE_OF_SUBMODULE Some other class }}}

Underlying autodocumentor in other hand works correctly, since directive autodata gets the documentation string from attributes/datas of module correctly.

Comments (6)

  1. Log in to comment