asottile / pyupgrade

A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
MIT License
3.58k stars 182 forks source link

Error after upgrading a formatted sting starting with a variable #889

Closed mrm-motez closed 1 year ago

mrm-motez commented 1 year ago

If I run pyupgrade on this string : '{}\N{NO-BREAK SPACE}'.format(currency.symbol or "") I get this line as an output : "\N{NO-BREAK SPACE}".format(currency.symbol or "") Wich causes an error