-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
GH-139590: Run ruff format
on pre-commit for Tools/wasm
#139591
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
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.
question / confusion: we have both black
and ruff format
inside the repo 🤔
How do we choose when to use which? Maybe we can migrate to a single tool (ruff) in the future?
@sobolevn This is a good question. Since the JIT code and now WASI are the only dirs using @brettcannon Was there a particular reason that you were looking to use For the JIT, I don't think it really matters. I'd previously added the configuration to run |
See #133123 for previous discussion |
I'd also support using a |
I missed that thread about the JIT using Ruff as I was out getting married that week 😅. I appreciate the context. I'll wait for Brett's input, but it seems like moving things over to Ruff going forward/as soon as feasible, would be the right move. |
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
A benefit of Ruff is it fixes the quote things Emma and I suggested. Alternatively, we can add the ISC (flake8-implicit-str-concat) rule, like in |
Nope, just that I don't think |
Sounds good - will update to use Ruff later today! |
black
on pre-commit for WASIruff format
on pre-commit for WASI
Not sure if we need to set a custom |
Should this get backported to make backporting other things easy? Or maybe just the reformatting? |
Yes, let's backport, if it's not too tricky.
For a followup: It's worth checking and moving common rules from subdir There might be some rules that are in most subdir configs but not all, and it could be worth moving them up so those rules do apply for all. |
ruff format
on pre-commit for WASIruff format
on pre-commit for Tools/wasm
I made the pre-commit rule check for all of |
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.
👍 No objection to turning on Ruff for the Emscripten paths as well.
Thanks @savannahostrowski for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…onGH-139591) (cherry picked from commit a15aeec) Co-authored-by: Savannah Ostrowski <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
Sorry, @savannahostrowski, I could not cleanly backport this to
|
GH-139744 is a backport of this pull request to the 3.14 branch. |
…on#139591) Co-authored-by: Hugo van Kemenade <[email protected]> (cherry picked from commit a15aeec)
GH-139745 is a backport of this pull request to the 3.13 branch. |
GH-139745 is a backport of this pull request to the 3.13 branch. |
…139591) (#139745) Co-authored-by: Hugo van Kemenade <[email protected]>
…139591) (#139744) Co-authored-by: Savannah Ostrowski <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
Per @brettcannon's WASI plans