@@ -125,11 +125,9 @@ def _split_by_type(self, changes: Dict[str, List[dict]]) -> List[Dict[str, List[
125125 Split raw filtered changes into two batches:
126126 1. Blocking: updated/removed and added files that are blocking
127127 2. Non-blocking: added files that are not blocking
128-
129- Adds blocking key with a boolean value for each group
130128 """
131- blocking_changes = {"added" : [], "updated" : [], "removed" : [], "blocking" : True }
132- non_blocking_changes = {"added" : [], "updated" : [], "removed" : [], "blocking" : False }
129+ blocking_changes = {"added" : [], "updated" : [], "removed" : []}
130+ non_blocking_changes = {"added" : [], "updated" : [], "removed" : []}
133131
134132 for f in changes .get ("added" , []):
135133 if self .is_blocking_file (f ):
@@ -144,9 +142,9 @@ def _split_by_type(self, changes: Dict[str, List[dict]]) -> List[Dict[str, List[
144142 blocking_changes ["removed" ].append (f )
145143
146144 result = []
147- if any (blocking_changes [ k ] for k in ( "added" , "updated" , "removed" )):
145+ if any (len ( v ) for v in blocking_changes . values ( )):
148146 result .append (blocking_changes )
149- if any (non_blocking_changes [ "added" ] ):
147+ if any (len ( v ) for v in non_blocking_changes . values () ):
150148 result .append (non_blocking_changes )
151149
152150 return result
0 commit comments