Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
charris opened this issue Feb 16, 2014 · 3 comments

Comments

@charris
Copy link
Member

charris commented Feb 16, 2014

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":

@partofthething
Copy link

Affects me too. So, is adding a \n after prop1 confirmed to fix it? If so who wants to patch the code?

@jnothman
Copy link
Member

I think this must have been previously fixed and has been changed again in #106. It is tested in https://github.com/numpy/numpydoc/blob/f09abc8/numpydoc/tests/test_docscrape.py#L898 rendering as https://github.com/numpy/numpydoc/blob/f09abc8/numpydoc/tests/test_docscrape.py#L1028.

This should be closed.

@jnothman
Copy link
Member

I'm closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants