Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Ensure we're not holding state in class variables #810

Closed
DominicOram opened this issue Jul 18, 2023 · 1 comment · Fixed by #814
Closed

Ensure we're not holding state in class variables #810

DominicOram opened this issue Jul 18, 2023 · 1 comment · Fixed by #814
Assignees

Comments

@DominicOram
Copy link
Collaborator

See issue fixed in b9d46d5. We should go through the code and ensure we're not doing the same elsewhere, this is particularly a problem where we're e.g. appending but we should fix it more generally too

@DominicOram DominicOram self-assigned this Jul 18, 2023
@DominicOram
Copy link
Collaborator Author

DominicOram commented Jul 18, 2023

Going through the classes:

  • For dataclasses and pydantic models this isn't an issue, instance variables will be created to override the class variables
  • BlueskyRunner is a singleton so it's fair to keep class variables
  • DCGIDFilter is a singleton
  • FGSComposite is a singleton
  • ophyd Device classes handle this with the Component mechanism

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant