MCPcopy Index your code
hub / github.com/RustPython/RustPython / _prune_breaks

Method _prune_breaks

Lib/bdb.py:706–717  ·  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

704 self._add_to_breaks(filename, lineno)
705
706 def _prune_breaks(self, filename, lineno):
707 """Prune breakpoints for filename:lineno.
708
709 A list of breakpoints is maintained in the Bdb instance and in
710 the Breakpoint class. If a breakpoint in the Bdb instance no
711 longer exists in the Breakpoint class, then it's removed from the
712 Bdb instance.
713 """
714 if (filename, lineno) not in Breakpoint.bplist:
715 self.breaks[filename].remove(lineno)
716 if not self.breaks[filename]:
717 del self.breaks[filename]
718
719 def clear_break(self, filename, lineno):
720 """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