loom.validator.check_abstract
Copyright 2024 Entropica Labs Pte Ltd
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
- class loom.validator.check_abstract.AbstractValidityCheck(*args, **kwargs)[source]
Bases:
ABCAbstract dataclass to store the results of a check.
- Parameters:
output (Any) – Any output that is relevant to the check. It has to have a __len__ method to be used to determine if the check is valid.
Properties
----------
valid (bool) – True if the check is valid (i.e., no issues found), False otherwise.
message (str) – A message indicating the result of the check. It will be empty if the check is valid, otherwise it will contain a message describing the issue. This must be implemented by subclasses.
- property message: str
A message indicating the result of the check. It will be empty if the check is valid, otherwise it will contain a message describing the issue.
-
output:
Any
- property valid: bool
Determine if the check passed based on the output.