Commit 19ec991
[SPARK-54632][INFRA][FOLLOW-UP] Enable ruff on our CI and lint-python
### What changes were proposed in this pull request?
This add `ruff` to our docker image and enables ruff check in our CI. Also this adds ruff check in `dev/lint-python`.
We want to have both `ruff` and `flake8` run in CI for a while to confirm the compatibility then we will deprecate `flake8`.
~~It is intentional to leave ruff version blank - so it uses the latest version. I think the linter rule is pretty stable and the version upgrade should not affect our workflow too much. This is an experiment about using the latest version of devtool. Pinning the version has its advantage but upgrading the version is painful. If we can occasionally (per month?) fix a small amount of code for linter, I think that's acceptable.~~
After discussion with Yicong-Huang I think it's a good idea to pin the version - so we can do all the code fix with devtool change in a single PR. We should avoid having multiple people trying to fix the code when there is a new rule.
### Why are the changes needed?
`flake8` is too slow and our pinned version is just too old. We should replace it.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Local ruff test passes.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #53412 from gaogaotiantian/add-ruff-to-ci.
Authored-by: Tian Gao <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>1 parent 7e684b3 commit 19ec991
File tree
5 files changed
+6
-3
lines changed- dev
- spark-test-image/lint
- python/pyspark/sql/tests
- arrow
- pandas
5 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
| 371 | + | |
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
| |||
0 commit comments