@@ -141,7 +141,7 @@ def _diff_report(
141141 print (f"Reduced memory by at least: { round (mem_change ,3 )} MB (-{ mem_perc } %)\n " )
142142
143143
144- def _print_cleaning_details (arg0 , arg1 , arg2 , arg3 ):
144+ def _print_cleaning_details (arg0 , arg1 , arg2 , arg3 ) -> None :
145145 print (arg0 )
146146 print (f"dtypes:\n { arg1 .dtypes .value_counts ()} " )
147147 print (f"\n Number of rows: { str (arg1 .shape [0 ]).rjust (8 )} " )
@@ -232,49 +232,49 @@ def _missing_vals(data: pd.DataFrame) -> MVResult:
232232 }
233233
234234
235- def _validate_input_bool (value : bool , desc ):
235+ def _validate_input_bool (value : bool , desc ) -> None :
236236 if not isinstance (value , bool ):
237237 raise TypeError (
238238 f"Input value for '{ desc } ' is { type (value )} but should be a boolean."
239239 )
240240
241241
242- def _validate_input_int (value : int , desc ):
242+ def _validate_input_int (value : int , desc ) -> None :
243243 if not isinstance (value , int ):
244244 raise TypeError (
245245 f"Input value for '{ desc } ' is { type (value )} but should be an integer."
246246 )
247247
248248
249- def _validate_input_range (value , desc , lower , upper ):
249+ def _validate_input_range (value , desc , lower , upper ) -> None :
250250 if value < lower or value > upper :
251251 raise ValueError (
252252 f"'{ desc } ' = { value } but should be { lower } <= '{ desc } ' <= { upper } ."
253253 )
254254
255255
256- def _validate_input_smaller (value1 , value2 , desc ):
256+ def _validate_input_smaller (value1 , value2 , desc ) -> None :
257257 if value1 > value2 :
258258 raise ValueError (
259259 f"The first input for '{ desc } ' should be smaller or equal to the second."
260260 )
261261
262262
263- def _validate_input_sum_smaller (limit , desc , * args ):
263+ def _validate_input_sum_smaller (limit , desc , * args ) -> None :
264264 if sum (args ) > limit :
265265 raise ValueError (
266266 f"The sum of input values for '{ desc } ' should be less or equal to { limit } ."
267267 )
268268
269269
270- def _validate_input_sum_larger (limit , desc , * args ):
270+ def _validate_input_sum_larger (limit , desc , * args ) -> None :
271271 if sum (args ) < limit :
272272 raise ValueError (
273273 f"The sum of input values for '{ desc } ' should be larger/equal to { limit } ."
274274 )
275275
276276
277- def _validate_input_num_data (value : pd .DataFrame , desc ):
277+ def _validate_input_num_data (value : pd .DataFrame , desc ) -> None :
278278 if value .select_dtypes (include = ["number" ]).empty :
279279 raise TypeError (
280280 f"Input value for '{ desc } ' should contain at least one numerical column."
0 commit comments