-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Add experimental backend for ruff with lint and fmt goals #17945
Conversation
src/python/pants/backend/python/lint/ruff/rules_integration_test.py
Outdated
Show resolved
Hide resolved
One thing we should discuss is implementing it as a fixer or as a formatter (or both?). Ruff is special in that it has some fixes, and some formats. I wonder if we can implement it as 2 plugins, each doing "the right thing". Or maybe it's just simpler as 1. It would also help if ruff itself had the distinction... |
Possibly a crazy idea, but what if it was one plugin that the user chooses whether to run as a formatter or fixer? So it's the user's responsibility to decide whether they intend |
In that case, it's be the build owner making the decision for everyone, which isn't ideal as only a subset of people use --loop and would care. |
Since this is marked experimental I'm fine with whichever goal you choose. As long as we track this in a tracking issue, 🚀 |
Is it marked experimental right now? |
Oops I just read the title and assumed. @ozturkberkay I'd be happy to see this get in if we marked it experimental. Probably a much easier path forward. |
(and for completeness here's the ruff issue: astral-sh/ruff#455 |
@thejcannon I followed the existing code ( |
I launched CI 🚀 |
Hi @ozturkberkay! I'm not sure why CI is failing, but we had a similar issue a while back, which we fixed, so could you merge latest main onto your changes and push them? That might sort it out. |
For the difference between fix and fmt, this just got closed: astral-sh/ruff#455 (comment) |
Woohoo! @ozturkberkay thanks for the contribution and for your patience throughout the code review process. I think this is worth a blog post! |
Hi,
Ruff is a fast Python linter & formatter written in Rust. I wanted to integrate Pants with ruff for my personal projects. I was curious if the pants community would be interested in this.
This is my first time contributing to Pants, so please bear with me :)