MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _prune_breaks

Method _prune_breaks

tools/python-3.11.9-amd64/Lib/bdb.py:403–414  ·  view source on GitHub ↗

Prune breakpoints for filename:lineno. A list of breakpoints is maintained in the Bdb instance and in the Breakpoint class. If a breakpoint in the Bdb instance no longer exists in the Breakpoint class, then it's removed from the Bdb instance.

(self, filename, lineno)

Source from the content-addressed store, hash-verified

401 self._add_to_breaks(filename, lineno)
402
403 def _prune_breaks(self, filename, lineno):
404 """Prune breakpoints for filename:lineno.
405
406 A list of breakpoints is maintained in the Bdb instance and in
407 the Breakpoint class. If a breakpoint in the Bdb instance no
408 longer exists in the Breakpoint class, then it's removed from the
409 Bdb instance.
410 """
411 if (filename, lineno) not in Breakpoint.bplist:
412 self.breaks[filename].remove(lineno)
413 if not self.breaks[filename]:
414 del self.breaks[filename]
415
416 def clear_break(self, filename, lineno):
417 """Delete breakpoints for filename:lineno.

Callers 2

clear_breakMethod · 0.95
clear_bpbynumberMethod · 0.95

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected