Skip to content

BUG: Numpydoc doesn't render attributes decorated with cached_property in the Attributes section #432

Closed
@tirthasheshpatel

Description

@tirthasheshpatel

Numpydoc doesn't render attributes decorated with cached_property in the Attribute section. I think it is due to this line:

or isinstance(func, property)

which can be changed to:

from functools import cached_property

...


                    func is None
                    or isinstance(func, property)
                    or isinstance(func, cached_property)
                    or inspect.isdatadescriptor(func)

to fix the issue.

xref scipy/scipy#16002

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions