From d4a113acd578b816be1cd9495d9970d1febe14ab Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 19 Jul 2024 14:05:07 -0500 Subject: [PATCH] Break out of search loop after deleting watch Flagged by ruff as B909 --- pudb/debugger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pudb/debugger.py b/pudb/debugger.py index a9f808f9..844ed4f5 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -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) @@ -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()