This is an automated email from the ASF dual-hosted git repository.
HyukjinKwon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-connect-rust.git
The following commit(s) were added to refs/heads/master by this push:
new 71dabfc5 [MINOR][BUILD] Apply ruff's excludes to the paths given on
its command line too
71dabfc5 is described below
commit 71dabfc56e86d53bcf53b64237e0e4bfecb00d9b
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Fri Nov 13 11:33:29 2026 +0900
[MINOR][BUILD] Apply ruff's excludes to the paths given on its command line
too
### What changes were proposed in this pull request?
This PR sets `force-exclude = true` in `[tool.ruff]` of `pyproject.toml`,
so that ruff applies its excludes to the paths given on its command line too.
### Why are the changes needed?
Without it, a path given to ruff explicitly is linted even when
`[tool.ruff]` excludes it. For example, `ruff check
python/pyspark/cloudpickle/cloudpickle.py`, or an editor integration that runs
ruff on the open file, reports 5 errors (and `ruff format --check` one file to
reformat) in a vendored file that the drift gate keeps byte-identical to Apache
Spark. With the setting, such a path is skipped ("No Python files found under
the given path(s)"), as it is in `ruff check` of the whole tree.
### Does this PR introduce _any_ user-facing change?
No. It only changes developer tooling.
### How was this patch tested?
- `ruff0.14.0 check` and `format --check` on that vendored file: 5 errors
and 1 file to reformat before; skipped after.
- CI's gates, which run ruff without paths, are unchanged: `ruff check`
passes, `ruff format --check` reports 40 files formatted (40 without this
change too), and `python/tests/test_ruff_excludes.py` passes.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5
This pull request and its description were written by Isaac.
Closes #600 from HyukjinKwon/MINOR-ruff-force-exclude.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
---
pyproject.toml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyproject.toml b/pyproject.toml
index 83e8a6a4..65301374 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -49,6 +49,10 @@ Repository = "https://github.com/apache/spark-connect-rust"
# under python/pyspark (the modules that are neither vendored nor generated).
line-length = 100
target-version = "py39"
+# Apply the excludes below to the paths given on the command line too, so that
+# `ruff check <file>` or an editor integration skips a vendored or generated
file, as
+# `ruff check` of the whole tree does.
+force-exclude = true
include = [
"scripts/**/*.py",
"crates/pyspark-rs/src/row.py",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]