# fixhunt regression fixture: ruff RUF019, ruff 0.17.1 # the fix labelled safe changes the program's output on this program # before the fix: stdout "second: calls=0", exit 0 # after the fix: no stdout, stderr "AttributeError: 'SideEffectMap' object has no attribute 'get'", exit 1 # finding 2026-10-17T21-39-23-080Z-ah8u-ruff-RUF019/r2-p002; rule fired 1 time(s) before the fix class SideEffectMap: def __init__(self): self.data = {'x': 1} self.calls = 0 def __contains__(self, key): return key in self.data def __getitem__(self, key): return self.data[key] m = SideEffectMap() if 'x' in m and m['x']: print(f'second: calls={m.calls}')