Ruff: The Blazing Fast Python Linter and Formatter
Ruff is a modern Python linter and code formatter written in Rust. It's designed to be extremely fast while maintaining compatibility with existing tools.
Key features of Ruff:
- Speed: 10-100x faster than flake8 and black.
- All-in-one: Replaces multiple tools (flake8, black, isort, pydocstyle, pyupgrade).
- Pre-commit hooks: Easy integration with pre-commit.
- VS Code extension: Real-time linting and formatting in your editor.
Installation: pip install ruff
To check your code: ruff check .
To format your code: ruff format .
Many open-source projects, including FastAPI and Pandas, have already adopted Ruff.