-
Notifications
You must be signed in to change notification settings - Fork 101
Actually format with ruff
#2085
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
for more information, see https://pre-commit.ci
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
- id: ruff | ||
- id: ruff-format | ||
- id: ruff-check |
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.
This diff masks two separate changes
- adding
ruff-format
, which did most of this PR - renaming
ruff
toruff-check
, which is a change that happened sometime in the past few months. (See their boilerplate config.) If you saw something likeruff (legacy alias)
locally, this is why
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
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.
Preliminarily approved, but let's hold off on merging until the NAGLCharges stuff is done so we don't get the merge-conflict-pocalypse
for more information, see https://pre-commit.ci
I'm resolving conflicts and will merge this before the 0.17.0 reelase |
Oh, some of these conflicts are substantial-ish. Would it be easy to reopen this PR from a fresh reformatting of main or is that a lot of manual work? |
I'll have a look |
I have the tooling happy (so far) via accepting all upstream changes, re-running the formatter, and removing duplicate code. |
Thanks @mattwthompson! |
When I switched this repo over to
ruff
, I botched an important detail. It is split into two parts, a linter (think Flake8) and a formatter (think Black). At the time, I neglected to add the formatter to automation.I tried to do this with minimal disruptions, but there just isn't a straightforward way to do that in such a large codebase. Most (estimate 70%+) of the changes are re-wrapping some things that Black was eager to unwrap in the past. This is evidenced by how the changes should be identical but the codebase is reduced by ~3000 LOC. (I'm fine with this, line lengths of ~80 are too narrow to me on modern displays.) This can be tinkered with by changing the line length config, but I left that in place.