# fixhunt regression fixture: ruff W605, ruff 0.17.1 # the fix labelled safe changes the program's output on this program # before the fix: no stdout, stderr "/w/prog.py:11: SyntaxWarning: invalid escape sequence '\_'", exit 0 # after the fix: no stdout, exit 0 # finding 2026-10-17T20-50-05-853Z-2tuo-ruff-W605/r1-p005; rule fired 1 time(s) before the fix class Logger: def __init__(self): self.buf = [] def write(self, msg): self.buf.append(msg) def __enter__(self): return self def __exit__(self, *args): pass with Logger() as log: log.write('\_')