Skip to content

Property annotations do not show up in autoclassΒ #7383

@eric-wieser

Description

@eric-wieser

The following code renders the annotation on the method but not the property:

class Foo:
    @property
    def prop(self) -> int:
        """ the prop """
    def get_prop(self) -> int:
        """ get the prop """
.. autoclass:: Foo
    :members:

Expected output:

Foo
    property prop -> int
        the prop

    get_prop() -> int
        get the prop

actual output

Foo
    property prop
        the prop

    get_prop() -> int
        get the prop

Environment info

  • OS: Win
  • Python version: 3.8
  • Sphinx version: 3.0.0b1
  • Sphinx extensions: sphinx.ext.autodoc

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions