Summary
The fix for missing-f-string-syntax (RUF027) should be suppressed in Python 3.11 and earlier if it would create an f-string with an embedded comment, which only became valid in Python 3.12. Example:
$ cat >ruf027.py <<'# EOF'
x = "!"
print("""{x # }
}""")
# EOF
$ ruff --isolated check --select RUF027 ruf027.py --preview --target-version py311 --unsafe-fixes --fix --output-format concise
ruf027.py:2:15: invalid-syntax: Cannot use comments in f-strings on Python 3.11 (syntax was added in Python 3.12)
Found 1 error.
Version
ruff 0.15.2 (9d18ee9 2026-02-19)