@@ -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 (* args ) -> None :
133133 """Method to validate arguments that raises proper exceptions."""
134134
135135 @staticmethod
@@ -141,13 +141,13 @@ def result(evaluation_result) -> Tuple[Dict, bool]:
141141class ExactMatchType (CheckType ):
142142 """Exact Match class docstring."""
143143
144- def _validate (referece_data ):
144+ @staticmethod
145+ def _validate (reference_data ):
145146 # No need for _validate method as exact-match does not take any specific arguments.
146147 pass
147148
148149 def evaluate (self , value_to_compare : Any , reference_data : Any ) -> Tuple [Dict , bool ]: # type: ignore[override]
149150 """Returns the difference between values and the boolean."""
150-
151151 evaluation_result = diff_generator (reference_data , value_to_compare )
152152 return self .result (evaluation_result )
153153
@@ -156,7 +156,7 @@ class ToleranceType(CheckType):
156156 """Tolerance class docstring."""
157157
158158 @staticmethod
159- def _validate (tolerance ) -> None :
159+ def _validate (tolerance ) -> None : # type: ignore[override]
160160 """Method to validate arguments."""
161161 # reference_data = getattr(kwargs, "reference_data")
162162 if not tolerance :
@@ -204,7 +204,7 @@ class ParameterMatchType(CheckType):
204204 """Parameter Match class implementation."""
205205
206206 @staticmethod
207- def _validate (params , mode ) -> None :
207+ def _validate (params , mode ) -> None : # type: ignore[override]
208208 """Method to validate arguments."""
209209 mode_options = ["match" , "no-match" ]
210210 if not params :
@@ -231,7 +231,7 @@ class RegexType(CheckType):
231231 """Regex Match class implementation."""
232232
233233 @staticmethod
234- def _validate (regex , mode ) -> None :
234+ def _validate (regex , mode ) -> None : # type: ignore[override]
235235 """Method to validate arguments."""
236236 mode_options = ["match" , "no-match" ]
237237 if not regex :
@@ -255,7 +255,7 @@ class OperatorType(CheckType):
255255 """Operator class implementation."""
256256
257257 @staticmethod
258- def _validate (params ) -> None :
258+ def _validate (params ) -> None : # type: ignore[override]
259259 """Validate operator parameters."""
260260 in_operators = ("is-in" , "not-in" , "in-range" , "not-range" )
261261 bool_operators = ("all-same" ,)
@@ -273,8 +273,8 @@ def _validate(params) -> None:
273273 if not params or list (params .keys ())[0 ] != "params" :
274274 raise ValueError (f"'params' argument must be provided. You have: { list (params .keys ())[0 ]} ." )
275275
276- params_key = params .get ("mode" )
277- params_value = params .get ("operator_data" )
276+ params_key = params .get ("params" , {}). get ( " mode" )
277+ params_value = params .get ("params" , {}). get ( " operator_data" )
278278
279279 if not params_key or not params_value :
280280 raise ValueError (
0 commit comments