@@ -104,7 +104,6 @@ def determine_delta(self):
104104 try :
105105 delta_old_files = old_index [path ]
106106 except KeyError :
107- # self.deltas['added'].append(Delta(new_file, None, 'added'))
108107 self .deltas ['added' ].append (Delta (new_file , None , 'added' , 75 ))
109108 continue
110109
@@ -114,11 +113,9 @@ def determine_delta(self):
114113 for f in delta_old_files :
115114 # TODO: make sure sha1 is NOT empty
116115 if new_file .sha1 == f .sha1 :
117- # self.deltas['unmodified'].append(Delta(new_file, f, 'unmodified'))
118116 self .deltas ['unmodified' ].append (Delta (new_file , f , 'unmodified' , 0 ))
119117 continue
120118 else :
121- # delta = Delta(new_file, f, 'modified')
122119 delta = Delta (new_file , f , 'modified' , 50 )
123120 self .deltas ['modified' ].append (delta )
124121
@@ -134,7 +131,6 @@ def determine_delta(self):
134131 # This file already classified as 'modified' or 'unmodified' so do nothing
135132 new_index [path ]
136133 except KeyError :
137- # self.deltas['removed'].append(Delta(None, old_file, 'removed'))
138134 self .deltas ['removed' ].append (Delta (None , old_file , 'removed' , 25 ))
139135 continue
140136
@@ -169,7 +165,6 @@ def update_deltas(self, added, removed):
169165 Convert the matched 'added' and 'removed' Delta objects to a combined
170166 'moved' Delta object and delete the 'added' and 'removed' objects.
171167 """
172- # self.deltas.get('moved').append(Delta(added.new_file, removed.old_file, 'moved'))
173168 self .deltas .get ('moved' ).append (Delta (added .new_file , removed .old_file , 'moved' , 0 ))
174169 self .deltas .get ('added' ).remove (added )
175170 self .deltas .get ('removed' ).remove (removed )
@@ -236,8 +231,6 @@ class Delta(object):
236231 object -- and the category that characterizes the comparison:
237232 'added', 'modified', 'moved', 'removed' or 'unmodified'.
238233 """
239- # def __init__(self, new_file=None, old_file=None, delta_type=None):
240- # TODO: Should the default score be 0 or None? I've used 0 in the tests, e.g., test_Delta_to_dict_unmodified().
241234 def __init__ (self , new_file = None , old_file = None , delta_type = None , score = 0 ):
242235 self .new_file = new_file if new_file else File ()
243236 self .old_file = old_file if old_file else File ()
@@ -282,7 +275,6 @@ def to_dict(self):
282275 Check the 'category' attribute of the Delta object and return an
283276 OrderedDict comprising the 'category' and 'path' of the object.
284277 """
285- # delta = OrderedDict([('category', self.category)])
286278 delta = OrderedDict ([
287279 ('category' , self .category ),
288280 ('score' , self .score )
0 commit comments