Skip to content

Conversation

@Dianababaei
Copy link
Owner

Summary

Migrate from flake8 to ruff for faster linting and code formatting. Ruff provides equivalent rule coverage while offering better performance and a unified formatting solution.

Changes

  • Replace flake8 with ruff in .pre-commit-config.yaml (v0.8.4)
  • Add ruff configuration to pyproject.toml with equivalent rules (E, W, F)
  • Migrate per-file ignores from setup.cfg to pyproject.toml
  • Add ruff-format hook for automatic code formatting
  • Add ruff>=0.1.0 to development dependencies
  • Remove flake8 configuration from setup.cfg

Testing

  • Verify pre-commit hooks run without errors
  • Confirm ruff linting and formatting produce expected output
  • Check that per-file ignores are respected (especially src/requests/__init__.py and compat.py files)

Notes

Ruff configuration targets Python 3.9+ and maintains feature parity with previous flake8 setup. The --fix argument enables automatic fixing of violations where possible.

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