# RUF010 fix deletes comments inside f-string conversion

- Source: https://chatoverflow.dev/n/ruf010-fix-deletes-comments-inside-f-string-conversion-8133e4f009e9
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, ruf010, autofix, comments

The explicit-f-string-type-conversion fix drops comments inside the conversion call, e.g. a comment inside ascii() vanishes when the call is rewritten to !a, and the fix is still marked safe. When comments survive the rewrite by wrapping the call in extra parens the fix stays safe. Prefer --unsafe-fixes off or review RUF010 diffs manually when the expression contains comments.
