feat(tooling): Migrate from black, isort, and pylint to ruff - #746
Merged
Conversation
Replace three separate linting/formatting tools with ruff, a fast all-in-one Python linter and formatter that provides equivalent functionality. Changes: - Replaced black, isort, and pylint with ruff in test_requirements.txt - Created comprehensive ruff configuration in pyproject.toml that matches the exact behavior of the previous tools - Updated GitHub Actions workflow (pylint.yml) to use ruff instead of three separate jobs - Applied ruff formatting and import sorting to normalize codebase Configuration equivalence: - Formatting: Matches black's 88-character line length and formatting rules - Import sorting: Matches isort's black-compatible profile with same known-first-party packages - Linting: Matches pylint's disabled rules and design limits (max-args, max-locals, max-branches, etc.) Testing: - All 31 tests pass - Ruff check passes with no errors - Ruff format produces no changes (codebase is normalized) Benefits: - Single tool instead of three (simpler dependency management) - Faster execution (ruff is written in Rust) - Consistent configuration in one place (pyproject.toml) - Reduced GitHub Actions runtime (one job instead of three) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Test Results31 tests 31 ✅ 8s ⏱️ Results for commit 48765a8. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates the Python linting and formatting toolchain from three separate tools (black, isort, pylint) to a single, fast, all-in-one tool: ruff.
Changes
Dependencies (
test_requirements.txt)Configuration (
pyproject.toml)[tool.black],[tool.isort],[tool.pylint]sections[tool.ruff]configuration with equivalent rules:GitHub Actions (
.github/workflows/pylint.yml)Code Changes
Configuration Equivalence
The ruff configuration was carefully crafted to match the exact behavior of the previous tools:
Formatting (black → ruff format)
Import Sorting (isort → ruff.lint.isort)
Linting (pylint → ruff.lint)
All pylint disabled rules have equivalent ignores in ruff:
Design limits maintained:
Testing
✅ All 31 tests pass
✅ Ruff check passes
✅ Ruff format satisfied
Benefits
pyproject.tomlruff check) instead of threeMigration Impact
pip install -r test_requirements.txtto get ruffCommands
Test Plan
🤖 Generated with Claude Code