Skip to content

Extend Factory check_definition method to include a check_instance method #98

Description

@timsavage

Currently, factories include checks to confirm settings are correct, this can be extended to doing instance checks, however, this requires boilerplate code that could be included in the core library.

eg:

def check_definition(self, Dict[str, Dict[str, Any]], name: str, **_):
    messages = super().check_definition(check_definitions, name, **_)
    if any(message.level >= ERROR for message in messages):
        return messages

    messages.extend(self.check_instance(check_definitions, name, **_))
    return messages

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    💡 enhancementThis issue/pr has been reviewed and accepted as an enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions