-
Notifications
You must be signed in to change notification settings - Fork 55
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
Suppress stderr in call to ruff and add ruff formatter #333
Suppress stderr in call to ruff and add ruff formatter #333
Conversation
Would it be more adaptive to initialise the command depending on the ruff version which may be acquired via subprocess.run? |
Hi. Thanks for the comment. I believe the added flags for the On the installation, honestly I just edited the files in my conda env and transcribed the changes here. I know that's not right! |
@felix-cw would you like to rebase this PR to make sure the tests pass on CI? |
Also, adding a test here would make it easier to merge it :) |
5cc1823
to
d46bf96
Compare
I added a few tests for the ruff and ruffformat functionality. |
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.
Thank you @felix-cw!
This PR adds the fix I suggested in #331 to ensure compatibility with ruff 0.1.0+. I've confirmed it works with version 0.1.15.
I also added the ruff formatter itself, as a substitute for black, called "ruffformat". The formatter simply called "ruff" is for applying automatic fixes for diagnostics. For example, isort-style import sorting.