Skip to content

chore: unify linting and formatting with Ruff - #1644

Merged
Yunnglin merged 5 commits into
mainfrom
chore/ruff-toolchain
Aug 27, 2026
Merged

chore: unify linting and formatting with Ruff#1644
Yunnglin merged 5 commits into
mainfrom
chore/ruff-toolchain

Conversation

@Yunnglin

Copy link
Copy Markdown
Collaborator

Summary

  • replace flake8, YAPF, and double-quote-string-fixer with Ruff 0.16.4
  • centralize Python linting and import sorting under Ruff E, F, W, and I rules
  • configure Ruff formatting with 120-character lines, single quotes, spaces, and LF endings
  • preserve the existing lint scope for tests and vendored code through explicit exclusions and per-file ignores
  • apply the Ruff formatting baseline to all maintained Python source files in scope
  • update CI and contributor documentation to match the unified toolchain

B, SIM, and Q are intentionally not enabled in this PR. B and SIM introduce additional policy and semantic refactoring beyond an equivalent migration, while Ruff documents quote lint rules as potentially conflicting with the formatter.

Validation

  • pre-commit validate-config
  • make lint
  • ruff check .
  • ruff format --check .
  • normalized AST comparison across all 518 reformatted Python files
  • /mnt/nas2/anaconda3/envs/eval/bin/python -m pytest tests/cli/test_all.py::TestRun::test_ci_lite -v -s -p no:warnings

Closes #1631

Copilot AI lite review requested due to automatic review settings August 27, 2026 04:26

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Yunnglin
Yunnglin force-pushed the chore/ruff-toolchain branch from d5546f4 to 084e302 Compare August 27, 2026 07:13
@Yunnglin
Yunnglin force-pushed the chore/ruff-toolchain branch from 084e302 to 561fa7f Compare August 27, 2026 08:40
@Yunnglin
Yunnglin merged commit 54813f5 into main Aug 27, 2026
3 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.

Followup to #1629: CICD Improvements

2 participants