Skip to content

Build: Consolidate ruff config into pyproject.toml - #3883

Merged
kevinjqliu merged 1 commit into
apache:mainfrom
gorewilliams:consolidate-ruff-config-3882
Aug 31, 2026
Merged

Build: Consolidate ruff config into pyproject.toml#3883
kevinjqliu merged 1 commit into
apache:mainfrom
gorewilliams:consolidate-ruff-config-3882

Conversation

@gorewilliams

Copy link
Copy Markdown
Contributor

Closes #3882

Ruff was the only tool still configured outside pyproject.toml (pytest, mypy, coverage and uv all live there).

The standalone ruff.toml was introduced in #619 (April 2024) as a workaround for Dependabot failing to parse the project's pyproject.toml. That was the Poetry era; main is now PEP 621 metadata with a setuptools backend plus [tool.uv], so the parsing path that motivated the split is no longer in use.

Changes

  • Move ruff.toml contents into pyproject.toml under [tool.ruff], [tool.ruff.lint], [tool.ruff.lint.pyupgrade], [tool.ruff.lint.isort] and [tool.ruff.format]
  • Delete ruff.toml

No settings values changed.

Verification

  • Nothing referenced the file by path — the ruff/ruff-format and nbqa-ruff hooks pass no --config, so Ruff's own discovery picks up [tool.ruff].
  • ruff check --show-settings output is byte-identical before and after, apart from the Settings path line itself.
  • prek run --all-files passes.

Ruff was the only tool still configured outside pyproject.toml. The
standalone ruff.toml was added in apache#619 as a workaround for Dependabot
failing to parse the Poetry-era pyproject.toml; the project now uses
PEP 621 metadata with a setuptools backend, so that workaround no
longer applies.

Nothing referenced ruff.toml by path, and `ruff check --show-settings`
resolves to identical settings before and after the move.

Closes apache#3882
@gorewilliams
gorewilliams marked this pull request as ready for review August 31, 2026 12:36

@rambleraptor rambleraptor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable. It appears that pyproject.toml and ruff.toml have identical settings.

The linters are still passing, which is what we would expect on this change.

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

verified the changes are identical :)

@kevinjqliu
kevinjqliu merged commit 58749a3 into apache:main Aug 31, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate ruff.toml into pyproject.toml

3 participants