Skip to content

Property annotations do not show up in autoclass #7383

Closed

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

Activity

  1. added this to the 3.1.0 milestone on Mar 26, 2020
  2. eric-wieser commented on Mar 26, 2020

    @eric-wieser
    ContributorAuthor

    Patch linked above, this was fairly straightforward.

  3. modified the milestones: 3.1.0, 3.2.0 on May 23, 2020
  4. modified the milestones: 3.2.0, 3.3.0 on Jul 18, 2020
  5. pavel-kirienko commented on Aug 19, 2020

    @pavel-kirienko

    Are there plans to have this addressed in the near future? Is anybody working on this? Thanks.

  6. tk0miya commented on Aug 21, 2020

    @tk0miya
    Member

    I posted #7298 to implement it. But it was perfectly stalled. I don't have idea to go forward.

  7. modified the milestones: 3.3.0, 3.4.0 on Oct 3, 2020
  8. modified the milestones: 3.4.0, 3.5.0 on Dec 19, 2020
  9. modified the milestones: 3.5.0, 4.0.0 on Feb 4, 2021
  10. added 4 commits that reference this issue on Mar 11, 2021
    0fd252f
    87dbcd7
    75f5122
    f8e7ecf
  11. locked as resolved and limited conversation to collaborators on Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions