-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
As for Attributes:
- https://github.com/DiamondLightSource/FastCS/blob/main/src/fastcs/controllers/base_controller.py#L173
- https://github.com/DiamondLightSource/FastCS/blob/main/src/fastcs/controllers/base_controller.py#L248
We should add a helper method for checking for name clashes now because there will be a matrix of 3 things to check: attrbutes, methods and controllers each of which will have to check for clashes with itself and the other two.
def _check_for_name_clash(name: str):
if name in self.__attributes:
raise ...
if name in self.__methods:
raise ...
if name in self.__sub_controllers:
raise ...and then call this and then do the specific checks for each type (e.g. attribute access mode)
Acceptance Criteria
- Hinted methods raise an exception if they are not introspected
- Assigning methods fails if an attribute, sub controller, or method of the same name already exists
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels