Skip to content

chore: adopt ruff for linting, formatting and import sorting #367

Description

@refeed

The project currently uses black (pyproject.toml's [tool.black], black in the Pipfile) and
has no lint or import-sorting step. Ruff covers all three in one
fast tool: ruff check for linting (including isort-style import sorting via the I rules) and
ruff format as a black-compatible formatter.

Tasks

  • Add ruff configuration in pyproject.toml: the default rule set plus I (import sorting), with
    target-version matching the supported Python floor.
  • Run ruff check --fix and ruff format; keep the mechanical changes in their own commit,
    separate from any manual fixes they surface.
  • Replace black with ruff in the Pipfile/dev tooling, and add a CI step under
    .github/workflows/ running ruff check and ruff format --check.
  • Update CONTRIBUTING.md with the new commands.

This also covers import sorting, which was previously tracked as its own issue.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions