Issues

Issue #1444 resolved

autosummary does not create the description for descriptor attributes

Evgeny Prilepin
created an issue

For example, I want to document the following:

# MyModule.py

class D(object):
    """Descriptor class
    """

    def __get__(self, instance, owner):
        return 1

    def __set__(self, instance, value):
        pass

class A(object):
    """My Class
    """

    #: Descriptor attribute
    abc = D()

And I create the following RST file:

.. module:: MyModule

.. autoclass:: A
    :members:

    .. autosummary::

        abc

autosummary creates table with the following description for attribute abc:

int(x=0) -> int or long

But in this case I want to see:

Descriptor attribute

Comments (14)

  1. Evgeny Prilepin reporter

    I applied issue1444.patch to current sphinx v1.3a0. Your test project is ok. But on my work project is not working. I get the following error:

    Making output directory...
    Running Sphinx v1.3a0
    loading pickled environment... not yet created
    building [html]: targets for 5 source files that are out of date
    updating environment: 5 added, 0 changed, 0 removed
    reading sources... [ 20%] app_signals
    
    Exception occurred:
      File "C:\Programs\Python27_x86\lib\site-packages\docutils\statemachine.py", line 1158, in __setitem__
        raise TypeError('assigning non-ViewList to ViewList slice')
    TypeError: assigning non-ViewList to ViewList slice
    

    See attached full traceback sphinx-err-s8a91q.log.

  2. Log in to comment