As for Attributes:
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
As for Attributes:
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.
and then call this and then do the specific checks for each type (e.g. attribute access mode)
Acceptance Criteria