Skip to content

Using __slots__ hides class variables #168

Closed
@Nodd

Description

@Nodd

If __slots__ is declared in a class, it takes precedence over everything, including class methods and variables. However __slots__ has an effect on instance attributes only, not class attributes.

The relevant lines is https://github.com/astropy/sphinx-automodapi/blob/0aad86aa90bcd7ab5b3004b732e21a3bd3d9de70/sphinx_automodapi/automodsumm.py#LL534C33-L549C33. Maybe names should also be filled with getattr(type(obj), '__dict__').keys() or something like that ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions