Skip to content

Commit

Permalink
Break out of search loop after deleting watch
Browse files Browse the repository at this point in the history
Flagged by ruff as B909
  • Loading branch information
inducer committed Jul 19, 2024
1 parent bdfd67f commit 571ce75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ def change_var_state(w, size, key):
for i, watch_expr in enumerate(fvi.watches):
if watch_expr is var.watch_expr:
del fvi.watches[i]
break

self.update_var_view(focus_index=focus_index)

Expand Down Expand Up @@ -1165,6 +1166,7 @@ def edit_inspector_detail(w, size, key):
for i, watch_expr in enumerate(fvi.watches):
if watch_expr is var.watch_expr:
del fvi.watches[i]
break

self.update_var_view()

Expand Down

0 comments on commit 571ce75

Please sign in to comment.