ImperialCollegeLondon / FINESSE

A graphical user interface for controlling and monitoring an interferometer device
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

`AbstractDevice` should remove from `_device_parameters` any which don't appear in child class's constructor #564

Closed alexdewar closed 7 months ago

alexdewar commented 7 months ago

It is possible that child classes may not have a device parameter which their parent does, in which case that parameter will not be an argument in the child's __init__. This currently doesn't work, however, because the code assumes that children always have the same device parameters as their parents (plus, potentially, some more). We should check for this condition and remove the relevant device params when creating child classes.