python-hunter icon indicating copy to clipboard operation
python-hunter copied to clipboard

`From` predicate does not use watermark argument correctly

Open davidkhess opened this issue 5 months ago • 4 comments

Unless I'm missing something there's a bug at https://github.com/ionelmc/python-hunter/blob/master/src/hunter/predicates.py#L389C1-L390C1

            if delta_depth < self.watermark:

I believe the polarity of this check is reversed and should be:

            if delta_depth > self.watermark:

As it is, for any positive value of watermark, the From will correctly trigger on condition but on the next event it will immediately disable regardless of the actual depth requested by watermark.

davidkhess avatar Aug 14 '25 14:08 davidkhess