-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
urlquote / f-string issue #97
Comments
Oh fun. Turns out the tokenize leaves f-strings as a single token:
Whilst the AST parses them, presumably through a second internal tokenization step:
The fixer finds the AST I'm not sure what we can do here... perhaps recursively apply the fixers on |
The pyupgrade issue ( asottile/pyupgrade#572 ) was just resolved because it "just works" on Python 3.12. This is thanks to the PEP that modified how f-strings are parsed. I will add a 3.12+ test here to check this is also the case for django-upgrade. |
Python Version
3.8
Django Version
3.2.9
Package Version
1.4
Description
django-upgrade changed this import:
But then failed to change usages of
urlquote
toquote
. The only usage in my case was inside an f-string, don't know if that is relevant.I'll put more effort into a reproducible test case if needed
The text was updated successfully, but these errors were encountered: