# 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 "true []", exit 0 # after the fix: no stdout, stderr "AttributeError: 'D' object has no attribute 'get'", exit 1 # finding 2026-10-17T21-39-23-080Z-ah8u-ruff-RUF019/r1-p003; rule fired 1 time(s) before the fix state = [] class D: def __contains__(self, k): return k == 'x' def __getitem__(self, k): return 1 if k == 'x' else None d = D() if "x" in d and d["x"]: print("true", state)