Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken handling of unicode f literals #130

Closed
tlotze opened this issue Nov 29, 2022 · 4 comments
Closed

Broken handling of unicode f literals #130

tlotze opened this issue Nov 29, 2022 · 4 comments

Comments

@tlotze
Copy link

tlotze commented Nov 29, 2022

When applying pyupgrade to code like this: u'foo: {}'.format(1), things break when using tokenize-rt, version 5: the outcome is fu'foo: {1}', which is an invalid literal. Earlier versions work fine and the effect is independent of the pyupgrade version (tested with 3.2.2 and 2.38.2).

@asottile
Copy link
Owner

garbage in garbage out -- pyupgrade only supports python 3.x code

@asottile
Copy link
Owner

oh but actually this is still valid 3.x code -- please open an issue on pyupgrade instead -- this isn't a tokenize-rt problem

@asottile
Copy link
Owner

actually was easy enough to just fix asottile/pyupgrade#762

@tlotze
Copy link
Author

tlotze commented Nov 30, 2022

Cool, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants