Skip to content

Commit

Permalink
these bugs are like hydra heads
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Dec 6, 2023
1 parent 79525de commit a10da0d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/ipyflow/tracing/ipyflow_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def handle_first_ipython_frame(
self.external_call_depth -= not flow_.is_cell_file(
frame_filename
) and not is_project_file(frame_filename)
if flow_.is_dev_mode:
assert self.call_depth >= 0
self.call_depth = max(self.call_depth, 0)
self.external_call_depth = max(self.external_call_depth, 0)
if self.call_depth == 0:
return pyc.SkipAll

Expand Down Expand Up @@ -1430,7 +1430,9 @@ def before_stmt(self, _ret: None, stmt_id: int, frame: FrameType, *_, **__) -> N
self.prev_trace_stmt_in_cur_frame = trace_stmt
if not self.is_tracing_enabled and (
self._try_reenable_tracing(
frame, dry_run=True, is_module_stmt=trace_stmt.is_module_stmt()
frame,
dry_run=True,
is_module_stmt=trace_stmt.is_module_stmt(),
)
):
self.after_stmt_reset_hook()
Expand Down

0 comments on commit a10da0d

Please sign in to comment.