@@ -199,18 +199,18 @@ def license_diff(self):
199199 old_licenses = delta .old_file .licenses or []
200200
201201 if len (delta .new_file .licenses ) > 0 and delta .old_file .licenses == []:
202- delta .add_score (20 , 'license info added' )
202+ delta .update (20 , 'license info added' )
203203 return
204204
205205 if delta .new_file .licenses == [] and len (delta .old_file .licenses ) > 0 :
206- delta .add_score (15 , 'license info removed' )
206+ delta .update (15 , 'license info removed' )
207207 return
208208
209209 new_keys = set (license .key for license in new_licenses )
210210 old_keys = set (license .key for license in old_licenses )
211211
212212 if new_keys != old_keys :
213- delta .add_score (10 , 'license change' )
213+ delta .update (10 , 'license change' )
214214
215215 def copyright_diff (self ):
216216 """
@@ -228,10 +228,10 @@ def copyright_diff(self):
228228 old_copyrights = delta .old_file .copyrights or []
229229
230230 if len (delta .new_file .copyrights ) > 0 and delta .old_file .copyrights == []:
231- delta .add_score (10 , 'copyright info added' )
231+ delta .update (10 , 'copyright info added' )
232232 return
233233 elif delta .new_file .copyrights == [] and len (delta .old_file .copyrights ) > 0 :
234- delta .add_score (10 , 'copyright info removed' )
234+ delta .update (10 , 'copyright info removed' )
235235 return
236236
237237 new_statements = set (statement for copyright in new_copyrights for statement in copyright .statements )
@@ -242,7 +242,7 @@ def copyright_diff(self):
242242
243243 if ((new_statements != old_statements ) or
244244 (new_holders != old_holders )):
245- delta .add_score (5 , 'copyright change' )
245+ delta .update (5 , 'copyright change' )
246246
247247 def index_deltas (self , index_key = 'path' , delta_list = []):
248248 """
@@ -280,12 +280,11 @@ def __init__(self, score=0, new_file=None, old_file=None):
280280 self .factors = []
281281 self .score = score
282282
283- def add_score (self , score = 0 , factor = '' ):
283+ def update (self , score = 0 , factor = '' ):
284284 """
285- For each Delta object identified in DeltaCode.license_diff() or
286- DeltaCode.copyright_diff(), add the score to the object's 'score'
287- attribute and add a string, summarizing the factor associated with the
288- score, to the object's 'factors' attribute (a list).
285+ Add the score to the Delta object's 'score' attribute and add a string,
286+ summarizing the factor associated with the score, to the object's
287+ 'factors' attribute (a list).
289288 """
290289 self .factors .append (factor )
291290 self .score += score
0 commit comments