gaogaotiantian opened a new pull request, #57258: URL: https://github.com/apache/spark/pull/57258
### What changes were proposed in this pull request? This PR removes `flake8` from the PySpark lint tooling, since it has been fully superseded by `ruff`. - `dev/lint-python`: drop the flake8 binary/version variables, the `--flake8` option, and the `flake8_test` function and its invocation. - `dev/tox.ini`: deleted. It contained only a `[flake8]` section, and its rules (ignores, per-file-ignores, excludes, `max-line-length`) are already covered by the `[tool.ruff]` config in `pyproject.toml`. - `dev/run-tests.py`: the Python style-check change trigger was keyed on `tox.ini`; repoint it to `pyproject.toml`, where the ruff config now lives. - Drop the `flake8==3.9.0` install from the lint / docs / release Docker images (`dev/spark-test-image/lint/Dockerfile`, `dev/spark-test-image/docs/Dockerfile`, `dev/create-release/spark-rm/Dockerfile`) and from the docs `pages.yml` workflow. ### Why are the changes needed? `flake8` was already dead in the lint pipeline: - `dev/lint-python` only ran flake8 behind an explicit `--flake8` flag; the default run enables compile, custom-errors, `ruff`, and mypy. Nothing (CI, `.pre-commit-config.yaml`, `dev/run-tests.py`) passes `--flake8`. - The `_lint` dependency group in `pyproject.toml` no longer installs flake8 - only `ruff` and `mypy`. - `dev/tox.ini`'s flake8 configuration is duplicated by `[tool.ruff]` in `pyproject.toml` (same `line-length = 100`, `E402` ignore, and per-file-ignores). Removing the dead code and config reduces confusion and drops an unused dependency from the Docker images and docs workflow. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - `bash -n dev/lint-python` to verify the script still parses. - Confirmed `git grep -niI flake8` returns no matches after the change. - The lint pipeline (`ruff`) continues to run via `dev/lint-python` and pre-commit; the changed Docker images and workflow still install `ruff`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
