Skip to content

Consolidate ruff.toml into pyproject.toml #3882

Description

@gorewilliams

Feature Request / Improvement

Ruff is currently configured in a standalone ruff.toml at the repo root, while every other tool config lives in pyproject.toml ([tool.pytest.ini_options], [tool.mypy], [tool.coverage.run], [tool.uv]). Ruff is the only exception.

Why it's split today

The split was introduced in #619 (April 2024). Per the commit message: Dependabot broke after #442 and started erroring on the project's pyproject.toml, and moving the Ruff config out was the workaround.

Why it may no longer be needed

That workaround dates from when the project was on Poetry. pyproject.toml on main is now PEP 621 metadata with a setuptools backend plus [tool.uv], so the Dependabot parsing path that motivated #619 is not the one in use anymore.

What the change would involve

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

(Nothing appears to reference the file by path: the ruff and ruff-format hooks in .pre-commit-config.yaml pass no --config, nbqa-ruff passes no --config, etc. Ruff's own discovery would pick up [tool.ruff] from pyproject.toml once ruff.toml is removed.)

Happy to open the PR if there's agreement on the direction.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions