Skip to content

pyreverse tracking and drawing class data member relations in addition to instance data members (maybe enable/disable option). fixes attrs.org #9407

Open
@txemi

Description

@txemi

Current problem

I would like to suggest pyreverse tracking class data members in adition to instance data members and draw them on graphs. It may be an option (enable/disable) for people not wanting this.

Example of use case: I am using pyreverse for drawing charts on python dependencies, unfortunately attrs.org class data members are not recognized by pyreverse as they are not declared as expected (instance data members are declared as class data members first on attrs.org) and real existing relations do not appear on graphs. It is a pity not enjoying pyreverse on attrs.org classes. Lot of people use this attrs.org, useful for clearness, compactness and convention.

It does not seem difficult to implement as the only difference is that declared attrs.org attributes are class members instead instance members, having annotated type declarations they would have similar parsing. It also seems to me that parsing and drawing class attribute or data member relations would be useful in pyreverse even not using attrs.org on more use cases.

Thanks,

Desired solution

Someone proposes a patch of find workaround.

Additional context

Link to same issue on attrs site:
python-attrs/attrs#1231

Metadata

Metadata

Assignees

No one assigned

    Labels

    Lib specific 💅This affect the code from a particular libraryNeeds investigation 🔬A bug or crash where it's not immediately obvious what is happenningNeeds triage 📥Just created, needs acknowledgment, triage, and proper labellingpyreverseRelated to pyreverse component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions