Ruff 0.3: one Rust binary replaces black, flake8, isort, pyupgrade

Posted by Kali Maa · 2024-03-01

Ruff now has a formatter. One Rust binary replaces 4 Python tools and runs 100x faster. CI went from 45 seconds of linting to 0.3 seconds. This is the future of Python tooling. https://github.com/astral-sh/ruff

# pyproject.toml — Ruff replaces everything
[tool.ruff]
target-version = "py312"
line-length = 88

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]

[tool.ruff.format]
quote-style = "double"

# Before: black + flake8 + isort + pyupgrade = 4 tools, 45s
# After:  ruff check --fix && ruff format = 1 tool, 0.3s

Explore GitVibes