@@ -92,7 +92,7 @@ class BlobNewestDataCSV(CSVParser.CSVParser):
9292 UPDATE_CONSTRAINT_PREFIX = "updateif_"
9393 GENERATE_PROP_PREFIX = "gen_"
9494
95- def __init__ (self , entity_class , filename , ** kwargs ):
95+ def __init__ (self , entity_class : str , filename : str , ** kwargs ):
9696 self .known_generators = ["blobsize" , "blobsha1" , "insertdate" ]
9797 self .entity = entity_class
9898 self .keys_set = False
@@ -112,16 +112,16 @@ def __init__(self, entity_class, filename, **kwargs):
112112 def _setupkeys (self ):
113113 if not self .keys_set :
114114 self .keys_set = True
115- self .props_keys = [x for x in self .header [1 :]
116- if not (x .startswith (CSVParser .CONSTRAINTS_PREFIX )
117- or x .startswith (BlobNewestDataCSV .UPDATE_CONSTRAINT_PREFIX )
118- or x .startswith (BlobNewestDataCSV .GENERATE_PROP_PREFIX ))]
115+ self .props_keys = [x for x in self .header [1 :]
116+ if not (x .startswith (CSVParser .CONSTRAINTS_PREFIX )
117+ or x .startswith (BlobNewestDataCSV .UPDATE_CONSTRAINT_PREFIX )
118+ or x .startswith (BlobNewestDataCSV .GENERATE_PROP_PREFIX ))]
119119 self .generated_keys = [x for x in self .header [1 :]
120120 if x .startswith (BlobNewestDataCSV .GENERATE_PROP_PREFIX )]
121- self .constraints_keys = [x for x in self .header [1 :]
122- if x .startswith (CSVParser .CONSTRAINTS_PREFIX )]
123- self .search_keys = [x for x in self .header [1 :]
124- if x .startswith (BlobNewestDataCSV .UPDATE_CONSTRAINT_PREFIX )]
121+ self .constraints_keys = [x for x in self .header [1 :]
122+ if x .startswith (CSVParser .CONSTRAINTS_PREFIX )]
123+ self .search_keys = [x for x in self .header [1 :]
124+ if x .startswith (BlobNewestDataCSV .UPDATE_CONSTRAINT_PREFIX )]
125125
126126 # derived class interface for retrieving blob
127127 def read_blob (self , idx ):
@@ -248,7 +248,7 @@ def getitem(self, idx):
248248 self .filter_generated_constraints (), idx )
249249 # we test generated constraints here as they will stop an update from happening.
250250 generated_positive_constraints = self .create_generated_constraints (
251- idx , match = True )
251+ idx , match = True )
252252 update_constraints .update (search_constraints )
253253 update_constraints .update (generated_positive_constraints )
254254 properties = self .parse_properties (idx )
0 commit comments