Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Factory check_definition method to include a check_instance method #98

Open
timsavage opened this issue Feb 1, 2021 · 0 comments
Labels
💡 enhancement This issue/pr has been reviewed and accepted as an enhancement

Comments

@timsavage
Copy link
Collaborator

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

@timsavage timsavage added the 💡 enhancement This issue/pr has been reviewed and accepted as an enhancement label Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement This issue/pr has been reviewed and accepted as an enhancement
Projects
None yet
Development

No branches or pull requests

1 participant