Bugfix to remove spurious signatures from @property decorated attributes in cython code

27 views
Skip to first unread message

David Ham

unread,
Oct 10, 2013, 5:00:46 AM10/10/13
to sphin...@googlegroups.com
Imagine the following scenario. foo.pyx is a Cython module with contents as follows:

# cython: embedsignature=True
class Bar(object):
    def __init__(self):
        pass

    @property
    def myattribute(self):
        """my docstring"""

Cython will now prepend "Bar.myattribute(self)\n" to the docstring as instructed by the embedsignature directive. Currently autodoc will not strip this signature, and it ends up in the Sphinx generated documentation.

This can be solved by introducing a slightly modified DocstringSignatureMixin. I have a (short) pull request to this effect at: https://bitbucket.org/birkenfeld/sphinx/pull-request/157 . I would be most grateful if someone can find the time to consider this pull request.

Regards,

David Ham

David Ham

unread,
Mar 28, 2014, 11:00:44 AM3/28/14
to sphin...@googlegroups.com
Dear all, I was wondering if someone might find time to consider the pull-request detailed below.

Many thanks,

David Ham


--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages