-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Bump Ruff to 0.8.0, ignoring RUF022
/RUF023
#13090
Conversation
This comment has been minimized.
This comment has been minimized.
I think it's probably fine to sort |
I can see arguments both ways, but could we split that discussion into a separate PR? That way we can see clearly which changes are specifically due to the RUF022 autofix; as it currently is, it's pretty hard to see if there are any other autofixes making changes here. I think what I'd like is:
|
This reverts commit 8e74e58.
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.
LGTM. Though I suppose we could also split RUF023 into the followup PR as well, since it's unlikely we'll want to auto-sort __slots__
but not __all__
at the end of the day. The same principles apply to both, we just have more __all__
definitions in the stub right now (but there have been proposals to add more __slots__
definitions in the past, and I can see the merits of doing so!)
This comment has been minimized.
This comment has been minimized.
Fair. Since you already approved this PR, do you want me to also exclude the |
I would weakly prefer the |
It feels like trying to slip in a change. And I'd rather avoid the (small) risk we just forget about it. In hindsight it's pretty much the same discussion, so let's do them together, I'll revert that change from this PR. |
RUF022
RUF022
/RUF023
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.
And now you have my unqualified approval ;)
Thank you!
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
No manual fixes needed. I split the PR into 2 initial commits to help understand and evaluate the changes:
ruff check --fix
RunForgot we use black 🙃ruff format
Now for the question: Should typeshed be re-ordering
__all__
? Or aim to follow the runtime's ordering?