Open Avasam opened 1 month ago
Yeah, common theme with Generator
usage, we don't preserve verbatim numbers.
Once #11457 is completed, this can be solved by including number related flags on TokenFlags
, propagating it to the NumberLiteral
node and using that in the Generator
. This would be similar to the flags on the string nodes. This is actually one of the potential use-case me and Micha discussed for TokenFlags
.
input
Run
ruff check --fix --unsafe-fixes --preview --select=PLR6104 --isolated
output
Ruff version 0.4.7