-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ignore builtins when detecting missing f-strings #9849
Conversation
0519ef9
to
06ec002
Compare
Some real code to test against (I think in all 3 cases it was triggered because of builtins):
Errors with the current stable release:
|
I think we should also ignore |
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
RUF027 | 36 | 0 | 36 | 0 | 0 |
Ecosystem checks look like improvements to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I'm really happy to see fewer false positives in the ecosystem check.
Summary
Reported on Discord: if the name maps to a builtin, it's not bound locally, so is very unlikely to be intended as an f-string expression.