Skip to content

Conversation

@dfop02
Copy link
Owner

@dfop02 dfop02 commented Dec 4, 2025

Migrate from Flake8 to Ruff

This PR migrates the project from flake8 to ruff as the linting tool.

Motivation

  • Performance: Ruff is significantly faster than flake8 (10-100x)
  • Modernization: Ruff is a modern tool that combines multiple linting tools
  • Maintenance: Simpler and unified configuration

Changes Made

📦 Dependencies

  • requirements_test.txt: Replaced flake8>=7.3.0 with ruff>=0.1.0

⚙️ Configuration

  • pyproject.toml: Created new ruff configuration file with:

    • line-length = 127 (kept from flake8)
    • exclude: Same files/directories excluded
    • ignore: Equivalent rules (W292, E261, E302, E305)
    • Note: W504 and W601 were removed as they don't exist in ruff
  • setup.cfg: Removed [flake8] section (configuration migrated to pyproject.toml)

🔧 CI/CD

  • .github/workflows/tests.yml: Updated lint step to use ruff
    • Simplified to a single command ruff check . --output-format=concise
    • Maintains the same critical error checking functionality

Compatibility

  • ✅ All flake8 rules were mapped to ruff equivalents
  • ✅ Same files excluded from checking
  • ✅ Same maximum line length of 127 characters
  • ✅ All 66 tests continue to pass

Testing

  • Ruff installed and working correctly
  • Lint commands executing without errors
  • All unit tests passing (66/66)

References

Checklist Before Requesting a Review

  • I have performed a self-review of my code.
  • My code follows the project's coding style and guidelines.
  • I have run tests and verified that all existing and new tests pass.
  • I have added new tests to cover my changes.

@dfop02 dfop02 self-assigned this Dec 4, 2025
@dfop02 dfop02 added documentation Improvements or additions to documentation good first issue Good for newcomers labels Dec 4, 2025
@dfop02 dfop02 merged commit 853b8cd into release/1.1.2 Dec 4, 2025
6 checks passed
@dfop02 dfop02 deleted the feat/change-flake8-to-ruff branch December 4, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants