-
Notifications
You must be signed in to change notification settings - Fork 10
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
Consider switching to Ruff for pre-commit linting/formatting #623
Comments
There do seem to be some deliberate differences from Back: https://docs.astral.sh/ruff/formatter/black/ In some initial testing on the codebase, the differences seemed exceedingly minor (Ruff on the right): |
Shouldn't we leave this open for review, @chriszs ? It sounds like it absolutely merits a look ... ? |
It does! But is there a path to acceptance? If the issue is going to wind up stale, I'd rather close it and bring it back out later so that issues reflect stuff we can act on. I want to be sensitive to the project lifecycle, which seems to be maintenance as part of a larger suite of stuff, where consistency might matter more than other considerations. |
Re-opening because Ruff now has a complimentary package manager in uv (okay, technically they're independent, but from the same source and built the same way). Both have been well-reviewed. |
Hey @newsroomdev , this seems like it might now be in your bailiwick? |
I think this absolutely merits a look, but should probably be done in coordination with a general update and evaluation of the existing testing suite ... which I tried to get to months ago, and poked at, and then got pulled off. This sounds like it may be eminently useful and practical on multiple levels. If adopted, we'll want to plan some time for implementing this into related repositories and updating the code there to fit. That might not be a heavy lift, especially WRT to the lift and testing of updating the testing suite. Thank you for bringing this, @chriszs . |
And man ... this gives me pause. https://community.plone.org/t/drop-black-isort-flake8-and-use-ruff/16413/6 Linting is great. Breaking code is ... not. =) |
I noticed that pre-commit was running slowly on a minor change. I've recently checked out Ruff, which claims "drop-in parity with Flake8, isort, and Black," each of which are separate steps in pre-commit right now, while benchmarking at much higher speeds. It also seems to have some pyupgrade compatibility.
The text was updated successfully, but these errors were encountered: