4040from popmon .hist .hist_utils import COMMON_HIST_TYPES , is_numeric
4141
4242
43- def hist_compare (row , hist_name1 = "" , hist_name2 = "" ):
43+ def hist_compare (row , hist_name1 : str = "" , hist_name2 : str = "" ):
4444 """Function to compare two histograms
4545
4646 Apply statistical tests to compare two input histograms, such as:
@@ -107,11 +107,11 @@ def __init__(
107107 read_key ,
108108 store_key ,
109109 assign_to_key = None ,
110- hist_col = "histogram" ,
111- suffix = "comp" ,
110+ hist_col : str = "histogram" ,
111+ suffix : str = "comp" ,
112112 * args ,
113113 ** kwargs ,
114- ):
114+ ) -> None :
115115 """Initialize an instance of RollingHistComparer.
116116
117117 :param func_hist_collector: histogram collection function
@@ -160,10 +160,10 @@ def __init__(
160160 read_key ,
161161 store_key ,
162162 window ,
163- shift = 1 ,
164- hist_col = "histogram" ,
165- suffix = "roll" ,
166- ):
163+ shift : int = 1 ,
164+ hist_col : str = "histogram" ,
165+ suffix : str = "roll" ,
166+ ) -> None :
167167 """Initialize an instance of RollingHistComparer.
168168
169169 :param str read_key: key of input data to read from data store
@@ -201,9 +201,9 @@ def __init__(
201201 self ,
202202 read_key ,
203203 store_key ,
204- hist_col = "histogram" ,
205- suffix = "prev1" ,
206- ):
204+ hist_col : str = "histogram" ,
205+ suffix : str = "prev1" ,
206+ ) -> None :
207207 """Initialize an instance of PreviousHistComparer.
208208
209209 :param str read_key: key of input data to read from data store
@@ -228,10 +228,10 @@ def __init__(
228228 self ,
229229 read_key ,
230230 store_key ,
231- shift = 1 ,
232- hist_col = "histogram" ,
233- suffix = "expanding" ,
234- ):
231+ shift : int = 1 ,
232+ hist_col : str = "histogram" ,
233+ suffix : str = "expanding" ,
234+ ) -> None :
235235 """Initialize an instance of ExpandingHistComparer.
236236
237237 :param str read_key: key of input data to read from data store
@@ -267,9 +267,9 @@ def __init__(
267267 reference_key ,
268268 assign_to_key ,
269269 store_key ,
270- hist_col = "histogram" ,
271- suffix = "ref" ,
272- ):
270+ hist_col : str = "histogram" ,
271+ suffix : str = "ref" ,
272+ ) -> None :
273273 """Initialize an instance of ReferenceHistComparer.
274274
275275 :param str reference_key: key of input data to read from data store
@@ -306,10 +306,10 @@ def __init__(
306306 read_key ,
307307 store_key ,
308308 assign_to_key = None ,
309- hist_col = "histogram" ,
309+ hist_col : str = "histogram" ,
310310 * args ,
311311 ** kwargs ,
312- ):
312+ ) -> None :
313313 """Initialize an instance of NormHistComparer.
314314
315315 :param func_hist_collector: histogram collection function
@@ -349,7 +349,9 @@ def __init__(
349349class RollingNormHistComparer (NormHistComparer ):
350350 """Compare histogram to previous rolling normalized histograms"""
351351
352- def __init__ (self , read_key , store_key , window , shift = 1 , hist_col = "histogram" ):
352+ def __init__ (
353+ self , read_key , store_key , window , shift : int = 1 , hist_col : str = "histogram"
354+ ) -> None :
353355 """Initialize an instance of RollingNormHistComparer.
354356
355357 :param str read_key: key of input data to read from data store
@@ -383,7 +385,9 @@ def transform(self, datastore):
383385class ExpandingNormHistComparer (NormHistComparer ):
384386 """Compare histogram to previous expanding normalized histograms"""
385387
386- def __init__ (self , read_key , store_key , shift = 1 , hist_col = "histogram" ):
388+ def __init__ (
389+ self , read_key , store_key , shift : int = 1 , hist_col : str = "histogram"
390+ ) -> None :
387391 """Initialize an instance of ExpandingNormHistComparer.
388392
389393 :param str read_key: key of input data to read from data store
@@ -412,7 +416,9 @@ def transform(self, datastore):
412416class ReferenceNormHistComparer (NormHistComparer ):
413417 """Compare histogram to reference normalized histograms"""
414418
415- def __init__ (self , reference_key , assign_to_key , store_key , hist_col = "histogram" ):
419+ def __init__ (
420+ self , reference_key , assign_to_key , store_key , hist_col : str = "histogram"
421+ ) -> None :
416422 """Initialize an instance of ReferenceNormHistComparer.
417423
418424 :param str reference_key: key of input data to read from data store
0 commit comments