Skip to content

chore: use ruff to lint and format files and apply fixes#3779

Merged
aignas merged 9 commits into
mainfrom
aignas.refactor.pre-commit-use-ruff
May 24, 2026
Merged

chore: use ruff to lint and format files and apply fixes#3779
aignas merged 9 commits into
mainfrom
aignas.refactor.pre-commit-use-ruff

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented May 16, 2026

There have been a few attempts at doing these, but the efforts are
stale. Since ruff is very popular these days and it is only a single
binary and is fast, let's use that.

From now on we will be able to maintain the files better, because we
have a CI step testing the compliance.

Closes #3073

Comment thread .github/workflows/ruff.yaml Fixed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces isort and black with ruff for linting and formatting across the repository, leading to extensive automated changes in imports and code style. While the transition modernizes the project's tooling, the automated cleanup removed several imports required for tests to function correctly, specifically in system_python_nodeps_test.py, repl_test.py, and verify_files_test.py. The reviewer also identified a version typo in the pre-commit configuration and recommended lowering the target-version in ruff.toml to maintain support for older Python versions.

Comment thread tests/bootstrap_impls/system_python_nodeps_test.py
Comment thread tests/repl/repl_test.py Outdated
Comment thread tests/whl_with_build_files/verify_files_test.py Outdated
Comment thread .pre-commit-config.yaml Outdated
Comment thread ruff.toml Outdated
@aignas aignas marked this pull request as draft May 16, 2026 06:00
Copy link
Copy Markdown
Collaborator

@dougthor42 dougthor42 left a comment

Choose a reason for hiding this comment

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

Most of the AI comments are actually decent. One wasn't.

+2 when those are addressed.

Comment thread .pre-commit-config.yaml Outdated
@aignas aignas force-pushed the aignas.refactor.pre-commit-use-ruff branch from 3e59864 to e3b9858 Compare May 23, 2026 05:48
Comment thread .github/workflows/ruff.yaml Fixed
@aignas aignas force-pushed the aignas.refactor.pre-commit-use-ruff branch from 3cfb59d to c8b200f Compare May 24, 2026 08:15
@aignas aignas marked this pull request as ready for review May 24, 2026 08:22
@aignas aignas changed the title chore: use ruff to lint and format files chore: use ruff to lint and format files and apply fixes May 24, 2026
@aignas aignas enabled auto-merge May 24, 2026 08:23
@aignas aignas added this pull request to the merge queue May 24, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 24, 2026
@aignas aignas added this pull request to the merge queue May 24, 2026
Merged via the queue into main with commit a9de4d5 May 24, 2026
9 checks passed
@aignas aignas deleted the aignas.refactor.pre-commit-use-ruff branch May 24, 2026 08:49
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.

3 participants