-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Enable Ruff PLE (Pylint Error) #13305
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
What do we do if we're writing stubs for a library that really does invalidly declare a special method? It's happened before. We'd be in a tough spot there: we'd either have to |
We've had "unfixable" cases like that, I can namely remember around I'd be very surprised, but if we add stubs for a library that does it on purpose, and often. Let's say overloads builtin dunders to add params and explicitly calls those methods instead of using keywords ( In other words, I think it's a rare/niche enough case and we have an escape hatch in case it does happen. |
This comment has been minimized.
This comment has been minimized.
This has (not suprisingly) conflicts after merging #13306. |
This comment has been minimized.
This comment has been minimized.
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.
Considering this found two genuine problems and did not flag any wrong problems, I support this PR. I also agree with the reasoning of using an explicit noqa
if code does something unexpected. (And we can also easily drop this check again if it turns out to be annoying.)
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Ref #13295
https://docs.astral.sh/ruff/rules/#error-e_1
This did found seemingly incorrect dunders in stubs that couldn't be caught by stubtest