Skip to content

autoattribute could not create document for __slots__ attributes correctly #8480

@tk0miya

Description

@tk0miya

Describe the bug
autoattribute could not create document for slots attributes correctly

To Reproduce

# example.py
class Foo:
    __slots__ = {'attr': 'docstring'}
# index.rst
.. autoattribute:: example.Foo.attr

The build succeeded. But docstring is not shown.

Expected behavior
Document should be generated successfully like when I used automodule.

Your project
N/A

Screenshots
N/A

Environment info

  • OS: Mac
  • Python version: 3.9.0
  • Sphinx version: HEAD of 3.x
  • Sphinx extensions: sphinx.ext.autodoc
  • Extra tools: Nothing

Additional context
Nothing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions