Skip to content

Attributes on classes not displayed when using both properties and normal attributes  #12

Closed
@charris

Description

@charris

Copied from numpy/numpy#421.

When documenting at the same time properties and normal attributes, nothing is rendered at all.

e.g. in the example below:

class ExampleClass1
    """
    Attributes
    ----------
    prop1
    attr2 : string 
        Some string attribute. 
    """
    @property 
    def prop1(self)
           """ Property 1 docsting """
           pass

The docstring is transformed in the following reST (docscrape_sphinx.py:57,strmember_list) :

.. rubric:: Attributes

.. autosummary::
   :toctree:

   prop1
==============  ================  ==========
        attr2             string  Some string attribute
==============  ================  ==========

but this is not correct as a newline is missing after "prop1":

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions