# fixhunt regression fixture: ruff FURB129, ruff 0.17.1 # the fix labelled safe changes the program's output on this program # before the fix: stdout "0:apple,0:banana,0:cherry", exit 0 # after the fix: stdout "2:apple", exit 0 # finding 2026-10-22T17-16-41-266Z-868l-ruff-FURB129/r1-p003; rule fired 1 time(s) before the fix with open('tmp.txt', 'w') as f: f.write('apple\nbanana\ncherry') with open('tmp.txt') as fp: trace = [] for line in fp.readlines(): # Rule triggers here try: trace.append(f'{len(fp.readlines())}:{line.strip()}') except AttributeError as e: trace.append(f'ERR:{type(e).__name__}') print(','.join(trace))