-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
UP011 is incorrectly replacing lru_cache(max_size)=None
#1913
Comments
Thank you! Fixing now. Just an oversight. |
@charliermarsh Thanks for the super quick response! Your fix seems to work fine for the |
@charliermarsh That's a fair limitation, but still the message is pretty misleading since it's telling you to remove the parameters instead of changing |
Note that pyupgrade separates this into two rules, one that converts |
Ah right -- I'll modify the error message. |
(And consider splitting into two rules, too.) |
Fixed in #1938. |
Thanks again for all your hard work, I really appreciate it! |
Thanks for being persistent on this one even after I closed it out -- you were totally right! |
The UP011 rule replaces
functools.lru_cache(max_size=None)
withfunctools.lru_cache
. The corresponding rule in pyupgrade replaces it withfunctools.cache
: https://github.com/asottile/pyupgrade#replace-functoolslru_cachemaxsizenone-with-shorthand.Tested with ruff 0.0.222
The text was updated successfully, but these errors were encountered: