Summary
The fix for f-string (UP032) parenthesizes decimal int literals when necessary to avoid syntax errors, except for literals containing underscores. Example:
$ cat >up032.py <<'# EOF'
print("{.real}".format(1_2))
# EOF
$ python up032.py
12
$ ruff --isolated check up032.py --select UP032 --diff 2>&1 | grep error:
error: Fix introduced a syntax error. Reverting all changes.
Version
ruff 0.14.1 (2bffef5 2025-10-16)
Summary
The fix for
f-string(UP032) parenthesizes decimalintliterals when necessary to avoid syntax errors, except for literals containing underscores. Example:Version
ruff 0.14.1 (2bffef5 2025-10-16)