Skip to content

Add validation of hinted methods on set and post initialise #300

@GDYendell

Description

@GDYendell

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions