Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplication of class attributes #2340

Open
matrss opened this issue May 6, 2024 · 0 comments
Open

Remove duplication of class attributes #2340

matrss opened this issue May 6, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@matrss
Copy link
Collaborator

matrss commented May 6, 2024

This came up in #2326. There are some locations in which attributes of classes are duplicated in a way in which it is easy for them to become out-of-sync. For example, there is an active_op_id attribute in multiple places (https://github.com/search?q=repo%3AOpen-MSS%2FMSS+active_op_id&type=code) and there is no clear way in which they are all kept up-to-date, even though there can only ever be one.

The active flighttrack has the same issue, it exists as an attribute in multiple locations (https://github.com/search?q=repo%3AOpen-MSS%2FMSS+%22self.active_flight_track+%3D%22+OR+%22self.active_flighttrack+%3D%22+OR+%22self.activeflighttrack+%3D%22&type=code) while I am pretty sure that there should only be one active at a time.

Similarily, there are locations where additional references to attributes of another object are created, which really should be accessed directly through the containing object (e.g. here: https://github.com/search?q=repo%3AOpen-MSS%2FMSS+mainwindow_signal&type=code).

I think we need to check the code for duplication of state that really should have only one source of truth.

@matrss matrss added the enhancement New feature or request label May 6, 2024
@matrss matrss added this to the 10.0.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant