Summary
#19505 made start_of_file handle a backslash after a docstring, but it only handles one backslash. If the next line has a backslash too, the original bug appears. Example:
$ cat >i002.py <<'# EOF'
"docstring"\
\
print(f"{__doc__=}")
# EOF
$ ruff --isolated check i002.py --select I002 --config 'lint.isort.required-imports=["import sys"]' --diff 2>&1 | grep error:
error: Fix introduced a syntax error. Reverting all changes.
Version
ruff 0.12.8 (f51a228 2025-08-07)