Skip to content

[MAINT] Remove redundancy in Abtract Qt Classes #10779

@alexrockhill

Description

@alexrockhill

E.g. here https://github.com/mne-tools/mne-python/blob/main/mne/viz/backends/_abstract.py#L491. Why do methods of a Qt abstract object have the name of the object in them? i.e.

toolbar = _QtToolBar(...)
toolbar._tool_bar_add_button(...)

seems very redundant when

toolbar = _QtToolBar(...)
toolbar._add_button(...)

seems like it will do and will be much easier to maintain.

Maybe @larsoner, you have thoughts on this/a good reason for why it is this way?

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