-
Notifications
You must be signed in to change notification settings - Fork 483
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
Replace flake8 with ruff; convert setup.cfg to pyproject.toml #3488
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3488 +/- ##
==========================================
- Coverage 66.87% 66.75% -0.13%
==========================================
Files 49 49
Lines 8469 8374 -95
Branches 2384 2239 -145
==========================================
- Hits 5664 5590 -74
+ Misses 1693 1670 -23
- Partials 1112 1114 +2
☔ View full report in Codecov by Sentry. |
e3f7b31
to
3579dd8
Compare
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.
Thanks @cmarqu!
Have you tried replacing black and isort with ruff as well? (We only get the speed benefits really if we get rid of most of the tools, otherwise we're back to parsing the AST multiple times.)
If ruff works out formatting-wise, the main concern I have is that we're relying on binary components (which people cannot really build from source, a rust toolchain isn't that common these days). However, the wheels provided by the ruff project (https://pypi.org/project/ruff/#files) seem to be targeting manylinux2014/glibc 2.17, which means RHEL7 and include wheels even for s390x and ppc64lc. We seem to be loosing support for Python 3.6 and Ubuntu 18.04, which are really EOL on development machines these days.
So I think I convinced myself that these binaries are good enough. I hope the ruff project keeps up the commitment to older versions of various tools -- and if not, we can always go back to our existing setup.
- repo: "https://github.com/tox-dev/pyproject-fmt" | ||
rev: "1.4.1" | ||
hooks: | ||
- id: "pyproject-fmt" | ||
|
||
- repo: "https://github.com/abravalheri/validate-pyproject" | ||
rev: "v0.15" | ||
hooks: | ||
- id: "validate-pyproject" |
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.
These two (together with the resulting formatting changes) can go in a separate PR, or at least in a separate commit, to get them out of the way.
Maybe create a PR with another commit updating the other pre-commit tool versions.
I wonder if we could get the |
Superseded. |
No description provided.