File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -618,8 +618,8 @@ def at_attr(name: str) -> bool:
618618 new_src = "" .join (new_lines )
619619
620620 def _find_annotate_import_idx (lines ):
621- for idx , l in enumerate (lines ):
622- if re .match (r"^\s*from\s+traincheck\s+import\s+annotate_stage\s*$" , l ):
621+ for idx , line in enumerate (lines ):
622+ if re .match (r"^\s*from\s+traincheck\s+import\s+annotate_stage\s*$" , line ):
623623 return idx
624624 return - 1
625625
Original file line number Diff line number Diff line change @@ -183,6 +183,11 @@ def _rm_incomplete_trailing_func_calls(self):
183183 self .events .groupby ("func_call_id" ).size ().reset_index (name = "count" )
184184 )
185185
186+ multiple_func_call_ids = func_call_groups [func_call_groups ["count" ] > 2 ][
187+ "func_call_id"
188+ ]
189+ assert len (multiple_func_call_ids )== 0 , "more than 2 events for one func call id"
190+
186191 incomplete_func_call_ids = func_call_groups [func_call_groups ["count" ] == 1 ][
187192 "func_call_id"
188193 ]
You can’t perform that action at this time.
0 commit comments