@@ -129,7 +129,7 @@ def evaluate(self, *args, **kwargs) -> Tuple[Dict, bool]:
129129
130130 @staticmethod
131131 @abstractmethod
132- def validate (** kwargs ) -> None :
132+ def _validate (** kwargs ) -> None :
133133 """Method to validate arguments that raises proper exceptions."""
134134
135135 @staticmethod
@@ -142,13 +142,13 @@ class ExactMatchType(CheckType):
142142 """Exact Match class docstring."""
143143
144144 @staticmethod
145- def validate (** kwargs ) -> None :
145+ def _validate (** kwargs ) -> None :
146146 """Method to validate arguments."""
147147 # reference_data = getattr(kwargs, "reference_data")
148148
149149 def evaluate (self , value_to_compare : Any , reference_data : Any ) -> Tuple [Dict , bool ]:
150150 """Returns the difference between values and the boolean."""
151- self .validate (reference_data = reference_data )
151+ self ._validate (reference_data = reference_data )
152152 evaluation_result = diff_generator (reference_data , value_to_compare )
153153 return self .result (evaluation_result )
154154
@@ -157,7 +157,7 @@ class ToleranceType(CheckType):
157157 """Tolerance class docstring."""
158158
159159 @staticmethod
160- def validate (** kwargs ) -> None :
160+ def _validate (** kwargs ) -> None :
161161 """Method to validate arguments."""
162162 # reference_data = getattr(kwargs, "reference_data")
163163 tolerance = kwargs .get ("tolerance" )
@@ -170,7 +170,7 @@ def validate(**kwargs) -> None:
170170
171171 def evaluate (self , value_to_compare : Any , reference_data : Any , tolerance : int ) -> Tuple [Dict , bool ]:
172172 """Returns the difference between values and the boolean. Overwrites method in base class."""
173- self .validate (reference_data = reference_data , tolerance = tolerance )
173+ self ._validate (reference_data = reference_data , tolerance = tolerance )
174174 evaluation_result = diff_generator (reference_data , value_to_compare )
175175 self ._remove_within_tolerance (evaluation_result , tolerance )
176176 return self .result (evaluation_result )
@@ -206,7 +206,7 @@ class ParameterMatchType(CheckType):
206206 """Parameter Match class implementation."""
207207
208208 @staticmethod
209- def validate (** kwargs ) -> None :
209+ def _validate (** kwargs ) -> None :
210210 """Method to validate arguments."""
211211 mode_options = ["match" , "no-match" ]
212212 params = kwargs .get ("params" )
@@ -225,7 +225,7 @@ def validate(**kwargs) -> None:
225225
226226 def evaluate (self , value_to_compare : Mapping , params : Dict , mode : str ) -> Tuple [Dict , bool ]:
227227 """Parameter Match evaluator implementation."""
228- self .validate (params = params , mode = mode )
228+ self ._validate (params = params , mode = mode )
229229 # TODO: we don't use the mode?
230230 evaluation_result = parameter_evaluator (value_to_compare , params , mode )
231231 return self .result (evaluation_result )
@@ -235,7 +235,7 @@ class RegexType(CheckType):
235235 """Regex Match class implementation."""
236236
237237 @staticmethod
238- def validate (** kwargs ) -> None :
238+ def _validate (** kwargs ) -> None :
239239 """Method to validate arguments."""
240240 mode_options = ["match" , "no-match" ]
241241 regex = kwargs .get ("regex" )
@@ -252,7 +252,7 @@ def validate(**kwargs) -> None:
252252
253253 def evaluate (self , value_to_compare : Mapping , regex : str , mode : str ) -> Tuple [Mapping , bool ]:
254254 """Regex Match evaluator implementation."""
255- self .validate (regex = regex , mode = mode )
255+ self ._validate (regex = regex , mode = mode )
256256 evaluation_result = regex_evaluator (value_to_compare , regex , mode )
257257 return self .result (evaluation_result )
258258
@@ -261,7 +261,7 @@ class OperatorType(CheckType):
261261 """Operator class implementation."""
262262
263263 @staticmethod
264- def validate (** kwargs ) -> None :
264+ def _validate (** kwargs ) -> None :
265265 """Validate operator parameters."""
266266 in_operators = ("is-in" , "not-in" , "in-range" , "not-range" )
267267 bool_operators = ("all-same" ,)
@@ -334,7 +334,7 @@ def validate(**kwargs) -> None:
334334
335335 def evaluate (self , value_to_compare : Any , params : Any ) -> Tuple [Dict , bool ]:
336336 """Operator evaluator implementation."""
337- self .validate (** params )
337+ self ._validate (** params )
338338 # For name consistency.
339339 reference_data = params
340340 evaluation_result = operator_evaluator (reference_data ["params" ], value_to_compare )
0 commit comments