-
Notifications
You must be signed in to change notification settings - Fork 184
Use Ruff instead of flake8 #1789
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
2f20952
to
febd220
Compare
# 4326, crossing the Prime-Meridian, wound counter-clockwise | ||
am_4326_cw = polygon(( | ||
am_4326_cw = polygon(( # noqa: F841 |
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 polygon is unused and it didn't work to copy the assert for the corresponding pm equivalence for this, so disabling the check for now. Will make an issue so someone who knows about these things can take a look at it later.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1789 +/- ##
===========================================
+ Coverage 85.76% 85.78% +0.01%
===========================================
Files 149 149
Lines 16186 16180 -6
===========================================
- Hits 13882 13880 -2
+ Misses 2304 2300 -4 ☔ View full report in Codecov by Sentry. 🚀 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.
Look good to me, thanks.
Reason for this pull request
Ruff is a fast linter that can check the rules of flake8 and a number of flake8 plugins. Ruff is made by the same people that make uv, and my experience from making a few functional bug reports on Ruff in Q2 2024 is that the bugs were fixed within hours/days, and a new release of Ruff was available within a week.
The main advantage beyond the speed is that after this PR,
uv sync
provides everything for development, so it's easy touv run ruff check --fix
locally during development.There are Ruff lint failures on the current develop branch, so this PR consists of a number of individual commits that fixes these problems in the code and gives a reasonable commit message for each one of them so git blame can be followed, and then a commit that adds Ruff to pyproject.toml, switches from flake8 to Ruff in the pre-commit config, and adds a couple of suppressions in the source code.
Besides the code fixes, this PR mirrors opendatacube/datacube-explorer#587 except no formatting checks are enabled.
Proposed changes
Closes #xxxx
Tests added / passed
Fully documented, including
docs/about/whats_new.rst
for all changes📚 Documentation preview 📚: https://datacube-core--1789.org.readthedocs.build/en/1789/