Skip to content

cached_property does not show typehint #9487

@SwampFalc

Description

@SwampFalc

Describe the bug

When documenting a functools.cache_property, the type hint is not shown.

How to Reproduce

I have a class that has a number of functools.cached_property methods.

Both through :members: as well as through autoproperty, I am unable to have them show their type hint.

To doublecheck, I turned some of them into regular property methods, and their type hint does get shown.

Expected behavior

functools.cached_property methods should show their typehint.

Your project

x-special/nautilus-clipboard copy file:///home/ldt/Projects/mde3/exportit/sphinx.zip

Screenshots

image

At the top, I changed it to a regular property, at the bottom I left it as a functools.cached_property.

OS

Linux Ubuntu 20.0.4

Python version

3.9.6

Sphinx version

4.1.1

Sphinx extensions

autodoc

Extra tools

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions