should this be
end_hits = [iv for iv in self.at(end) if iv.begin < end]
? The end of the chopping interval is not part of the chopping interval, and an existing interval that starts at the end of the chopping interval does not need any part of it chopped off. Also, checking iv.end > end seems unnecessary since it should hold for any interval returned by self.at(end).
At https://github.com/chaimleib/intervaltree/blob/01a30a8df977a02e1b6e25eee3838b8d6b340995/intervaltree/intervaltree.py#L503
should this be
end_hits = [iv for iv in self.at(end) if iv.begin < end]
? The end of the chopping interval is not part of the chopping interval, and an existing interval that starts at the end of the chopping interval does not need any part of it chopped off. Also, checking
iv.end > end
seems unnecessary since it should hold for any interval returned byself.at(end)
.