-
Notifications
You must be signed in to change notification settings - Fork 18
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
use ruff for code linting #490
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #490 +/- ##
===========================================
- Coverage 87.90% 52.77% -35.14%
===========================================
Files 40 49 +9
Lines 1745 3335 +1590
===========================================
+ Hits 1534 1760 +226
- Misses 211 1575 +1364
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Would it replace sort and flake8? The changes it made are nice. In #343 you said we would need to update our documentation, why? Also that we should wait for an update so that it does not interfere with black, is that out now? |
Right - I made an issue on that 😳 the formatting tools are mentioned in https://github.com/MESMER-group/mesmer/blob/main/docs/source/development.rst#formatting so they'd need updating (and also the Makefile, but we could also delete it), and it's less important now that we use pre-commit CI anyways. The formatting issue is still open - astral-sh/ruff#9745 |
And yes it would replace flake8 and isort (and we could consider adding more rules, see e.g. https://github.com/shapely/shapely/blob/775f7792ecd945fa30b3f98b46d99f996e275f00/pyproject.toml#L81 for an inspiration (or also the ruff docs). |
Ok, switched to ruff entirely. I keep the isort and flake config around - otherwise we can get a mess if isort or flake is ever called. One issue with this is that there are formatting checks in ruff - so they might trigger an error that is fixed by black. Before we could run the formatting checks after the formater. If that is a problem we can turn off the formatting checks: astral-sh/ruff-pre-commit#74 (comment) |
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.
Add ruff configuration. I don't necessarily want to switch but we could...