-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Enable Ruff UP rules #12358
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
Enable Ruff UP rules #12358
Conversation
|
Very nice, I generally like the idea of making use of modern language features. I only hope we don't accidentally introduce new bugs..... |
If this happens, our tests need to be udpated. |
|
And at least one person needs to go over all changes I'm afraid. |
|
Turns out this is a huge PITA. If anyone wants to take over the remaining ~350 conversions from % to f-string, please knock yourselves out. Otherwise, I'll do it sometime soonish, but probably not in the next days. |
|
I don't think we "need" to do these ... I mean it's great you're donating so much of your time, but I'm not sure if those strings are worth the effort! |
Thanks for getting the ball rolling; may I suggest disabling |
|
Yes, sure. Can we keep the changes I've already made? |
of course! |
|
Great idea, @drammock! |
|
This should be good to go. I've created #12360 to follow up; we don't have a "good first issue" label, so I've used "EASY" for now (but feel free to change it). |
|
We get some Numpy 2.0 related errors in Pyvista/Pyvistaqt. It seems like there's no issue in their repos yet, since they probably do not test against pre-release Numpy. |
I've just opened pyvista/pyvista#5472, and pyvista/pyvista#5473 to fix it. |
|
Thanks! Let me know once the PR is merged, I can then re-run the pip-pre job. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This PR enables Ruff UP rules (pyupgrade). These rules check if newer language constructs can be used (it automatically uses the minimum required version from
pyproject.toml, so 3.9 in this case). I've only fixed some of the errors, the remaining ones need a bit more manual work. Thanks @hoechenberger for pointing out this very nice tool!Edit: tutorials and examples are done.