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

Improving formatting of functions marked with @property #5

Open
sindrehan opened this issue Sep 18, 2019 · 0 comments
Open

Improving formatting of functions marked with @property #5

sindrehan opened this issue Sep 18, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@sindrehan
Copy link

sindrehan commented Sep 18, 2019

First of all, thank you for a great project! I've used it quite successfully with portray, but when documenting a class that makes quite heavy use of the @property decorator I noticed that the docstring from the setter function is ignored by pdocs. See the example below

class Dummy:
    def __init__(self):
        self._foo = 1
        self._bar = 2

    @property
    def foo(self):
        """Get the value of foo"""
        return self._foo

    @foo.setter
    def foo(self, value):
        """This string is ignored"""
        self._foo = value

    @property
    def bar(self):
        """Get the value of bar"""
        return self._bar

    @bar.setter
    def bar(self, value):
        """This is also ignored"""
        self._bar = value

pdocs_example

If possible it would be great to separate the property functions into their own section, with items in the index, etc, similiar to how methods are displayed now.

@timothycrosley timothycrosley added the enhancement New feature or request label Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants