i_rule
Module for IRule interface
!!! interfaces IRule
IRule (ABC)
Interface for rules
Source code in rules/i_rule.py
class IRule(ABC):
"""Interface for rules"""
@property
@abstractmethod
def name(self) -> str:
"""Name of the rule"""
@property
@abstractmethod
def description(self) -> str:
"""Description of the rule"""
@property
@abstractmethod
def input_variable_names(self) -> List[str]:
"""Names of the input variable"""
@property
@abstractmethod
def output_variable_name(self) -> str:
"""Name of the output variable"""
@abstractmethod
def validate(self, logger: ILogger) -> bool:
"""Validates if the rule is valid
Returns:
bool: wether the rule is valid
"""
description: str
property
readonly
Description of the rule
input_variable_names: List[str]
property
readonly
Names of the input variable
name: str
property
readonly
Name of the rule
output_variable_name: str
property
readonly
Name of the output variable
validate(self, logger)
Validates if the rule is valid
Returns:
Type | Description |
---|---|
bool |
wether the rule is valid |
Source code in rules/i_rule.py
@abstractmethod
def validate(self, logger: ILogger) -> bool:
"""Validates if the rule is valid
Returns:
bool: wether the rule is valid
"""